zhanghongrui il y a 2 ans
Parent
commit
993862fd40

+ 4 - 25
base/httputil.js

@@ -1,33 +1,11 @@
 // let BASE_Server = "http://127.0.0.1:8329"
 // let BASE_Server = "http://127.0.0.1:8329"
 
 
-  //let BASE_Server = "https://192.168.1.100:18080"
-let BASE_Server = "https://sookajs.top:18080"
+  let BASE_Server = "https://192.168.1.100:18080"
+// let BASE_Server = "https://sookajs.top:18080"
 
 
 
 
-let app = getApp()
-
-
-
-// function send_post_login(url, data, successfun) {
-
-//   wx.request({
-//     url: BASE_Server_Login + url, //仅为示例,并非真实的接口地址 
-//     method: "POST",
-//     header: {
-//       'content-type': 'application/json'
-//     },
-//     data: data,
-//     success(res) {
-//       successfun(res)
-//       // var d = decodeURIComponent(decodeURIComponent(res.data.data))
-//       // console.log("*****", d) 
-//       // var json = JSON.parse(d)
-//       // successfun(json)
-//     }
-//   })
-// }
-
 
 
+let app = getApp()
 
 
 //-----------------------------登录,获取token-----------------------------------
 //-----------------------------登录,获取token-----------------------------------
 function init_userInfo() {
 function init_userInfo() {
@@ -170,6 +148,7 @@ function post_token(url, data, successfun) {
     fail(res){
     fail(res){
       wx.showToast({
       wx.showToast({
         title: "网络请求失败",
         title: "网络请求失败",
+        icon:'none',
       })
       })
     }
     }
 
 

+ 2 - 2
pages/denglu/denglu.js

@@ -30,7 +30,7 @@ Page({
     })
     })
   },
   },
   bindViewlogin(){
   bindViewlogin(){
-    if(!this.data.userName){
+    if(this.data.userName==null||this.data.userName==''){
       wx.showToast({
       wx.showToast({
         title: '请输入用户名',
         title: '请输入用户名',
         icon:'none',
         icon:'none',
@@ -38,7 +38,7 @@ Page({
       })
       })
       return
       return
     }
     }
-    if(!this.data.password){
+    if(this.data.password==null||this.data.password==''){
       wx.showToast({
       wx.showToast({
         title: '请输入密码',
         title: '请输入密码',
         icon:'none',
         icon:'none',

+ 7 - 1
pages/xqzggzs/xqzggzs.js

@@ -114,7 +114,13 @@ Page({
       })
       })
       return
       return
     }
     }
-
+    if(this.data.askCompany==null){
+      wx.showToast({
+        title: '请输入咨询组织名称',
+        icon:'none'
+      })
+      return
+    }
     if(this.data.number==null){
     if(this.data.number==null){
       wx.showToast({
       wx.showToast({
         title: '请输入检查人员编号',
         title: '请输入检查人员编号',

+ 1 - 1
pages/xqzggzs2/xqzggzs2.js

@@ -145,7 +145,7 @@ Page({
   submitXqzggzs2(){
   submitXqzggzs2(){
     if(this.data.company==null){
     if(this.data.company==null){
       wx.showToast({
       wx.showToast({
-        title: '请输入组织名称',
+        title: '请输入咨询组织名称',
         icon:'none'
         icon:'none'
       })
       })
       return
       return

+ 51 - 1
pages/zhenggaijindu/zhenggaijindu.js

@@ -59,7 +59,9 @@ Page({
         end: '#fff',
         end: '#fff',
         icon: '../../img/process_1.png'
         icon: '../../img/process_1.png'
       }
       }
-    ]
+    ],
+     // 期限按钮
+    buttons: [{ id: 1, name: "一天" }, { id: 2, name: "两天" }, { id: 3, name:"三天" }]
 
 
   },
   },
   //进度条的状态
   //进度条的状态
@@ -90,6 +92,7 @@ Page({
     })
     })
   },
   },
 
 
+<<<<<<< HEAD
 
 
   onUnload(){
   onUnload(){
     let page = getCurrentPages();
     let page = getCurrentPages();
@@ -98,4 +101,51 @@ Page({
       isRefresh :this.data.isRefreshUP,
       isRefresh :this.data.isRefreshUP,
     });
     });
   }
   }
+=======
+  // 期限按钮
+  onLoad: function (options) {
+    this.data.buttons[0].checked = true;
+    this.setData({
+      buttons: this.data.buttons,
+    })
+  },
+  radioButtonTap: function (e) {
+    console.log(e)
+    let id = e.currentTarget.dataset.id
+    console.log(id)
+    for (let i = 0; i < this.data.buttons.length; i++) {
+      if (this.data.buttons[i].id == id) {
+        //当前点击的位置为true即选中
+        this.data.buttons[i].checked = true;
+      }
+      else {
+        //其他的位置为false
+        this.data.buttons[i].checked = false;
+      }
+    }
+    this.setData({
+      buttons: this.data.buttons,
+      msg: "id:"+id
+    })
+  },
+  checkButtonTap:function(e){
+    console.log(e)
+    let id = e.currentTarget.dataset.id
+    console.log(id)
+    for (let i = 0; i < this.data.buttons.length; i++) {
+      if (this.data.buttons[i].id == id) {
+        if (this.data.buttons[i].checked == true) {
+          this.data.buttons[i].checked = false;
+         
+        } else {
+          this.data.buttons[i].checked = true;
+          
+        }
+      }
+    }
+    
+  },
+
+
+>>>>>>> 57f7980a209c37c9f7735fbe7e3a57926d779ed2
 })
 })

+ 11 - 0
pages/zhenggaijindu/zhenggaijindu.wxml

@@ -16,4 +16,15 @@
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>
+  <view class="btm_btn">
+    <view class="time_qx">
+      <text>期限:</text>
+      <view class="ttbtn">
+        <block wx:for="{{buttons}}" wx:key="buttons">
+  <button size="mini" class="{{item.checked?'checked_button':'normal_button'}}" data-id="{{item.id}}" bindtap="radioButtonTap">{{item.name}}</button>
+  </block>
+      </view>
+    </view>
+    <button type="primary" class="succ_btn">完成</button>
+  </view>
 </view>
 </view>

+ 48 - 0
pages/zhenggaijindu/zhenggaijindu.wxss

@@ -95,4 +95,52 @@ margin-top: 40rpx;
   display: flex;
   display: flex;
   background: #ccc;
   background: #ccc;
   margin-right: 30rpx;
   margin-right: 30rpx;
+}
+
+.btm_btn{
+  display: flex;
+  flex-direction: row;
+  position: fixed;
+  width: 100%;
+  background-color: rgb(255, 255, 255);
+  bottom: 0px;
+  padding: 40rpx 20rpx;
+  left: 0;
+  border-top: 1px solid rgb(233, 233, 233);
+  box-shadow: 0px 0px 10px #ccc;
+}
+.btm_btn text{
+  font-size: 32rpx;
+  color: #444;
+}
+.time_qx{
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.ttbtn{
+  display: flex;
+  flex-direction: row;
+  
+}
+.ttbtn button{
+padding: 0rpx 30rpx!important;
+font-size: 28rpx!important;
+border-radius: 100rpx!important;
+margin-right: 16rpx;
+font-weight: normal!important;
+border: 1px solid rgb(209, 209, 209);
+}
+.checked_button{
+  background: rgb(248, 89, 41);
+  border: 1px solid #fff!important;
+  color: #fff;
+}
+.normal_button{
+  background: rgb(250, 250, 250);
+}
+.succ_btn{
+  width: auto!important;
+padding: 10rpx 26px!important;
+font-size: 28rpx!important;
 }
 }