Browse Source

feat: 页面+对接接口:防骗指南、用户协议、隐私政策

Moss 1 year ago
parent
commit
d74cbe672d

+ 3 - 3
src/common/http/index.js

@@ -48,9 +48,9 @@ export const $http = (url, method, data, json) => {
         //   })
         // })
 
-        uni.navigateTo({
-          url: '/pages/login/indexs'
-        })
+        // uni.navigateTo({
+        //   url: '/pages/login/indexs'
+        // })
       }
       return Promise.reject(new Error(res.message || 'Error'))
     } else {

+ 6 - 0
src/pages.json

@@ -72,6 +72,12 @@
       "style": {
         "navigationBarTitleText": "添加地址"
       }
+    },
+    {
+      "path": "pages/mine/parse",
+      "style": {
+        "navigationBarTitleText": "防骗指南"
+      }
     },
     {
       "path": "pages/goods/list",

+ 1 - 1
src/pages/login/indexs.vue

@@ -103,7 +103,7 @@
         this.model.accountCode = value.usercode
         this.model.password = value.password
       }
-      this.getCode()
+      // this.getCode()
     },
     methods: {
       //存储账号密码

+ 0 - 8
src/pages/mine/guide.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 3 - 3
src/pages/mine/index.vue

@@ -102,10 +102,10 @@ export default {
 
       pageList: [
         { name: '我的地址', url: '/pages/mine/address/list' },
-        { name: '防骗指南', url: '' },
+        { name: '防骗指南', url: '/pages/mine/parse?type=1' },
         { name: '联系客服', url: 'contact' },
-        { name: '隐私政策', url: '' },
-        { name: '用户协议', url: '' },
+        { name: '隐私政策', url: '/pages/mine/parse?type=2' },
+        { name: '用户协议', url: '/pages/mine/parse?type=3' },
       ],
     }
   },

+ 59 - 0
src/pages/mine/parse.vue

@@ -0,0 +1,59 @@
+<template>
+  <zj-page-layout
+  	:bgColor="'#FFFFFF'"
+  	:hasFooter="false"
+  	:isScroll="false">
+  	<view class="content">
+  		<u-parse :content="content" :tagStyle="style"></u-parse>
+  	</view>
+  </zj-page-layout>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				type: 1,
+				content: '',
+				style: {
+					p: 'font-size: 32rpx; line-height: 52rpx;',
+				}
+			}
+		},
+		onLoad({type}) {
+			this.type = type;
+      if(type == 1) {
+        uni.setNavigationBarTitle({
+          title: '防骗指南'
+        })
+      }else if(type == 2) {
+        uni.setNavigationBarTitle({
+          title: '隐私政策'
+        })
+      }else if(type == 3) {
+        uni.setNavigationBarTitle({
+          title: '用户协议'
+        })
+      }
+			
+			this.getDetail();
+		},
+		methods: {
+			getDetail() {
+				this.$api.get('/app/config/detail-by-type', {
+          configType: this.type
+        }).then(res => {
+					this.content = res.data ? res.data.content : '';
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		image {
+			width: 100%;
+		}
+	}
+</style>