82 lines
1.6 KiB
Vue
82 lines
1.6 KiB
Vue
<template>
|
|
<view>
|
|
<button @tap.stop="aaa" class="clear-btn order">点击我</button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
var jweixin = require('jweixin-module');
|
|
import {
|
|
mapState,
|
|
mapActions,
|
|
mapMutations
|
|
} from "vuex"
|
|
export default {
|
|
data() {
|
|
return {
|
|
|
|
}
|
|
},
|
|
async onLoad(options) {
|
|
this.initIndex()
|
|
},
|
|
methods: {
|
|
async initIndex(){
|
|
await this.$jweixin.initJssdk();
|
|
this.$jweixin.wxReady(() => {
|
|
this.$jweixin.hideOptionMenu()
|
|
})
|
|
},
|
|
async aaa() {
|
|
let url = await this.$api.order.getVirtualPhone({
|
|
order_id:188
|
|
})
|
|
console.log(url)
|
|
// #ifdef H5
|
|
// if (this.$jweixin.isWechat()) {
|
|
|
|
// this.$util.showLoading()
|
|
// await this.$jweixin.wxReady2();
|
|
// let {
|
|
// latitude: lat = 0,
|
|
// longitude: lng = 0
|
|
// } = await this.$jweixin.getWxLocation();
|
|
|
|
// if (!lat) {
|
|
// this.$util.hideAll()
|
|
// this.$util.showToast({
|
|
// title: `请授权定位当前地址`
|
|
// })
|
|
// return
|
|
// }
|
|
// if (lat && lng) {
|
|
// let key = `${lat},${lng}`
|
|
// let data = await this.$api.base.getMapInfo({
|
|
// location: key
|
|
// })
|
|
// let {
|
|
// status,
|
|
// result
|
|
// } = JSON.parse(data)
|
|
// if (status == 0) {
|
|
// this.$util.hideAll()
|
|
// let {
|
|
// address
|
|
// } = result
|
|
// let location = {
|
|
// lat,
|
|
// lng,
|
|
// address
|
|
// }
|
|
// // alert(JSON.stringify(location))
|
|
// }
|
|
// }
|
|
// }
|
|
// #endif
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style> |