Browse Source

fix: work

wangyuan 2 years ago
parent
commit
2ddf7a5a95
4 changed files with 18 additions and 22 deletions
  1. 1 1
      app.json
  2. 10 18
      pages/workbench/workbench.js
  3. 1 2
      pages/workbench/workbench.wxml
  4. 6 1
      pages/workbench/workbench.wxss

+ 1 - 1
app.json

@@ -1,5 +1,5 @@
 {
-  "entryPagePath": "pages/login/login",
+  "entryPagePath": "pages/workbench/workbench",
   "pages": [
     "pages/login/login",
     "pages/workbench/workbench",

+ 10 - 18
pages/workbench/workbench.js

@@ -103,24 +103,16 @@ Page({
     writeOffOrder(data).then(res => {
       wx.hideLoading()
       const response = res.data
-      if (response.useNum == 0) {
-        wx.showModal({
-          content: '该用户检测次数为0,提示充值',
-          confirmColor: '#333',
-          showCancel: false
-        })
-      } else {
-        that.setData({
-          orderNo: response.orderNo,
-          orderId: response.orderId,
-          personName: response.personName,
-          personSex: response.personSex,
-          birthday: response.birthday,
-          age: response.age,
-          useNum: response.useNum,
-          overlayShow: true
-        })
-      }
+      that.setData({
+        orderNo: response.orderNo,
+        orderId: response.orderId,
+        personName: response.personName,
+        personSex: response.personSex,
+        birthday: response.birthday,
+        age: response.age,
+        useNum: response.useNum,
+        overlayShow: true
+      })
     }).catch(e => {
       wx.hideLoading()
       wx.showModal({

+ 1 - 2
pages/workbench/workbench.wxml

@@ -1,6 +1,5 @@
 <!--pages/workbench/workbench.wxml-->
 <view class="work-content wh">
-  <view class="notice">当前已获得{{deviceName}}检测车权限</view>
   <view class="account-info  ittflex-jcs">
     <view class="left half ittflex-jcs">
       <view class="head-img">
@@ -8,7 +7,7 @@
       </view>
       <view class="userinfo">
         <view class="username">{{userName}}</view>
-        <view class="usernum">{{workerId}}</view>
+        <view class="usernum">当前已获得{{deviceName}}检测车权限</view>
       </view>
     </view>
     <view class="right half">

+ 6 - 1
pages/workbench/workbench.wxss

@@ -20,8 +20,13 @@
   background: #FFFFFF;
   border-radius: 20rpx;
 }
+.left {
+  width: 70%;
+}
+.right {
+  width: 30%;
+}
 .half {
-  width: 50%;
   height: 100%;
 }
 .head-img {