tianyi 2 weeks ago
parent
commit
0e39e1b155
  1. 39
      pages/index/index.vue

39
pages/index/index.vue

@ -162,7 +162,7 @@
<view class="daimai-box" style="padding-bottom:180rpx;">
<view class="daimai-tab" id="menuList" :style="{'top': (navBarHeight+46) + 'px','background':lastScrollTop>583?'#fff':''}">
<view @tap="checkTab1('waimai')" style="flex: 1;">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:10rpx;" v-if="checked == 'waimai'">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'waimai'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4d3207adb25546f68ce4d3428e571867.png" alt="" style="width: 160rpx;height: 50rpx;" />
<text style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{waimaiCount}}</text>
</view>
@ -171,7 +171,7 @@
</view>
</view>
<view @tap="checkTab1('kuaidi')" style="margin-left: 20rpx;flex: 1;">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:10rpx;" v-if="checked == 'kuaidi'">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'kuaidi'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/aeff6530c1c4486e9c7d088522de0c98.png" alt="" style="width: 160rpx;height: 50rpx;">
<text style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{kuaidiCount}}</text>
</view>
@ -180,7 +180,7 @@
</view>
</view>
<view @tap="checkTab1('paotui')" style="margin-left: 20rpx;flex: 1;">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:10rpx;" v-if="checked == 'paotui'">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'paotui'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/e2cccb5ad1534b2aaae9b2b67ed401b4.png" alt="" style="width: 160rpx;height: 50rpx;">
<text style="position: absolute;top: 0;left: 60rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{paotuiCount}}</text>
</view>
@ -189,7 +189,7 @@
</view>
</view>
<view @tap="checkTab1('zhipai')" style="margin-left: 20rpx;flex: 1;" v-if="worker != null">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:10rpx;" v-if="checked == 'zhipai'">
<view class="like-title" style="position: relative;width: 160rpx;height: 50rpx;margin-top:8rpx;" v-if="checked == 'zhipai'">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/2bfc2333818b47478572e4d1a430049a.png" alt="" style="width: 160rpx;height: 50rpx;">
<text style="position: absolute;top: 0;left: 80rpx;font-size: 30rpx;font-weight: 700;height: 50rpx;line-height: 40rpx;">{{zhipaiCount}}</text>
</view>
@ -658,7 +658,6 @@
that.deliveryItem = res.result.records;
if(res.result.orderCount != null){
for(let i =0;i<res.result.orderCount.length;i++){
console.log(res.result.orderCount[i])
if(res.result.orderCount[i].deliveryType == 1){
that.waimaiCount = res.result.orderCount[i].orderCount
}else if(res.result.orderCount[i].deliveryType == 2){
@ -751,7 +750,6 @@
},
getShopArea(){
let that = this
console.log(that.searchForm.regionId)
that.tui.request("/app/shopArea/getByParentId/"+ that.searchForm.regionId, "GET", {}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
@ -885,35 +883,6 @@
clearInterval(this.deliveryTimer);
}
},
//
wxPayment() {
let that = this;
this.tui.request("/api/wechat/pay/unified-order", "POST", {
openid: uni.getStorageSync('miniProgramOpenid'),
amount: 1, //
description: '拼团订单',
outTradeNo: 'ORDER_' + Date.now()
}, false, false).then((res) => {
if (res.code == 200) {
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res2) {
console.log('success:' + JSON.stringify(res2));
},
fail: function(err) {
console.log('fail:' + JSON.stringify(err));
}
});
} else {
this.tui.toast(res.message)
}
})
},
checkAdd() {
this.isgetArea = !this.isgetArea
},

Loading…
Cancel
Save