From a70d242fc3715ca257b4f61acc872d0397aaecd9 Mon Sep 17 00:00:00 2001
From: mo-bai <1873032855@qq.com>
Date: Fri, 25 Feb 2022 17:00:42 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.DS_Store | Bin 8196 -> 8196 bytes
apis/commonApi.js | 50 +++++--
enums/index.js | 3 +
env/index.js | 4 +-
pages.json | 8 +
pages/mine/index.vue | 104 +++----------
pages/vip-center/index.vue | 294 +++++++++++++++++++++++++++++++++++++
7 files changed, 367 insertions(+), 96 deletions(-)
create mode 100644 pages/vip-center/index.vue
diff --git a/.DS_Store b/.DS_Store
index 184911d8bf3c40b92f2f0e9ce5c3d37d71189fa6..c86b64390b4c6c7a752ae571a8cefc375283f93f 100644
GIT binary patch
delta 47
zcmZp1XmQveDk#Xyki}5Ukj#+JkjIe5kjaofxj|53vw>hZ^X7RnY0MKFcs8?3{AC9K
DCfW@n
delta 39
vcmZp1XmQveD#**mkik&Nki<~Lkjap;*+4LrdGiFB66T2wJe%1i{;~rA&}|DD
diff --git a/apis/commonApi.js b/apis/commonApi.js
index 21dc9e9..cfaa931 100644
--- a/apis/commonApi.js
+++ b/apis/commonApi.js
@@ -1,6 +1,6 @@
import http from '../utils/http/index.js'
import store from '@/store/index'
-import { XAPPID } from '@/enums/index.js'
+import { XAPPID, PAY_URL } from '@/enums/index.js'
let areaCache = null
/**
* 获取省市区街道
@@ -32,6 +32,8 @@ function syncStore(res) {
let vipExpireTime = supplierInfo.supplier.vipExpireTime || null
let isVip = false
if (vipExpireTime) {
+ // 适配ios时间戳
+ vipExpireTime = vipExpireTime.replace(/-/g, '/')
let now = new Date().getTime()
if (now < new Date(vipExpireTime).getTime()) {
isVip = true
@@ -43,13 +45,13 @@ function syncStore(res) {
fddEnterpriseStatus: supplierInfo.fddEnterpriseStatus,
supplierId: supplierInfo.supplier.id,
isVip,
- vipExpireTime
+ vipExpireTime,
})
let userInfo = {
name: supplierInfo.employeeName, // 没有企业就没有name,
userId: res.userId,
mobile: res.mobile,
- avatar: null
+ avatar: null,
}
store.commit('setUserInfo', userInfo)
} else {
@@ -57,7 +59,7 @@ function syncStore(res) {
name: '', // 没有企业就没有name,
userId: res.userId,
mobile: res.mobile,
- avatar: null
+ avatar: null,
}
store.commit('setUserInfo', userInfo)
// 移除企业信息
@@ -103,7 +105,7 @@ export function getVerifyUrl(data = {}) {
export function getGuaranteeContract(data = {}) {
return http.post({
url: `/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=${data.mallSupplierId}&customerEnterpriseId=${data.customerEnterpriseId}`,
- data
+ data,
})
}
@@ -114,7 +116,7 @@ export function getGuaranteeContract(data = {}) {
export function transformFileToImg(data) {
return http.get({
url: '/document/get/enterprise-documents/file-image-base64',
- data: data
+ data: data,
})
}
@@ -125,7 +127,7 @@ export function transformFileToImg(data) {
export function pushCustomerBind(cid, platformType = 'android', appId = XAPPID) {
return http.post({
url: '/base-paper-trading/user/binding/geTui/cid',
- data: { cid, appId, platformType }
+ data: { cid, appId, platformType },
})
}
@@ -136,7 +138,7 @@ export function pushCustomerBind(cid, platformType = 'android', appId = XAPPID)
export function pushCustomerOff(cid, platformType = 'android', appId = XAPPID) {
return http.post({
url: '/base-paper-trading/user/geTui/offline',
- data: { cid, appId, platformType }
+ data: { cid, appId, platformType },
})
}
@@ -146,7 +148,7 @@ export function pushCustomerOff(cid, platformType = 'android', appId = XAPPID) {
export function getLicenseOcr(data = {}) {
return http.post({
url: '/base-paper-trading/ocr/business-license',
- data: data
+ data: data,
})
}
@@ -156,7 +158,7 @@ export function getLicenseOcr(data = {}) {
export function getFrontIdCardOcr(data = {}) {
return http.post({
url: '/base-paper-trading/ocr/id-card/face',
- data: data
+ data: data,
})
}
@@ -168,6 +170,32 @@ export function getFrontIdCardOcr(data = {}) {
export function checkUpdate(data = {}) {
return http.get({
url: '/base-paper-trading/get/app/version',
- data: data
+ data: data,
+ })
+}
+
+/**
+ * 纸盘商开通会员,创建订单
+ * @param {object} data
+ * @value {string} type
+ * @value {string} mallSupplierId
+ */
+export function openVip(data = {}) {
+ return http.post({
+ url: `/yyt-uec/supplier/apply/for/vip?type=${data.type}&mallSupplierId=${data.mallSupplierId}`,
+ data: data,
+ })
+}
+
+/**
+ * 纸盘商开通会员,真实支付
+ * @param {object} data
+ * @value {string} orderId
+ * @value {string} channelId
+ */
+export function openVipPay(data = {}) {
+ return http.post({
+ url: PAY_URL,
+ data: data,
})
}
diff --git a/enums/index.js b/enums/index.js
index 049ae48..639811b 100644
--- a/enums/index.js
+++ b/enums/index.js
@@ -8,6 +8,9 @@ export const H5_URL = `http://shopkeeper${env === 'production' ? '' : '.' + env}
export const H5_URL_STORE = `${H5_URL}/#/pages/store/index?share=true&`
export const H5_URL_PAPER = `${H5_URL}/#/pages/paper-details/index?share=true&`
+// 统一支付接口
+export const PAY_URL = `https://api-client-psc${urlEnv}.qniao.cn/payment-settlement-center/pay`
+
/**
* 账号类型
*/
diff --git a/env/index.js b/env/index.js
index bcf6a22..a0bfcb1 100644
--- a/env/index.js
+++ b/env/index.js
@@ -1,8 +1,8 @@
/**
* @description 唯一环境变量
*/
-// const env = 'test'
+const env = 'test'
// const env = 'dev'
-const env = 'production'
+// const env = 'production'
export default env
diff --git a/pages.json b/pages.json
index 43b3238..ac284e2 100644
--- a/pages.json
+++ b/pages.json
@@ -348,6 +348,14 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path": "pages/vip-center/index",
+ "style": {
+ "navigationBarTitleText": "会员中心",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
}
],
"globalStyle": {
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 2429aa0..90eafce 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -129,34 +129,6 @@
订单列表
-
-
-
-
-
-
-
-
-
-
-
- 线上开通会员暂未上线,
- 请添加客服开通。
-
- 扫码或添加会员专属客服微信号
- {{ customerServicer }}
-
-
- 复制微信号
-
-
@@ -187,7 +159,6 @@ export default {
components: { qnDataPicker },
data() {
return {
- visible: false,
customerServicer: '17606507108',
fddStatus: Object.freeze(fddEnterpriseStatus),
messageNum: 0,
@@ -195,23 +166,23 @@ export default {
tradeRange: [
{
text: '本月',
- value: currentMonth.join('~')
+ value: currentMonth.join('~'),
},
{
text: '上月',
- value: lastMonth.join('~')
+ value: lastMonth.join('~'),
},
{
text: '总计',
- value: ''
- }
+ value: '',
+ },
],
tradeDate: currentMonth.join('~'),
tradeData: {
tradingVolume: 0,
volumeOfBusiness: 0,
- orderQuantity: 0
- }
+ orderQuantity: 0,
+ },
}
},
@@ -224,7 +195,7 @@ export default {
if (!this.hasCompany) {
uni.showToast({
title: '您还没有企业信息,请先完善企业信息',
- icon: 'none'
+ icon: 'none',
})
return
}
@@ -251,7 +222,7 @@ export default {
if (!this.hasCompany) {
uni.showToast({
title: '您还没有企业,请先加入企业',
- icon: 'none'
+ icon: 'none',
})
return
}
@@ -259,17 +230,14 @@ export default {
},
makeVip() {
if (this.hasCompany) {
- this.visible = true
+ loginGo2('vip-center')
} else {
uni.showToast({
title: '请先完善企业信息',
- icon: 'none'
+ icon: 'none',
})
}
},
- closeShare() {
- this.visible = false
- },
// 复制客服手机号
copyPhone() {
uni.setClipboardData({
@@ -278,9 +246,9 @@ export default {
uni.showToast({
title: '复制成功',
icon: 'none',
- duration: 2000
+ duration: 2000,
})
- }
+ },
})
},
// 获取纸盘商订单统计
@@ -295,14 +263,14 @@ export default {
getOrderStatistics({
beginDate,
endDate,
- currentSupplier
+ currentSupplier,
}).then((res) => {
console.log('res', res)
if (res) {
this.tradeData = res
}
})
- }
+ },
},
watch: {
tradeDate(val) {
@@ -315,7 +283,7 @@ export default {
this.getStatistics()
}
},
- immediate: true
+ immediate: true,
},
tradeDate() {
this.getStatistics()
@@ -326,10 +294,10 @@ export default {
this.tradeData = {
tradingVolume: 0,
volumeOfBusiness: 0,
- orderQuantity: 0
+ orderQuantity: 0,
}
}
- }
+ },
},
computed: {
vipExpireTime() {
@@ -342,6 +310,7 @@ export default {
return this.$store.state.qnToken != ''
},
isVip() {
+ console.log('isVip:', this.$store.state.supplierInfo.isVip)
return this.$store.state.supplierInfo.isVip == true
},
hasCompany() {
@@ -362,9 +331,9 @@ export default {
avatar: this.$store.state.userInfo.avatar || '',
name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '',
supplierName: this.$store.state.supplierInfo.name || '',
- fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus || 1
+ fddEnterpriseStatus: this.$store.state.supplierInfo.fddEnterpriseStatus || 1,
}
- }
+ },
},
onLoad() {},
onShow() {
@@ -375,7 +344,7 @@ export default {
}
})
this.hasLogin && this.getStatistics()
- }
+ },
}
@@ -647,37 +616,6 @@ export default {
align-items: center;
justify-content: flex-end;
}
-.share-area {
- width: 750rpx;
- height: 100vh;
- background: rgba(0, 0, 0, 0.5);
- position: fixed;
- z-index: 200;
- top: 0;
- left: 0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .close-icon {
- width: 750rpx;
- padding: 0 32rpx;
- height: 70rpx;
- flex-grow: 0;
- flex-shrink: 0;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: flex-end;
- }
- .share-content {
- width: 560rpx;
- margin-top: 26rpx;
- background-color: #fff;
- border-radius: 20rpx;
- overflow: hidden;
- }
-}
.vip-top {
width: 560rpx;
height: 268rpx;
diff --git a/pages/vip-center/index.vue b/pages/vip-center/index.vue
new file mode 100644
index 0000000..6229bbb
--- /dev/null
+++ b/pages/vip-center/index.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
+ 超级VIP
+
+ 开通立即尊享
+ {{ money }} 元/年
+
+
+
+
+ 会员权益
+
+
+
+
+
+ 账期变现
+
+
+
+
+
+ 电子签约
+
+
+
+
+
+ 智能合同
+
+
+
+
+
+ 征信管理
+
+
+
+
+ 服务说明
+ 1.纸掌柜会员支付支持微信支付。
+ 2.支付成功后会员权益立即生效。
+ 3.会员权益最终解释权归千鸟互联电商科技有限公司所有。
+
+
+
+
+
+ 立即支付
+
+
+
+
+
+
+
+