From f26b59d3604eb1788715b0d5654d4dd4bad690e9 Mon Sep 17 00:00:00 2001
From: yangjie <812952667@qq.com>
Date: Sat, 18 Sep 2021 14:28:55 +0800
Subject: [PATCH 1/3] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 16 +++++------
pages/tabBar/home/home.vue | 55 ++++++++++++++++----------------------
2 files changed, 31 insertions(+), 40 deletions(-)
diff --git a/App.vue b/App.vue
index d744daa..4e1d136 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/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index 8afe1ed..4c2b069 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -49,9 +49,9 @@
-
+
- {{ row.name }}
+ {{ row.title }}
@@ -253,29 +253,8 @@
pageNum: 1,
pageSize: 6,
// 分类菜单
- categoryList: [{
- id: 1,
- name: '在线加油',
- img: 'user/home1.png',
- src: '/pages/goods/refuel/refuel'
- },
- {
- id: 2,
- name: '电影票',
- img: 'user/home2.png',
- src: '/pages/tabBar/order/order'
- },
- {
- id: 3,
- name: '肯德基',
- img: 'user/home3.png',
- src: '/pages/tabBar/order/order'
- },
- {
- id: 4,
- name: '话费充值',
- img: 'user/home4.png'
- }
+ categoryList: [
+
],
//切换状态
cpStuats: 1
@@ -299,7 +278,7 @@
this.getCouponListArea();
this.getCouponListgold();
this.getCmsContent();
- // this.getCmsAactibity();
+ this.getCmsContentcmshome();
}
},
onLoad() {
@@ -348,7 +327,18 @@
// #endif
},
methods: {
-
+ //获取首页菜单
+ getCmsContentcmshome() {
+ let params = {
+ regionId: app.globalData.cityId,
+ categoryCode: 'CMS_HOME_NAV'
+ }
+ getCmsContent(params).then(res => {
+ if (res.return_code == '000000') {
+ this.categoryList = res.return_data;
+ }
+ });
+ },
//获取弹出或者弹窗
getCmsContent() {
let params = {
@@ -430,6 +420,7 @@
uni.hideLoading();
that.getCmsContent();
that.getCmsAactibity();
+ that.getCmsContentcmshome();
},
fail() {
uni.hideLoading()
@@ -685,11 +676,11 @@
},
//跳转菜单
toCategory(item) {
- if (item.name == '在线加油') {
+ if (item.title == '在线加油') {
uni.navigateTo({
- url: item.src
+ url: item.ext1
})
- } else if (item.name == '肯德基') {
+ } else if (item.title == '肯德基') {
if (!app.globalData.userInfo) {
uni.navigateTo({
url:'../../userLogin/userLogin'
@@ -705,7 +696,7 @@
uni.navigateTo({
url: '/pages/tabBar/order/order?id=1'
})
- } else if (item.name == '电影票') {
+ } else if (item.title == '电影票') {
if (!app.globalData.userInfo) {
uni.navigateTo({
url:'../../userLogin/userLogin'
@@ -721,7 +712,7 @@
uni.navigateTo({
url: '/pages/tabBar/order/order?id=2'
})
- } else if (item.name == '话费充值') {
+ } else if (item.title == '话费充值') {
if (!app.globalData.userInfo) {
uni.navigateTo({
url:'../../userLogin/userLogin'
From f5af1d828d600bf20ce6330c187e592411edd6dc Mon Sep 17 00:00:00 2001
From: yangjie <812952667@qq.com>
Date: Sat, 18 Sep 2021 16:20:15 +0800
Subject: [PATCH 2/3] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/tabBar/home/home.vue | 230 ++++++++++++++-----------------------
1 file changed, 86 insertions(+), 144 deletions(-)
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index 4c2b069..0b37600 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -54,34 +54,29 @@
{{ row.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.couponName}}
-
-
- {{ item.discountPrice*100}}
-
+
+
+
+
+
+
+
+
+
+ {{item.couponName}}
+
+
+ {{ item.discountPrice*100}}
-
-
-
+
+
+
+
+
@@ -97,92 +92,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -202,7 +111,6 @@
getTPigCinemaToken,
getCmsContent,
} from "../../../Utils/Api.js"; //您的api路径
- // import { getUserInfo } from '../../../Utils/Api.js'
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
let app = getApp();
export default {
@@ -226,11 +134,6 @@
imgadres1: 'jbhed.png',
imgadres2: 'jt.png',
imgadres3: '',
- imgadres4: 'homet.png',
- imgadres5: 'homeh.png',
- imgadres6: 'homed.jpg',
- imgadres7: 'homek.jpg',
- imgadres8: 'homejf.jpg',
webUrl: '',
// 轮播图片
swiperList: [{
@@ -254,8 +157,8 @@
pageSize: 6,
// 分类菜单
categoryList: [
-
],
+ homeCateList:[],
//切换状态
cpStuats: 1
};
@@ -279,6 +182,7 @@
this.getCouponListgold();
this.getCmsContent();
this.getCmsContentcmshome();
+ this.getCmsContentcmsContent();
}
},
onLoad() {
@@ -327,6 +231,18 @@
// #endif
},
methods: {
+ //获取首页功能
+ getCmsContentcmsContent() {
+ let params = {
+ regionId: app.globalData.cityId,
+ categoryCode: 'CMS_HOME_CONTENT'
+ }
+ getCmsContent(params).then(res => {
+ if (res.return_code == '000000') {
+ this.homeCateList = res.return_data;
+ }
+ });
+ },
//获取首页菜单
getCmsContentcmshome() {
let params = {
@@ -339,6 +255,7 @@
}
});
},
+
//获取弹出或者弹窗
getCmsContent() {
let params = {
@@ -376,7 +293,7 @@
closePopup() {
this.$refs.popup.hide();
},
-
+
/**
* 跳转外链
*/
@@ -421,6 +338,7 @@
that.getCmsContent();
that.getCmsAactibity();
that.getCmsContentcmshome();
+ that.getCmsContentcmsContent();
},
fail() {
uni.hideLoading()
@@ -506,12 +424,7 @@
console.log(err);
});
},
- //调整商品列表
- goGoodsList(item) {
- uni.navigateTo({
- url: '../../goods/goods-list/goods-list?id=' + item
- })
- },
+
//搜索跳转
toSearch() {
uni.navigateTo({
@@ -668,12 +581,7 @@
}
})
},
- //跳转团油
- jumpTyou() {
- uni.navigateTo({
- url: '/pages/goods/refuel/refuel'
- })
- },
+
//跳转菜单
toCategory(item) {
if (item.title == '在线加油') {
@@ -683,13 +591,13 @@
} else if (item.title == '肯德基') {
if (!app.globalData.userInfo) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
@@ -699,13 +607,13 @@
} else if (item.title == '电影票') {
if (!app.globalData.userInfo) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
@@ -715,13 +623,13 @@
} else if (item.title == '话费充值') {
if (!app.globalData.userInfo) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
@@ -741,21 +649,55 @@
jumphuafei(item) {
if (!app.globalData.userInfo) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
return;
}
+ if(item.title == '汇联通'){
+ uni.navigateTo({
+ url: '/pages/goods/goods-list/goods-list?id=2'
+ })
+ return;
+ }
+ if(item.title == '在线加油'){
+ uni.navigateTo({
+ url: '/pages/goods/refuel/refuel'
+ })
+ return;
+ }
+ if(item.title == '话费充值'){
+ uni.navigateTo({
+ url: '/pages/tabBar/order/order?id=3'
+ })
+ return;
+ }
+ if(item.title == '电影票'){
+ uni.navigateTo({
+ url: '/pages/tabBar/order/order?id=2'
+ })
+ return;
+ }
+ if(item.title == '肯德基'){
+ uni.navigateTo({
+ url: '/pages/tabBar/order/order?id=1'
+ })
+ return;
+ }
+
+
+ },
+ //调整商品列表
+ goGoodsList(item) {
uni.navigateTo({
- url: '/pages/tabBar/order/order?id=' + item
+ url: '/pages/goods/goods-list/goods-list?id=' + item
})
-
- }
+ },
},
};
From 930483fdfb1837416c5aefed03c9f3dbda50c052 Mon Sep 17 00:00:00 2001
From: yangjie <812952667@qq.com>
Date: Sat, 18 Sep 2021 16:35:50 +0800
Subject: [PATCH 3/3] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=AD=A3=E5=BC=8F?=
=?UTF-8?q?=E7=8E=AF=E5=A2=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/App.vue b/App.vue
index 4e1d136..d744daa 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: '',