Commit 0e604500 by 赵雅纹

bug修复

parent e41311c0
...@@ -161,7 +161,7 @@ wxService.page({ ...@@ -161,7 +161,7 @@ wxService.page({
cartList: cartList cartList: cartList
}, function () { }, function () {
this.setTotalFee() this.setTotalFee()
this.editOk(cartList[e.index]) //调用完成 this.inputProNumber(cartList[e.index]) //调用完成
}) })
}, },
...@@ -183,7 +183,7 @@ wxService.page({ ...@@ -183,7 +183,7 @@ wxService.page({
cartList: cartList cartList: cartList
}, function () { }, function () {
this.setTotalFee() this.setTotalFee()
this.editOk(cartList[e.index]) //调用完成 this.inputProNumber(cartList[e.index]) //调用完成
}) })
} }
}, },
...@@ -321,6 +321,26 @@ wxService.page({ ...@@ -321,6 +321,26 @@ wxService.page({
} }
}) })
}, },
// 输入商品数量
inputProNumber(cartPro){
wx.showLoading({
title: '加载中'
})
wxService.post(`/sale/trolley/update?count=${cartPro.count}&skuId=${cartPro.skuId}`).then(res => {
if (res) {
const { result } = res.data
if (result == 0) {
wx.hideLoading()
} else {
wx.showToast({
title: res.data.message,
icon: 'none'
})
}
}
})
},
checkProChange(e) { checkProChange(e) {
this.checkPro(e.detail) this.checkPro(e.detail)
}, },
......
...@@ -31,6 +31,7 @@ wxService.page({ ...@@ -31,6 +31,7 @@ wxService.page({
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.hideShareMenu() wx.hideShareMenu()
console.log('-----------',options)
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -42,6 +43,9 @@ wxService.page({ ...@@ -42,6 +43,9 @@ wxService.page({
// couponId: couponId, // couponId: couponId,
// trolleySku2Buy: JSON.parse(trolleySku2Buy) // trolleySku2Buy: JSON.parse(trolleySku2Buy)
// } // }
let pages = getCurrentPages();
let currPage = pages[pages.length - 1];
console.log('-----------', pages)
const { trolleySku2Buy } = this.options const { trolleySku2Buy } = this.options
......
...@@ -81,13 +81,13 @@ ...@@ -81,13 +81,13 @@
</view> </view>
</view> </view>
<view class="share-wrap"> <view class="share-wrap">
<view class="share-button" bindtap="onTapShare"> <view class="share-button" bindtap="onTapPoster">
<image mode="widthFix" /> <image mode="widthFix" />
<text>快速分享</text> <text>快速分享</text>
</view> </view>
<view class="share-button" bindtap="onTapPoster"> <view class="share-button" bindtap="onTapPoster">
<image mode="widthFix" /> <image mode="widthFix" />
<text>生成卡片</text> <text>生成海报</text>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -96,12 +96,12 @@ ...@@ -96,12 +96,12 @@
<scroll-view scroll-y wx:if="{{currentTab==1}}"> <scroll-view scroll-y wx:if="{{currentTab==1}}">
<view class="release-num weui-flex df-j--bt"> <view class="release-num weui-flex df-j--bt">
<view class="num-invite df-1 border_box"> <view class="num-invite df-1 border_box">
<view class="share-number">{{myShareCount.totalCount}}</view> <view class="share-number">{{myShareCount.totalCount || 0}}</view>
<view class="share-title">当前分享订单</view> <view class="share-title">当前分享订单</view>
</view> </view>
<view class="extension-line" /> <view class="extension-line" />
<view class="num-invite-yesterday df-1 border_box"> <view class="num-invite-yesterday df-1 border_box">
<view class="share-number">{{myShareCount.yesterdayCount}}</view> <view class="share-number">{{myShareCount.yesterdayCount || 0}}</view>
<view class="share-title">昨日新增分享订单</view> <view class="share-title">昨日新增分享订单</view>
</view> </view>
</view> </view>
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<text class="pro-img-dot">{{extendItem.content}}</text> <text class="pro-img-dot">{{extendItem.content}}</text>
</view> </view>
<view class="pro-number"> <view class="pro-number">
<text class="total-pro">促成订单 <text class="help-order">5</text>笔 <text class="total-pro">促成订单 <text class="help-order">5</text>
</text> </text>
</view> </view>
</navigator> </navigator>
......
...@@ -273,7 +273,7 @@ swiper { ...@@ -273,7 +273,7 @@ swiper {
} }
.coupon-title{ .coupon-title{
width:300rpx; width:270rpx;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
......
...@@ -29,6 +29,12 @@ wxService.page({ ...@@ -29,6 +29,12 @@ wxService.page({
const item = this.data.addressList[index] const item = this.data.addressList[index]
wx.setStorageSync('_defalutAddress', item) wx.setStorageSync('_defalutAddress', item)
let pages = getCurrentPages();
let beforePage = pages[pages.length - 2];
beforePage.setData({
wxAddress: false
})
console.log('beforePage+++++++', beforePage)
setTimeout(() => { setTimeout(() => {
wxService.router().back() wxService.router().back()
}, 300) }, 300)
...@@ -74,6 +80,13 @@ wxService.page({ ...@@ -74,6 +80,13 @@ wxService.page({
}) })
}, },
// 编辑地址
editAddress(e){
if (e.currentTarget.dataset.id){
wxService.router(`/pages/addAddress/addAddress?id=${e.currentTarget.dataset.id}`)
}
},
//设置默认地址 //设置默认地址
settingDefalutAddress(e){ settingDefalutAddress(e){
console.log(e) console.log(e)
......
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
</view> </view>
<text class="setting-default">设为默认地址</text> <text class="setting-default">设为默认地址</text>
</view> </view>
<navigator url="/pages/addAddress/addAddress?id={{item.id}}"> <!-- <navigator url="/pages/addAddress/addAddress?id={{item.id}}"> -->
<image class="edit-img" mode="widthFix" src="/assets/imgs/7_1_0/edit.png" /> <image catchtap="editAddress" data-id="{{item.id}}" class="edit-img" mode="widthFix" src="/assets/imgs/7_1_0/edit.png" />
</navigator> <!-- </navigator> -->
<view class="delete" bindtap="deleteAddress" data-id="{{item.id}}">删除</view> <view class="delete" catchtap="deleteAddress" data-id="{{item.id}}">删除</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -169,6 +169,7 @@ class WXService extends Http { ...@@ -169,6 +169,7 @@ class WXService extends Http {
let dataResp = response.data.data let dataResp = response.data.data
wx.setStorageSync('token', dataResp.token) wx.setStorageSync('token', dataResp.token)
wx.setStorageSync('_baseUserInfo', dataResp) wx.setStorageSync('_baseUserInfo', dataResp)
return Promise.resolve({ return Promise.resolve({
response response
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment