更新代码

This commit is contained in:
guaishoudemao
2021-02-06 17:25:18 +08:00
parent 33549e5489
commit 247655dbdb
40 changed files with 2294 additions and 2338 deletions

View File

@@ -66,7 +66,7 @@
//领取优惠券
let ids = [];
ids.push(id);
setCouponReceive(ids).then(res=>{
setCouponReceive(id).then(res=>{
that.$emit('ChangCouponsUseState', index);
that.$util.Tips({title: "领取成功"});
that.$emit('ChangCoupons', list[index]);

View File

@@ -62,6 +62,7 @@
},
goPay: function(number, paytype) {
let that = this;
let goPages = '/pages/order_pay_status/index?order_id=' + that.order_id;
if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单'
});
@@ -73,7 +74,12 @@
});
wechatOrderPay({
orderNo: that.order_id,
payChannel: this.$wechat.isWeixin() ? 'public' : 'weixinh5',
// #ifdef MP
payChannel: 'routine',
// #endif
// #ifdef H5 || APP-PLUS
payChannel: that.$wechat.isWeixin() ? 'public' : 'weixinh5',
// #endif
payType: paytype
}).then(res => {
let jsConfig = res.data.jsConfig;
@@ -167,9 +173,9 @@
break;
case 'weixinh5':
uni.hideLoading();
location.replace(jsConfig.mwebUrl);
location.replace(jsConfig.mwebUrl + '&redirect_url=' + window.location.protocol + '//' + window.location.host + goPages + '&status=1');
return that.$util.Tips({
title: "支付成功",
title: "支付",
icon: 'success'
}, () => {
that.$emit('onChangeFun', {
@@ -178,119 +184,6 @@
});
break;
}
// switch (paytype) {
// case 'weixin':
// if (res.data.result === undefined) return that.$util.Tips({
// title: '缺少支付参数'
// });
// // #ifdef MP || APP-PLUS
// let jsConfig = res.data.jsConfig;
// uni.requestPayment({
// timeStamp: jsConfig.timeStamp.toString(),
// nonceStr: jsConfig.nonceStr,
// package: jsConfig.package,
// signType: jsConfig.signType,
// paySign: jsConfig.paySign,
// success: function(res) {
// uni.hideLoading();
// return that.$util.Tips({
// title: '支付成功',
// icon: 'success'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_complete'
// });
// });
// },
// fail: function(e) {
// uni.hideLoading();
// return that.$util.Tips({
// title: '取消支付'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_fail'
// });
// });
// },
// complete: function(e) {
// uni.hideLoading();
// if (e.errMsg == 'requestPayment:cancel') return that.$util.Tips({
// title: '取消支付'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_fail'
// });
// });
// },
// });
// // #endif
// // #ifdef H5
// if (res.data.status === "WECHAT_PAY") {
// let jsConfig = res.data.jsConfig;
// //let packages = 'prepay_id=' + jsConfig.prepayId;
// let datas = {
// timestamp:jsConfig.timeStamp,
// nonceStr:jsConfig.nonceStr,
// package:jsConfig.package,
// signType:jsConfig.signType,
// paySign:jsConfig.paySign
// };
// that.$wechat.pay(datas)
// .then(() => {
// return that.$util.Tips({
// title: "支付成功",
// icon: 'success'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_complete'
// });
// });
// })
// .catch(function() {
// return that.$util.Tips({
// title: '支付失败'
// });
// });
// } else {
// uni.hideLoading();
// location.replace(res.data.jsConfig.h5PayUrl);
// return that.$util.Tips({
// title: "支付成功",
// icon: 'success'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_complete'
// });
// });
// }
// // #endif
// break;
// case 'yue':
// uni.hideLoading();
// return that.$util.Tips({
// title: '余额支付成功',
// icon: 'success'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_complete'
// });
// });
// break;
// case 'offline':
// uni.hideLoading();
// return that.$util.Tips({
// title: '线下支付成功',
// icon: 'success'
// }, () => {
// that.$emit('onChangeFun', {
// action: 'pay_complete'
// });
// });
// break;
// }
}).catch(err => {
uni.hideLoading();
return that.$util.Tips({

View File

@@ -77,6 +77,9 @@
.recommend .recommendList {
padding: 0 30rpx;
/* #ifdef H5 */
padding-bottom: 50rpx;
/* #endif */
}
.recommend .recommendList .item {

View File

@@ -9,7 +9,7 @@
</scroll-view>
</view>
<view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
<scroll-view scroll-x="true">
<view class="wrapper">
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
<image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
@@ -18,6 +18,17 @@
</view>
</scroll-view>
</view>
<!-- <image :src="item.extra" mode="" :style="{'background-color':(item.extra&&item.extra.indexOf('https://') > -1) || (item.extra&&item.extra.indexOf('http://') > -1)?'none':'#f7f7f7'}"></image> -->
<!-- <view class="child-box" v-if="tabClick>0 && tabTitle[tabClick].child?tabTitle[tabClick].child.length>0:0">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
<view class="wrapper">
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
<image :src="item.extra" mode="" :style="{'background-color':item.extra?'none':'#f7f7f7'}"></image>
<view class="txt line1">{{item.name}}</view>
</view>
</view>
</scroll-view>
</view> -->
</view>
</template>