From 58ec38837a6c531da05b10b89013ba6db1c3ffd0 Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Wed, 27 Oct 2021 17:31:29 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=B8=8B=E5=8D=95=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=A4=84=E7=90=86=E5=8F=8A=E9=A6=96=E9=A1=B5=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E4=BC=98=E6=83=A0=E5=88=B8=E5=92=8C=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/equity/index.vue | 20 ++-- pages/goods/confirmOrder.vue | 113 +++++++------------- pages/vip/vip.vue | 195 ++++++++++++++++++++--------------- 3 files changed, 159 insertions(+), 169 deletions(-) diff --git a/pages/equity/index.vue b/pages/equity/index.vue index 1131c16..2e48109 100644 --- a/pages/equity/index.vue +++ b/pages/equity/index.vue @@ -106,11 +106,12 @@ - + {{item.name}} - + 查看全部 @@ -137,13 +138,13 @@ - + + @@ -169,6 +170,11 @@ @click="onCoupons('get', item.coupon_id, index)">{{item.can.get ? '立即领取' : '已领取'}} + + + 优选商品海量商家商品优选 + + @@ -258,7 +264,7 @@ // } // }) uni.navigateTo({ - url:'/pages/equity/search?type='+this.tabIndex +'' + url: '/pages/equity/search?type=' + this.tabIndex + '' }) break } @@ -374,7 +380,7 @@ // name: 'goodsList' // }) uni.navigateTo({ - url:`/pages/goods/lists?type=id&id=${id}` + url: `/pages/goods/lists?type=id&id=${id}` }) }, // 打开微信小程序 diff --git a/pages/goods/confirmOrder.vue b/pages/goods/confirmOrder.vue index 222e774..054aead 100644 --- a/pages/goods/confirmOrder.vue +++ b/pages/goods/confirmOrder.vue @@ -48,7 +48,7 @@ - {{ item.title }} @@ -43,15 +52,18 @@ - {{ item.title }} + {{ item.title }} + - {{ item.title }} + {{ item.title }} + - {{ item.title }} + {{ item.title }} + @@ -74,16 +86,19 @@ {{ openCondition.energy_shard.message }} - + - + {{ openCondition.price.message }} {{ openCondition.service_charge.message }} {{ openCondition.certification.message }} + :class="{ active: openCondition.certification.finish }"> + {{ openCondition.certification.message }} @@ -108,11 +123,14 @@ - - - {{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}} - - + + + + {{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}} + + @@ -152,7 +170,7 @@ path: '' }, openCondition: {}, - voucher:'', //弹窗展示得内容 + voucher: '', //弹窗展示得内容 } }, created() { @@ -162,7 +180,7 @@ }, methods: { // 当前用户信息 - idenInfo(type) { + idenInfo(type) { identities().then(res => { res.identities.map(item => { item.obj_condition = new Object() @@ -173,15 +191,16 @@ }; } return item; - + }); this.identitie = res.identities if (type === 'cre') { - let Index = res.identities.findIndex(val => val.identity_id == this.$Route.query.identity_id) - if(Index+1 === res.identities.length){ + let Index = res.identities.findIndex(val => val.identity_id == this.$Route.query + .identity_id) + if (Index + 1 === res.identities.length) { this.tabsIndex = Index - }else{ - this.tabsIndex = Index+1 + } else { + this.tabsIndex = Index + 1 } } this.openCondition = res.identities[this.tabsIndex].obj_condition @@ -190,13 +209,14 @@ this.canBtn = res.identities[this.tabsIndex].can this.currentInfo = res.user this.loding = false - this.voucher = this.identitie[this.tabsIndex].voucher?this.identitie[this.tabsIndex].voucher:'' - if(this.voucher){ + this.voucher = this.identitie[this.tabsIndex].voucher ? this.identitie[this.tabsIndex] + .voucher : '' + if (this.voucher) { this.canFromImg = this.identitie[this.tabsIndex].voucher.cover - }else{ + } else { this.canFromImg = { - path:'', - showpath:'' + path: '', + showpath: '' } } }).catch(err => { @@ -209,7 +229,7 @@ // 切换开通身份 swiperChange(e) { - this.tabsIndex = e.detail.current + this.tabsIndex = e.detail.current this.idenInfo() }, @@ -223,67 +243,69 @@ icon: 'none' }); return; - } - if (can.on_line) { - this.wxPayAppConfig() + } + if (can.on_line) { + this.wxPayAppConfig() } else { this.canClick() } }, // 支付创建订单APP - wxPayAppConfig(){ - let identity = this.identitie[this.tabsIndex].identity_id - vipOrder(identity,{ - year:1, - }).then(res=>{ + wxPayAppConfig() { + let identity = this.identitie[this.tabsIndex].identity_id + vipOrder(identity, { + year: 1, + }).then(res => { this.wechatAppPay(res.id) - }).catch(err=>{ + }).catch(err => { uni.showToast({ - title:err.message, - icon:"none" + title: err.message, + icon: "none" }) }) }, // 微信支付 APP - wechatAppPay(orderId){ - vipWechatPay(orderId,{ - type: 'app' - }).then(res=>{ - let payConfig = JSON.parse(res) - console.log(payConfig,'console.log(res)') - uni.requestPayment({ - provider: 'wxpay', - orderInfo: {...payConfig}, - success: payRes => { - uni.showModal({ - title : "开通提示", - content : "支付成功,已成功开通/升级节点身份", - showCancel : false, - success : ()=> { - this.idenInfo() - } - }) - }, + wechatAppPay(orderId) { + vipWechatPay(orderId, { + type: 'app' + }).then(res => { + let payConfig = JSON.parse(res) + console.log(payConfig, 'console.log(res)') + uni.requestPayment({ + provider: 'wxpay', + orderInfo: { + ...payConfig + }, + success: payRes => { + uni.showModal({ + title: "开通提示", + content: "支付成功,已成功开通/升级节点身份", + showCancel: false, + success: () => { + this.idenInfo() + } + }) + }, fail: payErr => { - console.log(payErr,'console.log(payErr)') - uni.showToast({ - title: '支付失败,原因:' + payErr.errMsg, - icon : 'none' - }) - } - }) - }).catch(err=>{ + console.log(payErr, 'console.log(payErr)') + uni.showToast({ + title: '支付失败', + icon: 'none' + }) + } + }) + }).catch(err => { uni.showToast({ - title:err.message, - icon:"none" + title: err.message, + icon: "none" }) }) }, // 勾选协议 agreeChange() { this.selected = !this.selected; - }, - + }, + // 会员权益介绍 showRemark(title, val) { uni.showModal({ @@ -315,10 +337,10 @@ }) }, // 预览图片 - preImg(){ + preImg() { uni.previewImage({ - current:this.voucher.cover.showpath, - urls:[this.voucher.cover.showpath] + current: this.voucher.cover.showpath, + urls: [this.voucher.cover.showpath] }) }, @@ -347,9 +369,9 @@ }) }, // 编辑凭证 - canSubmitEdit(id){ + canSubmitEdit(id) { let newCover = this.canFromImg.path - vipVoucherUpdate(id,{ + vipVoucherUpdate(id, { cover: newCover }).then(res => { this.$Router.push({ @@ -415,11 +437,12 @@ height: 240rpx; border: 2rpx solid #f3f3f3; } - .canPop-remark{ + + .canPop-remark { margin-bottom: 20rpx; } - - .canPop-status{ + + .canPop-status { margin-bottom: 10rpx; } @@ -632,7 +655,8 @@ .footer-btn { width: 74%; } - .current-btn{ + + .current-btn { width: 74%; height: 80rpx; background-image: linear-gradient(to right, #7c52fc, #976dff); @@ -642,7 +666,8 @@ line-height: 80rpx; font-size: 36rpx; } - .current-btn-sh{ + + .current-btn-sh { background-color: #cacaca; width: 74%; height: 80rpx;