Browse Source

支付接口修改 海报分享二维码接口修改 充值会员接口 支付结果逻辑修改

twodate
Enzo 5 years ago
parent
commit
f744b89193
  1. 10
      common/styles/iconfont.css
  2. 92
      pages/center/bestar.vue
  3. 2
      pages/center/invite.vue
  4. 5
      pages/goodsDetail/index.vue
  5. 2
      pages/index/index.vue
  6. 2
      pages/login/index.vue
  7. 7
      pages/order/confirm-order.vue
  8. 6
      pages/order/pay-success.vue

10
common/styles/iconfont.css

@ -1,8 +1,8 @@
@font-face {
font-family: "lf-iconfont"; /* Project id 2631569 */
src: url('//at.alicdn.com/t/font_2631569_eny3iiapmkl.woff2?t=1625043087841') format('woff2'),
url('//at.alicdn.com/t/font_2631569_eny3iiapmkl.woff?t=1625043087841') format('woff'),
url('//at.alicdn.com/t/font_2631569_eny3iiapmkl.ttf?t=1625043087841') format('truetype');
src: url('//at.alicdn.com/t/font_2631569_seikzobrfas.woff2?t=1626243885395') format('woff2'),
url('//at.alicdn.com/t/font_2631569_seikzobrfas.woff?t=1626243885395') format('woff'),
url('//at.alicdn.com/t/font_2631569_seikzobrfas.ttf?t=1626243885395') format('truetype');
}
.lf-iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.lf-icon-weixinzhifu:before {
content: "\e689";
}
.lf-icon-shuaxin1:before {
content: "\e6d2";
}

92
pages/center/bestar.vue

@ -2,13 +2,14 @@
<view>
<view class="flex lf-p-30">
<view>
<image src="../../static/center/shop-logo.png" style="height: 120rpx;width: 120rpx;" mode="aspectFill"></image>
<image :src="info.avatar" style="height: 120rpx;width: 120rpx;border-radius: 50%;" mode="aspectFill"></image>
</view>
<view class="flex flex-direction lf-p-l-20 justify-center">
<view class="lf-font-32 lf-m-b-10 text-black1 lf-line-2">时空网的内部网友</view>
<view class="lf-font-28 lf-color-gray">会员未开通</view>
<view class="lf-font-32 lf-m-b-10 text-black1 lf-line-2">{{info.nickname}}</view>
<view class="lf-font-28 lf-color-gray" v-if="!info.isTalnet">会员未开通</view>
<view class="lf-font-28 lf-color-gray" v-else>会员已开通</view>
</view>
</view>
</view>
<self-line/>
<view>
<view class="lf-p-t-30 lf-p-l-32 lf-flex-wrap">
@ -29,13 +30,15 @@
<view class="flex justify-between align-center text-center lf-p-l-32 lf-p-r-32 lf-p-t-30 lf-p-b-30 solid-bottom">
<view class="flex justify-around align-center text-center">
<view class="lf-row-center">
<image src="../../static/center/loginout.png" mode="widthFix" style="width: 44rpx;height: 38rpx;"></image>
<text class="lf-iconfont lf-icon-weixinzhifu lf-font-48" style="color: #09BB07;"></text>
</view>
<view class="lf-font-38 lf-m-l-20 lf-w-100 text-black1">微信支付</view>
<view class="lf-font-36 lf-m-l-20 lf-w-100 text-black1">微信支付</view>
</view>
<view>
<view>
<image src="../../static/images/system/paysuccess.png" mode="widthFix" style="width: 40rpx;height: 40rpx;"></image>
<checkbox-group @change="checkboxChangepay" style="display: inline-block;">
<checkbox class="lf-text-vertical" style="" :checked="checkedpay"></checkbox>
</checkbox-group>
</view>
</view>
</view>
@ -49,7 +52,7 @@
</checkbox-group>
<view class="lf-m-l-10 lf-font-24 lf-color-gray" style="display: inline-block;">
<text>已阅读并同意</text>
<text @click="enterAgree" class="text-orange">会员服务协议</text>
<text @click="enterAgree" class="text-orange">{{agreement.title}}</text>
</view>
</view>
<view class="padding-lr-lg">
@ -66,6 +69,10 @@
data() {
return {
checked: false, //
info: {},
ifPay: true,
checkedpay: true,
agreement: ''
}
},
methods: {
@ -73,10 +80,79 @@
checkboxChange(event){
this.checked = event.detail.value.length > 0;
},
//
checkboxChangepay(event){
this.checkedpay = event.detail.value.length > 0;
},
getAgree(){
this.$http(this.API.API_WXLOGIN_VIEW,{type: 'vip'}).then(res => {
this.agreement = res.data.agreement;
})
},
//
enterAgree(){
this.$url('/pages/agreement/agreement?id='+ this.agreement.article_id);
},
getData(){
this.$http(this.API.API_USER_CENTER).then(res => {
this.info = res.data;
})
},
subimitApply() {
if(!this.checkedpay) {
this.$msg('请选择付款方式!')
return
}
if(!this.checked) {
this.$msg('请认真阅读并同意协议!')
return
}
if(!this.ifPay) return;
this.ifPay = false;
this.$http(this.API.API_PRPAID, {
goods_id: 0,
goods_specs_id: 0,
number: 1,
payment_desc: 3,
share_one: this.info.id
}).then(res => {
this.order_id = res.data.order_id
uni.requestPayment({
orderInfo: res.data.order_num,
timeStamp: res.data.timeStamp,
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success: (res) => {
this.ifPay = true
this.$url('/pages/order/pay-success?ifSuccess=1&type=3&order_id='+this.order_id,{type: 'redirect'})
},
fail: (err) => {
this.ifPay = true
this.$url('/pages/order/pay-success?ifSuccess=2&type=3&order_id='+this.order_id,{type: 'redirect'})
},
})
}).catch(err => {
this.ifPay = true
if(err.code == 9997) {
uni.showModal({
title: '提示',
content: '是否同意前往手机授权?',
success: e => {
if (!e.confirm) return;
this.$routerGo('/pages/login/index?type=phone')
}
});
}
});
}
},
onLoad() {
this.getData()
this.getAgree()
}
}
</script>

2
pages/center/invite.vue

@ -85,7 +85,7 @@
success: res => {
this.onceCode = wx.env.USER_DATA_PATH + '/pic' + number + '.jpg'
if(this.onceCode) {
console.log(this.onceCode)
console.log('小程序二维码',this.onceCode)
this.createNewImg()
}
},

5
pages/goodsDetail/index.vue

@ -185,10 +185,11 @@
})
},
getWxCode() {
let userInfo = uni.getStorageSync('userinfo') || {};
uni.request({
url: 'http://dev-gxsky.com/api/salesman/qrcode', //
data: {
scene: 'route=goods&id=2&pt=2',
scene: 'route=goods&pt=2&id='+this.goods_id+'&share_id='+userInfo.id,
page: 'pages/route/index',
width: '2800'
},
@ -299,7 +300,7 @@
this.goods_detail = res.data;
if(this.goods_detail) {
if(this.pt == 1) {
if(this.pt == 2) {
this.bindGoods()
}
}

2
pages/index/index.vue

@ -94,7 +94,7 @@
sid: userInfo.id,
t: gettime
}).then(res => {
console.log(res)
_this.$msg('提交审核成功');
}).catch(err => {
console.log(err)
})

2
pages/login/index.vue

@ -59,7 +59,7 @@
methods: {
//
getAgree(){
this.$http(this.API.API_WXLOGIN_VIEW).then(res => {
this.$http(this.API.API_WXLOGIN_VIEW,{type: 'login'}).then(res => {
this.agreement = res.data?.agreement;
})
},

7
pages/order/confirm-order.vue

@ -101,7 +101,8 @@
ifDo: 1,
ifPay: true,
limit: 1,
pt: 1
pt: 1,
share_id: 1
}
},
computed: {
@ -128,6 +129,7 @@
this.pt = e.pt || 1;
this.order_id = e.order_id;
this.goods_specs_id = e.goods_specs_id
this.share_id = e.share_id
if(this.goods_id && this.goods_specs_id) {
this.getConfirmOrder()
}
@ -193,7 +195,8 @@
goods_id: this.goods_id,
goods_specs_id: this.goods_specs_id,
number: this.num,
payment_desc: this.pt
payment_desc: this.pt,
share_one: this.share_id
}).then(res => {
this.order_id = res.data.order_id
uni.requestPayment({

6
pages/order/pay-success.vue

@ -19,7 +19,7 @@
</view>
</view>
<view class="margin-top flex flex-direction justify-around">
<view class="padding-top padding-lr-lg">
<view class="padding-top padding-lr-lg" v-if="type!=3">
<button class="cu-btn block bg-orange lg margin-top round" @tap="$url('/pages/order/order-details?order_id='+order_id,{type: 'launch'})">
<text class="lf-font-32 text-white">查看订单</text>
</button>
@ -38,12 +38,14 @@
data() {
return {
ifpaySuccess:-1,
order_id: 1
order_id: 1,
type: -1
}
},
onLoad(e) {
this.ifpaySuccess = e.ifSuccess
this.order_id = e.order_id
this.type = e.type
}
}
</script>

Loading…
Cancel
Save