roose 4 năm trước cách đây
mục cha
commit
57bf1e3d09

+ 80 - 9
pages/index/index.js

@@ -23,14 +23,14 @@ Page({
     duration: 500,
     number: {},
     msgList: [
-      {
-        url: "url",
-        title: "欢迎来到吉顺致养小程序"
-      },
-      {
-        url: "url",
-        title: "欢迎来到吉顺致养小程序"
-      },
+      // {
+      //   url: "url",
+      //   title: "欢迎来到吉顺致养小程序"
+      // },
+      // {
+      //   url: "url",
+      //   title: "欢迎来到吉顺致养小程序"
+      // },
     ]
   },
   goCollect() {
@@ -55,7 +55,6 @@ Page({
   },
   goSaoMa() {
     console.log("扫阿");
-    var _this = this;
     // 允许从相机和相册扫码
     wx.scanCode({
       onlyFromCamera: true,
@@ -93,11 +92,83 @@ Page({
         }
       }
     })
+  },
+  welcomeMessage() {
+    this.setData({
+      msgList: []
+    })
+    if (wx.getStorageSync('user') == '') {
+      wx.request({
+        url: app.globalData.publicUrl + '/welcomeMessage/list',
+        method: "GET",
+        success: (res) => {
+          if (res.data.code == 0) {
+            console.log(res);
+            let result = res.data.data[0].title
+            this.data.msgList.push({
+              // url: '',
+              title: result
+            });
+            this.data.msgList.push({
+              // url: '',
+              title: result
+            });
+            this.setData({
+              msgList: this.data.msgList
+            })
+          }
+        }
+      })
+    } else {
+      wx.request({
+        url: app.globalData.publicUrl + '/appletNotice/listForAppletsFirst',
+        method: "GET",
+        header: {
+          appletsId: wx.getStorageSync('openId')
+        },
+        success: (res) => {
+          if (res.data.code == 0) {
+            console.log(res);
+            if (res.data.data.length == 0) {
+              this.data.msgList.push({
+                // url: '',
+                title: '暂无数据!!!'
+              });
+              this.data.msgList.push({
+                // url: '',
+                title: '暂无数据!!!'
+              });
+              this.setData({
+                msgList: this.data.msgList
+              })
+            } else {
+              let result = res.data.data.title;
+              this.data.msgList.push({
+                // url: '',
+                title: result
+              });
+              this.data.msgList.push({
+                // url: '',
+                title: result
+              });
+              this.setData({
+                msgList: this.data.msgList
+              })
+            }
+
+          }
+        }
+      })
+    }
+
+
+
   },
   onLoad() {
     this.depts();
   },
   onShow() {
     this.depts();
+    this.welcomeMessage();
   }
 })

+ 3 - 0
pages/visitandinfo/visitandinfo.js

@@ -115,6 +115,9 @@ Page({
       success(res) {
         if (res.confirm) {
           //确定绑定的操作
+          
+
+
         } else if (res.cancel) {
           //取消绑定的操作
         }

+ 7 - 7
pages/visitandinfo/visitandinfo.wxml

@@ -38,16 +38,16 @@
 								</view>
 								<view class="td idcard" value="{{item.text}}" bindtap="cellClick" data-infos='{{item}}'>
 									<view>{{item.name}}</view>
-										<view wx:if='{{item.idNumber}}' class="oldzi">({{item.idNumber}}</view>
+									<view wx:if='{{item.idNumber}}' class="oldzi">({{item.idNumber}}</view>
 									<!-- <view wx:if='{{item.idNumber}}' class="oldzi">({{subqian.subqian(item.idNumber)}}</view>
 									<view wx:if='{{item.idNumber}}' class="oldzi">{{subhou.subhou(item.idNumber)}})</view> -->
 								</view>
-								<view class="td" value="{{item.text}}">{{time.formatDate(item.time)}}</view>
-								<view class="td status" wx:if="{{item.status == '1'}}" style="color: #67C23A">填全未审</view>
-								<view class="td status" wx:if="{{item.status == '0'}}" style="color: #F56C6C">未完成</view>
-								<view class="td status" wx:if="{{item.status == '2'}}" style="color: #909399">审核中</view>
-								<view class="td status" wx:if="{{item.status == '3'}}" style="color: #409EFF">审核完成</view>
-								<view class="td status" wx:if="{{item.status == '4'}}" style="color: #E6A23C">审核失败</view>
+								<view class="td" bindtap="cellClick" data-infos='{{item}}' value="{{item.text}}">{{time.formatDate(item.time)}}</view>
+								<view class="td status" bindtap="cellClick" data-infos='{{item}}' wx:if="{{item.status == '1'}}" style="color: #67C23A">填全未审</view>
+								<view class="td status" bindtap="cellClick" data-infos='{{item}}' wx:if="{{item.status == '0'}}" style="color: #F56C6C">未完成</view>
+								<view class="td status" bindtap="cellClick" data-infos='{{item}}' wx:if="{{item.status == '2'}}" style="color: #909399">审核中</view>
+								<view class="td status" bindtap="cellClick" data-infos='{{item}}' wx:if="{{item.status == '3'}}" style="color: #409EFF">审核完成</view>
+								<view class="td status" bindtap="cellClick" data-infos='{{item}}' wx:if="{{item.status == '4'}}" style="color: #E6A23C">审核失败</view>
 							</view>
 						</checkbox-group>
 					</scroll-view>

+ 1 - 0
utils/number.wxs

@@ -1,4 +1,5 @@
 var number = function (val, index) {
+
   return val.subString(index - 1, 1)
   // return val.slice(index,index+1)
 }

+ 2 - 2
utils/util.js

@@ -1,7 +1,7 @@
 const globalData = {
   
-  publicUrl: 'http://info.windd.cn:8080/test',
-
+  //publicUrl: 'http://info.windd.cn:8080/test',
+ publicUrl: 'http://10.16.4.12:7001',
  //publicUrl: 'http://10.16.4.8:7001',
 };
 module.exports = {