root 4 mēneši atpakaļ
vecāks
revīzija
f4803d7ecc

+ 1 - 1
newScale/Burnout/testPage.vue

@@ -232,7 +232,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Burnout/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Burnout",
 							});
 						}
 					});

+ 1 - 1
newScale/Career/testPage.vue

@@ -192,7 +192,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Career/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Career",
 							});
 						}
 					});

+ 1 - 1
newScale/Charm/testPage.vue

@@ -239,7 +239,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Charm/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Charm"
 							});
 						}
 					});

+ 1 - 1
newScale/EQtest/testPage.vue

@@ -192,7 +192,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/EQtest/paymentPage",
+								url: "/newScale/paymentPage/index?tName=EQtest"
 							});
 						}
 					});

+ 1 - 1
newScale/Family/testPage.vue

@@ -234,7 +234,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Family/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Family"
 							});
 						}
 					});

+ 1 - 1
newScale/Marriage/testPage.vue

@@ -192,7 +192,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Marriage/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Marriage"
 							});
 						}
 					});

+ 1 - 1
newScale/Mbti/testPage.vue

@@ -234,7 +234,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Mbti/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Mbti"
 							});
 						}
 					});

+ 1 - 1
newScale/Mental/testPage.vue

@@ -221,7 +221,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Mental/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Mental"
 							});
 						}
 					});

+ 1 - 1
newScale/Senile/testPage.vue

@@ -191,7 +191,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Senile/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Senile"
 							});
 						}
 					});

+ 1 - 1
newScale/Sleep/testPage.vue

@@ -219,7 +219,7 @@
 							};
 							uni.setStorageSync('orderInfo', params);
 							uni.navigateTo({
-								url: "/newScale/Sleep/paymentPage",
+								url: "/newScale/paymentPage/index?tName=Sleep"
 							});
 						}
 					});

+ 94 - 22
newScale/paymentPage/index.vue

@@ -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 {

+ 21 - 29
pages.json

@@ -39,36 +39,28 @@
 		}, {
 			"root": "paymentPage",
 			"pages": [{
-					"path": "paymentPage/index",
-					"style": {
-						"navigationStyle": "custom",
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false
-					}
-				}, {
-					"path": "phoneSave/index",
-					"style": {
-						"navigationStyle": "custom",
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false
-					}
-				}, {
-					"path": "queryByPhone/index",
-					"style": {
-						"navigationStyle": "custom",
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false,
-						"onReachBottomDistance": 100
-					}
-				},
-				{
-					"path": "index/index",
-					"style": {
-						"navigationBarTitleText": "",
-						"enablePullDownRefresh": false
-					}
+				"path": "paymentPage/index",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
 				}
-			]
+			}, {
+				"path": "phoneSave/index",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+			}, {
+				"path": "queryByPhone/index",
+				"style": {
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false,
+					"onReachBottomDistance": 100
+				}
+			}]
 		}, {
 			"root": "scaleTestResults",
 			"pages": [{

BIN
static/role_img1.png


BIN
static/role_img10.png


BIN
static/role_img2.png


BIN
static/role_img3.png


BIN
static/role_img4.png


BIN
static/role_img5.png


BIN
static/role_img6.png


BIN
static/role_img7.png


BIN
static/role_img8.png


BIN
static/role_img9.png