diff --git a/pages.json b/pages.json index 0eb5fc6..acedf1c 100644 --- a/pages.json +++ b/pages.json @@ -1,6 +1,13 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { + "path": "pages/user/news/news", + "style": { + "navigationBarTitleText": "消息", + "enablePullDownRefresh": false + } + + }, { "path": "pages/welcome/welcome", "style": { "navigationBarTitleText": "", @@ -12,8 +19,8 @@ "style": { "navigationBarTextStyle": "white", "navigationBarTitleText": "首页", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", + "navigationBarBackgroundColor": "#3da7e7", + "backgroundColorTop": "#3da7e7", "onReachBottomDistance": 50, "app-plus": { "titleNView": false, //禁用原生导航栏 @@ -146,8 +153,8 @@ "enablePullDownRefresh": true, "navigationBarTitleText": "我的", "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", + "navigationBarBackgroundColor": "#6fbdee", + "backgroundColorTop": "#6fbdee", "navigationBarTextStyle": "white", "app-plus": { "titleNView": false, //禁用原生导航栏 @@ -298,7 +305,7 @@ "path": "pages/user/order_list/order_list", "style": { "navigationBarTitleText": "我的订单", - "navigationBarBackgroundColor": "#f8f8f8", + "navigationBarBackgroundColor": "#ffffff", "backgroundColorTop": "#f3f3f3", "backgroundColorBottom": "#ffffff" } @@ -497,6 +504,7 @@ } + ], "subpackages": [{ "root": "subPages", diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index 3ca70d3..4bc642f 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -17,103 +17,146 @@ + + + + + + + + + + + + + + + + + + + {{ row.title }} + + + + + + + + + + + + + {{ row.title }} + + + + + + + + + + + + 放松放松方放松放松方放松放松方 + 40分钟前 + + + + + + + - - + - - + - - - - - - - - - - - {{ row.title }} + + + + 加油专区 + 更多 - - - - + + + + ETC加油券 + 2020.09.21-2202.10.12 + ¥240 + + + + ETC加油券 + 2020.09.21-2202.10.12 + ¥240 + + + + ETC加油券 + 2020.09.21-2202.10.12 + ¥240 + - - - - - {{item.couponName}} - - - {{ item.discountPrice*100}} - - - - - - - + + + + 惠享生活 + - - - - - {{item.couponName}} - - ¥{{item.discountPrice}} - - - - - - - - - + + + + + - - - - - - {{pro.couponName}} - ¥{{pro.discountPrice}} - - - + + + + 天天好券 + + 更多 + + + + + 加油优惠券包 + 2020.09.21-2202.10.12 + ¥240 + + + + 加油优惠券包 + 2020.09.21-2202.10.12 + ¥240 + + + + 加油优惠券包 + 2020.09.21-2202.10.12 + ¥240 + + + - - - - - - - - @@ -149,8 +192,8 @@ currentSwiper: 0, imageUrl: app.globalData.imgUrl, imagewxUrl: app.globalData.imageWxImg, - imgadres: 'headzq.png', - imgadres1: 'jbhed.png', + imgadres: '/home/home1.png', + imgadres1: '/home/home2.png', imgadres2: 'jt.png', imgadres5: 'unionarea.png', imgadres3: '', @@ -708,6 +751,10 @@ swiperChange(event) { this.currentSwiper = event.detail.current; }, + test(item) { + let a = item % 2; + }, + eheckStu(item) { this.cpStuats = item; }, @@ -770,51 +817,9 @@ //跳转菜单 toCategory(item) { - // if (!app.globalData.userInfo.phone) { - // uni.navigateTo({ - // url: '../../userLogin/userLogin' - // }) - // return; - // } - // if (!app.globalData.userInfo) { - // uni.navigateTo({ - // url: '../../userLogin/userLogin' - // }) - // return; - // } - // if (item.title == '在线加油') { uni.navigateTo({ url: item.ext1 }) - // } else if (item.title == '肯德基') { - // uni.navigateTo({ - // // url: '/pages/tabBar/order/order?id=1' - // url: '../../../qianzhu-KFC/home/home' - // }) - // } else if (item.title == '电影票') { - // uni.navigateTo({ - // // url: '/pages/tabBar/order/order?id=2' - // // url: '/qianzhu-Starbucks/home/home' - // }) - // } else if (item.title == '话费充值') { - // uni.navigateTo({ - // url: '../../../subPages/recharge/recharge' - // }) - // } else if (item.title == '星巴克') { - // uni.navigateTo({ - // url: '/qianzhu-Starbucks/home/home' - // }) - // }else if (item.title == '会员充值') { - // uni.navigateTo({ - // url: '/member-Recharge/choicepage/choicepage' - // }) - // } else { - // uni.showToast({ - // title: '暂未开通', - // icon: 'none', - // duration: 2000 - // }) - // } }, //轮播跳转活动 jumplottery(item) { @@ -827,76 +832,9 @@ }, //单独跳转话费充值 jumphuafei(item) { - // if (!app.globalData.userInfo) { - // uni.navigateTo({ - // url: '../../userLogin/userLogin' - // }) - // return; - // } - // if (!app.globalData.userInfo.phone) { - // uni.navigateTo({ - // url: '../../userLogin/userLogin' - // }) - // return; - // } - uni.navigateTo({ url: item.ext1 }) - // 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: '../../../subPages/recharge/recharge' - // }) - // return; - // } - // if (item.title == '电影票') { - // uni.navigateTo({ - // url: '/pages/tabBar/order/order?id=2' - // }) - // return; - // } - // if (item.title == '星巴克') { - // uni.navigateTo({ - // url: '/qianzhu-Starbucks/home/home' - // }) - // return; - // } - // if (item.title == '肯德基') { - // uni.navigateTo({ - // url: '../../../qianzhu-KFC/home/home' - // }) - // return; - // } - // if (item.title == '优选商品') { - // uni.navigateTo({ - // url: '../../../subPages/preferred-goods/preferred-goods' - // }) - // return; - // } - // if (item.title == '优惠券包') { - // uni.navigateTo({ - // url: '../../../subPages/coupon-package/coupon-package' - // }) - // return; - // } - // if (item.title == '会员充值') { - // uni.navigateTo({ - // url: '/member-Recharge/choicepage/choicepage' - // }) - // return; - // } }, //调整商品列表 goGoodsList(item) { @@ -931,7 +869,6 @@ diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index a470d2c..f54975d 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -12,7 +12,7 @@ - + 点击获取信息 @@ -21,126 +21,139 @@ {{user.name}} - 积分: 0 - 积分: {{user.gold}} 个 - + {{userphone}} - - - - - - - - - + + + + + {{textnum}} + 卡券 + + + + + {{textSend}} + 优惠券 + + + + - 我的订单 + + 订单 + 全部订单 + + + - - - - - - + - {{row.text}} + {{row.text}} + + + + + + + + 等待付款 + 剩余时间: 13:44 + + + 去支付 + + + + + - + + - - 话费充值 - - - - - - - {{row.text}} + + 我的资产 + + + + 进入卡包 + - - - - 卡券中心 - - - - - - - - - - {{row.text}} + + + **** + ¥2400 + 积分余额 + + + **** + ¥2400 + 油卡余额 + + + **** + ¥2400 + 工会卡余额 - - - 推广中心 - - - - - - - - - - {{row.text}} - - {{row.text}} + + + + 商务中心 + + + + + 门店登陆 + + + + 代理商登陆 + + + + 我的推广 - - 我的 + + + + + - - + + - {{row.text}} + + {{row.text}} - @@ -161,7 +174,6 @@ }, data() { return { - isfirst: true, imagewxUrl: app.globalData.imageWxImg, imgadres: 'head.png', headerPosition: "fixed", @@ -179,21 +191,18 @@ // 订单类型 orderList: [{ text: '待支付', - icon: "fukuan" + icon: "../../../static/img/user/user1.png" }, { text: '已支付', - icon: "fahuo" + icon: "../../../static/img/user/user2.png" }, { text: '已完成', - icon: "shouhuo" + icon: "../../../static/img/user/user3.png" }, { text: '已退款', - icon: "tuihuo" - }, { - text: '已取消', - icon: "pingjia" + icon: "../../../static/img/user/user4.png" } ], huafeiList: [{ @@ -215,58 +224,11 @@ icon: "tuihuo" } ], - // 工具栏列表 - mytoolbarList: [{ - url: '/pages/goods/recording/recording', - text: '积分记录', - img: 'user/mingxi.png' - }, - // { - // url: '/pages/goods/recording/recording?id=2', - // text: '消费记录', - // img: 'user/quan.png' - // }, - { - url: '/pages/user/mineCoupons/mineCoupons', - text: '我的卡券', - img: 'user/choujiang.png' - }, - { - url: '../../user/coupon/coupon', - text: '我的优惠券', - img: 'user/momey.png' - } - ], - // 推广列表 - mytgbarList: [{ - url: '', - text: '客服', - img: 'user/kefu.png' - }, - { - url: '../../login/login?id=1', - text: '商户入口', - img: 'user/point.png' - }, - { - url: '../../login/login?id=2', - text: '代理商登录', - img: 'user/renw.png' - }, - { - url: '/pages/user/myPromotion/myPromotion', - text: '我的推广', - img: 'user/extension.png' - } - // , - // { - // url: '/pages/user/generatePoster/generatePoster', - // text: '生成海报', - // img: 'user/poster.png' - // } - ], //操作列表 czList: '', + nopaylist: [1, 2, 3, 4, 5], + assetsstu: 2, + userphone:'' // 手机号 } }, //下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true @@ -307,47 +269,59 @@ // #ifdef MP if (!app.globalData.userInfo.isSetPayPwd) { this.czList = [{ - url: '../../../subPages/cardsList/cardsList', - text: '卡包', - img: '../../../static/img/ghkpay.png' + url: '/pages/goods/recording/recording', + text: '积分记录', + img: '../../../static/img/user/user10.png' }, + { url: '../../login/updatePas/updatePas', - text: '设置积分密码', - img: '../../../static/img/pas.png' + text: '支付密码', + img: '../../../static/img/user/user11.png' + }, { + url: '', + text: '客服', + img: '../../../static/img/user/user13.png' } ] return; } - // '../../user/unionCard/unionCard' this.czList = [{ - url: '../../../subPages/cardsList/cardsList', - text: '卡包', - img: '../../../static/img/ghkpay.png' + url: '/pages/goods/recording/recording', + text: '积分记录', + img: '../../../static/img/user/user10.png' }, { url: '../../login/updatePas/resetPas', - text: '修改积分密码', - img: '../../../static/img/pas.png' + text: '支付密码', + img: '../../../static/img/user/user11.png' + }, { + url: '', + text: '客服', + img: '../../../static/img/user/user13.png' } ] // #endif // #ifdef H5 if (!app.globalData.userInfo.isSetPayPwd) { this.czList = [{ - url: '../../../subPages/cardsList/cardsList', - text: '卡包', + url: '/pages/goods/recording/recording', + text: '积分记录', img: '../../../static/img/ghkpay.png' }, { url: '../../login/updatePas/updatePas', - text: '设置积分密码', - img: '../../../static/img/pas.png' + text: '支付密码', + img: '../../../static/img/user/user11.png' }, { url: '', text: '退出登录', - img: '../../../static/img/exit.png' - }, + img: '../../../static/img/user/user12.png' + }, { + url: '', + text: '客服', + img: '../../../static/img/user/user13.png' + } ] return; } @@ -358,13 +332,17 @@ }, { url: '../../login/updatePas/resetPas', - text: '修改积分密码', - img: '../../../static/img/pas.png' + text: '支付密码', + img: '../../../static/img/user/user11.png' }, { url: '', text: '退出登录', img: '../../../static/img/exit.png' + }, { + url: '', + text: '客服', + img: '../../../static/img/user/user13.png' } ] // #endif @@ -381,7 +359,8 @@ this.therrNum = res.return_data.unpaid; this.whetherCheckNum = res.return_data.whetherCheckNum; this.orderPayNum = res.return_data.orderPayNum; - this.rechargeOrderNum = res.return_data.rechargeOrderNum; + this.rechargeOrderNum = res.return_data.rechargeOrderNum; + this.geTel(this.user.phone); uni.setStorage({ key: "user", data: res.return_data @@ -389,98 +368,63 @@ } }); }, - loginByPhone(PhoneNumber) { - if (PhoneNumber.detail.iv == undefined) { - uni.showToast({ - title: "用户取消授权", - icon: "none" - }); - return; - } - let params = { - openId: app.globalData.openId, - iv: PhoneNumber.detail.iv, - encryptedData: PhoneNumber.detail.encryptedData - } - loginByPhone(params).then(res => { - if (res.return_code == '000000') { - app.globalData.userInfo = res.return_data - .object - .highUser; - app.globalData.token = res.return_data.uniqueCode; - uni.setStorage({ - key: "token", - data: res.return_data.uniqueCode - }) - uni.setStorage({ - key: "user", - data: res.return_data - .object - .highUser - }) - this.toDeposit(); - } - }); - }, - // H5获取手机号 - jumpH5Bding() { - uni.navigateTo({ - url: '/pages/login/register' - }) - }, //跳转用户信息 jumplogin() { uni.navigateTo({ url: '../../userLogin/userLogin' }) }, - //消息列表 - toMsg() { - uni.showToast({ - title: '暂未开通', - icon: 'none' - }); - }, toOrderList(index) { uni.navigateTo({ url: '../../user/order_list/order_list?tbIndex=' + index }) }, - //话费充值 - toOrdehuafeirList(index) { - uni.navigateTo({ - url: '../../../subPages/unionPay-orderList/unionPay-orderList?tbIndex=' + index - }) + // 隐藏手机号 + geTel(tel) { + var reg = /^(\d{3})\d{4}(\d{4})$/; + this.userphone = tel.replace(reg, "$1****$2"); }, - toLogin() { - uni.showToast({ - title: '请登录', - icon: "none" - }); - uni.navigateTo({ - url: '../../login/login' - }) - this.isfirst = false; - }, - isLogin() { - //实际应用中,用户登录状态应该用token等方法去维持登录状态. - const value = uni.getStorageSync('UserInfo'); - if (value) { - return true; + // 资产查看状态 + updatestu(item) { + if (item == 1) { + this.assetsstu = 2; + } + if (item == 2) { + this.assetsstu = 1; } - return false }, - toDeposit() { - if (this.user) { + // 推广 + jumppage(item) { + if (item == 1) { uni.navigateTo({ - url: '../../user/deposit/deposit' + url: '../../login/login?id=1' }) - } else { + } + if (item == 2) { uni.navigateTo({ - url: '/pages/userLogin/userLogin' + url: '../../login/login?id=2' + }) + } + if (item == 3) { + uni.navigateTo({ + url: '/pages/user/myPromotion/myPromotion' + }) + } + if (item == 4) { + uni.navigateTo({ + url: '../../../subPages/cardsList/cardsList' + }) + } + if (item == 5) { + uni.navigateTo({ + url: '/pages/user/mineCoupons/mineCoupons' + }) + } + if (item == 6) { + uni.navigateTo({ + url: '../../user/coupon/coupon' }) } - }, toPage(url, item) { if (item != '客服') { @@ -544,8 +488,7 @@ diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue index ef94372..4d905b6 100644 --- a/pages/user/order_list/order_list.vue +++ b/pages/user/order_list/order_list.vue @@ -1,110 +1,85 @@