浏览代码

1.添加分享规则页面
2.接口调试

zizhong.wang 5 年之前
父节点
当前提交
d9b5580d85
共有 4 个文件被更改,包括 93 次插入0 次删除
  1. 6 0
      pages.json
  2. 13 0
      pages/index/index.vue
  3. 74 0
      pages/index/ruleList/index.vue
  4. 二进制
      static/note.png

+ 6 - 0
pages.json

@@ -25,6 +25,12 @@
 			}
 		},
 		{
+			"path": "pages/index/ruleList/index",
+			"style": {
+				"navigationBarTitleText": "分享规则"
+			}
+		},
+		{
 			"path": "pages/selfCenter/index",
 			"style": {
 				"navigationBarTitleText": "个人中心"

+ 13 - 0
pages/index/index.vue

@@ -52,6 +52,11 @@
 						<view class="uni-share-content-image"><image src="/static/share-icon1.png" class="image" /></view>
 						<view class="uni-share-content-text">海报分享</view>
 					</button>
+					<button class="uni-share-content-box" @click="goRuleList">
+						<view class="uni-share-content-image"><image src="/static/note.png" class="image" /></view>
+						<view class="uni-share-content-text">分享规则</view>
+					</button>
+					
 				</view>
 				<view class="uni-share-btn" @click="cancelModal()">取消</view>
 			</view>
@@ -255,6 +260,14 @@
 					complete: () => {}
 				});
 			},
+			goRuleList(){
+					uni.navigateTo({
+					url: '/pages/index/ruleList/index',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
 			 copyCode(){
 				let that = this;
 				 if(!that.isAuth){

+ 74 - 0
pages/index/ruleList/index.vue

@@ -0,0 +1,74 @@
+<template>
+		<view>
+			<view>
+				<view class="help-content" style="padding: 10px;">
+					<u-parse :content="helpHtmlParse"></u-parse>
+					<!-- <text style="margin-right: 75%;"> 如何分销?</text>
+					<text> 对于小程序所有授权用户,均可以进行分销推广产品以获得分销奖励</text>
+					<text> 打开小程序可以看到产品列表,您可以从产品列表中选择某个产品点击分享按钮,分享给好友,好友授权后即关联为您的直属下级</text>
+					<text> 1、本人购买过产品------可以分享直属下级的购买产品奖励-----拥有两个以上直属下级才可分享下级的下级的购买产品奖励;</text>
+				    <text> 2、本人未购买过产品-----可以分享直属下级的购买产品奖励------拥有5个以上直属下级才可以分享下级的下级的购买产品奖励</text> -->
+				</view>
+				
+			</view>
+		</view>
+</template>
+
+<script>
+	 var md5 = require('../../../common/md5.js')
+	import uParse from '@/components/gaoyia-parse/parse.vue'
+		export default {
+		components: {
+			uParse,
+		},
+		data() {
+			return {
+				helpHtmlParse:''
+			}
+		},
+		onLoad() {
+	         this.getDetail()
+		},
+		methods: {
+			getDetail(){
+				 uni.showLoading({
+					title: '加载中',
+				});
+				let  that = this;
+				uni.request({
+					url: getApp().globalData.shareUrl, //需要设置为全局
+					method: 'POST',
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					data: {
+						method: 'getShareRule',
+						timestamp: getApp().globalData.globalTimestamp, //Date.now()
+						sign: md5('getShareRule' + getApp().globalData.globalTimestamp),
+						id:1,
+					},
+					success: res => {
+						if (res.data.code === 200) {
+							uni.hideLoading();
+							that.helpHtmlParse = res.data.msg.sharerule
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	// @import url("../../../../components/gaoyia-parse/parse.css");
+	.help-content {
+		font-size: 30rpx;
+		background: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
+	.help-content text {
+		margin-bottom: 2%;
+	}
+</style>

二进制
static/note.png