diff --git a/apis/index.js b/apis/index.js
index 0e2e535..79c1f8c 100644
--- a/apis/index.js
+++ b/apis/index.js
@@ -10,7 +10,7 @@ import router from '../router'
// 基础配置
const config = {
- apiUrl : 'http://api.gl.shangkelian.cn/api/', // 正式环境
+ apiUrl : 'https://api.gongli.vip/api/', // 正式环境
// apiUrl : 'http://api.zh.shangkelian.cn/api/', // 大健康调试环境,目前没有任何数据无法正常显示,所以需要使用该环境,最后会删除
timeout : 60000
}
diff --git a/apis/interfaces/account.js b/apis/interfaces/account.js
index 22f530a..939dd0e 100644
--- a/apis/interfaces/account.js
+++ b/apis/interfaces/account.js
@@ -19,6 +19,7 @@ const dt = (data) =>{
// 充值
const recharge = (data) => {
+ console.log(data)
return request({
url: "user/transaction/recharge",
method: "POST",
@@ -89,6 +90,13 @@ const integral = () => {
})
}
+// 快捷支付配置
+const paymentpre = () => {
+ return request({
+ url: 'user/transaction/recharge/paymentpre'
+ })
+}
+
export {
dt,
recharge,
@@ -99,5 +107,6 @@ export {
setpassword,
getSms,
submitTransfer,
- integral
+ integral,
+ paymentpre
}
diff --git a/apis/interfaces/user.js b/apis/interfaces/user.js
index 802ba34..ceef1e4 100644
--- a/apis/interfaces/user.js
+++ b/apis/interfaces/user.js
@@ -15,9 +15,10 @@ const info = () =>{
}
// 导出助记词
-const chainSeed = () => {
+const chainSeed = (data) => {
return request({
- url: 'chain/safe/seed'
+ url: 'chain/safe/seed',
+ data
})
}
diff --git a/pages.json b/pages.json
index 68525b3..3cf12d4 100644
--- a/pages.json
+++ b/pages.json
@@ -244,7 +244,7 @@
"path": "pages/account/integral",
"name": "AccountIntegral",
"style": {
- "navigationBarTitleText": "共力值",
+ "navigationBarTitleText": "共力分",
"navigationBarBackgroundColor": "#34CE98",
"navigationBarTextStyle": "white"
}
@@ -259,7 +259,7 @@
"app-plus": {
"titleNView": {
"buttons": [{
- "text": "充值",
+ "text": "收款",
"width": "60",
"fontSize": "14"
}]
diff --git a/pages/account/dt.vue b/pages/account/dt.vue
index 3293ae1..4b3d30c 100644
--- a/pages/account/dt.vue
+++ b/pages/account/dt.vue
@@ -5,7 +5,7 @@
DT积分余额
{{score}}
-
+
@@ -79,7 +79,7 @@
},
onNavigationBarButtonTap() {
this.$Router.push({
- name: 'AccountRecharge'
+ name: 'AccountCode'
})
}
}
diff --git a/pages/account/integral.vue b/pages/account/integral.vue
index fa9d3ae..da380b7 100644
--- a/pages/account/integral.vue
+++ b/pages/account/integral.vue
@@ -1,7 +1,7 @@
账户记录
diff --git a/pages/account/recharge.vue b/pages/account/recharge.vue
index 6dbbb48..881d54d 100644
--- a/pages/account/recharge.vue
+++ b/pages/account/recharge.vue
@@ -9,35 +9,17 @@
-
+
快速充值
-
- 100元
- 100DT积分
-
-
- 200元
- 200DT积分
-
-
- 500元
- 500DT积分
-
-
- 1000元
- 1000DT积分
-
-
- 3000元
- 3000DT积分
-
-
- 5000元
- 5000DT积分
-
+
+
+ {{item.price}}元
+ {{item.dt}}DT积分
+
+
@@ -48,13 +30,24 @@
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 118d880..a08d644 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -26,7 +26,7 @@
- 共力会员
+ {{serial === '' ? '共力会员': 'NO:' + serial}}
@@ -38,7 +38,7 @@
- 共力值
+ 共力分
{{account.glz}}
@@ -52,19 +52,23 @@
我的订单
-
+
+ {{order.init}}
待付款
-
+
+ {{order.paid}}
待发货
-
+
+ {{order.delivered}}
待收货
-
+
+ {{order.refund}}
退换货
@@ -119,7 +123,17 @@
mode="widthFix">
-
+
+
+ { this.showIv = false, this.iv = '' }">
+
+
+
+
+
+
@@ -128,6 +142,9 @@
info,
chainSeed
} from '@/apis/interfaces/user';
+ import {
+ payPassword
+ } from '@/apis/interfaces/account.js'
import {
getVersions
} from '@/apis/interfaces/versions.js'
@@ -151,7 +168,17 @@
dt : 0.00
},
mnemonic : '',
- wordsShow: false
+ wordsShow: false,
+ order : {
+ init : 0,
+ paid : 0,
+ delivered: 0,
+ refund : 0
+ },
+ serial : '',
+ hasPassword : false,
+ showIv : false,
+ iv : ''
};
},
onShow() {
@@ -165,15 +192,18 @@
uni.setNavigationBarTitle({
title: res.nickname
});
- this.cardText = res.identity_array
- this.userInfo = {
+ this.cardText = res.identity_array
+ this.userInfo = {
nickname : res.nickname,
addr : res.addr,
avatar : res.avatar,
isOpenVip : res.is_open_vip,
+ username : res.username
}
- this.identity = res.identity
- this.account = res.account
+ this.identity = res.identity
+ this.account = res.account
+ this.serial = res.serial
+ this.hasPassword = res.has_transfer_password
})
.catch(err => {
uni.showToast({
@@ -184,8 +214,32 @@
},
// 导出助记词
onMnemonic(){
- chainSeed().then(res => {
+ if(!this.hasPassword){
+ uni.showModal({
+ title : '提示',
+ content : '暂未设置账户支付密码,无法导出助记词,请设置密码后重试',
+ cancelText : '稍后设置',
+ confirmText : '立即设置',
+ success : modalRes => {
+ if(modalRes.confirm){
+ this.$Router.push({name: 'AccountResetPassword', params: {phone: this.userInfo.username}})
+ return
+ }
+ this.showIv = false
+ }
+ })
+ return
+ }
+ this.showIv = true
+
+ },
+ // 验证支付密码
+ validationIv(){
+ chainSeed({
+ password: this.iv
+ }).then(res => {
this.mnemonic = res.seed
+ this.showIv = false
this.wordsShow = true
}).catch(err => {
uni.showToast({
@@ -461,7 +515,8 @@
display: flex;
justify-content: space-between;
- &-item {
+ &-item {
+ position: relative;
width: 25%;
padding: $padding $padding/2;
text-align: center;
@@ -475,7 +530,20 @@
.title {
font-size: $title-size-sm;
margin-top: $margin/3;
- }
+ }
+
+ .number{
+ position: absolute;
+ top: 22rpx;
+ z-index: 2;
+ right: 20%;
+ background: $text-price;
+ color: white;
+ font-size: 22rpx;
+ min-width: 30rpx;
+ line-height: 30rpx;
+ border-radius: 50%;
+ }
}
}
diff --git a/pages/vip/vip.vue b/pages/vip/vip.vue
index 3277f7c..08e04b0 100644
--- a/pages/vip/vip.vue
+++ b/pages/vip/vip.vue
@@ -2,10 +2,10 @@
-
+
{{user.nickname}}
到期日期:{{endedAt}}
- 续费
+ 续费
@@ -42,8 +42,21 @@
会员折扣说明
- 前{{item.open_number}} - {{item.open_number + item.stock}}名享开通会员折扣价{{item.price}}元
- 10000后会员恢复原价199.00元
+
+
+ {{item.open_number}} - {{item.open_number + item.stock}}
+ {{item.price}}
+ {{item.margin === 0 ? '满员': item.margin}}
+
+
+ 10000后
+ 199.00
+ -
+