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