roose 4 лет назад
Родитель
Сommit
99a34a6ce8

+ 1 - 1
app.json

@@ -1,7 +1,7 @@
 {
   "pages": [
-    "pages/notice/notice",
     "pages/index/index",
+    "pages/notice/notice",
     "pages/login/login",
     "pages/visitandinfo/visitandinfo",
     "pages/identity/identity",

+ 1 - 140
pages/identity/Identity.js

@@ -3,146 +3,7 @@ import WxValidate from '../../utils/WxValidate';
 const tools = require('../../utils/tools.js');
 Page({
   data: {
-    isRz: 0,
-    userName: "",
-    phone: "",
-    card: "",
-    isInput1: false,
-    isInput2: false,
-    isInput3: false
+    name:'',
   },
-  // 错误信息回显
-  showModal(error) {
-    wx.showModal({
-      content: error.msg,
-      showCancel: false,
-    })
-  },
-  // 提交
-  tj(sessionKey, params) {
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/student/uthentication',
-      method: "post",
-      data: {
-        studentName: params.userName,
-        studentCard: params.card,
-        phone: params.phone,
-        sessionKey: sessionKey
-      },
-      success: function (res) {
-        if (res.data.code == 0) {
-          wx.showModal({
-            showCancel: false,
-            content: res.data.msg,
-            success(res) {
-              if (res.confirm) {
-                wx.switchTab({
-                  url: '../index/index'
-                })
-              }
-            }
-          })
-        } else {
-          wx.showModal({
-            showCancel: false,
-            content: res.data.msg
-          })
-        }
-      }
-    })
-  },
-  // 表单提交 跳转tj()
-  async formSubmit(e) {
-    wx.showLoading({
-      mask: true,
-      title: '加载中',
-    })
-    // let _this = this;
-    if (this.data.isRz == 0) {
-      wx.hideLoading()
-      const params = e.detail.value
-      if (!this.WxValidate.checkForm(params)) {
-        const error = this.WxValidate.errorList[0]
-        this.showModal(error)
-        wx.hideLoading()
-        return false
-      }
-      const sessionKey = await tools.checkSessionAndLogin();
-      this.tj(sessionKey, params);
-    } else {
-      wx.hideLoading()
-      wx.showModal({
-        showCancel: false,
-        content: "您已经认证过了"
-      })
-    }
-  },
-  // 如果有就把信息回显出来
-  getXx(sessionKey) {
-    // let _this = this;
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/student/selStudentSessionKeyEcho',
-      method: "post",
-      data: {
-        sessionKey: sessionKey
-      },
-      success:  (res)=> {
-        if (res.data.code == 0) {
-          if (res.data.data !== null || res.data.data !== "") {
-            this.setData({
-              isRz: 1,
-              userName: res.data.data.miniName,
-              phone: res.data.data.miniPhone,
-              card: res.data.data.studentCard,
-              isInput3: true
-            })
-          } else {
-            console.log("我没认证,需要认证")
-          }
-        } else {
-          console.log("报错额")
-        }
-        console.log(res)
-      }
-    })
-  },
-  async onLoad() {
-    const sessionKey = await tools.checkSessionAndLogin();
-    this.getXx(sessionKey);
-    this.initValidate();
-  },
-   // 验证字段的规则
-  initValidate() {
-    const rules = {
-      userName: {
-        required: true
-      },
-      phone: {
-        required: true,
-        tel: true,
-      },
-      card: {
-        required: true,
-        idcard: true,
-      }
-    }
-
-    // 验证字段的提示信息,若不传则调用默认的信息
-    const messages = {
-      userName: {
-        required: '请输入姓名'
-      },
-      phone: {
-        required: '请输入手机号',
-        tel: '请输入正确的手机号',
-      },
-      card: {
-        required: '请输入身份证号码',
-        idcard: '请输入正确的身份证号码',
-      }
-    }
 
-    // 创建实例对象
-    this.WxValidate = new WxValidate(rules, messages)
-  }
 })

+ 1 - 1
pages/identity/Identity.json

@@ -1,4 +1,4 @@
 {
-  "navigationBarTitleText":"身份认证",
+  "navigationBarTitleText":"身份",
   "usingComponents": {}
 }

+ 1 - 22
pages/identity/Identity.wxml

@@ -1,22 +1 @@
-<view class='container'>
-	<form bindsubmit="formSubmit">
-		<view class="form_item">
-			<image src='/images/shenfen1.png' mode="aspectFit" class="icon1"></image>
-			<input style='display:inline-block;height:60%;' disabled="{{isInput1}}" placeholder-style='font-size:30rpx;' placeholder='请输入姓名' name='userName' value="{{userName}}"></input>
-		</view>
-		<view class="form_item">
-			<image src='/images/shenfen2.png' mode="aspectFit" class="icon1"></image>
-			<input style='display:inline-block;height:60%;' disabled="{{isInput2}}" placeholder-style='font-size:30rpx;' placeholder='请输入手机号' name='phone' type='number' value="{{phone}}"></input>
-			<!-- <view class="getyzm">获取验证码</view> -->
-		</view>
-		<!-- <view class="form_item">
-			<image src='/images/shenfen3.png' mode="aspectFit" class="icon1"></image>
-			<input style='width:80%;display:inline-block;height:60%;' placeholder-style='font-size:30rpx;' placeholder='请输入验证码'></input>
-		</view> -->
-		<view class="form_item">
-			<image src='/images/shenfen4.png' mode="aspectFit" class="icon1"></image>
-			<input style='width:80%;display:inline-block;height:60%;' disabled="{{isInput3}}" placeholder-style='font-size:30rpx;' placeholder='请输入身份证号' name="card" value="{{card}}"></input>
-		</view>
-		<button class="qrrz" formType="submit">前往认证</button>
-	</form>
-</view>
+<view>身份卡</view>

+ 0 - 40
pages/identity/Identity.wxss

@@ -1,40 +0,0 @@
-.form_item{
-  width: 600rpx;
-  margin-left: 75rpx;
-  height: 80rpx;
-  display: flex;
-  align-items:center;
-  border-bottom:1px solid #cdcdcd;
-  margin-top: 30rpx;
-}
-.icon1{
-  width: 43rpx;
-  height: 30rpx;
-  margin-right: 20rpx;
-}
-.getyzm{
-  color: #d72f1d;
-  font-size: 24rpx;
-  font-weight: 900;
-  border: 1px solid #d72f1d;
-  border-radius: 30rpx;
-  width: 150rpx;
-  height: 50rpx;
-  line-height: 50rpx;
-  text-align: center;
-}
-.qrrz{
-  /* width: 659rpx; */
-  height: 77rpx;
-  /* line-height: 57rpx; */
-  margin-left: 95rpx;
-  border-radius: 40rpx;
-  font-size: 29rpx;
-  font-weight: 600;
-  color: #fff;
-  background: -webkit-linear-gradient(left,#d7301d,#f99c30);
-  box-shadow: 5px 5px 5px #eea390; 
-  margin-bottom: 20rpx;
-  text-align: center;
-  margin-top: 300rpx;
-}

+ 5 - 1
pages/index/index.js

@@ -32,7 +32,11 @@ Page({
       url: '/pages/visitandinfo/visitandinfo',
     })
   },
-
+  goTongzhi(){
+    wx.navigateTo({
+      url: '/pages/notice/notice',
+    })
+  },
   goPaiming() {
     wx.navigateTo({
       url: '/pages/paiming/paiming',

+ 1 - 1
pages/index/index.wxml

@@ -8,7 +8,7 @@
 			</block>
 		</swiper>
 	</view>
-	<view class="flex-box">
+	<view class="flex-box" bindtap="goTongzhi">
 		<image src="/images/tongzhi.png" style="width: 80rpx; height: 31rpx;"></image>
 		<view class="bck">今日探访老人可得双倍积分</view>
 	</view>

+ 3 - 3
pages/login/login.js

@@ -31,9 +31,9 @@ Page({
       },
       success: (res) => {
         if (res.data.code == 0) {
-          // wx.switchTab({
-          //   url: '/pages/index/index',
-          // })
+          wx.switchTab({
+            url: '/pages/index/index',
+          })
           wx.setStorageSync('user', 'user')
         }
       }

+ 59 - 2
pages/notice/notice.js

@@ -3,6 +3,63 @@ var util = require('../../utils/md5.js')
 Page({
   data: {
     currentTabIndex: 0,
+    readList: [{
+        title: '重要通知',
+        content: '萨达撒多会撒娇的挥洒健康的挥洒考究的挥洒的货架上',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知222',
+        content: 'wewewe',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知222',
+        content: 'wewewe',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知222',
+        content: 'wewewe',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知222',
+        content: 'wewewe',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知',
+        content: 'skdaskjd阿斯顿撒多撒多撒多萨迪克撒旦卡萨丁',
+        time: '2020/07/08'
+      },
+      {
+        tile: '重要通知',
+        content: '所得税卡的挥洒考究的哈斯科技带回家卡萨的挥洒考究的哈斯卡接电话看手机啊都好看手机锕',
+        time: '2020/07/08'
+      },
+    ],
+    noreadList: [{
+        title: '未读通知',
+        content: '萨达撒多会撒娇的挥洒健康的挥洒考究的挥洒的货架上',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知222',
+        content: 'wewewe',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知',
+        content: 'skdaskjd阿斯顿撒多撒多撒多萨迪克撒旦卡萨丁',
+        time: '2020/07/08'
+      },
+      {
+        title: '重要通知',
+        content: '所得税卡的挥洒考究的哈斯科技带回家卡萨的挥洒考究的哈斯卡接电话看手机啊都好看手机锕',
+        time: '2020/07/08'
+      },
+    ],
   },
   onTabsItemTap: function (event) {
     let index = event.currentTarget.dataset.index;
@@ -10,9 +67,9 @@ Page({
       currentTabIndex: index
     })
   },
-  
+
   onLoad: function () {
-   
+
 
   },
 })

+ 22 - 7
pages/notice/notice.wxml

@@ -9,25 +9,40 @@
 		<view class="yuan" wx:if='{{currentTabIndex != 1}}'></view>
 		<view class='ordert-detail'>
 			<view hidden='{{currentTabIndex != 0}}'>
-				<view class="onread">
+				<view class="onread" wx:for='{{readList}}'>
 					<view>
-						【重要通知
+						【{{item.title}}
 					</view>
 					<view class="title">
-						2020/08/07 12:56:23
+						{{item.time}}
 					</view>
-					<view class="title">内容阿昆达睡觉啦圣诞快乐撒谎的卡拉是的撒接口的哈萨克交换机卡萨丁好贱啊阿回到家卡萨丁挥洒健康第三</view>
+					<view class="title"> {{item.content}} </view>
 					<view class="flex-box">
 						<view class="readwenzi">未读</view>
-						<view>
-							<!-- <image></image> -->
+						<view style="display: flex;">
+							<image src="/images/dui.png" style="width: 40rpx; height: 40rpx; margin-right: 10rpx;"></image>
 							<view>我知道了</view>
 						</view>
 					</view>
 				</view>
 			</view>
 			<view hidden='{{currentTabIndex != 1}}'>
-				sdsd
+				<view class="onread" wx:for='{{readList}}'>
+					<view>
+						【{{item.title}}】
+					</view>
+					<view class="title">
+						{{item.time}}
+					</view>
+					<view class="title">{{item.content}}</view>
+					<view class="flex-box">
+						<view class="readwenzi" style="background:#dcdcdc">已读</view>
+						<view style="display: flex;  align-items: center;">
+							<image src="/images/shan.png" style="width: 50rpx; height: 50rpx; margin-right: 10rpx;"></image>
+							<view>删除</view>
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
 	</view>

+ 5 - 1
pages/notice/notice.wxss

@@ -16,7 +16,10 @@ page {
   justify-content: center;
   height: 80rpx;
   line-height: 80rpx;
-  text-align: center
+  text-align: center;
+  /* position: fixed;
+  width: 100%;
+  height: 150rpx; */
 }
 
 .tabs-item.selected {
@@ -77,4 +80,5 @@ page {
   align-items: center;
   font-size: 24rpx;
   color: #a7a7a7;
+  
 }

+ 1 - 1
pages/personInfo/personInfo.js

@@ -10,7 +10,7 @@ Page({
   },
   shenfen() {
     wx.navigateTo({
-      url: '/pages/identity/Identity',
+      url: '/pages/identity/identity',
     })
   },
   xiugai() {