Kaynağa Gözat

增加使用手册

XWookey 1 yıl önce
ebeveyn
işleme
32bb412673

+ 4 - 1
app.json

@@ -41,7 +41,10 @@
     "pages/ucenter/accountsecurity/index/index",
     "pages/ucenter/accountsecurity/checkphonesecuirty/checkphonesecruity",
     "pages/ucenter/accountsecurity/mdfpassword/mdfpassword",
-    "pages/ucenter/accountsecurity/unbindphone/unbindphone"
+    "pages/ucenter/accountsecurity/unbindphone/unbindphone",
+    "pages/howtouse/howtouse",
+    "pages/agreement/userAgreement",
+    "pages/agreement/list"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 72 - 0
pages/agreement/list.js

@@ -0,0 +1,72 @@
+// pages/agreement/list.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  userAgreement(){
+    let url = '/pages/agreement/userAgreement'
+    wx.navigateTo({
+      url
+    });
+  },
+})

+ 4 - 0
pages/agreement/list.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "用户协议"
+}

+ 15 - 0
pages/agreement/list.wxml

@@ -0,0 +1,15 @@
+<!--pages/agreement/list.wxml-->
+<view class="container">
+
+
+  <view class="zan-cell" hover-class="active" bindtap="userAgreement">
+  <view class="zan-text">
+    <text>派捷充电用户使用协议</text>
+  </view>
+  <view class="zan-ft">
+    <image src='/images/enter.png'></image>
+  </view>
+  </view>
+
+</view>
+

+ 53 - 0
pages/agreement/list.wxss

@@ -0,0 +1,53 @@
+page {
+  height: 100%;
+  width: 100%;
+  background: #f4f4f4;
+}
+
+.container {
+  /* background: #f4f4f4; */
+  height: auto;
+  overflow: hidden;
+  width: 100%;
+}
+
+.zan-cell {
+  margin: 10rpx 0;
+  height:80rpx;
+  width: calc(100% - 80rpx);
+  position: relative;
+  padding: 0rpx 30rpx 0rpx 40rpx;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 2rpx solid #f1f1f1;
+  background: #FFFFFF;
+}
+
+
+.zan-icon {
+  margin:12rpx 0rpx 0rpx -25rpx;
+  width: 68rpx;
+  height: 69rpx;
+}
+.zan-icon image {
+  display: block;
+  width: 68rpx;
+  height: 69rpx;
+}
+
+.zan-text{
+  width:100%;
+}
+.zan-ft{
+  margin: 0;
+  width: 14rpx;
+  height: 24rpx;
+}
+.zan-ft image{
+  display: block;
+  width: 14rpx;
+  height: 24rpx;
+  /*transform:rotate(180deg);*/
+}

+ 83 - 0
pages/agreement/userAgreement.js

@@ -0,0 +1,83 @@
+// pages/agreement/userAgreement.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    baseUrl: getApp().globalData.postHeadAgreement.substring(getApp().globalData.postHeadAgreement,getApp().globalData.postHeadAgreement.indexOf("/",8))
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    console.info(this.data.baseUrl)
+    // wx.downloadFile({
+    //   // 示例 url,并非真实存在
+    //   url: 'https://jqcs.pjnes.com/web/profile/avatar/派捷充电用户使用协议.docx',
+    //   success: function (res) {
+    //     const filePath = res.tempFilePath
+    //     wx.openDocument({
+    //       filePath: filePath,
+    //       success: function (res) {
+    //         console.log('打开文档成功')
+    //       }
+    //     })
+    //   }
+    // })
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  htmlLoad(){
+
+  }
+})

+ 4 - 0
pages/agreement/userAgreement.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "用户协议"
+}

+ 7 - 0
pages/agreement/userAgreement.wxml

@@ -0,0 +1,7 @@
+<!--pages/agreement/userAgreement.wxml-->
+<!-- <web-view src="https://jqcs.pjnes.com/web/profile/avatar/user.html"></web-view> -->
+<view class="page-body">
+  <view class="page-section page-section-gap">
+    <web-view src="{{baseUrl}}/web/profile/avatar/user.html" bindload='htmlLoad'></web-view>
+  </view>
+</view>

+ 4 - 0
pages/agreement/userAgreement.wxss

@@ -0,0 +1,4 @@
+.page-section-gap{
+  box-sizing: border-box;
+  padding: 0 30rpx;
+}

+ 91 - 0
pages/howtouse/howtouse.js

@@ -0,0 +1,91 @@
+// pages/howtouse/howtouse.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    imgs:[1,2,3,4,5,6,7],
+    imgUrls:[],
+    baseUrl: getApp().globalData.postHeadAgreement.substring(getApp().globalData.postHeadAgreement,getApp().globalData.postHeadAgreement.indexOf("/",8))
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    let imgUrls = [];
+    for(let i=0;i<this.data.imgs.length;i++){
+      imgUrls.push(this.data.baseUrl + "/web/profile/avatar/howtouse/" + this.data.imgs[i] + ".jpg");
+    }
+    console.info(imgUrls)
+    this.setData({
+      imgUrls
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },  
+  previewImage(e){
+    console.info(e)
+    var that = this,
+    
+    //获取当前图片的下表
+      index = e.currentTarget.dataset.index,
+      //数据源
+      imgUrls = this.data.imgUrls;
+    wx.previewImage({
+    //当前显示下表
+     current: imgUrls[index],
+     //数据源
+     urls: imgUrls
+    })
+  },
+})

+ 4 - 0
pages/howtouse/howtouse.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "使用说明",
+  "usingComponents": {}
+}

+ 8 - 0
pages/howtouse/howtouse.wxml

@@ -0,0 +1,8 @@
+<!--pages/howtouse/howtouse.wxml-->
+<swiper style="height: 100vh; width: 100vw;" indicator-dots="true">
+  <block wx:for="{{imgUrls}}" wx:key="unique"  >
+    <swiper-item style="height: 100vh; width: 100vw;">
+      <image src="{{item}}" style="height: 100vh; width: 100vw;" mode="aspectFit" data-index="{{index}}" bindtap="previewImage"/>
+    </swiper-item>
+  </block>
+</swiper>

+ 1 - 0
pages/howtouse/howtouse.wxss

@@ -0,0 +1 @@
+/* pages/howtouse/howtouse.wxss */

+ 5 - 0
pages/index/index.js

@@ -79,6 +79,11 @@ Page({
     showModal: false,
     notice: null
   },
+  howtouse(){
+    wx.navigateTo({
+      url:'/pages/howtouse/howtouse'
+    });
+  },
   wxScan(q) {
     //console.log(decodeURIComponent(e.q));
     let charePileId = decodeURIComponent(q).replace("https://cdgl.pjnes.com/", "");

+ 3 - 0
pages/index/index.wxml

@@ -4,10 +4,13 @@
       <image src='/images/search.png'></image>
       <text>{{keywords}}</text>
     </view>
+    <view class='city_select' bindtap="howtouse">使用说明</view>
+    <view class='city_select' style="width: 50rpx;"> </view>
     <view style="display: none;" class='city_select'>{{city==null?'北京市':city}}</view>
     <view style="display: none;"  class='down'>
       <image src='/images/down.png'></image>
     </view>
+    <view  style="display: none;" class='howtouse' bindtap="howtouse">使用说明</view>
   </view>
   <view class="{{textData.name?'map_container':'map_container_big'}}">
     <view wx:if="{{textData}}" class='map_textdata_fast'>

+ 15 - 0
pages/index/index.wxss

@@ -2,6 +2,7 @@
   height: 100rpx;
   width: 100%;
   display: flex;
+  flex-direction: row;
 }
 .section .input {
   width: 100%;
@@ -53,6 +54,20 @@
   color: #333333;
   padding: 0;
 }
+.howtouse{
+  line-height: 70rpx;
+  height: 80rpx;
+  text-align: left;
+  width:200rpx;
+  font-size: 28rpx;
+  font-family: 'Lucida Sans',
+                 'Lucida Sans Regular',
+                 'Lucida Grande',
+                 'Lucida Sans Unicode',
+                 Geneva,
+                 Verdana,
+              sans-serif;color: #333333;
+}
 .down image {
   margin: 24rpx auto;
   height: 12rpx;

+ 6 - 0
pages/register/register.js

@@ -516,6 +516,12 @@ Page({
       phoneNumber: this.data.servicetel,
     })
   },
+  userAgreement(){
+    let url = '/pages/agreement/userAgreement'
+    wx.navigateTo({
+      url
+    });
+  },
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 3 - 1
pages/register/register.wxml

@@ -49,7 +49,9 @@
       <button class='login_button' bindtap="getUserProfile">
       注册
     </button>
-    
+    <view style="width: 100%;text-align: center;padding:20rpx 0">
+      <text>点击注册即表示同意<text style="color:#00a8dc" bindtap="userAgreement">用户使用协议</text></text>
+    </view>
     <view class='phone_call_class' bindtap="phoneCall">
           <span>联系客服:  {{servicetel}}</span>
   </view>

+ 1 - 1
pages/register/register.wxss

@@ -205,7 +205,7 @@
 
 .phone_call_class{
   text-align: center;
-  margin: 100rpx 0rpx;
+  margin: 60rpx 0rpx;
   color: #c9c9c9;
   font-size: 28rpx;
 }

+ 6 - 0
pages/ucenter/index/index.js

@@ -204,6 +204,12 @@ Page({
       });
     }
   },
+  goAgreement(){
+    let url = '/pages/agreement/list'
+    wx.navigateTo({
+      url
+    });
+  },
   goHelp(){
     // wx.downloadFile({
     //   //url: getApp().globalData.postHeadAgreement + '/restapi/wechat/updateUser',//要预览的PDF的地址

+ 12 - 0
pages/ucenter/index/index.wxml

@@ -144,6 +144,18 @@
           <image src='/images/enter.png'></image>
         </view>
       </view>
+      <view class="zan-cell" hover-class="active" bindtap="goAgreement">
+        <view class="zan-icon">
+          <!-- <image src='/images/help.png'></image> -->
+          <image src='/images/column.png'></image>
+        </view>
+        <view class="zan-text">
+          <text>用户协议</text>
+        </view>
+        <view class="zan-ft">
+          <image src='/images/enter.png'></image>
+        </view>
+      </view>
       <view class="zan-cell" hover-class="active" bindtap="goHelp">
         <view class="zan-icon">
           <!-- <image src='/images/help.png'></image> -->

+ 1 - 1
project.private.config.json

@@ -4,5 +4,5 @@
   "setting": {
     "compileHotReLoad": true
   },
-  "libVersion": "2.31.0"
+  "libVersion": "2.31.1"
 }