diff --git a/App.vue b/App.vue index 91896dd..f6e8c3c 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 : '', bresthighAgent:'', @@ -47,7 +47,9 @@ //千猪下单数据 qianzhulist:'', //星巴克价格 - salesTallPrice:'' + salesTallPrice:'', + //第三方嵌入id + mchId:'' }, onLaunch: function() { }, diff --git a/Utils/Api.js b/Utils/Api.js index 4ee1599..7500a73 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -298,7 +298,7 @@ export const bindHuiLianTongCard = params => { } //手机短信登录 export const loginByTel = params => { - return POST('POST', `${base}/wechat/loginByTel`, params).then(res => res.data); + return POST('GET', `${base}/wechat/loginByTel`, params).then(res => res.data); } /** * 工会卡 diff --git a/Utils/Request.js b/Utils/Request.js index 245c81d..7ef525d 100644 --- a/Utils/Request.js +++ b/Utils/Request.js @@ -9,7 +9,8 @@ function request(method, url, data) { header: { 'Accept': "*/*", 'content-type': 'application/json;charset=utf-8', - 'Authorization': app.globalData.token + 'Authorization': app.globalData.token, + 'mchId': app.globalData.mchId }, //有的时候这里不一定是 token 还可能是 Authorization success(res) { resolve(res) diff --git a/member-Recharge/choicepage/choicepage.vue b/member-Recharge/choicepage/choicepage.vue index 6b00dcd..adfb201 100644 --- a/member-Recharge/choicepage/choicepage.vue +++ b/member-Recharge/choicepage/choicepage.vue @@ -1,8 +1,9 @@ @@ -31,7 +32,7 @@ //跳转充值 jumprechangeVip(item) { uni.navigateTo({ - url: '../home/home?id='+item.id + url: '../home/home?id=' + item.id }) }, //查询品牌 @@ -69,5 +70,8 @@ diff --git a/pages.json b/pages.json index 9da3bbc..f12b9a5 100644 --- a/pages.json +++ b/pages.json @@ -122,7 +122,7 @@ "path": "pages/tabBar/category/category", "style": { "navigationBarTextStyle": "white", - "navigationBarTitleText": "分类", + "navigationBarTitleText": "商户", "navigationBarBackgroundColor": "#0083f5", "backgroundColorTop": "#0083f5", "app-plus": { @@ -461,7 +461,16 @@ "navigationBarTextStyle": "white" } } - ], + ,{ + "path" : "pages/userLogin/agreement/agreement", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + } + ], "subpackages": [{ "root": "subPages", "pages": [{ @@ -880,7 +889,7 @@ }, { "path": "choicepage/choicepage", "style": { - "navigationBarTitleText": "选择", + "navigationBarTitleText": "充值类型", "enablePullDownRefresh": false } @@ -909,7 +918,7 @@ "pagePath": "pages/tabBar/category/category", "iconPath": "static/img/tabBar/category.png", "selectedIconPath": "static/img/tabBar/category-on.png", - "text": "导航" + "text": "商户" }, { diff --git a/pages/goods/goods-list/goods-list.vue b/pages/goods/goods-list/goods-list.vue index 39c30ea..cbdd3bf 100644 --- a/pages/goods/goods-list/goods-list.vue +++ b/pages/goods/goods-list/goods-list.vue @@ -19,6 +19,10 @@ + + {{item.title}} + @@ -56,7 +60,8 @@ import { getCouponList, getCmsContent, - getBrandCouponList + getBrandCouponList, + getListGoodsType } from '../../../Utils/Api.js'; let app = getApp(); export default { @@ -85,14 +90,18 @@ typeId: '', couponName: '', brandid: '', - goodtyid: '' + goodtyid: '', + cateTypeList: [] //分类 }; }, onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数 this.typeId = option.id; this.brandid = option.brandId; - this.goodtyid = option.goodsId; + this.goodtyid = option.goodsId; + if(this.goodtyid == undefined){ + this.goodtyid = ''; + } if (option.id == 1) { uni.setNavigationBarTitle({ title: '商品列表' @@ -104,15 +113,23 @@ uni.setNavigationBarTitle({ title: '积分列表' }); - this.getCouponListArea(); + if (app.globalData.cityName == '贵州省') { + this.getListGoodsType(); + }else{ + this.getCouponListArea(); + } + this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST'); + } + if (option.id == 5) { + uni.setNavigationBarTitle({ + title: '工会卡列表' + }); + if (app.globalData.cityName == '贵州省') { + this.getListGoodsType(); + }else{ + this.getCouponListArea(); + } this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST'); - } - if (option.id == 5) { - uni.setNavigationBarTitle({ - title: '工会卡列表' - }); - this.getCouponListArea(); - this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST'); } if (option.id == 3) { uni.setNavigationBarTitle({ @@ -134,6 +151,38 @@ } }, methods: { + //查询品牌 + getListGoodsType() { + uni.showLoading({ + title: '加载中...' + }) + let params = { + pageNum: 1, + pageSize: 10000, + userService: '贵州中石化' + } + getListGoodsType(params).then(res => { + uni.hideLoading(); + if (res.return_code == '000000') { + this.cateTypeList = res.return_data.list; + this.goodtyid = res.return_data.list[0].id; + if (app.globalData.cityName == '贵州省') { + this.getCouponListArea(); + } + } else { + this.cateTypeList = []; + } + }) + }, + //切换id + switchid(item){ + this.goodtyid = item.id; + this.pageNum = 1; + this.pageSize = 10; + this.isNoMoreData = false; + this.goodsList = []; + this.getCouponListArea(); + }, //获取弹出或者弹窗 getCmsContent(item) { let params = { @@ -162,6 +211,7 @@ let pagenum = this.pageNum; let params = { regionId: app.globalData.cityId, + goodsTypeId: this.goodtyid, pageNum: pagenum, pageSize: this.pageSize, displayArea: this.typeId, @@ -358,5 +408,8 @@ font-size: 24upx; text-decoration: line-through; } + } + .borbtom{ + border-bottom: 2px solid #089bf5; } diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue index 8f47a33..b736985 100644 --- a/pages/goods/refuel-details/refuel-details.vue +++ b/pages/goods/refuel-details/refuel-details.vue @@ -221,7 +221,7 @@ this.isTyAgent = true; } - if (app.globalData.gasKey) { + if (app.globalData.gasKey && app.globalData.accountType == '000000&gasKey') { this.store_key = app.globalData.gasKey; } else { app.globalData.staffCode = ''; diff --git a/pages/login/register.vue b/pages/login/register.vue index 745b5b6..627e82e 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -15,7 +15,18 @@ - 立即登录/注册 + + + + + + + 授权即表示同意 + 《注册协议》《服务协议》 + + 立即登录/注册 + @@ -39,16 +50,28 @@ passwd: "", getCodeText: '获取验证码', getCodeBtnColor: "#ffffff", - getCodeisWaiting: false + getCodeisWaiting: false, + disabled: false, } }, onLoad() { }, methods: { + //开启状态 + getchecked() { + this.disabled = !this.disabled + }, + //跳转协议 + getDocument(item) { + uni.navigateTo({ + url: '../userLogin/agreement/agreement?id=' + item + }) + }, Timer() {}, getCode() { uni.hideKeyboard() + if (this.getCodeisWaiting) { return; } @@ -63,8 +86,8 @@ title: '发送中...' }) let params = { - phone: this.phoneNumber, - HWMSG:3 + phone: this.phoneNumber, + HWMSG: 3 } sendSmsCodeByHw(params).then(res => { uni.hideLoading(); @@ -96,7 +119,15 @@ }, 1000) }, doReg() { - uni.hideKeyboard() + uni.hideKeyboard(); + if (this.disabled == false) { + uni.showToast({ + title: '请勾选用户协议', + icon: "none", + duration: 2000 + }) + return; + } //模板示例部分验证规则 if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { uni.showToast({ @@ -136,8 +167,7 @@ key: "token", data: res.return_data.uniqueCode }) - uni.navigateBack({ - }); + uni.navigateBack({}); } else { uni.showToast({ title: res.return_msg, @@ -161,4 +191,32 @@ margin-top: 90px; margin-bottom: 40px; } + + .checkbox { + display: flex; + align-items: center; + // line-height: 35rpx; + + .checkyes { + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + border: 1px solid #f4f4f4; + background-color: #089BF5; + margin-right: 10rpx; + border-radius: 50%; + text-align: center; + vertical-align: sub; + } + + .checkno { + width: 35rpx; + height: 35rpx; + display: inline-block; + border: 1px solid #666; + margin-right: 10rpx; + border-radius: 50%; + vertical-align: sub; + } + } diff --git a/pages/login/updatePas/resetPas.vue b/pages/login/updatePas/resetPas.vue index a241c0d..7e45cb3 100644 --- a/pages/login/updatePas/resetPas.vue +++ b/pages/login/updatePas/resetPas.vue @@ -1,103 +1,164 @@ - - - - - diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue index 29fad7c..b00e5da 100644 --- a/pages/order/confirmation.vue +++ b/pages/order/confirmation.vue @@ -91,11 +91,13 @@ - 支付方式: 积分充值 + 支付方式: 积分充值 - 积分支付可用积分: {{user.gold}} @@ -105,7 +107,8 @@ - + @@ -228,9 +231,9 @@ tongCardPrice: 0, storeId: '', isDiscont: false, - coupondiscountid: '', - orderDetails:'' //订单详情 - + coupondiscountid: '', + orderDetails: '', //订单详情 + payGold: '' //积分数 }; }, onLoad(option) { @@ -295,7 +298,7 @@ let params = { couponId: this.couponId } - getCouponById(params).then(res => { + getCouponById(params).then(res => { uni.hideLoading(); if (res.return_code == '000000') { this.couponList = res.return_data; @@ -413,20 +416,24 @@ duration: 2000 }) return; - } - if(this.orderDetails){ - this.orderToPay(this.orderDetails); - return; - } + } + if (this.orderDetails) { + this.orderToPay(this.orderDetails); + return; + } uni.showLoading({ title: '提交订单中...' }) if (this.couponList.reserveStatus) { this.storeId = app.globalData.storeid } + if (this.paytype == 'jinbi' && this.user.gold < this.paytheprice * 100 && this.couponList.buyPoints) { + this.payGold = this.user.gold; + } let goods = { "memDiscountId": this.coupondiscountid, "identificationCode": app.globalData.identificationCode, + "payGold": this.payGold, "highChildOrderList": [{ "goodsType": 1, "goodsId": this.couponId, @@ -434,7 +441,7 @@ "storeId": this.storeId }] } - addOrder(goods).then(res => { + addOrder(goods).then(res => { uni.hideLoading(); if (res.return_code == '000000') { // uni.redirectTo({ @@ -444,7 +451,7 @@ // .highChildOrderList[0].ext1 // }) this.jumpType = res.return_data.highChildOrderList[0].ext1; - this.orderId = res.return_data.id; + this.orderId = res.return_data.id; this.orderDetails = res.return_data; this.orderToPay(res.return_data); } else { @@ -492,7 +499,7 @@ "openId": app.globalData.openId, "orderScene": "GOODS_ORDER" } - // #endif + // #endif orderToPay(params).then(res => { if (res.return_code == '000000') { // #ifdef MP @@ -539,7 +546,7 @@ } }) } else if (that.paytype == 'jinbi') { - if (that.user.gold < that.paytheprice * 100) { + if (that.user.gold < that.paytheprice * 100 && !this.couponList.buyPoints) { uni.showToast({ icon: 'none', title: '积分不足', @@ -554,6 +561,79 @@ }); return; } + + if (that.user.gold < that.paytheprice * 100 && this.couponList.buyPoints) { + + uni.showModal({ + title: '积分支付', + content: '积分不足,请购买并兑换', + success: function(res) { + if (res.confirm) { + // #ifdef H5 + let params = { + "orderId": item.id, + "openId": app.globalData.openId, + "orderScene": "GOODS_ORDER", + "openIdType": 2 + } + // #endif + // #ifdef MP + let params = { + "orderId": item.id, + "openId": app.globalData.openId, + "orderScene": "GOODS_ORDER" + } + // #endif + orderToPay(params).then(res => { + if (res.return_code == '000000') { + // #ifdef MP + uni.showLoading({ + title: '支付中...' + }) + uni.requestPayment({ + "appId": res.return_data.appId, + "nonceStr": res.return_data.nonceStr, + "package": res.return_data.package, + "paySign": res.return_data.sign, + "signType": "MD5", + "timeStamp": res.return_data.timeStamp, + success: function(res) { + uni.hideLoading(); + uni.showToast({ + title: '支付成功' + }) + app.globalData.storeid = ''; + app.globalData.storename = ''; + uni.reLaunch({ + url: '../pay/success/success?id=' + that.couponId + }); + }, + fail: function(err) { + uni.hideLoading(); + uni.navigateBack({}) + }, + }); + // #endif + + //判断是否是公众号 + // #ifdef H5 + //判断微信浏览器 + that.payRequest(res); + // #endif + + } else { + uni.showToast({ + title: res.return_msg, + icon: 'none' + }) + } + }) + } + } + }) + + return; + } if (!that.user.isSetPayPwd) { uni.navigateTo({ url: '../login/updatePas/updatePas' @@ -734,12 +814,12 @@ duration: 4000 }); }); - }, - //跳转积分充值 - jumpdeposits(){ - uni.navigateTo({ - url:'../user/deposit/deposit' - }) + }, + //跳转积分充值 + jumpdeposits() { + uni.navigateTo({ + url: '../user/deposit/deposit' + }) } } @@ -954,8 +1034,8 @@ .jfrecharge { background-color: #0083f5; - padding: 5px 20rpx; - color: #fff; + padding: 5px 20rpx; + color: #fff; margin-left: 50%; justify-content: center; align-items: center; diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index a6eb231..3062945 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -213,7 +213,7 @@ uni.getStorage({ key: 'gasKey', success(e) { - if (e.data) { + if (e.data) { app.globalData.gasKey = e.data; } } @@ -221,8 +221,13 @@ uni.getStorage({ key: 'staffCode', success(e) { - if (e.data) { - app.globalData.staffCode = e.data; + if (e.data) { + if (app.globalData.accountId == '000001&key' || app.globalData.accountId == + '000000&gasKey') { + app.globalData.staffCode = e.data; + } else { + app.globalData.mchId = e.data; + } } } }) @@ -355,7 +360,7 @@ methods: { jumpcdx() { location.href = - 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsg.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'; + 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'; }, //获取首页功能 getCmsContentcmsContent() { @@ -517,6 +522,15 @@ success(e) { if (e.data) { app.globalData.accountType = e.data; + + // 000000#/ 一健加油 + // 000000&gasKey 加油员 + // 000001&key 领取优惠券 + // 002 积分专区 + // 003 星巴克 + // 004 肯德基 + // 005 会员充值 + // 006 话费充值 if (e.data == '000000#/' && app.globalData.h5code) { uni.navigateTo({ url: '../../goods/refuel-details/refuel-details' @@ -527,12 +541,37 @@ url: '../../goods/refuel-details/refuel-details' }) } - if (e.data == '000001&key') { uni.navigateTo({ url: '/subPages/scancodeCoupons/scancodeCoupons' }) } + + if (e.data == '000002&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '/pages/goods/goods-list/goods-list?id=2' + }) + } + if (e.data == '000003&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '/qianzhu-Starbucks/home/home' + }) + } + if (e.data == '000004&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '../../../qianzhu-KFC/home/home' + }) + } + if (e.data == '000005&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '/member-Recharge/choicepage/choicepage' + }) + } + if (e.data == '000006&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '../../../subPages/recharge/recharge' + }) + } } } }) @@ -718,35 +757,39 @@ // }) // 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 { - uni.showToast({ - title: '暂未开通', - icon: 'none', - duration: 2000 - }) - } + // 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) { @@ -771,60 +814,64 @@ // }) // 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: '../../../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; - } + + 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) { @@ -864,8 +911,8 @@ } .popImg { - width: 300px; - height: 440px; + width: 100%; + height: 430px; } .h5xfimg { diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index 120505c..2f8b79a 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -306,7 +306,7 @@ }, { url: '../../login/updatePas/updatePas', - text: '设置密码', + text: '设置积分密码', img: '../../../static/img/pas.png' } ] @@ -320,7 +320,7 @@ }, { url: '../../login/updatePas/resetPas', - text: '修改密码', + text: '修改积分密码', img: '../../../static/img/pas.png' } ] diff --git a/pages/user/order_details/order_details.vue b/pages/user/order_details/order_details.vue index 19870d6..bb691f8 100644 --- a/pages/user/order_details/order_details.vue +++ b/pages/user/order_details/order_details.vue @@ -153,6 +153,14 @@ src="../../../static/img/jfx.png"> {{(recinfo.deductionPrice * 10 * 10).toFixed(0)}} + + + + 积分抵扣 : + + + ¥{{(recinfo.payGold / 100).toFixed(2)}} + diff --git a/pages/user/runningWater/runningWater.vue b/pages/user/runningWater/runningWater.vue index a307c5e..53ba07f 100644 --- a/pages/user/runningWater/runningWater.vue +++ b/pages/user/runningWater/runningWater.vue @@ -29,8 +29,8 @@ :key="agenL.id"> - {{agenL.highCouponCode.consumeTime | formatDate('-')}} - {{agenL.highCouponCode.storeName}} + {{agenL.salesTime | formatDate('-')}} + {{agenL.highCoupon.couponName}} {{agenL.highCoupon.salesPrice}}.00元 diff --git a/pages/userLogin/agreement/agreement.vue b/pages/userLogin/agreement/agreement.vue new file mode 100644 index 0000000..92bfe86 --- /dev/null +++ b/pages/userLogin/agreement/agreement.vue @@ -0,0 +1,551 @@ + + + + + diff --git a/pages/userLogin/userLogin.vue b/pages/userLogin/userLogin.vue index e56410c..666cce1 100644 --- a/pages/userLogin/userLogin.vue +++ b/pages/userLogin/userLogin.vue @@ -1,31 +1,22 @@ @@ -47,8 +83,8 @@ import { getUserInfo, loginByPhone, - HandleCode, - loginByTel, + HandleCode, + loginByTel, sendSmsCodeByHw } from "../../Utils/Api.js" export default { @@ -57,12 +93,13 @@ user: '', imagewxUrl: app.globalData.imageWxImg, imgadres: 'login.png', - imgadres1: 'loginphone.png', - phoneNumber: "", - code: '', - getCodeText: '获取验证码', + imgadres1: 'loginphone.png', + phoneNumber: "", + code: '', + getCodeText: '获取验证码', getCodeisWaiting: false, - type: 1 // 区分登录方式 + type: 1, // 区分登录方式 + disabled: false, } }, onLoad() { @@ -87,7 +124,17 @@ // #endif this.user = app.globalData.userInfo; }, - methods: { + methods: { + //开启状态 + getchecked() { + this.disabled = !this.disabled + }, + //跳转协议 + getDocument(item){ + uni.navigateTo({ + url:'./agreement/agreement?id='+item + }) + }, getuserinfo() { let that = this; uni.getUserProfile({ @@ -138,7 +185,15 @@ that.isShowAuth = false }, // 微信获取手机号 - loginByPhone(PhoneNumber) { + loginByPhone(PhoneNumber) { + if (this.disabled == false) { + uni.showToast({ + title: '请勾选用户协议', + icon: "none", + duration:2000 + }) + return; + } if (PhoneNumber.detail.iv == undefined) { uni.showToast({ title: "用户取消授权", @@ -191,108 +246,121 @@ }) }, //改变登录方式 - updateStu(item) { - this.type = item; - }, - //发送短信 - getCode() { - uni.hideKeyboard() - if (this.getCodeisWaiting) { - return; - } - if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { + updateStu(item) { + if (this.disabled == false) { uni.showToast({ - title: '请填写正确手机号码', - icon: "none" - }); - return false; - } - uni.showLoading({ - title: '发送中...' - }) - let params = { - phone: this.phoneNumber, - HWMSG:5 - } - sendSmsCodeByHw(params).then(res => { - if (res.return_code == '000000') { - this.getCodeisWaiting = true; - uni.showToast({ - title: '验证码已发送', - icon: "none" - }); - this.setTimer(); - } else { - uni.hideLoading() - } - }) - }, - setTimer() { - let holdTime = 60; - this.getCodeText = "重新获取(60)" - this.Timer = setInterval(() => { - if (holdTime <= 0) { - this.getCodeisWaiting = false; - this.getCodeBtnColor = "#ffffff"; - this.getCodeText = "获取验证码" - clearInterval(this.Timer); - return; - } - this.getCodeText = "重新获取(" + holdTime + ")" - holdTime--; - - }, 1000) - }, - //手机短信登录 - doReg() { - uni.hideKeyboard() - //模板示例部分验证规则 - if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { - uni.showToast({ - title: '请填写正确手机号码', - icon: "none" - }); - return false; - } - if (!this.code) { - uni.showToast({ - title: '请填写验证码', - icon: "none" - }); - return false; - } - uni.showLoading({ - title: '提交中...' - }) - let params = { - phone: this.phoneNumber, - smsCode: this.code - } - loginByTel(params).then(res => { - uni.hideLoading() - if (res.return_code == '000000') { - app.globalData.token = res.return_data.uniqueCode; - app.globalData.userInfo = res.return_data - .object - .highUser; - uni.setStorage({ - key: "user", - data: res.return_data - .object - .highUser - }) - uni.setStorage({ - key: "token", - data: res.return_data.uniqueCode - }) - uni.navigateBack({}) - } else { - uni.showToast({ - title: res.return_msg, - icon: "none" - }); - } - }) + title: '请勾选用户协议', + icon: "none", + duration:2000 + }) + return; + } + this.type = item; + }, + //发送短信 + getCode() { + uni.hideKeyboard() + if (this.getCodeisWaiting) { + return; + } + if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { + uni.showToast({ + title: '请填写正确手机号码', + icon: "none" + }); + return false; + } + uni.showLoading({ + title: '发送中...' + }) + let params = { + phone: this.phoneNumber, + HWMSG: 5 + } + sendSmsCodeByHw(params).then(res => { + if (res.return_code == '000000') { + this.getCodeisWaiting = true; + uni.showToast({ + title: '验证码已发送', + icon: "none" + }); + this.setTimer(); + } else { + uni.showToast({ + title: res.return_msg, + duration: 2000, + icon: "none" + }) + uni.hideLoading() + } + }) + }, + setTimer() { + let holdTime = 60; + this.getCodeText = "重新获取(60)" + this.Timer = setInterval(() => { + if (holdTime <= 0) { + this.getCodeisWaiting = false; + this.getCodeBtnColor = "#ffffff"; + this.getCodeText = "获取验证码" + clearInterval(this.Timer); + return; + } + this.getCodeText = "重新获取(" + holdTime + ")" + holdTime--; + + }, 1000) + }, + //手机短信登录 + doReg() { + uni.hideKeyboard() + //模板示例部分验证规则 + if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { + uni.showToast({ + title: '请填写正确手机号码', + icon: "none" + }); + return false; + } + if (!this.code) { + uni.showToast({ + title: '请填写验证码', + icon: "none" + }); + return false; + } + uni.showLoading({ + title: '提交中...' + }) + let params = { + phone: this.phoneNumber, + code: this.code + } + loginByTel(params).then(res => { + uni.hideLoading() + if (res.return_code == '000000') { + app.globalData.token = res.return_data.uniqueCode; + app.globalData.userInfo = res.return_data + .object + .highUser; + uni.setStorage({ + key: "user", + data: res.return_data + .object + .highUser + }) + uni.setStorage({ + key: "token", + data: res.return_data.uniqueCode + }) + uni.navigateBack({}) + } else { + uni.showToast({ + title: res.return_msg, + icon: "none" + }); + } + }) }, } } @@ -304,4 +372,170 @@ .btns { border-radius: 6px; } + + page { + background-color: #f0f0f1; + } + + .container { + + .banner { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + height: 350rpx; + } + + .identity-code { + width: 150rpx; + height: 150rpx; + background-color: rgba(255, 255, 255, 0.2); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + // position: relative; + } + + + + .img1 { + border: 1px solid rgba(255, 255, 255, 0.4); + border-radius: 100%; + width: 130rpx; + height: 130rpx; + } + + .shuju { + margin: 0rpx 10rpx; + } + + // 右边 + .aut-code { + width: 150rpx; + height: 150rpx; + background-color: rgba(255, 255, 255, 0.2); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + } + + + .notice { + border-bottom: 20rpx solid #f0f0f1; + background-color: #FFFFFF; + padding: 20rpx 20rpx 20rpx 20rpx; + font-size: 30rpx; + + .name { + font-size: 34rpx; + font-weight: 600; + color: #2c2d28; + } + + .checkbox { + display: flex; + align-items: center; + // line-height: 35rpx; + + .checkyes { + width: 40rpx; + height: 40rpx; + line-height: 40rpx; + border: 1px solid #f4f4f4; + background-color: #089BF5; + margin-right: 10rpx; + border-radius: 50%; + text-align: center; + vertical-align: sub; + } + + .checkno { + width: 35rpx; + height: 35rpx; + display: inline-block; + border: 1px solid #666; + margin-right: 10rpx; + border-radius: 50%; + vertical-align: sub; + } + } + + } + + .phone { + width: 80%; + margin: auto; + padding: 20rpx; + border-radius: 25rpx; + box-shadow: 5rpx 5rpx 10rpx 10rpx #a1a1a1; + background-color: rgba(255, 255, 255, 1); + + .ph-title { + display: block; + width: 100%; + // border: 1px solid red; + text-align: center; + color: #000000; + font-size: 40rpx; + margin-bottom: 25rpx; + + } + + .ph-phone { + display: flex; + width: 90%; + margin: auto; + align-items: center; + margin-top: 50rpx; + margin-bottom: 50rpx; + + .ph-it1 { + flex: 3; + display: inline-block; + border-bottom: 1px solid #b5b5b5; + } + + .ph-btn { + flex: 2; + margin-left: 10rpx; + display: inline-block; + border: 1px solid #2cb0b0; + border-radius: 18rpx; + text-align: center; + height: 50rpx; + line-height: 45rpx; + } + } + + } + + .confirm-box { + display: flex; + flex-direction: row; + margin-top: 100rpx; + + .cancel { + border-radius: 10rpx; + font-size: 32rpx; + font-weight: 700; + background-color: #089bf5; + width: 40%; + padding: 0px; + color: #fff; + } + + .confirm { + border-radius: 10rpx; + background-color: #089bf5; + font-size: 32rpx; + font-weight: 700; + color: #FFFFFF; + width: 40%; + padding: 0px; + } + } + } diff --git a/qianzhu-KFC/order-details/order-details.vue b/qianzhu-KFC/order-details/order-details.vue index 3d1305f..4071499 100644 --- a/qianzhu-KFC/order-details/order-details.vue +++ b/qianzhu-KFC/order-details/order-details.vue @@ -9,7 +9,7 @@ {{typeText[orderList.orderStatus]}} 若超时未支付,订单将自动取消 - 立即支付 + 立即支付 - - - - - - - - - - - diff --git a/uni.scss b/uni.scss index 0be7c28..9325945 100644 --- a/uni.scss +++ b/uni.scss @@ -304,6 +304,9 @@ $uni-font-size-paragraph:30upx; .backcorfff { background-color: white; } +.backcorlb{ + background: linear-gradient(to right, #089bf5, #0083f5); +} .backshare { background: rgba(0, 0, 0, 0); @@ -686,6 +689,9 @@ $uni-font-size-paragraph:30upx; padding-right: 10px; } +.paddtright15 { + padding-right: 15px; +} .paddbotm5 { padding-bottom: 5px; }