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

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

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

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

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

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

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

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

@ -547,7 +547,6 @@
.srollview {
position: fixed;
z-index: 9999;
height: 60px;
background-color: #ffffff;
display: flex;
@ -806,7 +805,7 @@
.left {
background-color: #fff;
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 {
width: 90%;
@ -816,7 +815,7 @@
.term {
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%;
font-size: 26upx;
color: #999;
@ -856,7 +855,7 @@
width: 28%;
color: #fff;
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 {
background: linear-gradient(to right, #aaa, #999);

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

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

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

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

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

Loading…
Cancel
Save