Commit 7ea18f29 by 李伟康

commit

1 parent 4f096331
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
</template> </template>
<div <div
class="scan flex" class="scan flex"
v-if="type != 1" v-if="type != 1 && showScan"
@click="scan" @click="scan"
> >
<div class="sprite-icon icon-scan"></div> <div class="sprite-icon icon-scan"></div>
...@@ -196,6 +196,20 @@ const itemObj = [ ...@@ -196,6 +196,20 @@ const itemObj = [
key: 'verificationOperator' key: 'verificationOperator'
} }
] ]
const itemObj2 = [
{
label: '券名',
key: 'couponName'
},
{
label: '发放人',
key: 'employeeName'
},
{
label: '核销人',
key: 'sellerName'
}
]
export default { export default {
name: '', name: '',
data () { data () {
...@@ -216,20 +230,8 @@ export default { ...@@ -216,20 +230,8 @@ export default {
itemObj, itemObj,
total: 0, total: 0,
userName: '', userName: '',
itemObj2: [ itemObj2,
{ showScan: false
label: '券名',
key: 'couponName'
},
{
label: '发放人',
key: 'employeeName'
},
{
label: '核销人',
key: 'sellerName'
}
]
} }
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
...@@ -262,8 +264,9 @@ export default { ...@@ -262,8 +264,9 @@ export default {
}, },
mounted () { mounted () {
this.getTabNum() this.getTabNum()
window.$wx = wxConfig wxConfig.init(['scanQRCode']).then(() => {
window.$wx.init(['scanQRCode']) this.showScan = true
})
}, },
methods: { methods: {
/**获取列表数量 */ /**获取列表数量 */
...@@ -422,7 +425,7 @@ export default { ...@@ -422,7 +425,7 @@ export default {
}, },
scan () { scan () {
// let resultStr = 't=2&c=3483845737948516352' // let resultStr = 't=2&c=3483845737948516352'
window.$wx.scanQRCode(1).then(({ resultStr }) => { wxConfig.scanQRCode(1).then(({ resultStr }) => {
let name = 'verificationDetail' let name = 'verificationDetail'
let [t, c] = resultStr.split('&') let [t, c] = resultStr.split('&')
let type = t.split('=')[1] let type = t.split('=')[1]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!