1.上线2.0 解决问题 修改问题

2.新增定位公用请求
yj-dev
杨杰 2 years ago
parent 5561acb672
commit 5fd5c23ca2
  1. 97
      components/postion/postion.vue
  2. 5
      member-Recharge/rec-confirmation/rec-confirmation.vue
  3. 35
      pages.json
  4. 2
      pages/goods/goods.vue
  5. 3
      pages/goods/refuel-confirm/refuel-confirm.vue
  6. 14
      pages/goods/refuel-details/refuel-details.vue
  7. 19
      pages/login/register.vue
  8. 33
      pages/order/confirmation.vue
  9. 26
      pages/tabBar/user/user.vue
  10. 7
      pages/user/coupon/coupon.vue
  11. 2
      pages/user/order_details/order_details.vue
  12. 1
      qianzhu-KFC/confirmOrder/confirmOrder.vue
  13. 2
      qianzhu-KFC/order-details/order-details.vue
  14. 9
      subPages/recharge/recharge.vue
  15. 5
      subPages/unionComfirmation/unionComfirmation.vue

@ -0,0 +1,97 @@
<template>
<view>
</view>
</template>
<script>
const app = getApp();
import {
findByLatAndLng
} from '../../Utils/Api.js'
export default {
name: 'Postion',
data() {
return {
}
},
created() {
if(!app.globalData.companyId){
this.postionIng();
}
},
methods: {
postionIng() {
let that = this;
uni.getLocation({
type: 'wgs84',
success: function(res) {
app.globalData.latitude = res.latitude;
app.globalData.longitude = res.longitude;
that.findByLatAndLng(res.longitude, res.latitude);
},
fail: (err) => {
if (err.errCode == 2) {
uni.showToast({
title: '请开启系统定位',
duration: 3000,
icon: 'none'
})
} else {
uni.showToast({
title: '定位失败,请重新进入小程序',
duration: 3000,
icon: 'none'
})
}
}
})
},
findByLatAndLng(item, item1) {
let that = this;
let datas = {
lng: item,
lat: item1
}
findByLatAndLng(datas).then(res => {
if (res.return_code == '000000') {
that.city = res.return_data.provinceName;
app.globalData.cityName = res.return_data.provinceName;
app.globalData.qianzhuCityName = res.return_data.cityName;
app.globalData.cityId = res.return_data.regionId;
app.globalData.companyId = res.return_data.companyId;
uni.setStorage({
key: "cityId",
data: res.return_data.regionId
})
uni.setStorage({
key: "cityName",
data: res.return_data.provinceName
})
uni.setStorage({
key: "qianzhuCityName",
data: res.return_data.cityName
})
uni.setStorage({
key: "companyId",
data: res.return_data.companyId
})
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
});
},
}
}
</script>
<style>
</style>

@ -285,8 +285,7 @@
let datas = { let datas = {
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
"price": this.payPrice, "price": this.payPrice,
"productId": 3, "type": 3,
"type": 4,
} }
getRebateIntegral(datas).then(res => { getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
@ -398,7 +397,7 @@
"goodsId": this.goodId, "goodsId": this.goodId,
"customerMobile": this.customerMobile, "customerMobile": this.customerMobile,
"platformId": this.showType, "platformId": this.showType,
"productType": this.productType, "productType": 3,
"goodsType": 10, "goodsType": 10,
"saleCount": 1, "saleCount": 1,
}], }],

@ -1,6 +1,6 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/welcome/welcome", "path": "pages/welcome/welcome",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
@ -27,17 +27,17 @@
"softinputNavBar": "none" "softinputNavBar": "none"
} }
} }
}, { }, {
"path": "pages/qianZhuPay/union-pay/union-pay", "path": "pages/qianZhuPay/union-pay/union-pay",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "选择方式", "navigationBarTitleText": "选择方式",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/user/bindingCardList/bindingCardList", "path": "pages/user/bindingCardList/bindingCardList",
"style": { "style": {
"navigationBarTitleText": "卡列表", "navigationBarTitleText": "卡列表",
@ -505,7 +505,16 @@
} }
], ,{
"path" : "components/postion/postion",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"subpackages": [{ "subpackages": [{
"root": "subPages", "root": "subPages",
"pages": [{ "pages": [{

@ -54,7 +54,7 @@
<view class="width96 mart10 alijusstart"> <view class="width96 mart10 alijusstart">
<view class="fcorfff font12 height20" style="background-color: #3da7e7;border-radius: 20px;padding: 0px 5px;">嗨森逛 <view class="fcorfff font12 height20" style="background-color: #3da7e7;border-radius: 20px;padding: 0px 5px;">嗨森逛
</view> </view>
<view class="width70 fotrt font14 fcor666">月销 {{goodsData[0].salesCount}}</view> <view class="width70 fotrt font14 fcor666">月销 {{goodsData[0].monthlySales}}</view>
</view> </view>
</view> </view>
<!-- 服务-规则选择 --> <!-- 服务-规则选择 -->

@ -444,8 +444,7 @@
let datas = { let datas = {
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
"price": this.payPrice, "price": this.payPrice,
"productId": 1, "type": 6,
"type": 3,
} }
getRebateIntegral(datas).then(res => { getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {

@ -177,7 +177,7 @@
oilPriceDiscountCompute, oilPriceDiscountCompute,
recentGasStation, recentGasStation,
sendSmsCodeByHw, sendSmsCodeByHw,
H5login, phone,
getDictionaryByCodeType getDictionaryByCodeType
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
@ -396,13 +396,13 @@
userid = app.globalData.staffCode; userid = app.globalData.staffCode;
} }
let params = { let params = {
phone: this.phoneNumber, popularizeUserId: userid,
code: this.code, phone: this.phoneNumber,
openId: app.globalData.openId, type: "SMS",
popularizeUserId: userid, platform: "H5",
regionId: app.globalData.cityId smsCode: this.code
} }
H5login(params).then(res => { phone(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data app.globalData.userInfo = res.return_data

@ -34,8 +34,8 @@
<script> <script>
import { import {
sendSmsCodeByHw, getLoginSMSCode,
H5login phone
} from "../../Utils/Api.js"; } from "../../Utils/Api.js";
let app = getApp(); let app = getApp();
export default { export default {
@ -82,9 +82,8 @@
}) })
let params = { let params = {
phone: this.phoneNumber, phone: this.phoneNumber,
HWMSG: 3
} }
sendSmsCodeByHw(params).then(res => { getLoginSMSCode(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.getCodeisWaiting = true; this.getCodeisWaiting = true;
@ -146,13 +145,13 @@
userid = app.globalData.staffCode; userid = app.globalData.staffCode;
} }
let params = { let params = {
phone: this.phoneNumber, popularizeUserId: userid,
code: this.code, phone: this.phoneNumber,
openId: app.globalData.openId, type: "SMS",
popularizeUserId: userid, platform: "H5",
regionId: app.globalData.cityId smsCode: this.code
} }
H5login(params).then(res => { phone(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data app.globalData.userInfo = res.return_data

@ -316,7 +316,7 @@
// #endif // #endif
let datas = { let datas = {
platformId: this.showType, platformId: this.showType,
"companyId": app.globalData.companyId, "companyId": this.couponList.companyId,
productType: 5, productType: 5,
productId: this.couponList.couponSource productId: this.couponList.couponSource
} }
@ -348,7 +348,6 @@
this.getHuiLianTongCardBalance(); this.getHuiLianTongCardBalance();
} }
this.getUserNormalDiscountList(); this.getUserNormalDiscountList();
this.getRebateIntegral();
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data data: res.return_data
@ -357,13 +356,12 @@
}); });
}, },
// //
getRebateIntegral() { getRebateIntegral() {
let datas = { let datas = {
"companyId": app.globalData.companyId, "companyId": this.couponList.companyId,
"price": this.paytheprice, "price": this.paytheprice,
"productId": 1, "type": 5,
"type": 1, }
}
getRebateIntegral(datas).then(res => { getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.rebateIntegral = res.return_data; this.rebateIntegral = res.return_data;
@ -388,7 +386,8 @@
this.couponList = res.return_data; this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice; this.paytheprice = res.return_data.discountPrice;
this.saveprice = res.return_data.discountPrice; this.saveprice = res.return_data.discountPrice;
this.orderPrice = res.return_data.salesPrice this.orderPrice = res.return_data.salesPrice;
this.getRebateIntegral();
this.getThirdPartyByDetail(); this.getThirdPartyByDetail();
} }
}) })
@ -409,34 +408,34 @@
} else { // } else { //
this.isDiscont = true; this.isDiscont = true;
this.memDiscountId = item.id; this.memDiscountId = item.id;
if (item.highDiscount.discountType == 1) { if (item.discountType == 1) {
// //
if (this.orderPrice > item.highDiscount.discountCondition) { if (this.orderPrice > item.discountCondition) {
this.memDiscountId = item.id; this.memDiscountId = item.id;
// //
this.deductionPrice = item.highDiscount.discountPrice; this.deductionPrice = item.discountPrice;
let oldprice = this.orderPrice - this.deductionPrice; let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice); this.priceCaluc(oldprice);
} else { } else {
uni.showToast({ uni.showToast({
title: '请满' + item.highDiscount.discountCondition + '使用此券', title: '请满' + item.discountCondition + '使用此券',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
} }
} }
if (item.highDiscount.discountType == 2) { if (item.discountType == 2) {
// //
this.deductionPrice = item.highDiscount.discountPrice; this.deductionPrice = item.discountPrice;
let oldprice = this.orderPrice - this.deductionPrice; let oldprice = this.orderPrice - this.deductionPrice;
this.priceCaluc(oldprice); this.priceCaluc(oldprice);
} }
if (item.highDiscount.discountType == 3) { if (item.discountType == 3) {
// //
this.deductionPrice = parseFloat(this.orderPrice - (this.orderPrice * item.highDiscount this.deductionPrice = parseFloat(this.orderPrice - (this.orderPrice * item
.discountPrice)) .discountPrice))
.toFixed(2); .toFixed(2);
let oldprice = parseFloat(this.orderPrice * item.highDiscount.discountPrice).toFixed(2); let oldprice = parseFloat(this.orderPrice * item.discountPrice).toFixed(2);
this.priceCaluc(oldprice); this.priceCaluc(oldprice);
} }
} }

@ -305,11 +305,13 @@
url: '../../login/updatePas/updatePas', url: '../../login/updatePas/updatePas',
text: '支付密码', text: '支付密码',
img: '../../../static/img/user/user11.png' img: '../../../static/img/user/user11.png'
}, { },
{
url: '', url: '',
text: '退出登录', text: '退出登录',
img: '../../../static/img/user/user12.png' img: '../../../static/img/user/user12.png'
}, { },
{
url: '', url: '',
text: '客服', text: '客服',
img: '../../../static/img/user/user13.png' img: '../../../static/img/user/user13.png'
@ -331,7 +333,8 @@
url: '', url: '',
text: '退出登录', text: '退出登录',
img: '../../../static/img/exit.png' img: '../../../static/img/exit.png'
}, { },
{
url: '', url: '',
text: '客服', text: '客服',
img: '../../../static/img/user/user13.png' img: '../../../static/img/user/user13.png'
@ -491,7 +494,8 @@
}) })
} }
}, },
toPage(url, item) { toPage(url, item) {
let that = this;
if (item != '客服') { if (item != '客服') {
uni.navigateTo({ uni.navigateTo({
url: url url: url
@ -530,7 +534,15 @@
loginOut().then(res => { loginOut().then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
app.globalData.userInfo = ''; app.globalData.userInfo = '';
app.globalData.token = ''; app.globalData.token = '';
that.textnum = '';
that.textSend = '';
that.therrNum = '';
that.whetherCheckNum = '';
that.orderPayNum = '';
that.rechargeOrderNum = '';
that.userphone = '';
that.user = '';
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: '' data: ''
@ -555,7 +567,9 @@
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #f5f5f5; background-color: #f5f5f5;
overflow: hidden;
overflow-y: auto;
} }
.status { .status {

@ -547,7 +547,6 @@
.srollview { .srollview {
position: fixed; position: fixed;
z-index: 9999;
height: 60px; height: 60px;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
@ -806,7 +805,7 @@
.left { .left {
background-color: #fff; background-color: #fff;
width: 72%; width: 72%;
background-image: radial-gradient(6px at top right, #f5f5f5 50px, #ffffff); background-image: radial-gradient(6px at top right, #ffffff 50px, #ffffff);
.title { .title {
width: 90%; width: 90%;
@ -816,7 +815,7 @@
.term { .term {
width: 95%; width: 95%;
background-image: radial-gradient(6px at bottom right, #f5f5f5 50px, #ffffff); background-image: radial-gradient(6px at bottom right, #ffffff 50px, #ffffff);
margin-left: 5%; margin-left: 5%;
font-size: 26upx; font-size: 26upx;
color: #999; color: #999;
@ -856,7 +855,7 @@
width: 28%; width: 28%;
color: #fff; color: #fff;
background: linear-gradient(to right, #66c4ff, #009DFF); background: linear-gradient(to right, #66c4ff, #009DFF);
background-image: radial-gradient(6px at bottom left, #f5f5f5 50px, #009DFF); background-image: radial-gradient(6px at bottom left, #009DFF 50px, #009DFF);
&.invalid { &.invalid {
background: linear-gradient(to right, #aaa, #999); background: linear-gradient(to right, #aaa, #999);

@ -598,7 +598,7 @@
if (res.return_data.orderStatus == 1) { if (res.return_data.orderStatus == 1) {
this.timers = setInterval(() => { this.timers = setInterval(() => {
this.showtime() this.showtime()
}) }, 1000)
} }
} }
}) })

@ -397,7 +397,6 @@
let datas = { let datas = {
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
"price": this.payPrice, "price": this.payPrice,
"productId": this.productType,
"type": 4, "type": 4,
} }
getRebateIntegral(datas).then(res => { getRebateIntegral(datas).then(res => {

@ -269,7 +269,7 @@
if (this.orderList.orderStatus == 1) { if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.showtime() this.showtime()
}) }, 1000)
} }
if (this.orderList.orderStatus == 2) { if (this.orderList.orderStatus == 2) {
this.setTimer(); this.setTimer();

@ -7,19 +7,22 @@
<wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6" <wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6"
:showCloseIcon="true"> :showCloseIcon="true">
<image class="popImg" :src="imageUrl+imgadres1"></image> <image class="popImg" :src="imageUrl+imgadres1"></image>
</wybPopup> </wybPopup>
<Postion></Postion>
</view> </view>
</template> </template>
<script> <script>
import { import {
getCmsContent getCmsContent
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
import Postion from '@/components/postion/postion.vue';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
let app = getApp(); let app = getApp();
export default { export default {
components: { components: {
wybPopup wybPopup,
Postion
}, },
data() { data() {
return { return {

@ -322,8 +322,7 @@
let datas = { let datas = {
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
"price": this.payPrice, "price": this.payPrice,
"productId": this.rechargeModel, "type": 9,
"type": 3,
} }
getRebateIntegral(datas).then(res => { getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
@ -528,7 +527,7 @@
uni.hideLoading(); uni.hideLoading();
that.orderId = res.return_data.orderNo; that.orderId = res.return_data.orderNo;
let params = { let params = {
"orderId": res.return_data.id, "orderNo": res.return_data.orderNo,
"openId": app.globalData.openId, "openId": app.globalData.openId,
"openIdType": 2 "openIdType": 2
} }

Loading…
Cancel
Save