wmaple 1 년 전
부모
커밋
c625ae53a6
5개의 변경된 파일173개의 추가작업 그리고 174개의 파일을 삭제
  1. 3 0
      .gitignore
  2. 2 4
      config/global.config.js
  3. 1 1
      manifest.json
  4. 164 166
      pages/agreement.vue
  5. 3 3
      pages/serviceOrPrivacy.vue

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+node_modules/
+unpackage/
+.history

+ 2 - 4
config/global.config.js

@@ -1,10 +1,8 @@
 const CONFIG = {
   assetsPath: '/static', // 静态资源路径
-  baseUrl: 'http://192.168.0.232:9020/baseshop/api', // 后台接口请求地址
-  // baseUrl: 'https://shop.songhe1688.com/songhe/api', // 后台接口请求地址
-  hostUrl: 'http://h5.tinyshop.rageframe.com', // H5地址(前端运行地址)
+  // baseUrl: 'http://192.168.0.17:8196/api', // 后台接口请求地址
+  baseUrl: 'http://119.45.192.122:1221/prod-api/api', // 后台接口请求地址
   telRegex: "^(1)\\d{10}$", //手机正则
   mailVerify: "^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$",
-  SHAREURL: 'http://192.168.0.145:10030/lida/api'
 };
 export default CONFIG;

+ 1 - 1
manifest.json

@@ -140,7 +140,7 @@
         "template" : "",
         "router" : {
             "mode" : "hash",
-            "base" : "/h5/"
+            "base" : "/yige-h5/"
         },
         "sdkConfigs" : {
             "maps" : {

+ 164 - 166
pages/agreement.vue

@@ -1,173 +1,171 @@
 <template>
-	<view class="agreement">
-		<!-- <navbar ref="navbar" backColor="#fff" :config="config"></navbar> -->
-		<view class="top">
-			<view class="item">
-				一、总则
-			</view>
-			<view class="content">
-				<view v-html="list.shop_protocol">
-					
-				</view>
-			</view>
-			<view class="title">
-				一、注册信息和隐私保护
-			</view>
-			<view class="title-item">
-				<view v-html="list.user_protocol">
-				</view>
-			</view>
-		</view>
-	</view>
+  <view class="agreement">
+    <!-- <navbar ref="navbar" backColor="#fff" :config="config"></navbar> -->
+    <view v-html="detail.protocolContent"></view>
+  </view>
 </template>
 
 <script>
-	export default{
-		data(){
-			return{
-				config: {
-					back: true, //false是tolbar页面 是则不写
-					title: '用户协议',
-					color: '#fff',
-					//背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
-					backgroundColor: [1, "#3775F6"],
-					statusBarFontColor: '#1A1A1A',
-				},
-				list:{}
-			}
-			
-		},
-		onLoad() {
-			this.getList()
-		},
-		methods:{
-			getList(){
-				this.$http.get("/protocol/info").then(res=>{
-					if(res&&res.code==200){
-						this.list = res.data
-					}
-				})
-			}
-		}
-	}
+  export default {
+    data() {
+      return {
+        config: {
+          back: true, //false是tolbar页面 是则不写
+          title: '协议',
+          color: '#1A1A1A',
+          //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
+          backgroundColor: [1, "#fff"],
+          // statusBarFontColor: '#1A1A1A',
+        },
+        detail: {}
+      }
+
+    },
+    onLoad(options) {
+      let title = '协议'
+      if (options.code == "user_protocol") {
+        title = '用户协议'
+      } else if (options.code == "privacy_protocol") {
+        title = '隐私协议'
+      }
+      uni.setNavigationBarTitle({
+        title: title
+      });
+      this.getDetail(options.code || 'user_protocol')
+    },
+    methods: {
+      getDetail(code) {
+        this.$http.get(`/protocol/info?code=${code}`).then(res => {
+          if (res && res.code == 200) {
+            this.detail = res.data
+          }
+        })
+      }
+    }
+  }
 </script>
 
 <style lang="scss" scoped>
-	*{
-		word-break:break-all;
-	}
-	.agreement {
-		width: 100%;
-
-		.top /deep/ img {
-			max-width: 100%;
-		}
-	
-		.top /deep/ .ql-align-center {
-			text-align: center;
-		}
-	
-		.top /deep/ .ql-align-right {
-			text-align: right;
-		}
-	
-		.top /deep/ blockquote {
-			display: block;
-			border-left: 8px solid #d0e5f2;
-			padding: 5px 10px;
-			margin: 10px 0;
-			line-height: 1.4;
-			font-size: 100%;
-			background-color: #f1f1f1;
-		}
-	
-		.top /deep/ .ql-indent-1 {
-			margin-left: 60rpx;
-		}
-	
-		.top /deep/ .ql-indent-2 {
-			margin-left: 120rpx;
-		}
-	
-		.top /deep/ .ql-indent-3 {
-			margin-left: 180rpx;
-		}
-	
-		.top /deep/ .ql-indent-4 {
-			margin-left: 240rpx;
-		}
-	
-		.top /deep/ .ql-indent-5 {
-			margin-left: 300rpx;
-		}
-	}
-	
-	.title-item {
-		img {
-			width: 690rpx;
-			height: 390rpx;
-		}
-	}
-	
-	.top {
-		padding: 30rpx;
-	
-		.item {
-			font-size: 28rpx;
-			font-weight: 700;
-			color: #050505;
-			line-height: 40rpx;
-		}
-	
-		.content {
-			padding: 0 14rpx 26rpx 14rpx;
-			font-size: 24rpx;
-			color: #666666;
-			font-weight: 500;
-			line-height: 48rpx;
-		}
-	
-		.title {
-			font-size: 26rpx;
-			font-weight: 700;
-			color: #050505;
-			line-height: 40rpx;
-		}
-	
-		.title-item {
-			color: #666666;
-			font-weight: 500;
-			line-height: 48rpx;
-			font-size: 24rpx;
-			padding: 0 14rpx;
-		}
-	}
-	.top{
-		.item{
-			font-size: 28rpx;
-			font-weight: 700;
-			color: #050505;
-			line-height: 40rpx;
-		}
-		.content{
-			padding: 0 14rpx 26rpx 14rpx;
-			font-size: 24rpx;
-			color: #666666;
-			font-weight: 500;
-			line-height: 48rpx;
-		}
-		.title{
-			font-size: 26rpx;
-			font-weight: 700;
-			color: #050505;
-			line-height: 40rpx;
-		}
-		.title-item{
-			color: #666666;
-			font-weight: 500;
-			line-height: 48rpx;
-			font-size: 24rpx;
-			padding: 0 14rpx;
-		}
-	}
-</style>
+  * {
+    word-break: break-all;
+  }
+
+  .agreement {
+    padding: 30rpx;
+
+    .top /deep/ img {
+      max-width: 100%;
+    }
+
+    .top /deep/ .ql-align-center {
+      text-align: center;
+    }
+
+    .top /deep/ .ql-align-right {
+      text-align: right;
+    }
+
+    .top /deep/ blockquote {
+      display: block;
+      border-left: 8px solid #d0e5f2;
+      padding: 5px 10px;
+      margin: 10px 0;
+      line-height: 1.4;
+      font-size: 100%;
+      background-color: #f1f1f1;
+    }
+
+    .top /deep/ .ql-indent-1 {
+      margin-left: 60rpx;
+    }
+
+    .top /deep/ .ql-indent-2 {
+      margin-left: 120rpx;
+    }
+
+    .top /deep/ .ql-indent-3 {
+      margin-left: 180rpx;
+    }
+
+    .top /deep/ .ql-indent-4 {
+      margin-left: 240rpx;
+    }
+
+    .top /deep/ .ql-indent-5 {
+      margin-left: 300rpx;
+    }
+  }
+
+  .title-item {
+    img {
+      width: 690rpx;
+      height: 390rpx;
+    }
+  }
+
+  .top {
+    padding: 30rpx;
+
+    .item {
+      font-size: 28rpx;
+      font-weight: 700;
+      color: #050505;
+      line-height: 40rpx;
+    }
+
+    .content {
+      padding: 0 14rpx 26rpx 14rpx;
+      font-size: 24rpx;
+      color: #666666;
+      font-weight: 500;
+      line-height: 48rpx;
+    }
+
+    .title {
+      font-size: 26rpx;
+      font-weight: 700;
+      color: #050505;
+      line-height: 40rpx;
+    }
+
+    .title-item {
+      color: #666666;
+      font-weight: 500;
+      line-height: 48rpx;
+      font-size: 24rpx;
+      padding: 0 14rpx;
+    }
+  }
+
+  .top {
+    .item {
+      font-size: 28rpx;
+      font-weight: 700;
+      color: #050505;
+      line-height: 40rpx;
+    }
+
+    .content {
+      padding: 0 14rpx 26rpx 14rpx;
+      font-size: 24rpx;
+      color: #666666;
+      font-weight: 500;
+      line-height: 48rpx;
+    }
+
+    .title {
+      font-size: 26rpx;
+      font-weight: 700;
+      color: #050505;
+      line-height: 40rpx;
+    }
+
+    .title-item {
+      color: #666666;
+      font-weight: 500;
+      line-height: 48rpx;
+      font-size: 24rpx;
+      padding: 0 14rpx;
+    }
+  }
+</style>

+ 3 - 3
pages/serviceOrPrivacy.vue

@@ -12,16 +12,16 @@
 			}
 		},
 		onLoad(options) {
-			if (options.pageType == "privacy-agreement"){
+			if (options.pageType == "privacy_protocol"){
 				uni.setNavigationBarTitle({
 					title: '隐私协议'
 				});
 			}
-			this.getAgreement(options.pageType || 'privacy-agreement')
+			this.getAgreement(options.pageType || 'privacy_protocol')
 		},
 		methods:{
 			getAgreement(param){
-				this.$http.get(`/protocolConfig/info/${param}`).then(res=>{
+				this.$http.get(`/protocol/info/${param}`).then(res=>{
 					if(res&&res.code==200){
 						this.data = res.data
 					}