|
@@ -1,19 +1,18 @@
|
|
|
<template>
|
|
|
<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="pay_btn_sm" @click="payHandle">{{orderInfo.total}}元解锁专属测试报告</view>
|
|
|
+ <view class="pay_btn_sm" @click="payHandle">{{promotionPrice}}元解锁专属测试报告</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 class="top_footer">
|
|
|
<template v-if="hasDiscount">
|
|
|
<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
|
|
|
class="price">¥{{promotionPrice}}</text></view>
|
|
|
</view>
|
|
@@ -49,9 +48,77 @@
|
|
|
import {
|
|
|
timestampFormatter
|
|
|
} from '../../utils/util.js'
|
|
|
+ import {
|
|
|
+ photoUrl
|
|
|
+ } from "@/common/config.js"
|
|
|
+ const photoUrls = `${photoUrl}/api/show?filePath=./webo`
|
|
|
export default {
|
|
|
data() {
|
|
|
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: '',
|
|
|
orderInfo: {},
|
|
|
peopleNum: 0,
|
|
@@ -72,6 +139,12 @@
|
|
|
this.payEnsure();
|
|
|
}, 200)
|
|
|
}
|
|
|
+
|
|
|
+ if (options && options.tName) {
|
|
|
+ this.scaleName = options.tName;
|
|
|
+ this.currentScale = this.scaleList[options.tName];
|
|
|
+ }
|
|
|
+
|
|
|
this.orderInfo = uni.getStorageSync('orderInfo');
|
|
|
this.getPeople();
|
|
|
this.queryPromotion();
|
|
@@ -107,7 +180,7 @@
|
|
|
let resultInfo = JSON.parse(res.data.body)
|
|
|
if (resultInfo.trade_state === 'SUCCESS') {
|
|
|
uni.navigateTo({
|
|
|
- url: `/newScale/Charm/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
|
+ url: `/newScale/${this.scaleName}/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
|
});
|
|
|
} else {
|
|
|
return;
|
|
@@ -127,10 +200,10 @@
|
|
|
uni.hideLoading();
|
|
|
if (res.data && res.data.orderStatus === '支付成功') {
|
|
|
uni.navigateTo({
|
|
|
- url: `/newScale/Charm/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
|
+ url: `/newScale/${this.scaleName}/testResult?resultId=${this.orderInfo.resultId}&messageShare=1`
|
|
|
});
|
|
|
} else {
|
|
|
- // _this.orderInfo.total = _this.hasDiscount ? _this.promotionPrice : _this.price;
|
|
|
+ _this.orderInfo.total = _this.hasDiscount ? _this.promotionPrice : _this.price;
|
|
|
_this.$request
|
|
|
.post({
|
|
|
url: "api/wx-pay/h5Pay",
|
|
@@ -138,8 +211,8 @@
|
|
|
data: _this.orderInfo
|
|
|
})
|
|
|
.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}`;
|
|
|
});
|
|
@@ -207,7 +280,7 @@
|
|
|
let imageUrl =
|
|
|
'https://test.jue-ming.com:8849/api/show?filePath=./webo/EQtest/banner1.png';
|
|
|
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);
|
|
@@ -232,7 +305,7 @@
|
|
|
let _this = this;
|
|
|
_this.$request
|
|
|
.get({
|
|
|
- url: "record/countByFlag?flag=20210804164957",
|
|
|
+ url: `record/countByFlag?flag=${this.currentScale.flag}`,
|
|
|
loadingTip: "加载中..."
|
|
|
})
|
|
|
.then((res) => {
|
|
@@ -295,8 +368,6 @@
|
|
|
.payment_info {
|
|
|
width: 750rpx;
|
|
|
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;
|
|
|
margin-top: 143rpx;
|
|
|
overflow: hidden;
|
|
@@ -420,10 +491,11 @@
|
|
|
}
|
|
|
|
|
|
.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 {
|
|
@@ -432,7 +504,7 @@
|
|
|
font-weight: 700;
|
|
|
color: #f94206;
|
|
|
/* line-height: 38px; */
|
|
|
- margin-left: 10px;
|
|
|
+ margin-left: 10rpx;
|
|
|
}
|
|
|
|
|
|
.radio_class {
|