|
@@ -174,6 +174,7 @@ export default {
|
|
|
this.getLuckDrawActivity()
|
|
|
this.getMealInfo()
|
|
|
this.getCarouselList()
|
|
|
+ console.log(this.$userAgent.isMobile);
|
|
|
},
|
|
|
methods: {
|
|
|
async getCarouselList() {
|
|
@@ -210,15 +211,14 @@ export default {
|
|
|
actualPrice: this.actualPrice
|
|
|
});
|
|
|
} else {
|
|
|
- document.addEventListener('UniAppJSBridgeReady', () => {
|
|
|
- // 使用postMessage 方法可以发送消息到应用, 消息内容需要在data 对象中,否则webview无法接收到
|
|
|
- uni.postMessage({
|
|
|
- data: {
|
|
|
- payType: this.payType === 'aliPay' ? 3 : 2,
|
|
|
- orderNum: res.data.myOrderNum,
|
|
|
- buyType: 1
|
|
|
- }
|
|
|
- })
|
|
|
+ console.log(511);
|
|
|
+ // 使用postMessage 方法可以发送消息到应用, 消息内容需要在data 对象中,否则webview无法接收到
|
|
|
+ uni.postMessage({
|
|
|
+ data: {
|
|
|
+ payType: this.payType === 'aliPay' ? 3 : 2,
|
|
|
+ orderNum: res.data.myOrderNum,
|
|
|
+ buyType: 1
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
} catch (error) {
|