ssfg 4 年之前
父節點
當前提交
0f314df80a

+ 3 - 1
app.json

@@ -17,7 +17,9 @@
     "pages/notice/notice",
     "pages/card/card",
     "pages/personInfo/personInfo",
-    "pages/userBook/userBook"
+    "pages/userBook/userBook",
+    "pages/aboutUs/aboutUs",
+    "pages/adviceSubmit/adviceSubmit"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 66 - 0
pages/aboutUs/aboutUs.js

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

+ 4 - 0
pages/aboutUs/aboutUs.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "关于我们"
+}

+ 2 - 0
pages/aboutUs/aboutUs.wxml

@@ -0,0 +1,2 @@
+<!--pages/aboutUs/aboutUs.wxml-->
+<text>pages/aboutUs/aboutUs.wxml</text>

+ 1 - 0
pages/aboutUs/aboutUs.wxss

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

+ 72 - 0
pages/adviceSubmit/adviceSubmit.js

@@ -0,0 +1,72 @@
+const app = require('../../utils/util.js');
+Page({
+  data: {
+    texts: "至少需要2个字",
+    min: 2, //最少字数
+    max: 200, //最多字数 (根据自己需求改变) 
+    currentWordNumber: 0
+  },
+  //字数限制  
+  inputs: function (e) {
+    // 获取输入框的内容
+    var value = e.detail.value;
+    this.setData({
+      value:e.detail.value
+    })
+    // 获取输入框内容的长度
+    var len = parseInt(value.length);
+    console.log(len)
+    //最少字数限制
+    if (len <= this.data.min)
+      this.setData({
+        texts: "至少还需要",
+        textss: "字",
+        num: this.data.min - len
+      })
+    else if (len > this.data.min)
+      this.setData({
+        texts: " ",
+        textss: " ",
+        num: ''
+      })
+    this.setData({
+      currentWordNumber: len //当前字数  
+    });
+    //最多字数限制
+    if (len > this.data.max) return;
+    // 当输入框内容的长度大于最大长度限制(max)时,终止setData()的执行
+    console.log(this.data)
+  },
+  submit(){
+    wx.request({
+      url: app.globalData.publicUrl + '/feedback/add',
+      method: "POST",
+      data: {
+        appletsId: wx.getStorageSync('openId'),
+        content:this.data.value
+      },
+      success: res => {
+        console.log(res,'我提交成功了')
+        this.setData({
+          value:''
+        })
+        // wx.showToast({
+        //   title: '感谢您的反馈,我们会认真处理问题尽快完善相关功能',
+        //   icon: 'success',
+        //   duration: 2000
+        // })
+        wx.showToast({
+          title: '感谢您的反馈,我们会认真处理问题并尽快完善相关功能!',
+          icon: 'none',
+          duration: 3000,
+        });
+        setTimeout(function(){
+          wx.switchTab({
+            url: '../../pages/personInfo/personInfo'
+          });
+        },3000)
+
+      }
+    });
+  },
+})

+ 4 - 0
pages/adviceSubmit/adviceSubmit.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "意见反馈"
+}

+ 7 - 0
pages/adviceSubmit/adviceSubmit.wxml

@@ -0,0 +1,7 @@
+<view class="conts">
+	<textarea value="{{value}}" class="areas" placeholder='请留下您的宝贵意见和建议...' minlength="{{min}}" maxlength="{{max}}" bindinput="inputs">
+        <text class="currentWordNumber">{{currentWordNumber}}/{{max}}</text>
+        <!-- <text class="hint">{{texts}}{{num}}{{textss}}</text> -->
+    </textarea>
+</view>
+<button bindtap="submit">提交</button>

+ 32 - 0
pages/adviceSubmit/adviceSubmit.wxss

@@ -0,0 +1,32 @@
+.conts{
+  width: 750rpx;
+  height: auto;
+  border: 1rpx soldi red;
+  margin-top: 30rpx;
+}
+.areas{
+  width: 660rpx;
+  height:380rpx;
+  font-size: 30rpx;
+  text-indent: 20rpx;
+  border: 1rpx solid gainsboro;
+  padding-top: 20rpx;
+  margin: 0 auto;
+  overflow: hidden;   
+  position: relative; 
+  padding-right: 40rpx;
+}
+.currentWordNumber{
+  font-size: 28rpx;
+  color: gray;
+  position: absolute;
+  right: 20rpx;
+  bottom: 10rpx;
+}
+.hint{
+   font-size: 28rpx;
+   position: absolute;
+   top: 130rpx;
+   left: 320rpx;
+   color: #FF6600;
+}

+ 2 - 0
pages/collectInfo/collectInfo.js

@@ -3894,6 +3894,7 @@ Page({
         currentIndex: 0
       })
       this.huixian(app.globalData.id, app.globalData.name);
+      this.AllFalse();
     }
   },
   onHide() {
@@ -4034,6 +4035,7 @@ Page({
       this.setData({
         oldPhoneNull: true
       })
+      return false
     }
     if (!(/^1[34578]\d{9}$/.test(this.data.oldInfo[this.data.activeIndex].phone))) {
       this.setData({

+ 7 - 5
pages/personInfo/personInfo.js

@@ -19,16 +19,20 @@ Page({
         url: '/pages/idCard/idCard',
       })
     }
-
   },
   xiugai() {
     wx.navigateTo({
       url: '/pages/updatepassword/updatepassword',
     })
   },
-  userBook() {
+  aboutUs() {
+    wx.navigateTo({
+      url: '/pages/aboutUs/aboutUs',
+    })
+  },
+  adviceSubmit(){
     wx.navigateTo({
-      url: '/pages/userBook/userBook',
+      url: '/pages/adviceSubmit/adviceSubmit',
     })
   },
   tuichu() {
@@ -112,8 +116,6 @@ Page({
         }
       })
     }
-
-
   },
   onLoad() {
 

+ 14 - 7
pages/personInfo/personInfo.wxml

@@ -9,11 +9,11 @@
 			<!-- <open-data type="userNickName" lang="zh_CN"></open-data> -->
 			{{info.userName}}
 		</view>
-		<view class="nc" >
+		<view class="nc">
 			账号:{{info.loginName}}
 		</view>
 	</view>
-	<view class="title"  bindtap="wanshan">
+	<view class="title" bindtap="wanshan">
 		<view class="small-title">
 			<image src="/images/person1.png" style="width: 60rpx; height: 60rpx;"></image>
 			<view class="small-zi">完善资料</view>
@@ -34,15 +34,22 @@
 		</view>
 		<view class="jiantou">></view>
 	</view>
-		<!-- <view class="title" bindtap="userBook">
-		<view class="small-title" >
+	<view class="title" bindtap="aboutUs">
+		<view class="small-title">
+			<image src="/images/userbook.png" style="width: 60rpx; height: 60rpx;"></image>
+			<view class="small-zi">关于我们</view>
+		</view>
+		<view class="jiantou">></view>
+	</view>
+	<view class="title" bindtap="adviceSubmit">
+		<view class="small-title">
 			<image src="/images/userbook.png" style="width: 60rpx; height: 60rpx;"></image>
-			<view class="small-zi">用户手册</view>
+			<view class="small-zi">意见反馈</view>
 		</view>
 		<view class="jiantou">></view>
-	</view> -->
+	</view>
 	<view class="title" bindtap="tuichu">
-		<view class="small-title" >
+		<view class="small-title">
 			<image src="/images/person4.png" style="width: 60rpx; height: 60rpx;"></image>
 			<view class="small-zi">退出登录</view>
 		</view>

+ 1 - 1
project.config.json

@@ -22,7 +22,7 @@
 			"disablePlugins": [],
 			"outputPath": ""
 		},
-		"useCompilerModule": true,
+		"useCompilerModule": false,
 		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",

+ 2 - 2
utils/util.js

@@ -1,10 +1,10 @@
 const globalData = {
   // publicUrl: 'http://info.windd.cn:8080/test',//测试
   //  publicUrl: 'https://info.windd.cn/collection',//公众号
-  publicUrl: 'https://info.windd.cn/test',//正式
+  // publicUrl: 'https://info.windd.cn/test',//正式
   //publicUrl: 'http://10.16.4.12:7001',
   //publicUrl: 'http://10.16.4.8:7001',
-  // publicUrl:'http://10.16.4.7:7001'//立秋
+  publicUrl:'http://10.16.4.7:7001'//立秋
 };
 module.exports = {
   globalData: globalData,