gang.huang %!s(int64=4) %!d(string=hai) anos
pai
achega
7af9d30364

+ 28 - 0
pages/components/termsOfService/termsOfService.js

@@ -0,0 +1,28 @@
+// pages/components/termsOfService/termsOfService.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    show:{
+      type:Boolean,
+      value:false
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    onClosePopup(){
+      this.triggerEvent('close',{})
+    }
+  }
+})

+ 4 - 0
pages/components/termsOfService/termsOfService.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 15 - 0
pages/components/termsOfService/termsOfService.wxml

@@ -0,0 +1,15 @@
+<view class="clausePopup" wx:if="{{show}}">
+	<scroll-view class="clauseList" scroll-y>
+    <view class="title">充值代缴服务说明</view>
+		<view>1、本服务为全国加油卡代充服务、故 不提供充值发票;</view>
+		<view>2、支付成功后,需收到充值成功通知短信后,方可到 加油站圈存后加油使用;</view>
+		<view>3、每用户(手机号、设备号、加油卡号)每月最多能充2000且至多充值15笔;</view>
+		<view>4、不支持副卡、增票卡、过期卡、黑名单卡、挂失卡、注销卡、电子卡、车队卡等特殊卡种;</view>
+		<view>5、中石油不支持第三方虚拟手机号段充值;</view>
+		<view>6、充值操作以油卡卡号为准,请认真填写,如因填写卡号有误而导致充值不成功或误充值,相关后果由本人承担;</view>
+		<view>7、短信通知号码的收集仅用于后期充值信息的发送使用,特此说明;</view>
+	</scroll-view>
+	<view class="btn-rechargeNow" bindtap="onClosePopup">
+		<text>好的</text>
+	</view>
+</view>

+ 44 - 0
pages/components/termsOfService/termsOfService.wxss

@@ -0,0 +1,44 @@
+.clausePopup {
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  background: rgba(0,0,0,0.7);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+}
+
+.btn-rechargeNow {
+  width: 328rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  text-align: center;
+  background-color: #fe7124;
+  background: linear-gradient(to right, #ff7a21 0%, #feb25a 100%);
+  text-align: center;
+  color: #fff;
+  border-radius: 16rpx;
+  margin: 0 auto;
+  margin-top: 40rpx;
+}
+
+.clauseList {
+  height: 65%;
+  width: 80%;
+  background: #fff;
+  border-radius: 20rpx;
+  font-size: 30rpx;
+  color: #999;
+  padding: 0 3%;
+  line-height: 1.5;
+}
+
+.clauseList .title {
+  font-size: 34rpx;
+  color: #000;
+  text-align: center;
+  margin: 30rpx 0;
+}

+ 10 - 13
pages/phoneCharges/phoneCharges.js

@@ -22,7 +22,8 @@ Page({
     card_no: '',
     fromSource: '',
     payInfoChecked:true,
-    showShareDialog:false
+    showShareDialog:false,
+    showtermsOfServiceDialog:false
   },
 
   onShowShareDialog(){
@@ -169,19 +170,15 @@ Page({
   },
 
   onShowPayInfoModal(){
-    wx.showModal({
-      title: '充值代缴服务说明',
-      content: '充值代缴服务说明',
-      showCancel:false,
-      success (res) {
-        if (res.confirm) {
-          console.log('用户点击确定')
-        } else if (res.cancel) {
-          console.log('用户点击取消')
-        }
-      }
+    this.setData({
+      showtermsOfServiceDialog:true
+    })
+  },
+
+  onShowtermsOfServiceDialog(){
+    this.setData({
+      showtermsOfServiceDialog:false
     })
-    
   },
 
   /**

+ 2 - 1
pages/phoneCharges/phoneCharges.json

@@ -4,6 +4,7 @@
   "navigationBarBackgroundColor": "#ffffff",
   "navigationBarTextStyle": "black",
   "usingComponents":{
-    "shareDialog":"../components/shareDialog/shareDialog"
+    "shareDialog":"../components/shareDialog/shareDialog",
+    "termsOfService":"../components/termsOfService/termsOfService"
   }
 }

+ 2 - 1
pages/phoneCharges/phoneCharges.wxml

@@ -78,4 +78,5 @@
   </view> -->
 </view>
 
-<shareDialog showDialog="{{showShareDialog}}" bind:closeDialog="onCloseShareDialog"/>
+<shareDialog showDialog="{{showShareDialog}}" bind:closeDialog="onCloseShareDialog"/>
+<termsOfService show="{{showtermsOfServiceDialog}}" bind:close="onShowtermsOfServiceDialog" />

+ 13 - 25
pages/postage/postage.js

@@ -31,7 +31,8 @@ Page({
     ],
     fromSource: '',
     payInfoChecked:true,
-    showShareDialog:false
+    showShareDialog:false,
+    showtermsOfServiceDialog:false
   },
 
   onShowShareDialog(){
@@ -53,29 +54,15 @@ Page({
   },
 
   onShowPayInfoModal(){
-    let lines = [
-      '1、本服务为全国加油卡代充服务、故 不提供充值发票;',
-      '2、支付成功后,需收到充值成功通知短信后,方可到 加油站圈存后加油使用;',
-      '3、每用户(手机号、设备号、加油卡号)每月最多能充2000且至多充值15笔;',
-      '4、不支持副卡、增票卡、过期卡、黑名单卡、挂失卡、注销卡、电子卡、车队卡等特殊卡种;',
-      '5、中石油不支持第三方虚拟手机号段充值;',
-      '6、充值操作以油卡卡号为准,请认真填写,如因填写卡号有误而导致充值不成功或误充值,相关后果由本人承担;',
-      '7、短信通知号码的收集仅用于后期充值信息的发送使用,特此说明;'
-    ]
-    let content = lines.join("\r\n");
-
-    wx.showModal({
-      title: '充值代缴服务说明',
-      content: content,
-      showCancel:false,
-      success (res) {
-        if (res.confirm) {
-          console.log('用户点击确定')
-        } else if (res.cancel) {
-          console.log('用户点击取消')
-        }
-      }
-    })    
+    this.setData({
+      showtermsOfServiceDialog:true
+    })
+  },
+
+  onShowtermsOfServiceDialog(){
+    this.setData({
+      showtermsOfServiceDialog:false
+    })
   },
 
   // 页签切换
@@ -253,7 +240,8 @@ Page({
    */
   onHide: function () {
     this.setData({
-      showShareDialog:false
+      showShareDialog:false,
+      showtermsOfServiceDialog:false
     })
   },
 

+ 2 - 1
pages/postage/postage.json

@@ -3,6 +3,7 @@
   "navigationBarTitleText": "加油卡充值",
   "navigationBarTextStyle": "black",
   "usingComponents":{
-    "shareDialog":"../components/shareDialog/shareDialog"
+    "shareDialog":"../components/shareDialog/shareDialog",
+    "termsOfService":"../components/termsOfService/termsOfService"
   }
 }

+ 2 - 1
pages/postage/postage.wxml

@@ -77,4 +77,5 @@
 	</view>
 </view>
 
-<shareDialog showDialog="{{showShareDialog}}" bind:closeDialog="onCloseShareDialog"/>
+<shareDialog showDialog="{{showShareDialog}}" bind:closeDialog="onCloseShareDialog"/>
+<termsOfService show="{{showtermsOfServiceDialog}}" bind:close="onShowtermsOfServiceDialog" />