Mr.Shi
2023-08-11 b15a83329e33a954f41c9558b58aa1a64332c46b
标准版h5
已添加6个文件
已修改10个文件
1224 ■■■■■ 文件已修改
h5_standard/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/package-lock.json 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/package.json 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/public/redirect.html 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/apis/index.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/router/module/needToBeDealtWith/index.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/router/module/productionInspection/index.ts 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/utils/utils.ts 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/utils/wechat.js 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/LogInAgain.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/needToBeDealtWith/outbound.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/productionInspection/manualInspection.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/productionInspection/manualInspection1.vue 402 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/productionInspection/manualInspection2.vue 402 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/wxLogin.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/.env.development
@@ -14,9 +14,9 @@
# ä»»åº·æœ¬åœ°
# VUE_APP_API = 'http://192.168.0.15:10021/'
VUE_APP_API = 'http://192.168.0.15:10021/'
VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
# VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
# VUE_APP_API = 'http://192.168.0.13:10012/'
h5_standard/package-lock.json
@@ -11,6 +11,7 @@
        "axios": "^0.27.2",
        "dingtalk-jsapi": "^2.13.92",
        "echarts": "^4.8.0",
        "js-sha1": "^0.6.0",
        "jsqr": "^1.4.0",
        "lib-flexible": "^0.3.2",
        "mitt": "^3.0.0",
@@ -26,10 +27,12 @@
        "vue": "^3.2.13",
        "vue-pdf-embed": "^1.1.4",
        "vue-router": "^4.0.3",
        "vuex": "^4.0.0"
        "vuex": "^4.0.0",
        "weixin-js-sdk": "^1.6.0"
      },
      "devDependencies": {
        "@types/echarts": "^4.9.15",
        "@types/js-sha1": "^0.6.0",
        "@vue/cli-plugin-router": "~5.0.0",
        "@vue/cli-plugin-typescript": "~5.0.0",
        "@vue/cli-plugin-vuex": "~5.0.0",
@@ -857,6 +860,12 @@
      "dependencies": {
        "@types/node": "*"
      }
    },
    "node_modules/@types/js-sha1": {
      "version": "0.6.0",
      "resolved": "https://registry.npmjs.org/@types/js-sha1/-/js-sha1-0.6.0.tgz",
      "integrity": "sha512-TBJguE0wDNgtAwL7TpjzPbj5Sz5fsIuTQbgyXDJ7nV1eExhE/kd3YNS/q6JSiPAdElcFoKY3zlSifzjb/vO6xw==",
      "dev": true
    },
    "node_modules/@types/json-schema": {
      "version": "7.0.11",
@@ -5101,6 +5110,11 @@
      "engines": {
        "node": ">=0.6.0"
      }
    },
    "node_modules/js-sha1": {
      "version": "0.6.0",
      "resolved": "https://registry.npmjs.org/js-sha1/-/js-sha1-0.6.0.tgz",
      "integrity": "sha512-01gwBFreYydzmU9BmZxpVk6svJJHrVxEN3IOiGl6VO93bVKYETJ0sIth6DASI6mIFdt7NmfX9UiByRzsYHGU9w=="
    },
    "node_modules/js-tokens": {
      "version": "4.0.0",
@@ -9687,6 +9701,11 @@
        "node": ">=0.8.0"
      }
    },
    "node_modules/weixin-js-sdk": {
      "version": "1.6.0",
      "resolved": "https://registry.npmjs.org/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
      "integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
    },
    "node_modules/whatwg-fetch": {
      "version": "3.6.2",
      "resolved": "https://registry.npmmirror.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",
@@ -10568,6 +10587,12 @@
      "requires": {
        "@types/node": "*"
      }
    },
    "@types/js-sha1": {
      "version": "0.6.0",
      "resolved": "https://registry.npmjs.org/@types/js-sha1/-/js-sha1-0.6.0.tgz",
      "integrity": "sha512-TBJguE0wDNgtAwL7TpjzPbj5Sz5fsIuTQbgyXDJ7nV1eExhE/kd3YNS/q6JSiPAdElcFoKY3zlSifzjb/vO6xw==",
      "dev": true
    },
    "@types/json-schema": {
      "version": "7.0.11",
@@ -13822,6 +13847,11 @@
      "resolved": "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz",
      "integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==",
      "dev": true
    },
    "js-sha1": {
      "version": "0.6.0",
      "resolved": "https://registry.npmjs.org/js-sha1/-/js-sha1-0.6.0.tgz",
      "integrity": "sha512-01gwBFreYydzmU9BmZxpVk6svJJHrVxEN3IOiGl6VO93bVKYETJ0sIth6DASI6mIFdt7NmfX9UiByRzsYHGU9w=="
    },
    "js-tokens": {
      "version": "4.0.0",
@@ -17233,6 +17263,11 @@
      "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
      "dev": true
    },
    "weixin-js-sdk": {
      "version": "1.6.0",
      "resolved": "https://registry.npmjs.org/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
      "integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
    },
    "whatwg-fetch": {
      "version": "3.6.2",
      "resolved": "https://registry.npmmirror.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",
h5_standard/package.json
@@ -10,6 +10,7 @@
    "axios": "^0.27.2",
    "dingtalk-jsapi": "^2.13.92",
    "echarts": "^4.8.0",
    "js-sha1": "^0.6.0",
    "jsqr": "^1.4.0",
    "lib-flexible": "^0.3.2",
    "mitt": "^3.0.0",
@@ -25,10 +26,12 @@
    "vue": "^3.2.13",
    "vue-pdf-embed": "^1.1.4",
    "vue-router": "^4.0.3",
    "vuex": "^4.0.0"
    "vuex": "^4.0.0",
    "weixin-js-sdk": "^1.6.0"
  },
  "devDependencies": {
    "@types/echarts": "^4.9.15",
    "@types/js-sha1": "^0.6.0",
    "@vue/cli-plugin-router": "~5.0.0",
    "@vue/cli-plugin-typescript": "~5.0.0",
    "@vue/cli-plugin-vuex": "~5.0.0",
h5_standard/public/redirect.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>
  var url = window.location.href
  if (url.indexOf('?code') === -1) {
    let query = url.split('?')[1]
    let tempUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4d7c10bdec51942b&redirect_uri=https://dmtest.ahapp.net/doumeeplant_h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect`
    window.location.replace(tempUrl)
  } else {
    var code = url.substring(url.indexOf('?') + 6, url.indexOf('&'))
    let href1 = `https://dmtest.ahapp.net/doumeeplant_h5/#/wxLogin?code=${code}`
    window.location.replace(href1)
  }
</script>
</body>
</html>
h5_standard/src/apis/index.ts
@@ -11,6 +11,24 @@
    })
}
// èŽ·å–å¾®ä¿¡openId
export function wxLogin(params: any): Promise<any> {
    return httpRequest({
        url: '/system/wxLogin',
        method: 'get',
        params
    })
}
// å¾®ä¿¡ç«¯ç™»å½•
export function wxAccountLogin(data: any): Promise<any> {
    return httpRequest({
        url: '/system/wxAccountLogin',
        method: 'post',
        data
    })
}
// èŽ·å–ä¼ä¸šid
export function getDingdingCorpId(companyId: any): Promise<any> {
    return httpRequest({
h5_standard/src/router/module/needToBeDealtWith/index.ts
@@ -26,6 +26,24 @@
                component: () => import('@/views/needToBeDealtWith/warehousing.vue')
            },
            {
                path: '/needToBeDealtWith/outbound',
                name: 'outbound',
                meta: {
                    title: '出库',
                    keepAlive: false
                },
                component: () => import('@/views/needToBeDealtWith/outbound.vue')
            },
            {
                path: '/needToBeDealtWith/addWarehousing',
                name: 'addWarehousing',
                meta: {
                    title: '入库',
                    keepAlive: false
                },
                component: () => import('@/views/needToBeDealtWith/addWarehousing.vue')
            },
            {
                path: '/needToBeDealtWith/codeScanningWarehousing',
                name: 'codeScanningWarehousing',
                meta: {
h5_standard/src/router/module/productionInspection/index.ts
@@ -74,12 +74,30 @@
                path: '/productionInspection/manualInspection',
                name: 'manualInspection',
                meta: {
                    title: '手动检验',
                    title: '巡线',
                    keepAlive: true
                },
                component: () => import('@/views/productionInspection/manualInspection.vue')
            },
            {
                path: '/productionInspection/manualInspection1',
                name: 'manualInspection1',
                meta: {
                    title: '巡检',
                    keepAlive: true
                },
                component: () => import('@/views/productionInspection/manualInspection1.vue')
            },
            {
                path: '/productionInspection/manualInspection2',
                name: 'manualInspection2',
                meta: {
                    title: '完工检',
                    keepAlive: true
                },
                component: () => import('@/views/productionInspection/manualInspection2.vue')
            },
            {
                path: '/productionInspection/selectWorkOrder',
                name: 'selectWorkOrder',
                meta: {
h5_standard/src/utils/utils.ts
@@ -1,6 +1,45 @@
import * as dd from 'dingtalk-jsapi'
import sha1 from 'js-sha1'
import store from '@/store'
/**
 * èŽ·å–å½“å‰æ—¶é—´ æ—¶é—´æˆ³
 * @returns {number}
 */
export function getTimestamp () {
    return new Date().getTime()
}
/**
 * èŽ·å–éšæœºå­—ç¬¦ä¸²
 * @param {number} len å¯æŒ‡å®šé•¿åº¦
 * @returns {string}
 */
export function randomString (len: number): string {
    len = len || 32
    let $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
    let maxPos = $chars.length
    let pwd = ''
    for (let i = 0; i < len; i++) {
        pwd += $chars.charAt(Math.floor(Math.random() * maxPos))
    }
    return pwd
}
/**
 * æ‹¼æŽ¥ç­¾åå­—符串
 * @param {string} ticket é€šè¿‡access_token获取的jsapi_ticket
 * @param {string} noncestr è‡ªå·±ç”Ÿæˆçš„随机字符串
 * @param {string} timestamp ç”Ÿæˆç­¾åæ—¶çš„æ—¶é—´æˆ³
 * @param {string} urlLink url地址获取code
 * @param {string} return {*}
 */
export function getSignature (ticket: String, noncestr: String, timestamp: String, urlLink: String): String {
    let url = urlLink
    let jsapi_ticket = `jsapi_ticket=${ticket}&noncestr=${noncestr}&timestamp=${timestamp}&url=${url}`
    return sha1(jsapi_ticket)
}
/***
 * phoneRegular: æ‰‹æœºå·éªŒè¯
 * mailboxRegular: é‚®ç®±éªŒè¯
h5_standard/src/utils/wechat.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,144 @@
import wx from 'weixin-js-sdk'
import { Toast } from 'vant'
import { getTimestamp, randomString, getSignature } from './utils.ts'
class AuthWechat {
  /**
   * èŽ·å–æµè§ˆå™¨åœ°å€
   * */
  signLink() {
    if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
      window.entryUrl = document.location.href
    }
    let url = /(Android)/i.test(navigator.userAgent) ? document.location.href : window.entryUrl;
    return url.split('#')[0]
  }
  /**
   * å½“前是否是微信环境
   * */
  isWeixin() {
    return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
  }
  /**
   * åˆå§‹åŒ–
   * */
  wechat(ticket) {
    if (!this.isWeixin()) {
      return Toast.fail('当前不是微信环境');
    }
    return new Promise((resolve, reject) => {
      let url = this.signLink()
      let timestamp = getTimestamp()
      let nonceStr = randomString()
      let signature = getSignature(ticket, nonceStr, timestamp, url)
      wx.config({
        debug: false, // å¼€å¯è°ƒè¯•模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
        appId: process.env.VUE_APP_APPID, // å¿…填,公众号的唯一标识
        timestamp, // å¿…填,生成签名的时间戳
        nonceStr, // å¿…填,生成签名的随机串
        signature, // å¿…填,签名
        jsApiList: [
          'updateAppMessageShareData', // è‡ªå®šä¹‰â€œåˆ†äº«ç»™æœ‹å‹â€åŠâ€œåˆ†äº«åˆ°QQ”按钮的分享内容
          'updateTimelineShareData', // è‡ªå®šä¹‰â€œåˆ†äº«åˆ°æœ‹å‹åœˆâ€åŠâ€œåˆ†äº«åˆ°QQ空间”按钮的分享内容(1.4.0)
          'closeWindow', //关闭当前网页窗口接口
          'chooseWXPay'
        ]
      })
      wx.ready(res => {
        // å¾®ä¿¡SDK准备就绪后执行的回调。
        // console.log('wx.ready',res);
        resolve(wx, res)
      })
      wx.error(err => {
        // console.log('wx.error',err)
        reject(wx, err)
      })
    })
  }
  /**
   * å¾®ä¿¡åˆ†äº«
   * @param {object} shareObj åˆ†äº«å†…容对象
   * */
  wxShare(shareObj) {
    if (!this.isWeixin()) {
      return Toast.fail('当前不是微信环境');
    }
    console.log('分享', shareObj)
    let norShare = new Promise((resolve, reject) => {
      wx.ready(() => {
        wx.updateAppMessageShareData({
          title: shareObj.title, // åˆ†äº«æ ‡é¢˜
          desc: shareObj.desc, // åˆ†äº«æè¿°
          link: shareObj.link, // åˆ†äº«é“¾æŽ¥ï¼Œè¯¥é“¾æŽ¥åŸŸåæˆ–路径必须与当前页面对应的公众号 JS å®‰å…¨åŸŸåä¸€è‡´
          imgUrl: shareObj.imgUrl, // åˆ†äº«å›¾æ ‡
          success: function () {
            resolve('成功了')
          },
          fail: function (res) {
            console.log('好友分享 å¤±è´¥', res);
            alert('fail:' + JSON.stringify(res));
            reject(JSON.stringify(res))
          }
        })
      })
    })
    let friendShare = new Promise((resolve, reject) => {
      wx.ready(() => {
        wx.updateTimelineShareData({
          title: shareObj.title, // åˆ†äº«æ ‡é¢˜
          desc: shareObj.desc, // åˆ†äº«æè¿°
          link: shareObj.link, // åˆ†äº«é“¾æŽ¥ï¼Œè¯¥é“¾æŽ¥åŸŸåæˆ–路径必须与当前页面对应的公众号 JS å®‰å…¨åŸŸåä¸€è‡´
          imgUrl: shareObj.imgUrl, // åˆ†äº«å›¾æ ‡
          success: function () {
            resolve('成功了')
          },
          fail: function (res) {
            console.log('朋友圈分享 å¤±è´¥', res);
            alert('fail:' + JSON.stringify(res));
            reject(JSON.stringify(res))
          }
        })
      })
    })
    return Promise.all([norShare, friendShare])
  }
  wxPay(response) {
    if (!this.isWeixin()) {
      return Toast.fail('当前不是微信环境');
    }
    console.log('支付', response);
    return new Promise((resolve, reject) => {
      wx.chooseWXPay({
        appId: response.appId,
        timestamp: response.timeStamp, // æ”¯ä»˜ç­¾åæ—¶é—´æˆ³ï¼Œæ³¨æ„å¾®ä¿¡ jssdk ä¸­çš„æ‰€æœ‰ä½¿ç”¨ timestamp å­—段均为小写。但最新版的支付后台生成签名使用的 timeStamp å­—段名需大写其中的 S å­—符
        nonceStr: response.nonceStr, // æ”¯ä»˜ç­¾åéšæœºä¸²ï¼Œä¸é•¿äºŽ 32 ä½
        package: response.packageValue, // ç»Ÿä¸€æ”¯ä»˜æŽ¥å£è¿”回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
        signType: response.signType, // å¾®ä¿¡æ”¯ä»˜V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
        paySign: response.paySign, // æ”¯ä»˜ç­¾å
        complete: (res) => {
          console.log(res);
          reject(res)
        },
        success: function (res) {
          // æ”¯ä»˜æˆåŠŸåŽçš„å›žè°ƒå‡½æ•°
          console.log(res);
          resolve(res)
        },
        // cancel: function (err) {
        //   reject(err)
        // }
      })
    })
  }
}
export default new AuthWechat();
h5_standard/src/views/LogInAgain.vue
@@ -117,7 +117,7 @@
        window.localStorage.setItem('token', res.data)
        let info: any = await getUserInfo()
        if (info.code === 200) {
          // await store.commit('setEntrance', 'H5')
          await store.commit('setEntrance', 'H5')
          await store.commit('setUserInfo', info.data)
          await store.dispatch('getMenuList', 2)
          await router.go(-1)
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
<template>
    <div class="page">
        æ–°å¢žå…¥åº“
    </div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
.page {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #F7F7F7;
}
</style>
h5_standard/src/views/needToBeDealtWith/outbound.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
<template>
    <div class="page">
        æ–°å¢žå‡ºåº“
    </div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
.page {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #F7F7F7;
}
</style>
h5_standard/src/views/productionInspection/manualInspection.vue
@@ -3,8 +3,13 @@
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>检验类型</span>
                <div class="right">
                <!-- <div class="right">
                    <div class="right_item" :class="{ 'active': item.active }" v-for="(item, index) in status" :key="index" @click="changeItem(index, item.id)">{{item.name}}</div>
                </div> -->
                <div class="right">
                    <div class="right_item active">巡线</div>
                    <!-- <div class="right_item active" v-if="form.status == '1'">巡检</div>
                    <div class="right_item active" v-if="form.status == '2'">完工检</div> -->
                </div>
            </div>
        </div>
@@ -277,6 +282,7 @@
    onMounted(() => {
        checkAllLists()
        // /productionInspection/manualInspection
        // getListByConditions1()
        // toolingQueryByIds()
    })
h5_standard/src/views/productionInspection/manualInspection1.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,402 @@
<template>
    <div class="inspection">
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>检验类型</span>
                <!-- <div class="right">
                    <div class="right_item" :class="{ 'active': item.active }" v-for="(item, index) in status" :key="index" @click="changeItem(index, item.id)">{{item.name}}</div>
                </div> -->
                <div class="right">
                    <!-- <div class="right_item active">巡线</div> -->
                    <div class="right_item active">巡检</div>
                    <!-- <div class="right_item active" v-if="form.status == '2'">完工检</div> -->
                </div>
            </div>
        </div>
        <div class="x"></div>
        <div class="inspection_list">
            <div class="inspection_list_item" @click="jumpGD">
                <span>检验工单</span>
                <div class="right1">
                    <span :style="form.gdmc ? 'color: #000;' : ''">{{ form.gdmc ? form.gdmc : '点击选择检验工单'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div>
            <div class="inspection_list_item" v-if="form.gdmc">
                <span>计划数量</span>
                <div class="right1">
                    <span style="color: black;">{{data.info.planNum}}{{data.info.umodel ? data.info.umodel.name : ''}}</span>
                </div>
            </div>
            <!-- <div class="inspection_list_item" @click="openGZ">
                <span>检验工装</span>
                <div class="right1">
                    <span :style="form.jygzmc ? 'color: #000' : ''">{{ form.jygzmc ? form.jygzmc : '点击选择检验工装'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div> -->
        </div>
        <div class="x"></div>
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>良品数</span>
                <div class="right1">
                    <input type="number" v-model="form.hgsl" placeholder="0" />
                    <span class="dw" v-if="data.info.umodel">{{data.info.umodel.name}}</span>
                </div>
            </div>
            <div class="inspection_list_item">
                <span>不良数量</span>
                <div class="right1">
                    <input type="number" v-model="form.blsl" placeholder="0" />
                    <span class="dw" v-if="data.info.umodel">{{data.info.umodel.name}}</span>
                </div>
            </div>
            <!-- <div class="inspection_list_item" @click="openBLGZ" v-show="form.blsl > 0">
                <span>不良工装</span>
                <div class="right1">
                    <span :style="form.blgzmc ? 'color: #000;' : ''">{{ form.blgzmc ? form.blgzmc : '点击选择工装'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div> -->
            <div class="inspection_list_item" @click="openBL" v-show="form.blsl > 0">
                <span>不良说明</span>
                <div class="right1">
                    <span :style="form.blsm ? 'color: #000;' : ''">{{ form.blsm ? form.blsm : '点击选择不良原因'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div>
        </div>
        <div class="inspection_footer">
            <button class="inspection_footer_sub" @click="submit" v-preventReClick>提交</button>
        </div>
        <!--    ä¸è‰¯è¯´æ˜Ž    -->
        <van-popup v-model:show="data.show1" position="bottom" round :style="{ height: '50%' }">
            <van-picker
                title="请选择不良说明"
                :columns="data.columns1"
                @confirm="onConfirm1"
                @cancel="onCancel1"
            />
        </van-popup>
        <!--    å·¥è£…    -->
        <Tooling :show="gzShow1" :classification="true" :statusname="'1,2,3'" :attribute="Attribute.HG" @close="close1" @value="getValue1" />
        <!--    ä¸è‰¯å·¥è£…    -->
        <Tooling :show="gzShow" :attribute="Attribute.BF + ',' + Attribute.BL" @close="close" @value="getValue" />
    </div>
</template>
<script setup lang="ts">
    import { ref, reactive, onMounted, onActivated } from 'vue'
    import { useRouter } from "vue-router"
    import { Toast } from 'vant'
    import { REGULAR } from '@/utils/utils'
    import { Attribute } from '@/enum'
    import { createStandard } from '@/apis/QualityAPI'
    import { checkAllList, getListByCondition, toolingQueryById } from "@/apis/WorkOrderAPI"
    import Tooling from '@/components/common/Tooling.vue'
    const router = useRouter()
    let gzShow = ref<boolean>(false)
    let gzShow1 = ref<boolean>(false)
    let data = reactive<any>({
        info: {},
        show1: false,
        columns: [],
        columns1: []
    })
    let form = reactive({
        status: '1',
        gdid: '',
        gdmc: '',
        jygz: '',
        jygzmc: '',
        hgsl: 0,
        blsl: 0,
        blgz: '',
        blgzmc: '',
        blsm: '',
        dw: ''
    })
    let status = ref<Array<object>>([
        { id: '0', name: '巡线', active: true },
        { id: '1', name: '巡检', active: false },
        { id: '2', name: '完工检', active: false }
    ])
    // å…³é—­ä¸è‰¯å·¥è£…
    const close = () => {
        gzShow.value = false
    }
    // å…³é—­å·¥è£…
    const close1 = () => {
        gzShow1.value = false
    }
    // èŽ·å–ä¸è‰¯å·¥è£…æ•°æ®
    const getValue = (item: any) => {
        form.blgzmc = item.code
        form.blgz = item.id
        gzShow.value = false
    }
    // èŽ·å–å·¥è£…æ•°æ®
    const getValue1 = (item: any) => {
        form.dw = item.umodelData
        form.jygz = item.id
        form.jygzmc = item.code
        gzShow1.value = false
    }
    // æ‰“开检验工装
    const openGZ = () => {
        gzShow1.value = true
    }
    // åŽ»é€‰æ‹©è®¾å¤‡
    const jumpGD = () => {
        router.push({ name: 'selectWorkOrder' })
    }
    const openBL = () => {
        data.show1 = true
    }
    const openBLGZ = () => {
        gzShow.value = true
    }
    const onConfirm1 = (value: any): void => {
        form.blsm = value.text
        data.show1 = false
    }
    const onCancel1 = () => {
        data.show1 = false
    }
    // åˆ‡æ¢çŠ¶æ€
    const changeItem = (i: number, id: string): void => {
        status.value.forEach((item: any, index: number) => {
            item.active = i === index;
        })
        form.status = id
    }
    // æäº¤
    const submit = () => {
        if (!form.gdid) return Toast.fail({ message: '工单不能为空' })
        // if (!form.jygz) return Toast.fail({ message: '检验工装不能为空' })
        if (form.hgsl || form.blsl) {
            if (form.hgsl) {
                if (form.dw == '0') {   // æ•´æ•°
                    if (!REGULAR.positiveInteger.test(form.hgsl as never)) return Toast.fail({ message: '良品数量只能为正整数' })
                } else if (form.dw == '1') {    // å°æ•°
                    if (!REGULAR.number.test(form.hgsl as never)) {
                        return Toast.fail({ message: '良品数量只能为正整数或四位小数' })
                    }
                }
            }
            if (form.blsl) {
                if (form.dw == '0') {   // æ•´æ•°
                    if (!REGULAR.positiveInteger.test(form.blsl as never)) return Toast.fail({ message: '不良数量只能为正整数' })
                } else if (form.dw == '1') {    // å°æ•°
                    if (!REGULAR.number.test(form.blsl as never)) {
                        return Toast.fail({ message: '不良数量只能为正整数或四位小数' })
                    }
                }
            }
        } else {
            return Toast.fail({ message: '良品和不良不能同时为空' })
        }
        let total = (form.hgsl ? form.hgsl : 0) + (form.blsl ? form.blsl : 0)
        if (total > data.info.planNum) {
            return Toast.fail({ message: '合格不良相加不能超过计划数量' })
        }
        if (Number(form.blsl) > 0) {
            // if (!form.blgz) return Toast.fail({ message: '不良工装不能为空' })
            if (!form.blsm) return Toast.fail({ message: '不良说明不能为空' })
        }
        createStandard({
            workorderId: form.gdid,
            // appliancesId: form.jygz,
            qualifiedNum: form.hgsl ? form.hgsl : 0,
            unqualifiedNum: form.blsl ? form.blsl : 0,
            // qualifiedApplianceId: form.blgz,
            checkInfo: form.blsm,
            checkType: form.status
        }).then(res => {
            if (res.code === 200) {
                Toast.success({ message: '检验成功!', duration: 2000, forbidClick: true })
                setTimeout(() => {
                    router.go(-1)
                }, 2000)
            }
        })
    }
    // ä¸è‰¯åŽŸå› æ•°æ®
    const checkAllLists = () => {
        checkAllList({ bmodelCateType: '3' })
            .then(res => {
                if (res.code === 200) {
                    res.data.forEach((item: any) => {
                        data.columns1.push({ text: item.combinationName, id: item.id })
                    })
                }
            })
    }
    // æŸ¥è¯¢ä¸è‰¯/报废工装
    const getListByConditions1 = () => {
        data.columns2 = []
        getListByCondition({
            smodelLabel: 'APPLIANCE_OFFTEST,APPLIANCE_USELESS'
        }).then(res => {
            if (res.code === 200) {
                res.data.forEach((item: any) => {
                    data.columns2.push({ text: '[' + item.smodelCode  + '] ' + item.code, id: item.id })
                })
            }
        })
    }
    // èŽ·å–æ‰€æœ‰å·¥è£…
    const toolingQueryByIds = () => {
        data.columns3 = []
        toolingQueryById({})
            .then(res => {
                if (res.code === 200) {
                    res.data.forEach((item: any) => {
                        data.columns3.push({ text: item.code, id: item.id })
                    })
                }
            })
    }
    onMounted(() => {
        checkAllLists()
        // /productionInspection/manualInspection
        // getListByConditions1()
        // toolingQueryByIds()
    })
    onActivated(() => {
        let res: any = localStorage.getItem('workOder')
        if (res) {
            form.gdmc = JSON.parse(res).mmodel.name + '-' + JSON.parse(res).pgmodel.name
            form.gdid = JSON.parse(res).id
            data.info = JSON.parse(res)
            localStorage.removeItem('workOder')
        }
    })
</script>
<style lang="scss" scoped>
.inspection {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #F7F7F7;
    .x {
        height: 20px;
    }
    .inspection_list {
        padding: 0 30px;
        background: white;
        .inspection_list_item {
            height: 98px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1PX solid #E5E5E5;
            &:last-child {
                border: none;
            }
            span {
                font-size: 30px;
                font-weight: 400;
                color: #222222;
            }
            .right1 {
                display: flex;
                align-items: center;
                span {
                    font-size: 28px;
                    font-weight: 400;
                    color: #999999;
                    margin-right: 10px;
                }
                input {
                    width: 180px;
                    height: 60px;
                    border-radius: 8px;
                    border: 1PX solid #CCCCCC;
                    margin-right: 10px;
                    padding: 0 30px;
                    box-sizing: border-box;
                    font-size: 28px;
                }
                input::-webkit-input-placeholder {
                    font-size: 28px;
                    font-weight: 400;
                    color: #999999;
                }
                .dw {
                    font-size: 28px;
                    font-weight: 400;
                    color: #666666;
                }
            }
            .right {
                display: flex;
                align-items: center;
                .active {
                    background: $nav-color !important;
                    color: #ffffff !important;
                }
                .right_item {
                    padding: 18px 32px;
                    background: #F2F2F2;
                    border-radius: 8px;
                    font-size: 26px;
                    font-weight: 400;
                    color: #333333;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-left: 20px;
                }
            }
        }
    }
    .inspection_footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: calc(100% - 60px);
        padding: 30px 30px 68px 30px;
        background: #F7F7F7;
        .inspection_footer_sub {
            width: 100%;
            height: 88px;
            background: #4275FC;
            box-shadow: 0 0 12px 0 rgba(0,0,0,0.0800);
            border-radius: 8px;
            font-size: 30px;
            font-weight: 500;
            color: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
        }
    }
}
</style>
h5_standard/src/views/productionInspection/manualInspection2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,402 @@
<template>
    <div class="inspection">
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>检验类型</span>
                <!-- <div class="right">
                    <div class="right_item" :class="{ 'active': item.active }" v-for="(item, index) in status" :key="index" @click="changeItem(index, item.id)">{{item.name}}</div>
                </div> -->
                <div class="right">
                    <!-- <div class="right_item active">巡线</div> -->
                    <!-- <div class="right_item active">巡检</div> -->
                    <div class="right_item active">完工检</div>
                </div>
            </div>
        </div>
        <div class="x"></div>
        <div class="inspection_list">
            <div class="inspection_list_item" @click="jumpGD">
                <span>检验工单</span>
                <div class="right1">
                    <span :style="form.gdmc ? 'color: #000;' : ''">{{ form.gdmc ? form.gdmc : '点击选择检验工单'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div>
            <div class="inspection_list_item" v-if="form.gdmc">
                <span>计划数量</span>
                <div class="right1">
                    <span style="color: black;">{{data.info.planNum}}{{data.info.umodel ? data.info.umodel.name : ''}}</span>
                </div>
            </div>
            <!-- <div class="inspection_list_item" @click="openGZ">
                <span>检验工装</span>
                <div class="right1">
                    <span :style="form.jygzmc ? 'color: #000' : ''">{{ form.jygzmc ? form.jygzmc : '点击选择检验工装'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div> -->
        </div>
        <div class="x"></div>
        <div class="inspection_list">
            <div class="inspection_list_item">
                <span>良品数</span>
                <div class="right1">
                    <input type="number" v-model="form.hgsl" placeholder="0" />
                    <span class="dw" v-if="data.info.umodel">{{data.info.umodel.name}}</span>
                </div>
            </div>
            <div class="inspection_list_item">
                <span>不良数量</span>
                <div class="right1">
                    <input type="number" v-model="form.blsl" placeholder="0" />
                    <span class="dw" v-if="data.info.umodel">{{data.info.umodel.name}}</span>
                </div>
            </div>
            <!-- <div class="inspection_list_item" @click="openBLGZ" v-show="form.blsl > 0">
                <span>不良工装</span>
                <div class="right1">
                    <span :style="form.blgzmc ? 'color: #000;' : ''">{{ form.blgzmc ? form.blgzmc : '点击选择工装'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div> -->
            <div class="inspection_list_item" @click="openBL" v-show="form.blsl > 0">
                <span>不良说明</span>
                <div class="right1">
                    <span :style="form.blsm ? 'color: #000;' : ''">{{ form.blsm ? form.blsm : '点击选择不良原因'}}</span>
                    <van-icon name="arrow" color="#999999" size="18" />
                </div>
            </div>
        </div>
        <div class="inspection_footer">
            <button class="inspection_footer_sub" @click="submit" v-preventReClick>提交</button>
        </div>
        <!--    ä¸è‰¯è¯´æ˜Ž    -->
        <van-popup v-model:show="data.show1" position="bottom" round :style="{ height: '50%' }">
            <van-picker
                title="请选择不良说明"
                :columns="data.columns1"
                @confirm="onConfirm1"
                @cancel="onCancel1"
            />
        </van-popup>
        <!--    å·¥è£…    -->
        <Tooling :show="gzShow1" :classification="true" :statusname="'1,2,3'" :attribute="Attribute.HG" @close="close1" @value="getValue1" />
        <!--    ä¸è‰¯å·¥è£…    -->
        <Tooling :show="gzShow" :attribute="Attribute.BF + ',' + Attribute.BL" @close="close" @value="getValue" />
    </div>
</template>
<script setup lang="ts">
    import { ref, reactive, onMounted, onActivated } from 'vue'
    import { useRouter } from "vue-router"
    import { Toast } from 'vant'
    import { REGULAR } from '@/utils/utils'
    import { Attribute } from '@/enum'
    import { createStandard } from '@/apis/QualityAPI'
    import { checkAllList, getListByCondition, toolingQueryById } from "@/apis/WorkOrderAPI"
    import Tooling from '@/components/common/Tooling.vue'
    const router = useRouter()
    let gzShow = ref<boolean>(false)
    let gzShow1 = ref<boolean>(false)
    let data = reactive<any>({
        info: {},
        show1: false,
        columns: [],
        columns1: []
    })
    let form = reactive({
        status: '2',
        gdid: '',
        gdmc: '',
        jygz: '',
        jygzmc: '',
        hgsl: 0,
        blsl: 0,
        blgz: '',
        blgzmc: '',
        blsm: '',
        dw: ''
    })
    let status = ref<Array<object>>([
        { id: '0', name: '巡线', active: true },
        { id: '1', name: '巡检', active: false },
        { id: '2', name: '完工检', active: false }
    ])
    // å…³é—­ä¸è‰¯å·¥è£…
    const close = () => {
        gzShow.value = false
    }
    // å…³é—­å·¥è£…
    const close1 = () => {
        gzShow1.value = false
    }
    // èŽ·å–ä¸è‰¯å·¥è£…æ•°æ®
    const getValue = (item: any) => {
        form.blgzmc = item.code
        form.blgz = item.id
        gzShow.value = false
    }
    // èŽ·å–å·¥è£…æ•°æ®
    const getValue1 = (item: any) => {
        form.dw = item.umodelData
        form.jygz = item.id
        form.jygzmc = item.code
        gzShow1.value = false
    }
    // æ‰“开检验工装
    const openGZ = () => {
        gzShow1.value = true
    }
    // åŽ»é€‰æ‹©è®¾å¤‡
    const jumpGD = () => {
        router.push({ name: 'selectWorkOrder' })
    }
    const openBL = () => {
        data.show1 = true
    }
    const openBLGZ = () => {
        gzShow.value = true
    }
    const onConfirm1 = (value: any): void => {
        form.blsm = value.text
        data.show1 = false
    }
    const onCancel1 = () => {
        data.show1 = false
    }
    // åˆ‡æ¢çŠ¶æ€
    const changeItem = (i: number, id: string): void => {
        status.value.forEach((item: any, index: number) => {
            item.active = i === index;
        })
        form.status = id
    }
    // æäº¤
    const submit = () => {
        if (!form.gdid) return Toast.fail({ message: '工单不能为空' })
        // if (!form.jygz) return Toast.fail({ message: '检验工装不能为空' })
        if (form.hgsl || form.blsl) {
            if (form.hgsl) {
                if (form.dw == '0') {   // æ•´æ•°
                    if (!REGULAR.positiveInteger.test(form.hgsl as never)) return Toast.fail({ message: '良品数量只能为正整数' })
                } else if (form.dw == '1') {    // å°æ•°
                    if (!REGULAR.number.test(form.hgsl as never)) {
                        return Toast.fail({ message: '良品数量只能为正整数或四位小数' })
                    }
                }
            }
            if (form.blsl) {
                if (form.dw == '0') {   // æ•´æ•°
                    if (!REGULAR.positiveInteger.test(form.blsl as never)) return Toast.fail({ message: '不良数量只能为正整数' })
                } else if (form.dw == '1') {    // å°æ•°
                    if (!REGULAR.number.test(form.blsl as never)) {
                        return Toast.fail({ message: '不良数量只能为正整数或四位小数' })
                    }
                }
            }
        } else {
            return Toast.fail({ message: '良品和不良不能同时为空' })
        }
        let total = (form.hgsl ? form.hgsl : 0) + (form.blsl ? form.blsl : 0)
        if (total > data.info.planNum) {
            return Toast.fail({ message: '合格不良相加不能超过计划数量' })
        }
        if (Number(form.blsl) > 0) {
            // if (!form.blgz) return Toast.fail({ message: '不良工装不能为空' })
            if (!form.blsm) return Toast.fail({ message: '不良说明不能为空' })
        }
        createStandard({
            workorderId: form.gdid,
            // appliancesId: form.jygz,
            qualifiedNum: form.hgsl ? form.hgsl : 0,
            unqualifiedNum: form.blsl ? form.blsl : 0,
            // qualifiedApplianceId: form.blgz,
            checkInfo: form.blsm,
            checkType: form.status
        }).then(res => {
            if (res.code === 200) {
                Toast.success({ message: '检验成功!', duration: 2000, forbidClick: true })
                setTimeout(() => {
                    router.go(-1)
                }, 2000)
            }
        })
    }
    // ä¸è‰¯åŽŸå› æ•°æ®
    const checkAllLists = () => {
        checkAllList({ bmodelCateType: '3' })
            .then(res => {
                if (res.code === 200) {
                    res.data.forEach((item: any) => {
                        data.columns1.push({ text: item.combinationName, id: item.id })
                    })
                }
            })
    }
    // æŸ¥è¯¢ä¸è‰¯/报废工装
    const getListByConditions1 = () => {
        data.columns2 = []
        getListByCondition({
            smodelLabel: 'APPLIANCE_OFFTEST,APPLIANCE_USELESS'
        }).then(res => {
            if (res.code === 200) {
                res.data.forEach((item: any) => {
                    data.columns2.push({ text: '[' + item.smodelCode  + '] ' + item.code, id: item.id })
                })
            }
        })
    }
    // èŽ·å–æ‰€æœ‰å·¥è£…
    const toolingQueryByIds = () => {
        data.columns3 = []
        toolingQueryById({})
            .then(res => {
                if (res.code === 200) {
                    res.data.forEach((item: any) => {
                        data.columns3.push({ text: item.code, id: item.id })
                    })
                }
            })
    }
    onMounted(() => {
        checkAllLists()
        // /productionInspection/manualInspection
        // getListByConditions1()
        // toolingQueryByIds()
    })
    onActivated(() => {
        let res: any = localStorage.getItem('workOder')
        if (res) {
            form.gdmc = JSON.parse(res).mmodel.name + '-' + JSON.parse(res).pgmodel.name
            form.gdid = JSON.parse(res).id
            data.info = JSON.parse(res)
            localStorage.removeItem('workOder')
        }
    })
</script>
<style lang="scss" scoped>
.inspection {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #F7F7F7;
    .x {
        height: 20px;
    }
    .inspection_list {
        padding: 0 30px;
        background: white;
        .inspection_list_item {
            height: 98px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1PX solid #E5E5E5;
            &:last-child {
                border: none;
            }
            span {
                font-size: 30px;
                font-weight: 400;
                color: #222222;
            }
            .right1 {
                display: flex;
                align-items: center;
                span {
                    font-size: 28px;
                    font-weight: 400;
                    color: #999999;
                    margin-right: 10px;
                }
                input {
                    width: 180px;
                    height: 60px;
                    border-radius: 8px;
                    border: 1PX solid #CCCCCC;
                    margin-right: 10px;
                    padding: 0 30px;
                    box-sizing: border-box;
                    font-size: 28px;
                }
                input::-webkit-input-placeholder {
                    font-size: 28px;
                    font-weight: 400;
                    color: #999999;
                }
                .dw {
                    font-size: 28px;
                    font-weight: 400;
                    color: #666666;
                }
            }
            .right {
                display: flex;
                align-items: center;
                .active {
                    background: $nav-color !important;
                    color: #ffffff !important;
                }
                .right_item {
                    padding: 18px 32px;
                    background: #F2F2F2;
                    border-radius: 8px;
                    font-size: 26px;
                    font-weight: 400;
                    color: #333333;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-left: 20px;
                }
            }
        }
    }
    .inspection_footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: calc(100% - 60px);
        padding: 30px 30px 68px 30px;
        background: #F7F7F7;
        .inspection_footer_sub {
            width: 100%;
            height: 88px;
            background: #4275FC;
            box-shadow: 0 0 12px 0 rgba(0,0,0,0.0800);
            border-radius: 8px;
            font-size: 30px;
            font-weight: 500;
            color: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
        }
    }
}
</style>
h5_standard/src/views/wxLogin.vue
@@ -7,26 +7,86 @@
            <div class="wx_login_list">
                <div class="wx_login_list_item">
                    <img src="@/assets/icon/login_ic_code@2x.png" alt="" />
                    <input type="text" placeholder="企业代码" />
                    <input type="text" v-model="from.companyId" placeholder="企业代码" />
                </div>
                <div class="wx_login_list_item">
                    <img src="@/assets/icon/login_ic_phone@2x.png" alt="" />
                    <input type="text" placeholder="手机号" />
                    <input type="text" maxlength="11" v-model="from.username" placeholder="手机号" />
                </div>
                <div class="wx_login_list_item">
                    <img src="@/assets/icon/login_ic_password@2x.png" alt="" />
                    <input type="text" placeholder="密码" />
                    <input type="password" v-model="from.password" placeholder="密码" />
                </div>
            </div>
            <div class="wx_login_footer">
                <div class="wx_login_footer_btn">立即登录</div>
                <div class="wx_login_footer_btn" @click="login">立即登录</div>
            </div>
        </div>
    </div>
</template>
<script setup lang="ts">
import { onMounted, reactive } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useStore } from 'vuex';
import { wxLogin, wxAccountLogin, getUserInfo } from '@/apis/index';
import { Toast } from 'vant';
const route = useRoute()
const router = useRouter()
const store = useStore()
let from: any = reactive({
    openid: '',
    unionid: '',
    companyId: '',
    username: '',
    password: ''
})
const login = async () => {
    if (!from.openid) return Toast('openid不能为空')
    if (!from.unionid) return Toast('unionid不能为空')
    if (!from.companyId) return Toast('企业代码不能为空')
    if (!from.username) return Toast('手机号不能为空')
    if (!from.password) return Toast('密码不能为空')
    Toast.loading({
        message: '登录中...',
        forbidClick: true
    });
    let res = await wxAccountLogin(from)
    if (res.code === 200) {
        let info = await getUserInfo()
        if (info.code === 200) {
            await store.commit('setEntrance', 'DD')
            await store.commit('setUserInfo', info.data)
            await store.dispatch('getMenuList', 2)
            await router.replace('/workbench')
        }
    }
    Toast.clear();
}
onMounted(() => {
    wxLogin({ code: route.query.code })
        .then(async (res) => {
            if (res.code === 200) {
                // å…ç™»å½•,直接跳首页
                if (res.data.loginStatus == 0) {
                    let info = await getUserInfo()
                    if (info.code === 200) {
                        await store.commit('setEntrance', 'DD')
                        await store.commit('setUserInfo', info.data)
                        await store.dispatch('getMenuList', 2)
                        await router.replace('/workbench')
                    }
                } else {
                    from.openid = res.data.openid
                    from.unionid = res.data.unionid
                }
            }
        })
})
</script>
<style lang="scss" scoped>