diff --git a/App.vue b/App.vue index 1fbcc6f..48a6792 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.json b/pages.json index 9afd50f..da2b650 100644 --- a/pages.json +++ b/pages.json @@ -670,19 +670,54 @@ "backgroundColorTop": "#0083f5", "navigationBarTextStyle": "white" } - } ,{ - "path" : "recharge-pay/recharge-pay", + }, { + "path": "recharge-pay/recharge-pay", + "style": { + "navigationBarTitleText": "支付", + "enablePullDownRefresh": false, + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "navigationBarTextStyle": "white" + } + + } + ] + }, { + "root": "qianzhu-KFC", + "pages": [{ + "path" : "home/home", "style" : { - "navigationBarTitleText": "支付", "enablePullDownRefresh": false, + "navigationBarTitleText": "肯德基", "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", - "navigationBarTextStyle": "white" + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + + },{ + "path" : "address/address", + "style" : + { + "enablePullDownRefresh": false, + "navigationBarTitleText": "肯德基在线点餐", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + + },{ + "path" : "update-address/update-address", + "style" : + { + "enablePullDownRefresh": false, + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" } - } + } ] }], "globalStyle": { diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue index 479b520..5b52fc9 100644 --- a/pages/goods/refuel-details/refuel-details.vue +++ b/pages/goods/refuel-details/refuel-details.vue @@ -7,7 +7,7 @@ {{storeList.gasName}} {{storeList.gasAddress}} - + {{storeList.distance}}km @@ -520,22 +520,51 @@ duration: 2000 }); return; - } + } + + // #ifdef H5 + let data = { + key: "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" //腾讯地图申请的密钥 + }; + let url = "https://apis.map.qq.com/ws/location/v1/ip"; //这个就是地理位置信息的接口 + data.output = "jsonp"; + this.$jsonp(url, data) + .then(res => { + app.globalData.latitude = res.result.location.lat; + app.globalData.longitude = res.result.location.lng; + if (app.globalData.accountType && app.globalData.accountType == '000000#/') { + that.recentGasStation(); + } else { + that.getGasDetailByStoreKey(); + } + setTimeout(() => { + that.toPay(); + }, 500); + }).catch(error => { + if (app.globalData.accountType && app.globalData.accountType == '000000#/') { + that.recentGasStation(); + } else { + that.getGasDetailByStoreKey(); + } + setTimeout(() => { + that.toPay(); + }, 500); + }); + // #endif + // #ifdef MP uni.getLocation({ type: 'wgs84', success: function(res) { app.globalData.latitude = res.latitude; app.globalData.longitude = res.longitude; // #ifdef H5 - if (app.globalData.accountType && app.globalData.accountType == '000000#/') { - that.recentGasStation(); - } else { - that.getGasDetailByStoreKey(); - } + // if (app.globalData.accountType && app.globalData.accountType == '000000#/') { + // that.recentGasStation(); + // } else { + // that.getGasDetailByStoreKey(); + // } // #endif - // #ifdef MP that.getGasDetailByStoreKey(); - // #endif setTimeout(() => { that.toPay(); }, 500); @@ -547,11 +576,12 @@ duration: 2000 }); } - }) + }) + // #endif }, //去支付 - toPay() { - if (this.storeList.distance > this.distance) { + toPay() { + if (this.storeList.distance > this.distance && this.storeList.distance != null) { uni.showToast({ title: '请在' + this.distance + '公里内进行下单', icon: "none", diff --git a/pages/goods/refuel/refuel.vue b/pages/goods/refuel/refuel.vue index de9aade..5a69d52 100644 --- a/pages/goods/refuel/refuel.vue +++ b/pages/goods/refuel/refuel.vue @@ -36,7 +36,7 @@ {{item.address}} - + {{item.distance}}km diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index a8706cf..4b5cc16 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -239,45 +239,87 @@ }) // #endif // #ifdef H5 - // 使用 $nextTic 等待组件加载完成调用 - this.$nextTick(() => { - // 在检测用户是否开启定位权限需要一个过程,推荐使用 login 提示一下 - // 初始化组件,并且检测是否开启与授权定位 - this.$refs.muLocation.__init().then(location => { - // 用户授权了和开启了定位,把定位对象保存到 data 中 - this.locationRef = location; - this.getLocation(); - }, err => { + let data = { + key: "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" //腾讯地图申请的密钥 + }; + let url = "https://apis.map.qq.com/ws/location/v1/ip"; //这个就是地理位置信息的接口 + data.output = "jsonp"; + this.$jsonp(url, data) + .then(res => { + if(res.result.location.lng){ + app.globalData.latitude = res.result.location.lat; + app.globalData.longitude = res.result.location.lng; + this.findByLatAndLng(res.result.location.lng, res.result.location.lat); + return; + } + uni.showModal({ + title: '获取定位权限失败,默认城市重庆市', + content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' + }) + this.city = '重庆市'; + app.globalData.cityName = '重庆市'; + app.globalData.cityId = '500000'; + this.getCouponListArea(); + this.getCouponListgold(); + this.getCmsContent(); + this.getCmsAactibity(); + this.getCmsContentcmshome(); + this.getCmsContentcmsContent(); + }).catch(error => { + uni.showModal({ + title: '获取定位权限失败,默认城市重庆市', + content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' + }) this.city = '重庆市'; app.globalData.cityName = '重庆市'; app.globalData.cityId = '500000'; - // 用户拒绝了定位请求,获取系统没有开启定位功能 - if (err.code === 1) { - uni.showModal({ - title: '获取定位权限失败,默认城市重庆', - content: '你拒绝了位置授权服务。请允许当前页面获取定位授权,后刷新页面。' - }) - this.getCouponListArea(); - this.getCouponListgold(); - this.getCmsContent(); - this.getCmsAactibity(); - this.getCmsContentcmshome(); - this.getCmsContentcmsContent(); - } else { - uni.showModal({ - title: '获取定位权限失败,默认城市重庆', - content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' - }) - this.getCouponListArea(); - this.getCouponListgold(); - this.getCmsContent(); - this.getCmsAactibity(); - this.getCmsContentcmshome(); - this.getCmsContentcmsContent(); - } - }) + this.getCouponListArea(); + this.getCouponListgold(); + this.getCmsContent(); + this.getCmsAactibity(); + this.getCmsContentcmshome(); + this.getCmsContentcmsContent(); + }); - }) + // 使用 $nextTic 等待组件加载完成调用 + // this.$nextTick(() => { + // // 在检测用户是否开启定位权限需要一个过程,推荐使用 login 提示一下 + // // 初始化组件,并且检测是否开启与授权定位 + // this.$refs.muLocation.__init().then(location => { + // // 用户授权了和开启了定位,把定位对象保存到 data 中 + // this.locationRef = location; + // this.getLocation(); + // }, err => { + // this.city = '重庆市'; + // app.globalData.cityName = '重庆市'; + // app.globalData.cityId = '500000'; + // // 用户拒绝了定位请求,获取系统没有开启定位功能 + // if (err.code === 1) { + // uni.showModal({ + // title: '获取定位权限失败,默认城市重庆', + // content: '你拒绝了位置授权服务。请允许当前页面获取定位授权,后刷新页面。' + // }) + // this.getCouponListArea(); + // this.getCouponListgold(); + // this.getCmsContent(); + // this.getCmsAactibity(); + // this.getCmsContentcmshome(); + // this.getCmsContentcmsContent(); + // } else { + // uni.showModal({ + // title: '获取定位权限失败,默认城市重庆', + // content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。' + // }) + // this.getCouponListArea(); + // this.getCouponListgold(); + // this.getCmsContent(); + // this.getCmsAactibity(); + // this.getCmsContentcmshome(); + // this.getCmsContentcmsContent(); + // } + // }) + + // }) // #endif // #ifdef MP //定位 @@ -312,7 +354,7 @@ methods: { jumpcdx() { location.href = - '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'; + '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'; }, //获取首页功能 getCmsContentcmsContent() { @@ -648,7 +690,8 @@ }) } else if (item.title == '肯德基') { uni.navigateTo({ - url: '/pages/tabBar/order/order?id=1' + url: '/pages/tabBar/order/order?id=1' + // url:'../../../qianzhu-KFC/home/home' }) } else if (item.title == '电影票') { uni.navigateTo({ diff --git a/qianzhu-KFC/address/address.vue b/qianzhu-KFC/address/address.vue new file mode 100644 index 0000000..9ac6786 --- /dev/null +++ b/qianzhu-KFC/address/address.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/qianzhu-KFC/home/home.vue b/qianzhu-KFC/home/home.vue new file mode 100644 index 0000000..fc82781 --- /dev/null +++ b/qianzhu-KFC/home/home.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/qianzhu-KFC/static/imgs/add.png b/qianzhu-KFC/static/imgs/add.png new file mode 100644 index 0000000..9cf3e12 Binary files /dev/null and b/qianzhu-KFC/static/imgs/add.png differ diff --git a/qianzhu-KFC/static/imgs/kfc1.png b/qianzhu-KFC/static/imgs/kfc1.png new file mode 100644 index 0000000..b163be9 Binary files /dev/null and b/qianzhu-KFC/static/imgs/kfc1.png differ diff --git a/qianzhu-KFC/static/imgs/kfc2.png b/qianzhu-KFC/static/imgs/kfc2.png new file mode 100644 index 0000000..0299250 Binary files /dev/null and b/qianzhu-KFC/static/imgs/kfc2.png differ diff --git a/qianzhu-KFC/static/imgs/kfchome.png b/qianzhu-KFC/static/imgs/kfchome.png new file mode 100644 index 0000000..56740ce Binary files /dev/null and b/qianzhu-KFC/static/imgs/kfchome.png differ diff --git a/qianzhu-KFC/static/imgs/upte.png b/qianzhu-KFC/static/imgs/upte.png new file mode 100644 index 0000000..af59b9c Binary files /dev/null and b/qianzhu-KFC/static/imgs/upte.png differ diff --git a/qianzhu-KFC/update-address/update-address.vue b/qianzhu-KFC/update-address/update-address.vue new file mode 100644 index 0000000..7607baf --- /dev/null +++ b/qianzhu-KFC/update-address/update-address.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/uni.scss b/uni.scss index 726ed35..9e500d1 100644 --- a/uni.scss +++ b/uni.scss @@ -166,6 +166,9 @@ $uni-font-size-paragraph:30upx; .marglerig{ margin-right: 5px; +} +.marRight10{ + margin-right: 10px; } .marRight20{ margin-right: 20px; @@ -472,7 +475,10 @@ $uni-font-size-paragraph:30upx; .height220{ height: 220px; } - + +.height260{ + height: 260px; +} .height30 { height: 30px; line-height: 30px; @@ -644,7 +650,13 @@ $uni-font-size-paragraph:30upx; .paddbotm10 { padding-bottom: 10px; } - + +.paddbotm15 { + padding-bottom: 15px; +} +.paddbotm20 { + padding-bottom: 20px; +} /* 左悬浮 */ .flleft { float: left;