From 8fc9f0f6553f16474c01f0a1a28a480afb56cc5e Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Thu, 2 Dec 2021 12:09:02 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=B5=A0=E5=88=B8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 16 ++++++++-------- Utils/Api.js | 5 ++++- pages.json | 22 +++++++++++----------- pages/tabBar/home/home.vue | 33 ++++++++++++++------------------- 4 files changed, 37 insertions(+), 39 deletions(-) diff --git a/App.vue b/App.vue index eb2a24c..c50acc1 100644 --- a/App.vue +++ b/App.vue @@ -5,15 +5,15 @@ // brestUrl: 'http://192.168.3.4:9302/brest', // imgUrl: 'https://192.168.3.4:9301/filesystem/', //正式 - url: 'https://hsg.dctpay.com/crest', - imgUrl: 'https://hsg.dctpay.com/filesystem/', - brestUrl : 'https://hsg.dctpay.com/brest', - imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', + // url: 'https://hsg.dctpay.com/crest', + // imgUrl: 'https://hsg.dctpay.com/filesystem/', + // brestUrl : 'https://hsg.dctpay.com/brest', + // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', //测试 - // url: 'https://hsgcs.dctpay.com/crest', - // brestUrl : 'https://hsgcs.dctpay.com/brest', - // imgUrl: 'https://hsgcs.dctpay.com/filesystem/', - // imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', + url: 'https://hsgcs.dctpay.com/crest', + brestUrl : 'https://hsgcs.dctpay.com/brest', + imgUrl: 'https://hsgcs.dctpay.com/filesystem/', + imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', userInfo: "", brestUserInfo : '', openId: '', diff --git a/Utils/Api.js b/Utils/Api.js index b6290f4..f347a74 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -247,7 +247,10 @@ export const getUserLotteryNum = params => { export const getWinLotteryList = params => { return POST('GET', `${base}/activity/getWinLotteryList`, params).then(res => res.data); } - +//跳转是否赠券 +export const getMembershipLevel = params => { + return POST('GET', `${base}/highUser/GetMembershipLevel`, params).then(res => res.data); +} /** * 肯德基地址 */ diff --git a/pages.json b/pages.json index ddf3f9a..0d94345 100644 --- a/pages.json +++ b/pages.json @@ -1,16 +1,6 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { - "path": "pages/qianZhuPay/union-pay/union-pay", - "style": { - "navigationBarTextStyle": "white", - "navigationBarTitleText": "选择方式", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", - "enablePullDownRefresh": false - } - - },{ "path": "pages/tabBar/home/home", "style": { "navigationBarTextStyle": "white", @@ -28,7 +18,17 @@ }] } } - }, { + }, { + "path": "pages/qianZhuPay/union-pay/union-pay", + "style": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "选择方式", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "enablePullDownRefresh": false + } + + },{ "path": "pages/user/bindingCardList/bindingCardList", "style": { "navigationBarTitleText": "卡列表", diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index 6d4fb74..8af9db2 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -101,6 +101,7 @@ getTPigKFCToken, getTPigCinemaToken, getCmsContent, + getMembershipLevel } from "../../../Utils/Api.js"; //您的api路径 import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; let app = getApp(); @@ -174,6 +175,9 @@ this.getCmsContent(); this.getCmsContentcmshome(); this.getCmsContentcmsContent(); + if (app.globalData.userInfo.phone) { + this.getMembershipLevel(); + } } }, onLoad(options) { @@ -247,6 +251,14 @@ } }); }, + //查询是否赠券 + getMembershipLevel() { + let params = { + phone: app.globalData.userInfo.phone, + regionId: app.globalData.cityId + } + getMembershipLevel(params).then(res => {}); + }, //获取首页菜单 getCmsContentcmshome() { let params = { @@ -455,7 +467,7 @@ url: '../../goods/goods?id=' + e }); }, - + //赠券卡券列表 getCouponListArea() { let params = { @@ -495,23 +507,6 @@ } }) }, - /** - * 跳转其他小程序 - */ - tao(url, id) { - console.log(url); - uni.navigateToMiniProgram({ - appId: id, - path: url, - success: res => { - // 打开成功 - console.log("打开成功", res); - }, - fail: err => { - console.log(err); - } - }); - }, //轮播图指示器 swiperChange(event) { this.currentSwiper = event.detail.current; @@ -670,7 +665,7 @@ if (item.title == '优选商品') { uni.navigateTo({ url: '../../../subPages/preferred-goods/preferred-goods' - }) + }) return; }