You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.1 KiB
62 lines
1.1 KiB
<template>
|
|
<view>
|
|
<web-view :src="url"></web-view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getTPigKFCToken,
|
|
getTPigCinemaToken,
|
|
getGatewayToken
|
|
} from '../../../Utils/Api.js';
|
|
let app = getApp();
|
|
export default {
|
|
data() {
|
|
return {
|
|
url: '',
|
|
typeId: ''
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.typeId = options.id;
|
|
this.reqUlr();
|
|
},
|
|
methods: {
|
|
reqUlr() {
|
|
if (this.typeId == 1) {
|
|
let params = {
|
|
userId: app.globalData.userInfo.id
|
|
}
|
|
getTPigKFCToken(params).then(res => {
|
|
if (res.return_code == '000000') {
|
|
this.url = res.return_data;
|
|
}
|
|
})
|
|
} else if (this.typeId == 2) {
|
|
let params = {
|
|
userId: app.globalData.userInfo.id
|
|
}
|
|
getTPigCinemaToken(params).then(res => {
|
|
if (res.return_code == '000000') {
|
|
this.url = res.return_data;
|
|
}
|
|
})
|
|
} else if (this.typeId == 3) {
|
|
let params = {
|
|
userId: app.globalData.userInfo.id
|
|
}
|
|
getGatewayToken(params).then(res => {
|
|
if (res.return_code == '000000') {
|
|
this.url = res.return_data;
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|
|
|