Переглянути джерело

update: 添加平台协议

yll 4 роки тому
батько
коміт
6f10f82af6

+ 1 - 0
view/xcx/app.json

@@ -17,6 +17,7 @@
     "pages/user_pwd_edit/index",
     "pages/goods_search/index",
     "pages/user_vip/index",
+    "pages/user_license/license",
     "pages/user_spread_money/index",
     "pages/user_integral/index",
     "pages/user_bill/index",

+ 5 - 0
view/xcx/components/authorize/authorize.js

@@ -152,6 +152,11 @@ Component({
           that.setUserInfo(userInfo);
         }
       });
+    },
+    onTabRegular: function() {
+      wx.navigateTo({
+        url: `/pages/user_license/license`
+      })
     }
   },
 })

+ 7 - 4
view/xcx/components/authorize/authorize.wxml

@@ -1,13 +1,16 @@
 <!--pages/authorize/authorize.wxml-->
 <view class='Popup' hidden='{{iShidden}}'>
    <image src='{{logo_url}}'></image>
-   <view class='title'>授权提醒</view>
-   <view class='tip'>请授权头像等信息,以便为您提供更好的服务</view>
+   <view class='title'>请授权并同意协议</view>
+   <view class='tip'>请授权微信头像,用户名等信息,并遵守
+      <a href='/pages/user_license/license' bindtap='onTabRegular'>《美天旺平台规则》</a>,
+      以便更好地为您服务。
+   </view>
    <view class='bottom flex'>
       <view class='item' bindtap='close'>随便逛逛</view>
       <!-- 在高版本中获取用户信息已改成uni.getUserProfile-->
-	  <button class='item grant'  type="primary" wx:if="{{canIUseGetUserProfile}}" lang="zh_CN" bindtap="getUserProfile"> 去授权 </button>
-	  <button class='item grant'  type="primary" wx:else open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="setUserInfo"> 授权 </button>
+	  <button class='item grant'  type="primary" wx:if="{{canIUseGetUserProfile}}" lang="zh_CN" bindtap="getUserProfile">同意并授权</button>
+	  <button class='item grant'  type="primary" wx:else open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="setUserInfo"> 同意并授权 </button>
    </view>
 </view>
 <view class='mask' hidden='{{iShidden}}' catchtouchmove="true" bindtap='close'></view>

+ 1 - 0
view/xcx/components/authorize/authorize.wxss

@@ -5,6 +5,7 @@
 .Popup image{width:150rpx;height:150rpx;margin:-67rpx auto 0 auto;display:block;border: 8rpx solid #fff;border-radius: 50%}
 .Popup .title{font-size:28rpx;color:#000;text-align:center;margin-top: 30rpx}
 .Popup .tip{font-size:22rpx;color:#555;padding:0 24rpx;margin-top:25rpx;}
+.Popup .tip a{color:rgb(243, 70, 70);}
 .Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
 .Popup .bottom .item.on{width: 100%}
 .flex{display:flex;}

+ 79 - 0
view/xcx/pages/user_license/license.js

@@ -0,0 +1,79 @@
+// pages/user_license/license.js
+Page({
+
+  data: {
+    parameter: {
+      'navbar': '1',
+      'return': '1',
+      'title': '平台协议',
+      'color': true,
+      'class':'0'
+    },
+    html: "<p style='color: red;text-align: center'>html text<p>"
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    var that = this;
+    wx.request({
+      url: 'http://twongstatic.shotshock.shop/docs/twong_user_license.txt',
+      method: 'GET',
+      success: (res) => {
+        that.setData({
+          html: res.data,
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 5 - 0
view/xcx/pages/user_license/license.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "navbar": "/components/navbar/index"
+  }
+}

+ 4 - 0
view/xcx/pages/user_license/license.wxml

@@ -0,0 +1,4 @@
+<navbar parameter='{{parameter}}'></navbar>
+<view>
+  <rich-text nodes="{{html}}"></rich-text>
+</view>

+ 0 - 0
view/xcx/pages/user_license/license.wxss