丰都
This commit is contained in:
@@ -44,6 +44,12 @@
|
||||
<span>{{ item.label }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div class="item" hover-class="bg-hover" @click="scan">
|
||||
<div class="block">
|
||||
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/saoyisao.png" alt="">
|
||||
</div>
|
||||
<span class="desc">扫一扫</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="logout" v-if="token">
|
||||
@@ -90,18 +96,18 @@ export default {
|
||||
path: "./myIntegral",
|
||||
type: 'token'
|
||||
},
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png",
|
||||
label: "我的家庭",
|
||||
path: "./myIntegral",
|
||||
type: 'token'
|
||||
},
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wxmp/mine/saoyisao.png",
|
||||
label: "扫一扫",
|
||||
path: "./myIntegral",
|
||||
type: 'token'
|
||||
},
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png",
|
||||
// label: "我的家庭",
|
||||
// path: "./myFamily",
|
||||
// type: 'token'
|
||||
// },
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/saoyisao.png",
|
||||
// label: "扫一扫",
|
||||
// path: "scan",
|
||||
// type: 'token'
|
||||
// },
|
||||
],
|
||||
// [
|
||||
// {
|
||||
@@ -191,6 +197,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
scan() {
|
||||
wx.scanQRCode({
|
||||
needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
|
||||
scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
|
||||
success: (res)=> {
|
||||
// var result = res.resultStr; // 当 needResult 为 1 时,扫码返回的结果
|
||||
// var resultArr = result.split(','); // 扫描结果以逗号分割数组(一维码)
|
||||
// var codeContent = resultArr[resultArr.length - 1]; // 获取数组最后一个元素,也就是最终的内容
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log("调用wx.scanQRCode扫码失败");
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getAuth();
|
||||
|
||||
Reference in New Issue
Block a user