优化问题
This commit is contained in:
@@ -3,10 +3,10 @@ const debug = process.env.NODE_ENV == 'development' ? true : false;
|
|||||||
const proxyApi = "/api"
|
const proxyApi = "/api"
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP-WEIXIN || APP
|
// #ifdef MP-WEIXIN || APP
|
||||||
// const proxyApi = 'http://192.168.2.133:9889/cashierService' // 王伟
|
// const proxyApi = 'http://192.168.2.96:9889/cashierService' // 王伟
|
||||||
// const proxyApi = 'http://192.168.2.74:9888/cashierService' // 帆哥
|
// const proxyApi = 'http://192.168.2.74:9888/cashierService' // 帆哥
|
||||||
const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
|
||||||
// const proxyApiwws = 'ws://192.168.2.74:9888/cashierService' // 测试
|
// const proxyApiwws = 'ws://192.168.2.74:9888/cashierService' // 测试
|
||||||
|
const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
||||||
const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
@@ -19,6 +19,7 @@ const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService'
|
|||||||
// const baseUrl = debug ? proxyApi : 'https://cashier.sxczgkj.cn/cashierService'// 线上
|
// const baseUrl = debug ? proxyApi : 'https://cashier.sxczgkj.cn/cashierService'// 线上
|
||||||
// const baseUrlwws = debug ? proxyApiwws : 'wss://cashier.sxczgkj.cn/cashierService' // 线上
|
// const baseUrlwws = debug ? proxyApiwws : 'wss://cashier.sxczgkj.cn/cashierService' // 线上
|
||||||
const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试
|
const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试
|
||||||
|
// const baseUrl = 'http://192.168.2.96:9889/cashierService'
|
||||||
const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="addreeStyle">
|
<view class="addreeStyle">
|
||||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/dingwei.png"
|
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/dingwei.png"
|
||||||
style="width: 17.9rpx;height: 22rpx;margin-right: 6rpx;" mode=""></image>{{info.distances}}km |
|
style="width: 17.9rpx;height: 22rpx;margin-right: 6rpx;" mode=""></image>{{info.distances}} |
|
||||||
{{info.address}}
|
{{info.address}}
|
||||||
</view>
|
</view>
|
||||||
<view class="rightStyle">
|
<view class="rightStyle">
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
{{item.shopName}}
|
{{item.shopName}}
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
龙首.{{item.distances}}km
|
{{item.distances}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fivecontent_item_nav_lefttopstart flex-start">
|
<view class="fivecontent_item_nav_lefttopstart flex-start">
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
</image>
|
</image>
|
||||||
<view> {{item.productName}}</view>
|
<view> {{item.productName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="fivecontent_item_boxitemlefttow_t">{{item.distances}}km</text>
|
<text class="fivecontent_item_boxitemlefttow_t">{{item.distances}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="fivecontent_item_boxitemlefthere flex-start">
|
<view class="fivecontent_item_boxitemlefthere flex-start">
|
||||||
<view class="fivecontent_item_boxitemlefthere_one flex-start">
|
<view class="fivecontent_item_boxitemlefthere_one flex-start">
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
{{item.address.length>7?item.address.substring(0,7)+'...':item.address}}
|
{{item.address.length>7?item.address.substring(0,7)+'...':item.address}}
|
||||||
</view>
|
</view>
|
||||||
<view class="fivecontent_itemoneboxtow_t">
|
<view class="fivecontent_itemoneboxtow_t">
|
||||||
{{item.distances}}km
|
{{item.distances}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -148,9 +148,6 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
this.getinfo(e.orderId)
|
this.getinfo(e.orderId)
|
||||||
this.orderInfo = JSON.parse(e.orderInfo)
|
this.orderInfo = JSON.parse(e.orderInfo)
|
||||||
console.log('调试1', e)
|
|
||||||
console.log('调试2', JSON.parse(e.orderInfo))
|
|
||||||
console.log('调试3', this.orderInfo)
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
HeighT() { //手机类型的尺寸
|
HeighT() { //手机类型的尺寸
|
||||||
|
|||||||
@@ -426,7 +426,7 @@
|
|||||||
let isVip = uni.cache.get('userInfo').isPwd
|
let isVip = uni.cache.get('userInfo').isPwd
|
||||||
if (isVip == 0) {
|
if (isVip == 0) {
|
||||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
uni.pro.navigateTo('/pages/user/repairpassword', {
|
||||||
// shopId_id: uni.cache.get('shopUser')
|
shopId_id: uni.cache.get('shopUser')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.ispws = true
|
this.ispws = true
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<image class="contentitemthere_image"
|
<image class="contentitemthere_image"
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/product/d.png" mode="aspectFill"></image>
|
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/product/d.png" mode="aspectFill"></image>
|
||||||
<view class="contentitemthere_t">
|
<view class="contentitemthere_t">
|
||||||
距您{{item.distances}}km<text v-if="item.address">,{{item.address}}</text>
|
距您{{item.distances}}<text v-if="item.address">,{{item.address}}</text>
|
||||||
</view>
|
</view>
|
||||||
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -467,6 +467,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 180rpx;
|
||||||
padding: 24rpx 28rpx;
|
padding: 24rpx 28rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
|||||||
@@ -40,16 +40,16 @@
|
|||||||
<view style="background-color: #F6F6F6;height: 2rpx;width: 100%;margin: 16rpx 0;"></view>
|
<view style="background-color: #F6F6F6;height: 2rpx;width: 100%;margin: 16rpx 0;"></view>
|
||||||
<view class="jiesuanmoney">
|
<view class="jiesuanmoney">
|
||||||
<text>
|
<text>
|
||||||
优惠<text style="color: #FF4C11;font-weight: 500;">¥{{info.save * Quantity}}</text>
|
优惠<text style="color: #FF4C11;font-weight: 500;">¥{{calculateEvent(info.save)}}</text>
|
||||||
</text>
|
</text>
|
||||||
<text>
|
<text>
|
||||||
小计<text style="color: #FF4C11;font-weight: 500;">¥{{info.salePrice * Quantity}}</text>
|
小计<text style="color: #FF4C11;font-weight: 500;">¥{{calculateEvent(info.salePrice) }}</text>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 支付方式 -->
|
<!-- 支付方式 -->
|
||||||
<view class="payType">
|
<view class="payType" >
|
||||||
<view class="">
|
<view class="">
|
||||||
支付方式
|
支付方式
|
||||||
</view>
|
</view>
|
||||||
@@ -65,9 +65,8 @@
|
|||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</u-radio>
|
</u-radio>
|
||||||
<view style="margin: 22rpx 0;width: 100%;height: 2rpx;background-color: #E5E5E5;">
|
<view style="margin: 22rpx 0;width: 100%;height: 2rpx;background-color: #E5E5E5;" v-if="info.isUseVip==1"> </view>
|
||||||
</view>
|
<u-radio activeColor="#ffd158" name="2" v-if="info.isUseVip==1">
|
||||||
<u-radio activeColor="#ffd158" name="2">
|
|
||||||
<view class="dfs">
|
<view class="dfs">
|
||||||
<image style="width:44rpx;height:44rpx"
|
<image style="width:44rpx;height:44rpx"
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/wechat.png" mode="">
|
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/wechat.png" mode="">
|
||||||
@@ -77,7 +76,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
<view style="font-weight: 400;font-size: 24rpx;color: #333333;margin-left: 60rpx;">
|
<view style="font-weight: 400;font-size: 24rpx;color: #333333;margin-left: 60rpx;" v-if="info.isUseVip==1">
|
||||||
会员卡余额{{ amountVIP.amount}} <text
|
会员卡余额{{ amountVIP.amount}} <text
|
||||||
style="font-weight: 500;font-size: 28rpx;margin-left: 16rpx;color: #FF4C11;"
|
style="font-weight: 500;font-size: 28rpx;margin-left: 16rpx;color: #FF4C11;"
|
||||||
@click="goRecharge">去充值</text>
|
@click="goRecharge">去充值</text>
|
||||||
@@ -88,11 +87,12 @@
|
|||||||
<view class="placeBottom">
|
<view class="placeBottom">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text style="font-size: 24rpx;font-weight: bold;"> 合计 </text><text
|
<text style="font-size: 24rpx;font-weight: bold;"> 合计 </text><text
|
||||||
style="font-size: 32rpx;font-weight: bold;color:#FF4C11"> ¥{{info.salePrice * Quantity}} </text>
|
style="font-size: 32rpx;font-weight: bold;color:#FF4C11"> ¥{{calculateEvent(info.salePrice)}}
|
||||||
|
</text>
|
||||||
<text style="font-size: 24rpx;font-weight: 400;color: # 999;">含优惠卷包¥0</text>
|
<text style="font-size: 24rpx;font-weight: 400;color: # 999;">含优惠卷包¥0</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
共{{Quantity}}件 已优惠¥{{info.save * Quantity}}
|
共{{Quantity}}件 已优惠¥{{calculateEvent(info.save) }}
|
||||||
</view>
|
</view>
|
||||||
<button class="btnStyle" @click="sumbitFrom">提交订单</button>
|
<button class="btnStyle" @click="sumbitFrom">提交订单</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -140,11 +140,16 @@
|
|||||||
async accountPayevent(pwd) {
|
async accountPayevent(pwd) {
|
||||||
this.ispws = false
|
this.ispws = false
|
||||||
let res = await this.api.payOrderPay({
|
let res = await this.api.payOrderPay({
|
||||||
orderId: this.listinfoid,
|
orderId: this.listinfoid.id,
|
||||||
payType: "deposit",
|
payType: "deposit",
|
||||||
pwd
|
pwd
|
||||||
})
|
})
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
let orderInfo = {
|
||||||
|
createdAt:this.listinfoid.createTime,
|
||||||
|
orderNo:this.listinfoid.orderNo,
|
||||||
|
orderAmount:this.calculateEvent(this.info.salePrice)
|
||||||
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '支付成功',
|
title: '支付成功',
|
||||||
@@ -152,8 +157,7 @@
|
|||||||
setTimeout(res => {
|
setTimeout(res => {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/successful?orderId=' + this
|
url: '/pages/order/successful?orderId=' + this
|
||||||
.listinfoid + '&orderInfo=' + JSON.stringify(
|
.listinfoid.id + '&orderInfo=' + JSON.stringify(orderInfo)
|
||||||
this.orderInfo)
|
|
||||||
});
|
});
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
@@ -165,6 +169,9 @@
|
|||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
calculateEvent(d) {
|
||||||
|
return (d * 1000 * this.Quantity)/1000
|
||||||
|
},
|
||||||
goRecharge() {
|
goRecharge() {
|
||||||
uni.pro.navigateTo('/pages/member/index', {
|
uni.pro.navigateTo('/pages/member/index', {
|
||||||
shopId_id: this.info.shopId
|
shopId_id: this.info.shopId
|
||||||
@@ -180,7 +187,7 @@
|
|||||||
orderAmount: payMoney
|
orderAmount: payMoney
|
||||||
})
|
})
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.listinfoid = res.data.id
|
this.listinfoid = res.data
|
||||||
// radiovalue1:为1的时候微信支付,为2是会员卡,需要输入支付密码
|
// radiovalue1:为1的时候微信支付,为2是会员卡,需要输入支付密码
|
||||||
if (this.radiovalue1 == 1) {
|
if (this.radiovalue1 == 1) {
|
||||||
// 调用支付接口
|
// 调用支付接口
|
||||||
@@ -190,7 +197,7 @@
|
|||||||
let isVip = uni.cache.get('userInfo').isPwd
|
let isVip = uni.cache.get('userInfo').isPwd
|
||||||
if (isVip == 0) {
|
if (isVip == 0) {
|
||||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
uni.pro.navigateTo('/pages/user/repairpassword', {
|
||||||
// shopId_id: uni.cache.get('shopUser')
|
shopId_id: uni.cache.get('shopUser')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.ispws = true
|
this.ispws = true
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-total" v-show="isShow">
|
<view class="page-total" v-show="isShow">
|
||||||
<view class="key-list">
|
<view class="key-list">
|
||||||
<view class="list" v-for="(item,index) in keyList"
|
<view class="list" v-for="(item,index) in keyList" :class="{'special':item.keyCode==190||item.keyCode==8}"
|
||||||
:class="{'special':item.keyCode==190||item.keyCode==8}"
|
@click="onKeyList(item,index)" :key="item.keyCode">
|
||||||
@click="onKeyList(item,index)"
|
<block v-if="item.keyCode!=8">
|
||||||
:key="item.keyCode">
|
<text>{{item.key}}</text>
|
||||||
<text>{{item.key}}</text>
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<image style="width: 80rpx;height: 80rpx;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/tuige.png" mode=""></image>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -16,71 +19,69 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
keyList: [
|
keyList: [{
|
||||||
{
|
key: 1,
|
||||||
key: 1,
|
en: '',
|
||||||
en: '',
|
keyCode: 49,
|
||||||
keyCode: 49,
|
}, {
|
||||||
},{
|
key: 2,
|
||||||
key: 2,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 50,
|
||||||
keyCode: 50,
|
}, {
|
||||||
},{
|
key: 3,
|
||||||
key: 3,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 51,
|
||||||
keyCode: 51,
|
}, {
|
||||||
},{
|
key: 4,
|
||||||
key: 4,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 52,
|
||||||
keyCode: 52,
|
}, {
|
||||||
},{
|
key: 5,
|
||||||
key: 5,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 53,
|
||||||
keyCode: 53,
|
}, {
|
||||||
},{
|
key: 6,
|
||||||
key: 6,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 54,
|
||||||
keyCode: 54,
|
}, {
|
||||||
},{
|
key: 7,
|
||||||
key: 7,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 55,
|
||||||
keyCode: 55,
|
}, {
|
||||||
},{
|
key: 8,
|
||||||
key: 8,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 56,
|
||||||
keyCode: 56,
|
}, {
|
||||||
},{
|
key: 9,
|
||||||
key: 9,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 57,
|
||||||
keyCode: 57,
|
}, {
|
||||||
},{
|
key: '.',
|
||||||
key: '.',
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 190,
|
||||||
keyCode: 190,
|
}, {
|
||||||
},{
|
key: 0,
|
||||||
key: 0,
|
en: 'ABC',
|
||||||
en: 'ABC',
|
keyCode: 48,
|
||||||
keyCode: 48,
|
}, {
|
||||||
},{
|
key: 'del',
|
||||||
key: 'del',
|
en: 'DEL',
|
||||||
en: 'DEL',
|
keyCode: 8,
|
||||||
keyCode: 8,
|
}, ],
|
||||||
},
|
|
||||||
],
|
|
||||||
keyIndex: -1,
|
keyIndex: -1,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props:{
|
props: {
|
||||||
passwrdType: {
|
passwrdType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'pay'
|
default: 'pay'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
show(){
|
show() {
|
||||||
this.isShow = true;
|
this.isShow = true;
|
||||||
},
|
},
|
||||||
hide(){
|
hide() {
|
||||||
this.isShow = false;
|
this.isShow = false;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -88,17 +89,17 @@
|
|||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
* @param {Number} index
|
* @param {Number} index
|
||||||
*/
|
*/
|
||||||
onKeyList(item,index){
|
onKeyList(item, index) {
|
||||||
let KeyInfo = item;
|
let KeyInfo = item;
|
||||||
// 删除键
|
// 删除键
|
||||||
if(KeyInfo.keyCode === 8 && this.keyIndex > -1){
|
if (KeyInfo.keyCode === 8 && this.keyIndex > -1) {
|
||||||
this.keyIndex--;
|
this.keyIndex--;
|
||||||
}
|
}
|
||||||
this.$emit('KeyInfo',KeyInfo);
|
this.$emit('KeyInfo', KeyInfo);
|
||||||
// 不是删除键
|
// 不是删除键
|
||||||
if(KeyInfo.keyCode != 8){
|
if (KeyInfo.keyCode != 8) {
|
||||||
console.log(this.keyIndex,'支付键盘');
|
console.log(this.keyIndex, '支付键盘');
|
||||||
if( this.keyIndex = 4){
|
if (this.keyIndex = 4) {
|
||||||
this.keyIndex = -1;
|
this.keyIndex = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -112,4 +113,4 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import 'cc-defineKeyboard.scss';
|
@import 'cc-defineKeyboard.scss';
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user