Browse Source

no message

WIN-20230912WHV\Administrator 1 year ago
parent
commit
a86600129a

+ 4 - 1
pages.json

@@ -9,7 +9,7 @@
     {
       "path": "pages/index/index",
       "style": {
-        "navigationBarTitleText": "首页演示"
+        "navigationBarTitleText": "首页"
       }
     },
     {
@@ -17,6 +17,9 @@
       "style": {
         "navigationBarTitleText": "",
         "enablePullDownRefresh": true
+      },
+      "navigationBarRightButton": {
+        "hide": true
       }
     }
     ,

+ 64 - 3
pages/login/model/agreement.vue

@@ -1,25 +1,67 @@
 <template>
-  <view class="agreement-box">
+  <view class="agreement-box" @touchmove.stop.prevent="moveHandle">
     <view class="input-agreement animate__animated" :class="{'animate__shakeX':consentShake}" @click="setIsConsent" >
       <image class="agreement-agree" v-if="isConsent" src="/static/img/login/Checked1@3x.png" mode="aspectFill"></image>
       <image class="agreement-agree" v-else src="/static/img/login/Checked2@3x.png" mode="aspectFill"></image>
       <view class="agreement-text text-color-666 sys-size-24">已阅读并同意</view>
-      <view class="agreement-text text-color-dominant sys-size-24">《隐私政策》</view>
+      <view class="agreement-text text-color-dominant sys-size-24" @click.stop="showContent">《隐私政策》</view>
     </view>
+    <view >
+      <uni-popup ref="consentObj">
+        <view class="iPhone-padding agreement-data sys-background-fff">
+          <image class="data-title" src="/static/img/login/consent_bg.png" mode="widthFix"></image>
+          <view class="data-content">
+            <scroll-view class="content-box" scroll-y="true"  scroll-left="120">
+              <rich-text :nodes="content"></rich-text>
+            </scroll-view>
+          </view>
+          <view class="data-but text-color-fff sys-background-dominant sys-size-30 sys-weight-500 sys-radius-100" @click.stop="setConsent()">同意</view>
+        </view>
+
+      </uni-popup>
+    </view>
+
   </view>
 
 </template>
 
 <script>
+import tools from "@/service/tools";
+import {getMessage} from "@/api/common";
+
 export default {
   name:'agreement',
   data() {
     return {
       isConsent:false,
-      consentShake:false
+      consentShake:false,
+      content:''
     };
   },
+  mounted() {
+    this.getMessage()
+  },
   methods:{
+    setConsent(){
+      this.isConsent=true
+      this.$emit('input', this.isConsent)
+      this.$refs.consentObj.close('bottom')
+    },
+    async getMessage() {
+      const res = await getMessage({
+        type: 2
+      })
+      if (res.code === 1) {
+        this.content = tools.imgDeal(res.data)
+      }
+    },
+    showContent(){
+      this.$refs.consentObj.open('bottom')
+    },
+    moveHandle() {
+      console.log('--------------------------------hhhhhhhhhhhhhh')
+      return false
+    },
     setIsConsent(){
       this.isConsent=!this.isConsent
       this.$emit('input', this.isConsent)
@@ -52,6 +94,25 @@ export default {
       margin-left: 18rpx;
     }
   }
+  .agreement-data{
+    border-radius: 30rpx 30rpx 0 0;
+    .data-title{
+      width: 100%;
+      border-radius: 30rpx 30rpx 0 0;
+    }
+    .data-content{
+      padding: 20rpx 40rpx;
+      .content-box{
+        height: 600rpx;
+      }
+    }
+    .data-but{
+      height: 96rpx;
+      line-height: 96rpx;
+      text-align: center;
+      margin: 0 75rpx;
+    }
+  }
 }
 
 </style>

+ 3 - 0
pages/login/register.vue

@@ -58,6 +58,9 @@ import txUploadFile from "@/service/txOssSts";
 
 export default {
   components: {Agreement, EnInput},
+  onPullDownRefresh() {
+    return false
+  },
   data() {
     return {
       accountData:{

+ 0 - 1
service/tools.js

@@ -175,7 +175,6 @@ tools.updateVersion = function (sysVersion, appUrl) {
  * @returns {*}
  */
 tools.imgDeal = function (str) {
-    console.log(str)
     if (str === null || str === undefined) {
         return '';
     } else {

+ 4 - 1
static/css/common.css

@@ -2,7 +2,10 @@
     box-sizing: border-box;
     padding-bottom: env(safe-area-inset-bottom);
 }
-
+.iPhone-padding{
+    box-sizing: border-box;
+    padding-bottom: env(safe-area-inset-bottom);
+}
 
 /*字体大小*/
 .sys-size-16{

BIN
static/img/login/consent_bg.png


+ 1 - 1
uni_modules/uni-popup/components/uni-popup/i18n/en.json

@@ -1,7 +1,7 @@
 {
 	"uni-popup.cancel": "cancel",
 	"uni-popup.ok": "ok",
-	"uni-popup.placeholder": "pleace enter",
+	"uni-popup.placeholder": "please enter",
 	"uni-popup.title": "Hint",
 	"uni-popup.shareTitle": "Share to"
 }

+ 6 - 4
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -1,6 +1,6 @@
 <template>
 	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
-		<view @touchstart="touchstart">
+		<view >
 			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
 				:duration="duration" :show="showTrans" @click="onTap" />
 			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
@@ -192,10 +192,12 @@
 				// TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
 				if (safeArea && this.safeArea) {
 					// #ifdef MP-WEIXIN
-					this.safeAreaInsets = screenHeight - safeArea.bottom
+					// this.safeAreaInsets = screenHeight - safeArea.bottom
+					this.safeAreaInsets = 0
 					// #endif
 					// #ifndef MP-WEIXIN
-					this.safeAreaInsets = safeAreaInsets.bottom
+					// this.safeAreaInsets = safeAreaInsets.bottom
+					this.safeAreaInsets = 0
 					// #endif
 				} else {
 					this.safeAreaInsets = 0
@@ -301,7 +303,7 @@
 			},
 			// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
 			touchstart() {
-				this.clearPropagation = false
+				// this.clearPropagation = false
 			},
 
 			onTap() {