1.增加肯德基

2.增加电影票
yj-dev
杨杰 3 years ago
parent fe81118816
commit c5696ba288
  1. 11
      Utils/Api.js
  2. 9
      pages.json
  3. 32
      pages/tabBar/home/home.vue
  4. 25
      pages/tabBar/order/order.vue

@ -146,6 +146,17 @@ export const getDredgeProvince = params => {
}
/**
* 肯德基地址
*/
export const getTPigKFCToken = params => {
return POST('GET', `${base}/tPig/getTPigKFCToken`, params).then(res => res.data);
}
//电影票
export const getTPigCinemaToken = params => {
return POST('GET', `${base}/tPig/getTPigCinemaToken`, params).then(res => res.data);
}
/**
* H5 获取用户信息
*/

@ -430,6 +430,15 @@
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/tabBar/order/order",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],

@ -173,7 +173,9 @@
WXlogin,
getCouponList,
getH5UserInfo,
getH5AccessToken
getH5AccessToken,
getTPigKFCToken,
getTPigCinemaToken
} from "../../../Utils/Api.js"; //api
let app = getApp();
export default {
@ -218,12 +220,14 @@
{
id: 2,
name: '电影票',
img: '/static/img/user/home2.png'
img: '/static/img/user/home2.png',
src: '/pages/tabBar/order/order'
},
{
id: 3,
name: '肯德基',
img: '/static/img/user/home3.png'
img: '/static/img/user/home3.png',
src: '/pages/tabBar/order/order'
},
{
id: 4,
@ -520,6 +524,28 @@
uni.navigateTo({
url: item.src
})
}else if(item.name == '肯德基'){
let params = {
userId : app.globalData.userInfo.id
}
getTPigKFCToken(params).then(res => {
if (res.return_code == '000000') {
uni.navigateTo({
url: '/pages/tabBar/order/order?id='+res.return_data
})
}
})
}else if(item.name == '电影票'){
let params = {
userId : app.globalData.userInfo.id
}
getTPigCinemaToken(params).then(res => {
if (res.return_code == '000000') {
uni.navigateTo({
url: '/pages/tabBar/order/order?id='+res.return_data
})
}
})
}else{
uni.showToast({
title: '暂未开通',

@ -0,0 +1,25 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url:''
}
},
onLoad(options){
this.url = options.id;
},
methods: {
}
}
</script>
<style>
</style>
Loading…
Cancel
Save