Commit d38fcbbb authored by gengchunlei's avatar gengchunlei

小程序 js实现扫码

parent bd35f55a
......@@ -3,7 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
"serveP": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
"serve": "vue-cli-service serve",
"build:test": "vue-cli-service build --mode test",
"build:prod": "vue-cli-service build --mode prod",
"build:beta": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod"
......
......@@ -29,7 +29,7 @@
<label>返回首页</label>
</div>
</div>
<analyze-q-r-code :show="showPop" v-if="showPop"></analyze-q-r-code>
<analyze-q-r-code :show="showPop" v-if="showPop" @getQRCode="getQRCode"></analyze-q-r-code>
</div>
</template>
......@@ -41,7 +41,7 @@
import presonImg from '../assets/img/preson.png';
import sharpImg from '../assets/img/sharp.png';
import {getNetworkInfo} from '../utils/api';
import {callMobile, getQueryVariable, showNav} from "../utils/common";
import {callMobile, getQueryVariable, isWeiXin, showNav} from "../utils/common";
import {Toast} from 'mint-ui';
import {GPS} from "../utils/mapCalculation";
import AnalyzeQRCode from "./component/analyzeQRCode";
......@@ -102,18 +102,21 @@
// if (data.data == true) {//true 该用户非首次领取需要填写随访
// this.$router.push(`/returnVisit`);
// } else {
callMobile("qrcode", {});
// callMobile("qrcode", {});
// }
// })
// this.subscanQRCallBack(111)
//微信环境下 打开js扫码 (暂时关闭)
// if (isWeiXin()){
// this.showPop = true
// } else {
// callMobile("qrcode", {});
// }
// 微信环境下 打开js扫码 (暂时关闭)
if (isWeiXin()){
this.showPop = true
} else {
callMobile("qrcode", {});
}
},
getQRCode(val) {
this.subscanQRCallBack(val)
},
subscanQRCallBack(val) {
let info = JSON.parse(window.sessionStorage.getItem('mobileTokenIno'))
const {phone = '', userId = ''} = info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment