Explorar o código

行政端扫描功能

zhaojing hai 1 ano
pai
achega
767080f392

+ 1 - 1
src/packagesEnv/pages/administration/asuccess.wpy

@@ -27,7 +27,7 @@
 </style>
 <template>
 <div class="aIndex" :style="{'background-image': 'url('+h5StaticPath+'adminBack.png)'}">
-  <navigationbar></navigationbar>
+  <navigationbar :goto="'home'"></navigationbar>
   <div class="aImageDiv">
     <image class="image" :src="h5StaticPath+'successPc.png'" mode="widthFix" />
   </div>

+ 7 - 3
src/packagesEnv/pages/administration/chooseIdentity.wpy

@@ -26,6 +26,9 @@
     // &:nth-child(1) {
     //   margin-top: 34rpx;
     // }
+    &.checked {
+      background: rgba(61, 203, 204, 0.3);
+    }
     .checked-icon {
       position: absolute;
       right: 0;
@@ -93,10 +96,10 @@
 <template>
   <div class="overflow-wrap"  :style="{'background-image': 'url('+h5StaticPath+'/page-home/adminBack.png)'}">
     <navigationbar :ntitle="'选择登录身份'"></navigationbar>
-   <div class="bind-item" >
+   <div class="bind-item checked" >
       <div class="tenant-name">{{ companyName }}</div>
       <div class="tenant-identity">
-        <div class="info">正式员工</div>
+        <div class="info">{{ userInfo.manageUserType==3?'行政管理员':'' }}</div>
         <image class="logo-icon"  src="{{h5StaticPath+'/page-bind-tenant/logo_icon.svg'}}"/>
       </div>
       <image class="checked-icon"   src="{{h5StaticPath+'/page-bind-tenant/checked.svg'}}"/>
@@ -135,7 +138,8 @@ wepy.page({
   },
   methods: {
     loginAdmin() {
-      confirmLogin({ qrCodeId: this.qrCodeId })
+      //this.qrCodeId 
+      confirmLogin({ qrCodeId: 'd3d390917bd34372a479ba5ff27fc453'})
         .then((res) => {
           if (res.result == 'success') {
             wx.navigateTo({

+ 12 - 2
src/packagesEnv/pages/administration/index.wpy

@@ -75,7 +75,7 @@
       <image class="image" :src="h5StaticPath+'administration.png'" mode="widthFix" />
     </div>
     <div class="aLink">行政端:sagacare.tenants.link</div>
-    <div class="aLink">用电脑打开上方行政端网址<span class="copy">复制网址</span></div>
+    <div class="aLink">用电脑打开上方行政端网址<span class="copy" @click="goto">复制网址</span></div>
   </div>
   <div class="bottom">
     <div class="aButton" @click="scanQrcode">
@@ -92,6 +92,9 @@ import eventHub from '@/common/eventHub';
 import { mapState } from '@wepy/x';
 import store from '@/store';
 import config from '@/config';
+import {
+  checkHasUserInfo,
+} from '@/service/user.js';
 
 wepy.page({
   store,
@@ -107,6 +110,11 @@ wepy.page({
     }),
   },
   methods: {
+    goto:function(){
+      wx.navigateTo({
+            url: `/packagesEnv/pages/administration/chooseIdentity`,
+          });
+    },
     scanQrcode: function() {
       wx.scanCode({
         success: (res) => {
@@ -119,7 +127,9 @@ wepy.page({
       });
     },
   },
-  onLoad(options) {},
+  onLoad(options) {
+    checkHasUserInfo();
+  },
   onShow() {},
 });
 </script>

+ 9 - 2
src/packagesEnv/pages/administration/navigationbar.wpy

@@ -37,7 +37,7 @@ import config from '@/config';
 
 wepy.component({
   store,
-  props: { ntitle: String },
+  props: { goto: String },
   data: {
     h5StaticPath: config.h5StaticPath + '/page-home/',
     barTop: 0,
@@ -59,7 +59,14 @@ wepy.component({
   watch: {},
   methods: {
     goBack() {
-      wx.navigateBack();
+      console.log('this.gotothis.goto',this.goto);
+      if (this.goto == 'home') {
+        wx.navigateTo({
+        url: `/packagesEnv/pages/home/index`,
+      });
+      } else {
+        wx.navigateBack();
+      }
     },
   },
 });

+ 0 - 1
src/packagesEnv/pages/home/index.wpy

@@ -467,7 +467,6 @@ wepy.page({
     console.log("home----onLoad");
     checkLoginNew()
       .then(() => {
-    
         checkHasUserInfo();
         //获取项目list
         getCompanyDataByPhone()