xtz 4 éve
szülő
commit
3f0a51d28f

+ 1 - 0
answer - 副本/package.json

@@ -17,6 +17,7 @@
     "js-cookie": "^2.2.1",
     "js-cookies": "^1.0.4",
     "vant": "^2.11.1",
+    "vconsole": "^3.3.4",
     "vue": "^2.6.10",
     "vue-cropper": "^0.5.2",
     "vue-router": "^3.1.3",

+ 2 - 1
answer - 副本/public/index.html

@@ -15,9 +15,10 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>static/logo.ico">
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:100,300,400,500,600,700,900">
-    <script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script>
+    <!-- <script src="https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script> -->
     <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
     <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
+    <!-- <script src="./static/jwxwork-1.0.0.js"></script> -->
     <title>一键报修</title>
     <style>
       *{

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
answer - 副本/public/static/jwxwork-1.0.0.js


+ 1 - 1
answer - 副本/src/api/interceptor.js

@@ -19,7 +19,7 @@ service.interceptors.request.use(
       'from': 0,
       'page': 1,
       'rows': 10,
-      'userId': cookie.get('userId'),
+      'userId': cookie.get('userId') || 11829,
       'sidx': '',
       'sord': '',
       'token': '',

+ 30 - 23
answer - 副本/src/main.js

@@ -10,12 +10,20 @@ import Cookies from 'js-cookie'
 
 import * as filters from '@/filter'
 
+import VConsole from 'vconsole'
+
 import { postHttps, getHttps } from '@/api/index'
 import 'element-ui/lib/theme-chalk/index.css'
 import 'vant/lib/index.css'
 import '@/css/common.css'
 import '@/css/index.css'
 import '@/css/pc.css'
+
+const isDebug = true
+/* eslint-disable no-new */
+if (isDebug) {
+  new VConsole()
+}
 Object.keys(filters).forEach(key => {
   Vue.filter(key, filters[key])
 })
@@ -28,32 +36,31 @@ Vue.config.productionTip = false
 
 Vue.prototype.imgUrl = process.env.VUE_APP_IMG
 Vue.prototype.apiUrl = process.env.VUE_APP_API
-Vue.prototype.globalUserId = Cookies.get('userId')
+Vue.prototype.globalUserId = Cookies.get('userId') || 11829
 Vue.prototype.postHttps = postHttps
 Vue.prototype.getHttps = getHttps
 
-Vue.prototype.contactOther = function (userId) {
-  userId || this.Toast({ message: '无此联系人!' })
-  alert(userId)
-  window.wx.openEnterpriseChat({
-    // 注意:userIds和externalUserIds至少选填一个。内部群最多2000人;外部群最多500人;如果有微信联系人,最多40人
-    userIds: userId, // 参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
-    // externalUserIds: 'wmEAlECwAAHrbWYDOK5u3Bf13xlYDAAA;wmEAlECwAAHibWYDOK5u3Af13xlYDAAA', // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
-    groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
-    chatId: '', // 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
-    success: function () {
-      // var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
-      // 回调
-
-    },
-    fail: function (res) {
-      alert(JSON.stringify(res))
-      if (res.errMsg.indexOf('function not exist') > -1) {
-        alert('版本过低请升级')
-      }
-    }
-  })
-}
+// Vue.prototype.contactOther = function (userId) {
+//   alert(window.wx)
+//   window.wx.openEnterpriseChat({
+//     // 注意:userIds和externalUserIds至少选填一个。内部群最多2000人;外部群最多500人;如果有微信联系人,最多40人
+//     userIds: userId, // 参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
+//     // externalUserIds: 'wmEAlECwAAHrbWYDOK5u3Bf13xlYDAAA;wmEAlECwAAHibWYDOK5u3Af13xlYDAAA', // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
+//     groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
+//     chatId: '', // 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
+//     success: function () {
+//       // var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
+//       // 回调
+
+//     },
+//     fail: function (res) {
+//       alert(JSON.stringify(res))
+//       if (res.errMsg.indexOf('function not exist') > -1) {
+//         alert('版本过低请升级')
+//       }
+//     }
+//   })
+// }
 
 export default new Vue({
   router,

+ 74 - 74
answer - 副本/src/reset-sdk.js

@@ -1,76 +1,76 @@
-import { postHttps, getHttps } from './api/index'
-import vm from './main'
-import Cookie from 'js-cookie'
-import { setTimeout } from 'core-js'
+// import { postHttps, getHttps } from './api/index'
+// import vm from './main'
+// import Cookie from 'js-cookie'
+// import { setTimeout } from 'core-js'
 
-function strToObj (val) {
-  let obj = {}
-  let str = val.substr(1)
-  let arr = str.split('&')
-  for (let i = 0; i < arr.length; i++) {
-    let newArr = arr[i].split('=')
-    obj[newArr[0]] = newArr[1]
-  }
-  return obj
-}
+// function strToObj (val) {
+//   let obj = {}
+//   let str = val.substr(1)
+//   let arr = str.split('&')
+//   for (let i = 0; i < arr.length; i++) {
+//     let newArr = arr[i].split('=')
+//     obj[newArr[0]] = newArr[1]
+//   }
+//   return obj
+// }
 
-alert('123')
-if (location.search && strToObj(location.search).code) {
-  let reqdata = {
-    url: location.href,
-    type: 1
-  }
-  alert(JSON.stringify(reqdata))
-  setTimeout(() => {
-    postHttps('manage/wx/getWxConfig', { reqdata }).then(r => {
-      alert(JSON.stringify(r))
-      let { object: {
-        agentId: agentid,
-        appId: corpid,
-        nonceStr,
-        signature,
-        timestamp
-      } } = r
-      window.wx.agentConfig({
-        corpid,
-        timestamp,
-        nonceStr,
-        signature,
-        agentid,
-        jsApiList: ['openUserProfile', 'selectEnterpriseContact', 'openEnterpriseChat', 'hideOptionMenu', 'hideMenuItems'],
-        success: async function () {
-          // 回调
-          alert('success')
-          let { code } = strToObj(location.search)
-          let reqdata = {
-            code,
-            type: 1,
-            loginType: window.screen.width > 1000 ? 2 : 1
-          }
-          // let {object:{userId}} = await postHttps('manage/wx/getWxUserInfo',{reqdata})
-          // globalUserId = userId
-          // app.username = username
-          // app.avatar = avatar
-          postHttps('manage/wx/getWxUserInfo', { reqdata }).then(r => {
-            let { object: { userId } } = r
-            Cookie.set('userId', userId)
-            window.screen.width > 1000 ? vm.$router.push('/pc-list') : vm.$router.push('/home')
-          })
-          // window.screen.width>1000? location.href=location.href.split('?')[0] + '/pc' : app.page=11
-        },
-        fail: function (res) {
-          alert(JSON.stringify(res))
-          if (res.errMsg.indexOf('function not exist') > -1) {
-            alert('版本过低请升级')
-          }
-        }
-      })
-    }).catch(r => {
-      alert(r)
-    })
-  }, 1000)
-} else {
-  getHttps('/manage/wx/getUrl/1').then(() => {
-    // location.href = r.object
-  })
-}
+// alert('123')
+// if (location.search && strToObj(location.search).code) {
+//   let reqdata = {
+//     url: location.href,
+//     type: 1
+//   }
+//   alert(JSON.stringify(reqdata))
+//   setTimeout(() => {
+//     postHttps('manage/wx/getWxConfig', { reqdata }).then(r => {
+//       alert(JSON.stringify(r))
+//       let { object: {
+//         agentId: agentid,
+//         appId: corpid,
+//         nonceStr,
+//         signature,
+//         timestamp
+//       } } = r
+//       window.wx.agentConfig({
+//         corpid,
+//         timestamp,
+//         nonceStr,
+//         signature,
+//         agentid,
+//         jsApiList: ['openUserProfile', 'selectEnterpriseContact', 'openEnterpriseChat', 'hideOptionMenu', 'hideMenuItems'],
+//         success: async function () {
+//           // 回调
+//           alert('success')
+//           let { code } = strToObj(location.search)
+//           let reqdata = {
+//             code,
+//             type: 1,
+//             loginType: window.screen.width > 1000 ? 2 : 1
+//           }
+//           // let {object:{userId}} = await postHttps('manage/wx/getWxUserInfo',{reqdata})
+//           // globalUserId = userId
+//           // app.username = username
+//           // app.avatar = avatar
+//           postHttps('manage/wx/getWxUserInfo', { reqdata }).then(r => {
+//             let { object: { userId } } = r
+//             Cookie.set('userId', userId)
+//             window.screen.width > 1000 ? vm.$router.push('/pc-list') : vm.$router.push('/home')
+//           })
+//           // window.screen.width>1000? location.href=location.href.split('?')[0] + '/pc' : app.page=11
+//         },
+//         fail: function (res) {
+//           alert(JSON.stringify(res))
+//           if (res.errMsg.indexOf('function not exist') > -1) {
+//             alert('版本过低请升级')
+//           }
+//         }
+//       })
+//     }).catch(r => {
+//       alert(r)
+//     })
+//   }, 1000)
+// } else {
+//   getHttps('/manage/wx/getUrl/1').then(() => {
+//     // location.href = r.object
+//   })
+// }

+ 21 - 0
answer - 副本/src/views/detail.vue

@@ -162,6 +162,27 @@ export default {
       this.postHttps('/manage/repair/queryRepairOrderById', { reqdata: { id: id } }).then(r => {
         this.$set(this.detail, 'info', r.object)
       })
+    },
+    contactOther (userId) {
+      alert(window.wx)
+      window.wx.openEnterpriseChat({
+        // 注意:userIds和externalUserIds至少选填一个。内部群最多2000人;外部群最多500人;如果有微信联系人,最多40人
+        userIds: userId, // 参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
+        // externalUserIds: 'wmEAlECwAAHrbWYDOK5u3Bf13xlYDAAA;wmEAlECwAAHibWYDOK5u3Af13xlYDAAA', // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
+        groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
+        chatId: '', // 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
+        success: function () {
+          // var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
+          // 回调
+
+        },
+        fail: function (res) {
+          alert(JSON.stringify(res))
+          if (res.errMsg.indexOf('function not exist') > -1) {
+            alert('版本过低请升级')
+          }
+        }
+      })
     }
   },
   mounted () {

+ 23 - 1
answer - 副本/src/views/home.vue

@@ -35,7 +35,7 @@
                                             <img src="../common/img/home/warning.png" alt="">
                                             等确认IT后就可以发起微信聊天
                                         </div>
-                                    </div>
+                                    </div>{{item.repairWxUserId||'my'}}
                                     <img src="../common/img/home/chat.png" v-if="!item.repairStatus" class="chat" alt="">
                                     <img src="../common/img/home/chat-active.png" @click="contactOther(item.repairWxUserId)" v-else class="chat" alt="">
                                 </div>
@@ -270,6 +270,28 @@ export default {
         let { object } = r
         this.home.dataList.splice(index, 1, object)
       })
+    },
+    contactOther (userId) {
+      alert(userId)
+      alert(window)
+      window.wx.openEnterpriseChat({
+        // 注意:userIds和externalUserIds至少选填一个。内部群最多2000人;外部群最多500人;如果有微信联系人,最多40人
+        userIds: userId, // 参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
+        // externalUserIds: 'wmEAlECwAAHrbWYDOK5u3Bf13xlYDAAA;wmEAlECwAAHibWYDOK5u3Af13xlYDAAA', // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
+        groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
+        chatId: '', // 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
+        success: function () {
+          // var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
+          // 回调
+
+        },
+        fail: function (res) {
+          alert('2' + JSON.stringify(res))
+          if (res.errMsg.indexOf('function not exist') > -1) {
+            alert('版本过低请升级')
+          }
+        }
+      })
     }
 
   },

+ 22 - 1
answer - 副本/src/views/pc-detail.vue

@@ -92,7 +92,7 @@
                             </div>
                             <div class="pc-detail-item">
                                 <div class="item-label">剩余处理时间</div>
-                                <div class="item-value">{{(scope.row.takerTime||scope.row.repairTime)|formatCountdown}}</div>
+                                <div class="item-value">{{(detail.takerTime||detail.repairTime)|formatCountdown}}</div>
                             </div>
                             <div class="pc-detail-item">
                                 <div class="item-label">故障描述</div>
@@ -226,6 +226,27 @@ export default {
       this.postHttps('manage/repair/queryRepairOrderById', { reqdata }).then(r => {
         this.detail = r.object
       })
+    },
+    contactOther (userId) {
+      alert(window.wx)
+      window.wx.openEnterpriseChat({
+        // 注意:userIds和externalUserIds至少选填一个。内部群最多2000人;外部群最多500人;如果有微信联系人,最多40人
+        userIds: userId, // 参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
+        // externalUserIds: 'wmEAlECwAAHrbWYDOK5u3Bf13xlYDAAA;wmEAlECwAAHibWYDOK5u3Af13xlYDAAA', // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
+        groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
+        chatId: '', // 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
+        success: function () {
+          // var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
+          // 回调
+
+        },
+        fail: function (res) {
+          alert(JSON.stringify(res))
+          if (res.errMsg.indexOf('function not exist') > -1) {
+            alert('版本过低请升级')
+          }
+        }
+      })
     }
   },
   created () {

+ 21 - 0
answer - 副本/src/views/pc-list.vue

@@ -278,6 +278,27 @@ export default {
           return false
         }
       })
+    },
+    contactOther (userId) {
+      alert(window.wx)
+      window.wx.openEnterpriseChat({
+        // 注意:userIds和externalUserIds至少选填一个。内部群最多2000人;外部群最多500人;如果有微信联系人,最多40人
+        userIds: userId, // 参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
+        // externalUserIds: 'wmEAlECwAAHrbWYDOK5u3Bf13xlYDAAA;wmEAlECwAAHibWYDOK5u3Af13xlYDAAA', // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
+        groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
+        chatId: '', // 若要打开已有会话,需指定此参数。如果是新建会话,chatId必须为空串
+        success: function () {
+          // var chatId = res.chatId; //返回当前群聊ID,仅当使用agentConfig注入该接口权限时才返回chatId
+          // 回调
+
+        },
+        fail: function (res) {
+          alert(JSON.stringify(res))
+          if (res.errMsg.indexOf('function not exist') > -1) {
+            alert('版本过低请升级')
+          }
+        }
+      })
     }
   },
   created () {

+ 1 - 0
answer - 副本/src/views/people.vue

@@ -47,6 +47,7 @@ export default {
          */
     contactPeople ({ repairWxUserId }) {
       alert(repairWxUserId)
+      alert(JSON.stringify(window.wx))
       window.wx.invoke('openUserProfile', {
         'type': 1, // 1表示该userid是企业成员,2表示该userid是外部联系人
         'userid': repairWxUserId // 可以是企业成员,也可以是外部联系人

+ 5 - 0
answer - 副本/yarn.lock

@@ -8479,6 +8479,11 @@ vary@~1.1.2:
   resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
   integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
 
+vconsole@^3.3.4:
+  version "3.3.4"
+  resolved "https://registry.npm.taobao.org/vconsole/download/vconsole-3.3.4.tgz#a7dacd8887b3d3e902e8d18425cda56c34e77f51"
+  integrity sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E=
+
 vendors@^1.0.0:
   version "1.0.3"
   resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0"

+ 2 - 2
maintenance/public/index.html

@@ -15,10 +15,10 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>static/logo.ico">
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:100,300,400,500,600,700,900">
-    <script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script>
+    <!-- <script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script> -->
     <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
     <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
-    <title>一键报修</title>
+    <title>IT故障维修管理</title>
     <style>
       *{
         margin: 0;

+ 1 - 1
maintenance/src/router/index.js

@@ -4,7 +4,7 @@ Vue.use(Router)
 
 const routes = [
   {
-    path: '/assigned',
+    path: '/assigned/:id',
     name: 'assigned',
     component: () => import('@/views/assigned')
   },

+ 1 - 1
maintenance/src/views/assigned.vue

@@ -62,7 +62,7 @@ export default {
       })
       let reqdata = {
         processorId: this.active,
-        repairId: this.detail.info.id
+        repairId: this.$route.params.id
       }
       await this.postHttps('manage/repair/assignRepairOrder', { reqdata })
       loading.close()

+ 6 - 3
maintenance/src/views/detail.vue

@@ -139,7 +139,7 @@
                 </div>
             </div>
             <div class="button-grounp" v-if="info.repairStatus && info.repairStatus!==3">
-                <div @click="$router.push('/assigned')">指派</div>
+                <div @click="$router.push(`/assigned/${$route.params.id}`)">指派</div>
                 <div @click="detailDelay(1)">延迟</div>
                 <div @click="detailDelay(2)">完成</div>
             </div>
@@ -175,8 +175,7 @@
                 v-model="obj.extensionTime"
                 type="datehour"
                 :title="formatDate(obj.extensionTime)"
-                min-hour="2020-0-1"
-                max-hour="2025-0-1"
+                :min-date="minDate"
                 @cancel="timeShow = false"
                 @confirm="detailConfirmTime"
             />
@@ -195,6 +194,7 @@ import { Toast, ImagePreview } from 'vant'
 export default {
   data () {
     return {
+      minDate: new Date(),
       show: 0, // 1:延迟 2:完成
       info: {},
       timeShow: false, // 时间选择器
@@ -330,6 +330,9 @@ export default {
   computed: {
     formatDate () {
       return (time) => {
+        if (!time) {
+          return '请选择'
+        }
         let date = new Date(time) || new Date(time && time.replace(/-/g, ''))
         let y = date.getFullYear()
         let m = date.getMonth() + 1

+ 1 - 1
maintenance/src/views/main.vue

@@ -147,7 +147,7 @@ export default {
       loading.close()
       this.id = id
       this.show = true
-      this.searchRepairOrder()
+      this.mainRefresh()
     },
     /**
          * 详情

+ 1 - 1
maintenance/src/views/stay.vue

@@ -103,7 +103,7 @@ export default {
       loading.close()
       this.id = id
       this.show = true
-      this.searchRepairOrder()
+      this.mainRefresh()
     }
   },
   created () {

+ 8 - 12
spance/js/index.js

@@ -70,7 +70,7 @@ window.addEventListener('load', async () => {
     if (location.search&&strToObj(location.search).code) {
         let reqdata = {
             url: location.href,
-            type: 2
+            type: 1
         }
         let {object:{
             agentId:agentid,
@@ -88,25 +88,20 @@ window.addEventListener('load', async () => {
             jsApiList: ['openUserProfile','selectEnterpriseContact','openEnterpriseChat'],
             success: async function(res) {
                 // 回调
-                alert('success')
                 let { code } = strToObj(location.search)
                 let reqdata = {
                     code,
-                    type:2,
+                    type:1,
                     loginType: window.screen.width>1000?2:1
                 }
                 let {object:{userId,avatar,username}} = await postHttps('manage/wx/getWxUserInfo',{reqdata})
-                // alert(JSON.stringify(object))
-                // globalUserId = userId
-                // app.username = username
-                // app.avatar = avatar
                 let {state} = strToObj(location.search)
-                localStorage.setItem('avatar',avatar) //2
-                localStorage.setItem('username',username) //2
+                // localStorage.setItem('avatar',avatar) //2
+                // localStorage.setItem('username',username) //2
                 let orderId = state.split('-')[1] - 0
                 Cookies.set('userId', userId)
-                location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? '/pc' : orderId?'/front/#/detail/'+orderId:'/front/#/index') //2
-                // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? orderId?'/repair1/#/pc-detail/'+orderId:'/repair1/#/pc-list' : orderId?'/repair1/#/detail/'+orderId:'/repair1/#/home')
+                // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? '/pc' : orderId?'/front/#/detail/'+orderId:'/front/#/index') //2
+                location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? (orderId?'/repair1/#/pc-detail/'+orderId:'/repair1/#/pc-list') : (orderId?'/repair1/#/detail/'+orderId:'/repair1/#/home'))
                 // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? '/repair1/#/pc-form' : '/repair1/#/info')
             },
             fail: function(res) {
@@ -117,7 +112,8 @@ window.addEventListener('load', async () => {
             }
         })
     } else {
-        let url = '/manage/wx/getUrl/2/' + (strToObj(location.search).orderId||0)
+        let url = '/manage/wx/getUrl/1/' + (strToObj(location.search).orderId||0)
+        alert(url)
         let {object} = await getHttps(url)
         location.href = object
     }

+ 14 - 19
spance/js/index2.js

@@ -85,7 +85,7 @@ window.addEventListener('load', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/reg
 
           reqdata = {
             url: location.href,
-            type: 2
+            type: 1
           };
           _context2.next = 4;
           return postHttps('manage/wx/getWxConfig', {
@@ -116,40 +116,34 @@ window.addEventListener('load', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/reg
                     switch (_context.prev = _context.next) {
                       case 0:
                         // 回调
-                        alert('success');
                         _strToObj = strToObj(location.search), code = _strToObj.code;
                         reqdata = {
                           code: code,
-                          type: 2,
+                          type: 1,
                           loginType: window.screen.width > 1000 ? 2 : 1
                         };
-                        _context.next = 5;
+                        _context.next = 4;
                         return postHttps('manage/wx/getWxUserInfo', {
                           reqdata: reqdata
                         });
 
-                      case 5:
+                      case 4:
                         _yield$postHttps2 = _context.sent;
                         _yield$postHttps2$obj = _yield$postHttps2.object;
                         userId = _yield$postHttps2$obj.userId;
                         avatar = _yield$postHttps2$obj.avatar;
                         username = _yield$postHttps2$obj.username;
-                        // alert(JSON.stringify(object))
-                        // globalUserId = userId
-                        // app.username = username
-                        // app.avatar = avatar
                         _strToObj2 = strToObj(location.search), state = _strToObj2.state;
                         localStorage.setItem('avatar', avatar); //2
 
                         localStorage.setItem('username', username); //2
 
                         orderId = state.split('-')[1] - 0;
-                        Cookies.set('userId', userId);
-                        location.href = location.href.split('?')[0] + (window.screen.width > 1000 ? '/pc' : orderId ? '/front/#/detail/' + orderId : '/front/#/index'); //2
-                        // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? orderId?'/repair1/#/pc-detail/'+orderId:'/repair1/#/pc-list' : orderId?'/repair1/#/detail/'+orderId:'/repair1/#/home')
-                        // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? '/repair1/#/pc-form' : '/repair1/#/info')
+                        Cookies.set('userId', userId); // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? '/pc' : orderId?'/front/#/detail/'+orderId:'/front/#/index') //2
 
-                      case 16:
+                        location.href = location.href.split('?')[0] + (window.screen.width > 1000 ? orderId ? '/repair1/#/pc-detail/' + orderId : '/repair1/#/pc-list' : orderId ? '/repair1/#/detail/' + orderId : '/repair1/#/home'); // location.href=location.href.split('?')[0] + (window.screen.width > 1000 ? '/repair1/#/pc-form' : '/repair1/#/info')
+
+                      case 15:
                       case "end":
                         return _context.stop();
                     }
@@ -171,20 +165,21 @@ window.addEventListener('load', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/reg
               }
             }
           });
-          _context2.next = 20;
+          _context2.next = 21;
           break;
 
         case 14:
-          url = '/manage/wx/getUrl/2/' + (strToObj(location.search).orderId || 0);
-          _context2.next = 17;
+          url = '/manage/wx/getUrl/1/' + (strToObj(location.search).orderId || 0);
+          alert(url);
+          _context2.next = 18;
           return getHttps(url);
 
-        case 17:
+        case 18:
           _yield$getHttps = _context2.sent;
           object = _yield$getHttps.object;
           location.href = object;
 
-        case 20:
+        case 21:
         case "end":
           return _context2.stop();
       }