Browse Source

增加隐私政策、服务条款,支付方式页面样式替换

CarlYang 3 years ago
parent
commit
1756f474c0

+ 3 - 1
common/apiurl.js

@@ -74,7 +74,9 @@ const apiurl = {
 	// 普通微信支付
 	ordinaryWxPayApi: '/client/pay/gzbank/poly',
 	// 包月微信支付
-	monthlyWxPayApi: '/client/monthpay/gzbank/poly'
+	monthlyWxPayApi: '/client/monthpay/gzbank/poly',
+	// 获取条款须知
+	getSystermsApi: '/client/systerms/getByType/'
 }
 
 export {

+ 4 - 1
common/http.api.js

@@ -63,6 +63,8 @@ const install = (Vue, vm) => {
 	let ordinaryWxPay = (params = {}) => vm.$u.post(apiurl.ordinaryWxPayApi, params)
 	// 包月微信支付
 	let monthlyWxPay = (params = {}) => vm.$u.post(apiurl.monthlyWxPayApi, params)
+	// 获取条款须知
+	let getSysterms = (params = {}) => vm.$u.get(apiurl.getSystermsApi + params.termsType)
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
 		feedbackAdd,
@@ -100,7 +102,8 @@ const install = (Vue, vm) => {
 		updateOrderRefund,
 		getOrderRefundDetails,
 		ordinaryWxPay,
-		monthlyWxPay
+		monthlyWxPay,
+		getSysterms
 	};
 }
 

+ 9 - 0
pages.json

@@ -252,6 +252,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/privacyPolicy/privacyPolicy",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "隐私政策",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 10 - 1
pages/center/phoneLogin/phoneLogin.vue

@@ -15,7 +15,8 @@
 		<view class="buttom">
 			<view class="hint u-text-center">
 				登录代表同意
-				<text class="link">隐私政策,</text>
+				<text class="link" @tap="jumpToPage(1)">用户服务条款,</text>
+				<text class="link" @tap="jumpToPage(2)">隐私政策,</text>
 				并授权使用您的账号信息(如昵称、头像、收货地址)以便您统一管理
 			</view>
 		</view>
@@ -211,6 +212,14 @@ export default {
 				});
 			})
 		},
+		/**
+		 * 跳转页面
+		 * */
+		jumpToPage(flag){
+			uni.navigateTo({
+				url: "/pages/privacyPolicy/privacyPolicy?termsType=" + flag,
+			})
+		}
 	}
 };
 </script>

+ 42 - 4
pages/handleMonthly/handleMonthly.vue

@@ -29,10 +29,11 @@
 			<view>{{dateRange}}</view>
 		</view>
 		<view class="handle-monthly-explain">
-			<view>包月说明</view>
+			<!-- <view>包月说明</view>
 			<view>1、停车不足30分钟,免费;</view>
 			<view>2、停车 超过20分钟,按2元/小时收费;</view>
-			<!-- <view>3、月卡会员在有效期内停车免费</view> -->
+			<view>3、月卡会员在有效期内停车免费</view> -->
+			<u-parse :html="monthlyContent"></u-parse>
 		</view>
 		<view class="handle-monthly-confirm-button">
 			<button type="default"@click="submit(roadNo)">确认包月</button>
@@ -44,7 +45,7 @@
 			:show-confirm-button="false"
 			:show-cancel-button="false">
 				<view class="slot-content">
-					<view class="pay-way">
+					<!-- <view class="pay-way">
 						<view class="pay-way-item" @click="gyBankPay">
 							<image src="../../static/img/gy-bank-pay-icon.png" mode=""></image>
 							<view>贵州银行</view>
@@ -53,6 +54,17 @@
 							<image src="../../static/img/wechat-pay-icon.png" mode=""></image>
 							<view>微信支付</view>
 						</view>
+					</view> -->
+					<view class="pay-way-new">
+						<view class="pay-way-item pay-way-item-hy" @click="gyBankPay">
+							<image src="../../static/img/guiyang-bank-icon.png" mode=""></image>
+							<view class="title">贵州银行</view>
+							<view class="subtitle">前三个月每天首次一分钱<br/>长期八折优惠</view>
+						</view>
+						<view class="pay-way-item pay-way-item-jh" @click="wechatPay">
+							<image src="../../static/img/juhe-icon.png" mode=""></image>
+							<view class="title">聚合支付</view>
+						</view>
 					</view>
 					<button class="pay-way-close-btn" @click="payWayPop = false">关闭</button>
 				</view>
@@ -89,10 +101,12 @@
 				},
 				label:"",
 				payWayPop: false,
-				jumpUrl: undefined
+				jumpUrl: undefined,
+				monthlyContent: ''
 			}
 		},
 		onLoad (page) {
+			this.getSysterms(0)
 			if (page.roadNo) {
 				this.roadNo = page.roadNo;
 				this.getMonthInfo(this.roadNo);
@@ -365,6 +379,30 @@
 						type: 'error',
 					});
 				})
+			},
+			/**
+			 * 获取包月说明
+			 * */
+			getSysterms(termsType) {
+				this.$u.api.getSysterms({
+						termsType: termsType
+					})
+					.then(res => {
+						if (res.code === 200) {
+							this.monthlyContent = res.data?.content
+						} else {
+							this.$refs.uToast.show({
+								title: res.msg,
+								type: 'error',
+							})
+						}
+					})
+					.catch(err => {
+						this.$refs.uToast.show({
+							title: '系统错误!',
+							type: 'error',
+						})
+					})
 			}
 		},
 		computed:{

+ 39 - 1
pages/paymentMethod/paymentMethod.scss

@@ -15,8 +15,46 @@
 		}
 	}
 }
+.pay-way-new {
+	display: flex;
+	justify-content: space-between;
+	width: calc(100% - 80rpx);
+	border-top: solid 1px #979797;
+	margin: 23rpx auto;
+	padding: 36rpx 0;
+	.pay-way-item {
+		width: calc(50% - 9rpx);
+		border-radius: 20rpx;
+		text-align: center;
+		padding: 30rpx 0;
+		image {
+			width: 159rpx;
+			height: 159rpx;
+		}
+		.title {
+			font-size: 30rpx;
+			font-weight: 400;
+			font-family: 'PingFangSC-Regular, PingFang SC';
+			color: #fff;
+			margin: 15rpx 0;
+		}
+		.subtitle {
+			font-size: 14rpx;
+			font-weight: 400;
+			font-family: 'PingFangSC-Regular, PingFang SC';
+			color: #fff;
+			opacity: 0.73;
+		}
+	}
+	.pay-way-item-hy {
+		background: linear-gradient(153deg, #FA9460 0%, #FF5065 100%)
+	}
+	.pay-way-item-jh {
+		background: linear-gradient(155deg, #5EE3A6 0%, #3EB9C8 100%);
+	}
+}
 .pay-way-close-btn {
-	width: calc(100% - 34rpx);
+	width: calc(100% - 80rpx);
 	margin: 0 auto 68rpx;
 	border: none;
 	background-color: #3397FA;

+ 12 - 1
pages/paymentMethod/paymentMethod.vue

@@ -10,7 +10,7 @@
 		:show-confirm-button="false"
 		:show-cancel-button="false">
 			<view class="slot-content">
-				<view class="pay-way">
+				<!-- <view class="pay-way">
 					<view class="pay-way-item" @click="gyBankPay">
 						<image src="../../static/img/gy-bank-pay-icon.png" mode=""></image>
 						<view>贵州银行</view>
@@ -19,6 +19,17 @@
 						<image src="../../static/img/wechat-pay-icon.png" mode=""></image>
 						<view>微信支付</view>
 					</view>
+				</view> -->
+				<view class="pay-way-new">
+					<view class="pay-way-item pay-way-item-hy" @click="gyBankPay">
+						<image src="../../static/img/guiyang-bank-icon.png" mode=""></image>
+						<view class="title">贵州银行</view>
+						<view class="subtitle">前三个月每天首次一分钱<br/>长期八折优惠</view>
+					</view>
+					<view class="pay-way-item pay-way-item-jh" @click="wechatPay">
+						<image src="../../static/img/juhe-icon.png" mode=""></image>
+						<view class="title">聚合支付</view>
+					</view>
 				</view>
 				<button class="pay-way-close-btn" @click="closePaymentMethod">关闭</button>
 			</view>

+ 64 - 0
pages/privacyPolicy/privacyPolicy.vue

@@ -0,0 +1,64 @@
+<!-- ============================= 隐私政策/用户服务条款 ============================= -->
+<template>
+	<view class="u-content">
+		<u-parse :html="content"></u-parse>
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				content: ''
+			}
+		},
+		onLoad(query) {
+			const termsType = query?.termsType
+			if (termsType) {
+				switch (Number(termsType)) {
+					case 1:
+						uni.setNavigationBarTitle({
+							title: '用户服务条款'
+						})
+						break
+					case 2:
+						uni.setNavigationBarTitle({
+							title: '隐私政策'
+						})
+						break
+				}
+				this.getSysterms(termsType)
+			}
+		},
+		methods: {
+			getSysterms(termsType) {
+				this.$u.api.getSysterms({
+						termsType: Number(termsType)
+					})
+					.then(res => {
+						if (res.code === 200) {
+							this.content = res.data?.content
+						} else {
+							this.$refs.uToast.show({
+								title: res.msg,
+								type: 'error',
+							})
+						}
+					})
+					.catch(err => {
+						this.$refs.uToast.show({
+							title: '系统错误!',
+							type: 'error',
+						})
+					})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.u-content {
+	padding: 20rpx;
+}
+</style>

BIN
static/img/guiyang-bank-icon.png


BIN
static/img/juhe-icon.png