|
@@ -1,19 +1,18 @@
|
|
<template>
|
|
<template>
|
|
<view class="payment_bg">
|
|
<view class="payment_bg">
|
|
- <view class="payment_info">
|
|
|
|
- <view class="people_num"><text>{{peopleNum}}人已测</text></view>
|
|
|
|
|
|
+ <view class="payment_info"
|
|
|
|
+ :style="{'background': `url(${currentScale.infoImg}) no-repeat center`, 'background-size': 'cover'}">
|
|
|
|
+ <view class=" people_num"><text>{{peopleNum}}人已测</text></view>
|
|
<view class="price_num"><text>¥{{orderInfo.total}}</text></view>
|
|
<view class="price_num"><text>¥{{orderInfo.total}}</text></view>
|
|
- <view class="pay_btn_sm" @click="payHandle">{{orderInfo.total}}元解锁专属测试报告</view>
|
|
|
|
|
|
+ <view class="pay_btn_sm" @click="payHandle">{{promotionPrice}}元解锁专属测试报告</view>
|
|
</view>
|
|
</view>
|
|
- <view class="payment_desc">
|
|
|
|
- <image src="https://test.jue-ming.com:8849/api/show?filePath=./webo/Charm/paymentPage/pay_scale_desc.png"
|
|
|
|
- mode="widthFix"></image>
|
|
|
|
|
|
+ <view v-if="currentScale.showDesc" class="payment_desc">
|
|
|
|
+ <image v-if="currentScale" :src="currentScale.descImg" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
<view class="top_footer">
|
|
<view class="top_footer">
|
|
<template v-if="hasDiscount">
|
|
<template v-if="hasDiscount">
|
|
<view class="pay_price">
|
|
<view class="pay_price">
|
|
- <!-- <view class='pay_price_y'>优惠价</view> -->
|
|
|
|
- <view class="pay_price_p">¥{{price}}</view>
|
|
|
|
|
|
+ <view class="pay_price_p"><text class='pay_price_y'>原价:</text><text>¥{{price}}</text></view>
|
|
<view class="pro_tag"><text style="margin: 6rpx 5rpx 0 0;">优惠后:</text><text
|
|
<view class="pro_tag"><text style="margin: 6rpx 5rpx 0 0;">优惠后:</text><text
|
|
class="price">¥{{promotionPrice}}</text></view>
|
|
class="price">¥{{promotionPrice}}</text></view>
|
|
</view>
|
|
</view>
|
|
@@ -49,9 +48,77 @@
|
|
import {
|
|
import {
|
|
timestampFormatter
|
|
timestampFormatter
|
|
} from '../../utils/util.js'
|
|
} from '../../utils/util.js'
|
|
|
|
+ import {
|
|
|
|
+ photoUrl
|
|
|
|
+ } from "@/common/config.js"
|
|
|
|
+ const photoUrls = `${photoUrl}/api/show?filePath=./webo`
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ scaleList: {
|
|
|
|
+ 'Burnout': {
|
|
|
|
+ infoImg: `${photoUrls}/Burnout/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Burnout/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210804162506',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Career': {
|
|
|
|
+ infoImg: `${photoUrls}/Career/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Career/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210804165314',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Charm': {
|
|
|
|
+ infoImg: `${photoUrls}/Charm/paymentPage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Charm/paymentPage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210804164957',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'EQtest': {
|
|
|
|
+ infoImg: `${photoUrls}/EQtest/paymentPage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/EQtest/paymentPage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210820143117',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Family': {
|
|
|
|
+ infoImg: `${photoUrls}/Family/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Family/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210622214416',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Marriage': {
|
|
|
|
+ infoImg: `${photoUrls}/Marriage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Marriage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210804165314',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Mbti': {
|
|
|
|
+ infoImg: `${photoUrls}/Mbti/paymentPage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Mbti/paymentPage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20211020113914',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Mental': {
|
|
|
|
+ infoImg: `${photoUrls}/Mental/paymentPage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Mental/paymentPage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210616235331',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Senile': {
|
|
|
|
+ infoImg: `${photoUrls}/Senile/paymentPage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Senile/paymentPage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210804165314',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ 'Sleep': {
|
|
|
|
+ infoImg: `${photoUrls}/Sleep/paymentPage/pay_scale_info.png`,
|
|
|
|
+ descImg: `${photoUrls}/Sleep/paymentPage/pay_scale_desc.png`,
|
|
|
|
+ flag: '20210725100704',
|
|
|
|
+ showDesc: true
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ scaleName: '',
|
|
|
|
+ currentScale: null,
|
|
orderNo: '',
|
|
orderNo: '',
|
|
orderInfo: {},
|
|
orderInfo: {},
|
|
peopleNum: 0,
|
|
peopleNum: 0,
|
|
@@ -72,6 +139,12 @@
|
|
this.payEnsure();
|
|
this.payEnsure();
|
|
}, 200)
|
|
}, 200)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (options && options.tName) {
|
|
|
|
+ this.scaleName = options.tName;
|
|
|
|
+ this.currentScale = this.scaleList[options.tName];
|
|
|
|
+ }
|
|
|
|
+
|
|
this.orderInfo = uni.getStorageSync('orderInfo');
|
|
this.orderInfo = uni.getStorageSync('orderInfo');
|
|
this.getPeople();
|
|
this.getPeople();
|
|
this.queryPromotion();
|
|
this.queryPromotion();
|
|
@@ -107,7 +180,7 @@
|
|
let resultInfo = JSON.parse(res.data.body)
|
|
let resultInfo = JSON.parse(res.data.body)
|
|
if (resultInfo.trade_state === 'SUCCESS') {
|
|
if (resultInfo.trade_state === 'SUCCESS') {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/newScale/Charm/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
|
|
|
|
+ url: `/newScale/${this.scaleName}/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
return;
|
|
return;
|
|
@@ -127,10 +200,10 @@
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
if (res.data && res.data.orderStatus === '支付成功') {
|
|
if (res.data && res.data.orderStatus === '支付成功') {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/newScale/Charm/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
|
|
|
|
+ url: `/newScale/${this.scaleName}/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- // _this.orderInfo.total = _this.hasDiscount ? _this.promotionPrice : _this.price;
|
|
|
|
|
|
+ _this.orderInfo.total = _this.hasDiscount ? _this.promotionPrice : _this.price;
|
|
_this.$request
|
|
_this.$request
|
|
.post({
|
|
.post({
|
|
url: "api/wx-pay/h5Pay",
|
|
url: "api/wx-pay/h5Pay",
|
|
@@ -138,8 +211,8 @@
|
|
data: _this.orderInfo
|
|
data: _this.orderInfo
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- let redirect_url = encodeURI(
|
|
|
|
- `http://hnhong-duo.com/webo/newScale/Charm/paymentPage?orderNo=${res.data.orderNo}`
|
|
|
|
|
|
+ let redirect_url = encodeURIComponent(
|
|
|
|
+ `https://hnhong-duo.com/webo/newScale/paymentPage/index?orderNo=${res.data.orderNo}&tName=${_this.scaleName}`
|
|
)
|
|
)
|
|
window.location.href = `${res.data.codeUrl}&redirect_url=${redirect_url}`;
|
|
window.location.href = `${res.data.codeUrl}&redirect_url=${redirect_url}`;
|
|
});
|
|
});
|
|
@@ -207,7 +280,7 @@
|
|
let imageUrl =
|
|
let imageUrl =
|
|
'https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/banner1.png';
|
|
'https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/banner1.png';
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/newScale/Charm/testResult?resultId=${_this.orderInfo.resultId}&messageShare=1`
|
|
|
|
|
|
+ url: `/newScale/${this.scaleName}/testResult?resultId=${_this.orderInfo.resultId}&messageShare=1`
|
|
});
|
|
});
|
|
|
|
|
|
clearInterval(_this.timer);
|
|
clearInterval(_this.timer);
|
|
@@ -232,7 +305,7 @@
|
|
let _this = this;
|
|
let _this = this;
|
|
_this.$request
|
|
_this.$request
|
|
.get({
|
|
.get({
|
|
- url: "record/countByFlag?flag=20210804164957",
|
|
|
|
|
|
+ url: `record/countByFlag?flag=${this.currentScale.flag}`,
|
|
loadingTip: "加载中..."
|
|
loadingTip: "加载中..."
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
@@ -295,8 +368,6 @@
|
|
.payment_info {
|
|
.payment_info {
|
|
width: 750rpx;
|
|
width: 750rpx;
|
|
height: 531rpx;
|
|
height: 531rpx;
|
|
- background: url(https://test.jue-ming.com:8849/api/show?filePath=./webo/Charm/paymentPage/pay_scale_info.png) no-repeat center;
|
|
|
|
- background-size: cover;
|
|
|
|
position: relative;
|
|
position: relative;
|
|
margin-top: 143rpx;
|
|
margin-top: 143rpx;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
@@ -420,10 +491,11 @@
|
|
}
|
|
}
|
|
|
|
|
|
.pay_price_y {
|
|
.pay_price_y {
|
|
- background-color: #fe605f;
|
|
|
|
- margin-left: 20px;
|
|
|
|
- margin-right: 5px;
|
|
|
|
- color: #ffffff;
|
|
|
|
|
|
+ font-family: 'Alibaba PuHuiTi 2.0';
|
|
|
|
+ font-weight: normal;
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ color: #FF2F29;
|
|
|
|
+ line-height: 16rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.pay_price_p {
|
|
.pay_price_p {
|
|
@@ -432,7 +504,7 @@
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
color: #f94206;
|
|
color: #f94206;
|
|
/* line-height: 38px; */
|
|
/* line-height: 38px; */
|
|
- margin-left: 10px;
|
|
|
|
|
|
+ margin-left: 10rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.radio_class {
|
|
.radio_class {
|