From f744b8919326550d18491aa9c9d5202850f28320 Mon Sep 17 00:00:00 2001
From: Enzo <1284707383@qq.com>
Date: Wed, 14 Jul 2021 17:29:26 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=8E=A5=E5=8F=A3=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=20=E6=B5=B7=E6=8A=A5=E5=88=86=E4=BA=AB=E4=BA=8C?=
=?UTF-8?q?=E7=BB=B4=E7=A0=81=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=20?=
=?UTF-8?q?=E5=85=85=E5=80=BC=E4=BC=9A=E5=91=98=E6=8E=A5=E5=8F=A3=20?=
=?UTF-8?q?=E6=94=AF=E4=BB=98=E7=BB=93=E6=9E=9C=E9=80=BB=E8=BE=91=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/styles/iconfont.css | 10 ++--
pages/center/bestar.vue | 92 ++++++++++++++++++++++++++++++++---
pages/center/invite.vue | 2 +-
pages/goodsDetail/index.vue | 5 +-
pages/index/index.vue | 2 +-
pages/login/index.vue | 2 +-
pages/order/confirm-order.vue | 7 ++-
pages/order/pay-success.vue | 6 ++-
8 files changed, 106 insertions(+), 20 deletions(-)
diff --git a/common/styles/iconfont.css b/common/styles/iconfont.css
index 6029bcb..8e73fd7 100644
--- a/common/styles/iconfont.css
+++ b/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";
}
diff --git a/pages/center/bestar.vue b/pages/center/bestar.vue
index 82d8a48..3bb06b3 100644
--- a/pages/center/bestar.vue
+++ b/pages/center/bestar.vue
@@ -2,13 +2,14 @@
-
+
- 时空网的内部网友
- 会员未开通
+ {{info.nickname}}
+ 会员未开通
+ 会员已开通
-
+
@@ -29,13 +30,15 @@
-
+
- 微信支付
+ 微信支付
-
+
+
+
@@ -49,7 +52,7 @@
已阅读并同意
- 《会员服务协议》
+ 《{{agreement.title}}》
@@ -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()
}
}
diff --git a/pages/center/invite.vue b/pages/center/invite.vue
index 67c0fa8..986951e 100644
--- a/pages/center/invite.vue
+++ b/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()
}
},
diff --git a/pages/goodsDetail/index.vue b/pages/goodsDetail/index.vue
index df21600..11d2a61 100644
--- a/pages/goodsDetail/index.vue
+++ b/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()
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e0a9cac..b455c28 100644
--- a/pages/index/index.vue
+++ b/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)
})
diff --git a/pages/login/index.vue b/pages/login/index.vue
index e6ddb9b..dcbe894 100644
--- a/pages/login/index.vue
+++ b/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;
})
},
diff --git a/pages/order/confirm-order.vue b/pages/order/confirm-order.vue
index 573b209..2e5879c 100644
--- a/pages/order/confirm-order.vue
+++ b/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({
diff --git a/pages/order/pay-success.vue b/pages/order/pay-success.vue
index 9b03857..50ef8db 100644
--- a/pages/order/pay-success.vue
+++ b/pages/order/pay-success.vue
@@ -19,7 +19,7 @@
-
+
@@ -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
}
}