Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/xiaochengxusaomadiancan/cashier_weapp into dev
This commit is contained in:
27
App.vue
27
App.vue
@@ -4,9 +4,23 @@
|
|||||||
import Api from '@/common/js/api.js'
|
import Api from '@/common/js/api.js'
|
||||||
export default {
|
export default {
|
||||||
globalData: {
|
globalData: {
|
||||||
systemInfo: null
|
systemInfo: null,
|
||||||
|
tableCode: null,
|
||||||
|
shopId: null,
|
||||||
|
queueId: null,
|
||||||
},
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function(options) {
|
||||||
|
if ( options.query&&options.query.qrCode ) {
|
||||||
|
if (this.getQueryString(options.query.qrCode, 'code')) {
|
||||||
|
this.globalData.tableCode = this.getQueryString(options.query.qrCode, 'code')
|
||||||
|
}
|
||||||
|
if (this.getQueryString(options.query.qrCode, 'shopId')) {
|
||||||
|
this.globalData.shopId = this.getQueryString(options.query.qrCode, 'shopId')
|
||||||
|
}
|
||||||
|
if (this.getQueryString(options.query.qrCode, 'queueId')) {
|
||||||
|
this.globalData.queueId = this.getQueryString(options.query.qrCode, 'queueId')
|
||||||
|
}
|
||||||
|
}
|
||||||
if ( uni.getStorageSync("NAME") && !uni.getStorageSync("NAME").data) {
|
if ( uni.getStorageSync("NAME") && !uni.getStorageSync("NAME").data) {
|
||||||
uni.cache.clear();
|
uni.cache.clear();
|
||||||
}
|
}
|
||||||
@@ -68,7 +82,14 @@
|
|||||||
// console.log('App Hide');
|
// console.log('App Hide');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getQueryString(url, name) { //解码
|
||||||
|
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||||
|
var r = url.substr(1).match(reg)
|
||||||
|
if (r != null) {
|
||||||
|
return r[2]
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -161,7 +161,9 @@ export default {
|
|||||||
getUserConpons(data) { //我的优惠券
|
getUserConpons(data) { //我的优惠券
|
||||||
return uni.api.post("/userConpons/find", data);
|
return uni.api.post("/userConpons/find", data);
|
||||||
},
|
},
|
||||||
|
conponList(data) { //获取优惠券
|
||||||
|
return uni.api.post("/coupon/find", data);
|
||||||
|
},
|
||||||
ordergetYhqPara(data) { //获取优惠券参数列表
|
ordergetYhqPara(data) { //获取优惠券参数列表
|
||||||
return uni.api.get("/order/getYhqPara", data);
|
return uni.api.get("/order/getYhqPara", data);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,7 +82,12 @@
|
|||||||
//处理按键
|
//处理按键
|
||||||
_handleKeyPress(e) {
|
_handleKeyPress(e) {
|
||||||
// console.log('点击传e', e.target.dataset.num);
|
// console.log('点击传e', e.target.dataset.num);
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
let num = e.target.dataset.num;
|
let num = e.target.dataset.num;
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
|
let num = e.target.targetDataset.num;
|
||||||
|
// #endif
|
||||||
//不同按键处理逻辑
|
//不同按键处理逻辑
|
||||||
// -1 代表无效按键,直接返回
|
// -1 代表无效按键,直接返回
|
||||||
if (num == -1) return false;
|
if (num == -1) return false;
|
||||||
@@ -154,6 +159,7 @@
|
|||||||
// this.money = S + num;
|
// this.money = S + num;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
console.log(num)
|
||||||
if (this.money.length == 6) {
|
if (this.money.length == 6) {
|
||||||
this.$emit('confirmEvent', this.money); //提交参数
|
this.$emit('confirmEvent', this.money); //提交参数
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -6,22 +6,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="pay-password" @click="onPayUp">
|
<view class="pay-password" @click="onPayUp">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<text v-show="passwordArr.length >= 1">●</text>
|
<text v-if="passwordArr.length >= 1">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<text v-show="passwordArr.length >= 2">●</text>
|
<text v-if="passwordArr.length >= 2">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<text v-show="passwordArr.length >= 3">●</text>
|
<text v-if="passwordArr.length >= 3">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<text v-show="passwordArr.length >= 4">●</text>
|
<text v-if="passwordArr.length >= 4">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<text v-show="passwordArr.length >= 5">●</text>
|
<text v-if="passwordArr.length >= 5">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<text v-show="passwordArr.length >= 6">●</text>
|
<text v-if="passwordArr.length >= 6">●</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="hint" @click="gopaypassword">
|
<view class="hint" @click="gopaypassword">
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
* @param {Object} val
|
* @param {Object} val
|
||||||
*/
|
*/
|
||||||
KeyInfo(val) {
|
KeyInfo(val) {
|
||||||
|
console.log(val)
|
||||||
if (val.index >= 6) {
|
if (val.index&&val.index >= 6) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 判断是否输入的是删除键
|
// 判断是否输入的是删除键
|
||||||
|
|||||||
@@ -7,22 +7,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="contentbox flex-between">
|
<view class="contentbox flex-between">
|
||||||
<view class="contentboxitem flex-colum">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="consumeFee.length >= 1">●</text>
|
<text v-if="consumeFee.length >= 1">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentboxitem flex-colum">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="consumeFee.length >= 2">●</text>
|
<text v-if="consumeFee.length >= 2">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentboxitem flex-colum">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="consumeFee.length >= 3">●</text>
|
<text v-if="consumeFee.length >= 3">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentboxitem flex-colum">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="consumeFee.length >= 4">●</text>
|
<text v-if="consumeFee.length >= 4">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentboxitem flex-colum">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="consumeFee.length >= 5">●</text>
|
<text v-if="consumeFee.length >= 5">●</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentboxitem flex-colum">
|
<view class="contentboxitem flex-colum">
|
||||||
<text v-show="consumeFee.length >= 6">●</text>
|
<text v-if="consumeFee.length >= 6">●</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
consumeFee(newVal, oldVal) {
|
consumeFee(newVal, oldVal) {
|
||||||
|
console.log(this.consumeFee)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -134,11 +134,17 @@
|
|||||||
timer: null //定时器
|
timer: null //定时器
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(options) {
|
||||||
// 隐藏首页按钮
|
// 隐藏首页按钮
|
||||||
if (e.q) {
|
|
||||||
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
|
// #ifdef MP-WEIXIN
|
||||||
|
if (options.q) {
|
||||||
|
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
|
if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
|
||||||
|
// #endif
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="towcontent flex-between">
|
<view class="towcontent flex-between">
|
||||||
<view class="towcontent_item flex-colum" v-for="(item,index) in district" :key="index"
|
<view v-if="(item.absUrl!=''||item.jumpType=='scan')&&item.name!='积分商城'" class="towcontent_item flex-colum" v-for="(item,index) in district" :key="index"
|
||||||
@click="clickdistrict(item,index)">
|
@click="clickdistrict(item,index)">
|
||||||
<image :src="item.coverImg" mode="aspectFill"></image>
|
<image :src="item.coverImg" mode="aspectFill"></image>
|
||||||
<text>{{item.name}}</text>
|
<text>{{item.name}}</text>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickdistrict(item) {
|
clickdistrict(item) {
|
||||||
// console.log(item,'调试')
|
console.log(item,'调试')
|
||||||
switch (item.jumpType) {
|
switch (item.jumpType) {
|
||||||
case 'absolute':
|
case 'absolute':
|
||||||
uni.pro.navigateTo('webview/webview', {
|
uni.pro.navigateTo('webview/webview', {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<button class="getPhone" open-type="getAuthorize" scope='phoneNumber' @getAuthorize="getPhone" @error="getPhoneError">
|
<button class="getPhone" open-type="getAuthorize" scope='phoneNumber' @getAuthorize="getPhone" @error="getPhoneError">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<view class="text">{{phonetitle || '获取微信手机号'}}</view>
|
<view class="text">{{'获取微信手机号'}}</view>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement">
|
<view class="agreement">
|
||||||
@@ -202,7 +202,6 @@
|
|||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: async (data) => {
|
success: async (data) => {
|
||||||
console.log(data)
|
|
||||||
let res = await this.api.userwxlogins({
|
let res = await this.api.userwxlogins({
|
||||||
code: data.code,
|
code: data.code,
|
||||||
encryptedData: d.detail.encryptedData,
|
encryptedData: d.detail.encryptedData,
|
||||||
@@ -222,36 +221,12 @@
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
my.getPhoneNumber({
|
my.getPhoneNumber({
|
||||||
success: async (data) => {
|
success: async (data) => {
|
||||||
console.log(data)
|
|
||||||
let res = await this.api.userwxlogins({
|
let res = await this.api.userwxlogins({
|
||||||
encryptedData: JSON.parse(data.response).response,
|
encryptedData: JSON.parse(data.response).response,
|
||||||
source: "alipay"
|
source: "alipay"
|
||||||
})
|
})
|
||||||
this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
|
this.telephone = res.data
|
||||||
this.mobile = res.data;
|
// console.log(this.phonetitle)
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// #ifdef MP-ALIPAY
|
|
||||||
// 支付宝小程序环境
|
|
||||||
my.getAuthCode({
|
|
||||||
scopes: 'auth_user',
|
|
||||||
success: (res) => {
|
|
||||||
console.log(res)
|
|
||||||
let authCode = res.authCode;
|
|
||||||
my.getPhoneNumber({
|
|
||||||
success: async (data) => {
|
|
||||||
let res = await this.api.userwxlogins({
|
|
||||||
// code: authCode,
|
|
||||||
encryptedData: JSON.parse(data.response).response,
|
|
||||||
source: "alipay"
|
|
||||||
})
|
|
||||||
this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
|
|
||||||
this.mobile = res.data;
|
|
||||||
console.log(this.phonetitle)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
723
pages/member/index - 副本.vue
Normal file
723
pages/member/index - 副本.vue
Normal file
@@ -0,0 +1,723 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
|
||||||
|
<view class="location" @click="openLocation">
|
||||||
|
<image class="location_icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/location.png" mode="aspectFill"></image>
|
||||||
|
<view>{{ shopUserInfo.shopName }}</view>
|
||||||
|
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card_info flex-colum">
|
||||||
|
<view class="title">账户余额(元)</view>
|
||||||
|
<view class="card_info_con flex-between">
|
||||||
|
<view class="balance">{{shopUserInfo.amount || '0.00'}}</view>
|
||||||
|
<view class="card_info_con_right flex-end">
|
||||||
|
<view class ="card_info_con_right_item flex-colum" @click="handleClick(item)" v-for="(item,index) in cardManageList" :key="index">
|
||||||
|
<image class="card_info_con_right_item_icon" :src="item.icon" mode="aspectFill"></image>
|
||||||
|
<text class="card_info_con_right_item_text">{{item.name}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="customAmount" v-if="shopUserInfo.isUser == 1">
|
||||||
|
<view class="customAmount_left">
|
||||||
|
<text class="customAmount_left_tip">¥</text>
|
||||||
|
<u-input
|
||||||
|
type="number"
|
||||||
|
v-model="amount"
|
||||||
|
inputAlign="left"
|
||||||
|
:placeholder="`充${amount}送${giftAmount}`"
|
||||||
|
:customStyle="{border: '0'}"
|
||||||
|
@input="amountChange"
|
||||||
|
></u-input>
|
||||||
|
</view>
|
||||||
|
<text class="customAmount_right">自定义金额</text>
|
||||||
|
</view>
|
||||||
|
<view class="rechargeList">
|
||||||
|
<view class="rechargeList_f" @click="clickinput(item,index)" v-for="(item,index) in listdata" :key="index">
|
||||||
|
<view class="rechargeList_item flex-colum " :class="index === inputshow?'active':''">
|
||||||
|
<view class="rechargeList_item_title">充值</view>
|
||||||
|
<view class="flex-colum-start">
|
||||||
|
<view class="rechargeList_item_amount">¥<text>{{item.amount}}</text></view>
|
||||||
|
<view class="rechargeList_item_gift" v-show="index === inputshow">
|
||||||
|
<image class="rechargeList_item_gift_bg" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/gift_icon.png" mode="aspectFill"></image>
|
||||||
|
<view class="rechargeList_item_gift_text">
|
||||||
|
<text>赠{{inputshow}}</text>
|
||||||
|
<text>¥{{ item.giftAmount }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="rechargeList_item_handsel" v-show="index !== inputshow">赠送{{item.giftAmount}}元</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="gift" v-if="giftList && giftList.length > 0">
|
||||||
|
<view class="gift_title">您将获得:</view>
|
||||||
|
<view class="gift_list">
|
||||||
|
<view class="gift_list_item" v-for="(item,index) in giftList" :key="index">
|
||||||
|
<text class="icon"></text>
|
||||||
|
<text class="text"> {{ item }} </text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="explain">
|
||||||
|
<view class="explain-top flex-between">
|
||||||
|
<text class="explain-top_title">适用门店</text>
|
||||||
|
<text class="shopName">{{ shopUserInfo.shopName }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="explain_content">
|
||||||
|
<text class="explain_content_title">充值说明</text>
|
||||||
|
<text class="explain_content_text">1.充值金额1家门店可用</text>
|
||||||
|
<text class="explain_content_text">2.储值完成后不支持自助退款,可联系商家处理</text>
|
||||||
|
<text class="explain_content_text">3.钱包余额不支持转赠,不可提现,长期有效</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="rechargeBox">
|
||||||
|
<view class="agreement" @click="isProtocol = !isProtocol">
|
||||||
|
<u-checkbox-group >
|
||||||
|
<u-checkbox :checked="isProtocol" shape="circle" activeColor="#E3AD7F" @change="radioChange" size="35" iconSize="20">
|
||||||
|
</u-checkbox>
|
||||||
|
</u-checkbox-group>
|
||||||
|
<text>已同意</text>
|
||||||
|
<text class="agreement_text" @click.stop="viewProtocol">《用户隐私协议》</text>
|
||||||
|
<!-- <text class="agreement_text" @click="viewProtocol">《用户储值协议》</text> -->
|
||||||
|
<!-- <text class="agreement_text" @click="viewProtocol">《用户授权协议》</text> -->
|
||||||
|
</view>
|
||||||
|
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
|
||||||
|
</view>
|
||||||
|
<registermember :show="memberOpen" :shopId="shopId" @getRegisterMember="getRegisterMember"></registermember>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import registermember from './components/registermember.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
registermember
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inputshow: 0,
|
||||||
|
memberOpen: false,
|
||||||
|
isProtocol: false,
|
||||||
|
listdata: [],
|
||||||
|
amount: 0,
|
||||||
|
giftAmount: 0,
|
||||||
|
userInfo: {},
|
||||||
|
shopUserInfo: null,
|
||||||
|
shopId: '',
|
||||||
|
giftList: [],
|
||||||
|
cardManageList: [
|
||||||
|
{name: "明细", url: "member/billDetails",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
|
||||||
|
{name: "管理", url: "member/storedManage",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
|
||||||
|
],
|
||||||
|
type: "",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onLoad(options) {
|
||||||
|
// if ( e.type == 'list' || e.type == 'index') {
|
||||||
|
// this.shopId = e.shopId;
|
||||||
|
// this.init();
|
||||||
|
// }
|
||||||
|
|
||||||
|
uni.cache.set('forceUpdate',1)
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
if (options.q) {
|
||||||
|
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
|
||||||
|
uni.cache.set('shopId',this.shopId)
|
||||||
|
this.tokenShow = false;
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
|
if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
|
||||||
|
uni.cache.set('shopId',this.shopId)
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
if (options.shopId) {
|
||||||
|
this.shopId = options.shopId
|
||||||
|
uni.cache.set('shopId',this.shopId)
|
||||||
|
}
|
||||||
|
if (options.type) {
|
||||||
|
this.type = options.type
|
||||||
|
}
|
||||||
|
if ( options.amount ) { this.amount = options.amount; }
|
||||||
|
this.shopInfo();
|
||||||
|
this.paygetActive()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 初始化
|
||||||
|
*/
|
||||||
|
async shopInfo() {
|
||||||
|
let res = await this.api.shopUserInfo({
|
||||||
|
shopId: this.shopId,
|
||||||
|
userId: uni.cache.get('userInfo').id,
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.shopUserInfo = res.data;
|
||||||
|
uni.cache.remove('memberOpen',this.memberOpen)
|
||||||
|
if ( this.shopUserInfo.isVip == 0 ) {
|
||||||
|
this.memberOpen = true;
|
||||||
|
uni.cache.set('memberOpen',this.memberOpen)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let pages = getCurrentPages()
|
||||||
|
if ( pages.length > 1) {
|
||||||
|
uni.navigateBack()
|
||||||
|
} else {
|
||||||
|
setTimeout(res => {
|
||||||
|
uni.exitMiniProgram({
|
||||||
|
success: function() {
|
||||||
|
console.log('退出小程序成功');
|
||||||
|
},
|
||||||
|
fail: function(err) {
|
||||||
|
console.log('退出小程序失败', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
|
console.log(this.memberOpen)
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取充值金额列表
|
||||||
|
*/
|
||||||
|
async paygetActive() {
|
||||||
|
let res = await this.api.paygetActive({
|
||||||
|
shopId: this.shopId,
|
||||||
|
page: 1,
|
||||||
|
pageSize: 99
|
||||||
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.listdata = res.data.list;
|
||||||
|
this.giftList = this.listdata[0].gives;
|
||||||
|
this.giftAmount = this.listdata[0].giftAmount
|
||||||
|
if ( this.type == 'topUpActivity') {
|
||||||
|
this.amountChange()
|
||||||
|
} else {
|
||||||
|
this.amount = this.listdata[0].amount;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听金额修改
|
||||||
|
*/
|
||||||
|
amountChange () {
|
||||||
|
let item = this.listdata.filter(item=>this.amount==item.amount)
|
||||||
|
|
||||||
|
if ( item.length > 0 ) {
|
||||||
|
this.listdata.forEach((v,e)=>{
|
||||||
|
if ( this.amount == v.amount) {
|
||||||
|
this.inputshow = e;
|
||||||
|
this.clickinput(v,e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.inputshow = '';
|
||||||
|
this.giftList = [];
|
||||||
|
this.giftAmount = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进入明细\管理
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
handleClick (item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/${item.url}?shopUserInfo=${JSON.stringify(this.shopUserInfo)}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看协议
|
||||||
|
*/
|
||||||
|
viewProtocol (){
|
||||||
|
wx.openPrivacyContract({
|
||||||
|
success: () => {}, // 打开成功
|
||||||
|
fail: () => {}, // 打开失败
|
||||||
|
complete: () => {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否同意协议
|
||||||
|
* @param {Object} n
|
||||||
|
*/
|
||||||
|
radioChange(n) {
|
||||||
|
this.isProtocol = n;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册会员卡
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
getRegisterMember (e) {
|
||||||
|
this.memberOpen = e;
|
||||||
|
this.shopInfo();
|
||||||
|
this.paygetActive()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉起地图
|
||||||
|
*/
|
||||||
|
openLocation () {
|
||||||
|
console.log('123');
|
||||||
|
uni.openLocation({
|
||||||
|
latitude: Number(this.shopUserInfo.lat), // 目的地的纬度,浮点数,范围为-90~90
|
||||||
|
longitude: Number(this.shopUserInfo.lng), // 目的地的经度,浮点数,范围为-180~180
|
||||||
|
scale: 18, // 缩放比例,范围5~18
|
||||||
|
name: this.shopUserInfo.shopName, // 位置名
|
||||||
|
address: this.shopUserInfo.address, // 地址的详细说明
|
||||||
|
success() {
|
||||||
|
console.log('导航启动成功');
|
||||||
|
|
||||||
|
},
|
||||||
|
fail(error) {
|
||||||
|
console.log('导航启动失败', error);
|
||||||
|
if ( error.errMsg == "openLocation:fail invalid_coordinate") {
|
||||||
|
uni.showToast({
|
||||||
|
title: "门店经纬度无效",
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析地址传参
|
||||||
|
* @param {Object} url
|
||||||
|
* @param {Object} name
|
||||||
|
*/
|
||||||
|
getQueryString(url, name) { //解码
|
||||||
|
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||||
|
var r = url.substr(1).match(reg)
|
||||||
|
if (r != null) {
|
||||||
|
return r[2]
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值金额切换
|
||||||
|
* @param {Object} a
|
||||||
|
* @param {Object} b
|
||||||
|
*/
|
||||||
|
clickinput(a, b) {
|
||||||
|
this.inputshow = b;
|
||||||
|
this.giftList = a.gives;
|
||||||
|
this.amount = a.amount;
|
||||||
|
this.giftAmount = a.giftAmount;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值
|
||||||
|
*/
|
||||||
|
async userbalancerechangesub() {
|
||||||
|
let _this = this;
|
||||||
|
if (!this.isProtocol) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请勾选协议',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.amount == null || this.amount == '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '金额不能为空',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.amount <= 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '金额必须大于0',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let res = await this.api.paymemeberIn({
|
||||||
|
shopId: this.shopId, // 判断显示哪家的作品,
|
||||||
|
amount: this.amount // 判断显示哪家的作品,
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay', //支付类型-固定值
|
||||||
|
partnerid: res.data.appId, // 微信支付商户号
|
||||||
|
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
|
||||||
|
nonceStr: res.data.nonceStr, // 随机字符串
|
||||||
|
package: res.data.package, // 固定值
|
||||||
|
signType: res.data.signType, //固定值
|
||||||
|
paySign: res.data.paySign, //签名
|
||||||
|
success: (res) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付成功"
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
let pages = getCurrentPages()
|
||||||
|
uni.requestSubscribeMessage({
|
||||||
|
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
|
||||||
|
complete() {
|
||||||
|
if ( _this.type && _this.type == "topUpActivity") {
|
||||||
|
uni.pro.navigateBack()
|
||||||
|
} else {
|
||||||
|
if ( pages.length > 1) {
|
||||||
|
_this.shopInfo()
|
||||||
|
} else {
|
||||||
|
setTimeout(res => {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
fail: (res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
uni.hideLoading()
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background: #F9F9F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 16rpx 20rpx 245rpx 20rpx;
|
||||||
|
|
||||||
|
.location{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 16rpx 28rpx 18rpx 28rpx;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
.location_icon{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_info{
|
||||||
|
width: 100%;
|
||||||
|
height: 182rpx;
|
||||||
|
background: linear-gradient( 132deg, #D6B68D 0%, #E6D6BC 100%);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
|
align-items: initial;
|
||||||
|
margin-bottom: 26rpx;
|
||||||
|
.title{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.card_info_con{
|
||||||
|
align-items: flex-end;
|
||||||
|
.balance{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 48rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.card_info_con_right{
|
||||||
|
.card_info_con_right_item{
|
||||||
|
margin-left: 64rpx;
|
||||||
|
.card_info_con_right_item_icon{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
margin-bottom: 5rpx;
|
||||||
|
}
|
||||||
|
.card_info_con_right_item_text{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.customAmount{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
padding: 14rpx 16rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
.customAmount_left{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.customAmount_left_tip{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
width: 100%;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
padding-left: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.customAmount_right{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rechargeList{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.rechargeList_f{
|
||||||
|
width: 33.333%;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
padding-left: 0;
|
||||||
|
.rechargeList_item{
|
||||||
|
border-radius: 0rpx 48rpx 0rpx 0rpx;
|
||||||
|
border: 4rpx solid #E5E5E5;
|
||||||
|
align-items: initial;
|
||||||
|
padding: 26rpx 22rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
.rechargeList_item_title{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.rechargeList_item_title,.rechargeList_item_handsel{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.rechargeList_item_amount{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
text{
|
||||||
|
font-size: 44rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rechargeList_item_handsel{
|
||||||
|
|
||||||
|
}
|
||||||
|
.rechargeList_item_gift{
|
||||||
|
width: 92.52rpx;
|
||||||
|
height: 88.74rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 12rpx;
|
||||||
|
right: 12rpx;
|
||||||
|
.rechargeList_item_gift_bg{
|
||||||
|
width: 92.52rpx;
|
||||||
|
height: 88.74rpx;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.rechargeList_item_gift_text{
|
||||||
|
width: 92.52rpx;
|
||||||
|
height: 88.74rpx;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text:nth-child(1){
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
text:nth-child(2){
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rechargeList_item.active{
|
||||||
|
border: 4rpx solid #DCC19E;
|
||||||
|
background: linear-gradient( 133deg, #F9F6ED 0%, #FFFFFF 100%);
|
||||||
|
.rechargeList_item_title{
|
||||||
|
color: #F7664E;
|
||||||
|
margin-bottom: 47rpx;
|
||||||
|
}
|
||||||
|
.rechargeList_item_amount{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #FB604A;
|
||||||
|
text{
|
||||||
|
font-size: 44rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #FB604A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rechargeList_f:nth-child(3n-1){
|
||||||
|
padding-right: 10rpx;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
.rechargeList_f:nth-child(3n){
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gift{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0 22rpx;
|
||||||
|
margin-bottom: 48rpx;
|
||||||
|
.gift_title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
.gift_list{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.gift_list_item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.icon{
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #F7853D;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.explain{
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 22rpx 24rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.explain-top{
|
||||||
|
// align-items: center;
|
||||||
|
margin-bottom: 18rpx;
|
||||||
|
.explain-top_title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.shopName{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.explain_content{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.explain_content_title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.explain_content_text{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
|
margin-bottom: 14rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rechargeBox{
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 28rpx 84rpx 28rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
.agreement{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 16rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
text{
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.agreement_text{
|
||||||
|
color: #E3AD7F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.recharge {
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background: #E3AD7F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -374,6 +374,7 @@
|
|||||||
shopExtend: null,
|
shopExtend: null,
|
||||||
shopId: "",
|
shopId: "",
|
||||||
tableCode: "",
|
tableCode: "",
|
||||||
|
orderAMeal: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@@ -402,16 +403,24 @@
|
|||||||
this.$store.getters.is_BarHeight.customBar)
|
this.$store.getters.is_BarHeight.customBar)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(options) {
|
||||||
if (e.q) {
|
// #ifdef MP-WEIXIN
|
||||||
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
if (options.q) {
|
||||||
|
this.tableCode = this.getQueryString(decodeURIComponent(options.q), 'code')
|
||||||
uni.cache.set('tableCode', this.tableCode)
|
uni.cache.set('tableCode', this.tableCode)
|
||||||
}
|
}
|
||||||
if ( e.shopId ) {
|
// #endif
|
||||||
this.shopId = e.shopId
|
// #ifdef MP-ALIPAY
|
||||||
|
if (getApp().globalData.tableCode) {
|
||||||
|
this.tableCode = getApp().globalData.tableCode
|
||||||
|
uni.cache.set('tableCode', this.tableCode)
|
||||||
}
|
}
|
||||||
if ( e.tableCode ) {
|
// #endif
|
||||||
this.tableCode = e.tableCode
|
if ( options.shopId ) {
|
||||||
|
this.shopId = options.shopId
|
||||||
|
}
|
||||||
|
if ( options.tableCode ) {
|
||||||
|
this.tableCode = options.tableCode
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -431,7 +440,9 @@
|
|||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
if (!this.orderAMeal){
|
||||||
|
uni.pro.switchTab('index/index')
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
uni.pageScrollTo({
|
uni.pageScrollTo({
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
@@ -539,7 +550,8 @@
|
|||||||
if (this.shopId) {params.shopId = this.shopId}
|
if (this.shopId) {params.shopId = this.shopId}
|
||||||
let res = await this.api.productqueryShop(params)
|
let res = await this.api.productqueryShop(params)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if ( res.data.shopTableInfo && !res.data.shopTableInfo.choseCount) {
|
if ( res.data.shopTableInfo && !res.data.shopTableInfo.choseCount&&this.orderAMeal) {
|
||||||
|
this.orderAMeal = false;
|
||||||
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
|
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
|
||||||
tableCode: this.tableCode,
|
tableCode: this.tableCode,
|
||||||
shopId: res.data.storeInfo.id,
|
shopId: res.data.storeInfo.id,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
textMargin: 14
|
textMargin: 14
|
||||||
},
|
},
|
||||||
qrcodeSize: 400,
|
qrcodeSize: 400,
|
||||||
createcardNo: '4637700074809642',
|
createcardNo: '',
|
||||||
shopInfo: null
|
shopInfo: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -58,7 +58,6 @@
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.createcardNo = res.data;
|
this.createcardNo = res.data;
|
||||||
console.log(this.$refs.tkiBarcode)
|
|
||||||
this.$refs.tkiBarcode.setval(this.createcardNo) //操作属性
|
this.$refs.tkiBarcode.setval(this.createcardNo) //操作属性
|
||||||
this.$refs.tkiQrcode.setval(this.createcardNo) //操作属性
|
this.$refs.tkiQrcode.setval(this.createcardNo) //操作属性
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-radio-group v-model="radiovalue1" iconPlacement="right" :size="28" placement="column">
|
<u-radio-group v-model="radiovalue1" iconPlacement="right" :size="28" placement="column">
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<u-radio activeColor="#ffd158" name="1">
|
<u-radio activeColor="#ffd158" name="1">
|
||||||
<view class="dfs">
|
<view class="dfs">
|
||||||
<image style="width:44rpx;height:44rpx"
|
<image style="width:44rpx;height:44rpx"
|
||||||
@@ -65,7 +66,20 @@
|
|||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</u-radio>
|
</u-radio>
|
||||||
<view style="margin: 22rpx 0;width: 100%;height: 2rpx;background-color: #E5E5E5;"
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
|
<u-radio activeColor="#ffd158" name="1">
|
||||||
|
<view class="dfs">
|
||||||
|
<image style="width:44rpx;height:44rpx"
|
||||||
|
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/alipay.png" mode="aspectFill" />
|
||||||
|
<text style="font-size: 28rpx;margin-left: 16rpx;">
|
||||||
|
支付宝支付
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</u-radio>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<!-- <view style="margin: 22rpx 0;width: 100%;height: 2rpx;background-color: #E5E5E5;"
|
||||||
v-if="info.isUseVip==1"> </view>
|
v-if="info.isUseVip==1"> </view>
|
||||||
<u-radio activeColor="#ffd158" name="2" v-if="info.isUseVip==1">
|
<u-radio activeColor="#ffd158" name="2" v-if="info.isUseVip==1">
|
||||||
<view class="dfs">
|
<view class="dfs">
|
||||||
@@ -75,7 +89,7 @@
|
|||||||
<text style="font-size: 28rpx;margin-left: 16rpx;">
|
<text style="font-size: 28rpx;margin-left: 16rpx;">
|
||||||
余额支付</text>
|
余额支付</text>
|
||||||
</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">
|
v-if="info.isUseVip==1">
|
||||||
@@ -98,7 +112,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<button class="btnStyle" @click="fangdouevent">提交订单</button>
|
<button class="btnStyle" @click="fangdouevent">提交订单</button>
|
||||||
</view>
|
</view>
|
||||||
<payPassword ref="payPwd" @accountPayevent="accountPayevent" v-show="ispws"></payPassword>
|
<payPassword ref="payPwd" @accountPayevent="accountPayevent" v-if="ispws"></payPassword>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -109,7 +123,7 @@
|
|||||||
payPassword
|
payPassword
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.$store.dispatch("set_shopid"); //获取shapid
|
// this.$store.dispatch("set_shopid"); //获取shapid
|
||||||
this.getInfo(e.id)
|
this.getInfo(e.id)
|
||||||
this.orderIds = e.id
|
this.orderIds = e.id
|
||||||
this.amount = uni.cache.get('userInfo').amount
|
this.amount = uni.cache.get('userInfo').amount
|
||||||
@@ -143,6 +157,12 @@
|
|||||||
// 余额支付
|
// 余额支付
|
||||||
async accountPayevent(pwd) {
|
async accountPayevent(pwd) {
|
||||||
this.ispws = false
|
this.ispws = false
|
||||||
|
if ( this.amountVIP.isVip == 0 ) {
|
||||||
|
uni.pro.navigateTo('/pages/member/index', {
|
||||||
|
shopId: this.info.shopId,
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
let res = await this.api.payOrderPay({
|
let res = await this.api.payOrderPay({
|
||||||
orderId: this.listinfoid.id,
|
orderId: this.listinfoid.id,
|
||||||
payType: "deposit",
|
payType: "deposit",
|
||||||
@@ -207,7 +227,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('shopId')
|
shopId_id: this.info.shopId
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.ispws = true
|
this.ispws = true
|
||||||
@@ -221,12 +241,19 @@
|
|||||||
},
|
},
|
||||||
async payEvent(id) {
|
async payEvent(id) {
|
||||||
let res = await this.api.payOrderPay({
|
let res = await this.api.payOrderPay({
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
payType: 'wechatPay',
|
payType: 'wechatPay',
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
|
payType: 'aliPay',
|
||||||
|
// #endif
|
||||||
orderId: id,
|
orderId: id,
|
||||||
orderType: 'group'
|
orderType: 'group'
|
||||||
})
|
})
|
||||||
if (res) {
|
if (res) {
|
||||||
|
// 微信支付还是余额支付
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
provider: 'wxpay', //支付类型-固定值
|
provider: 'wxpay', //支付类型-固定值
|
||||||
partnerid: res.data.appId, // 微信支付商户号
|
partnerid: res.data.appId, // 微信支付商户号
|
||||||
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
|
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
|
||||||
@@ -234,22 +261,32 @@
|
|||||||
package: res.data.package, // 固定值
|
package: res.data.package, // 固定值
|
||||||
signType: res.data.signType, //固定值
|
signType: res.data.signType, //固定值
|
||||||
paySign: res.data.paySign, //签名
|
paySign: res.data.paySign, //签名
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
|
provider: 'alipay', //支付类型-固定值
|
||||||
|
orderInfo: res.data.tradeNo, // 支付宝支付商户号
|
||||||
|
// #endif
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
let _this = this
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "支付成功"
|
title: "支付成功"
|
||||||
})
|
})
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: async (err) => {
|
||||||
setTimeout(res => {
|
console.log(err)
|
||||||
uni.showToast({
|
let res = await this.api.cancelOrderPay({
|
||||||
icon: 'none',
|
orderId: this.listinfoid.id,
|
||||||
title: '支付失败'
|
})
|
||||||
})
|
|
||||||
uni.hideLoading()
|
uni.showToast({
|
||||||
}, 2000)
|
icon: 'none',
|
||||||
|
title: '支付失败'
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<view class="towcontent">
|
<view class="towcontent">
|
||||||
<view class="towcontentlistxitem flex-start">
|
<view class="towcontentlistxitem flex-start">
|
||||||
<view class="towcontentlistxitembox flex-colum"
|
<view class="towcontentlistxitembox flex-colum"
|
||||||
:class="towcontentclickindex == index?'towcontentlistxitemboxopacity':''"
|
:class="tabIndex == index?'towcontentlistxitemboxopacity':''"
|
||||||
v-for="(item,index) in listbox" :key="index" @click="towcontentclick(index,item)">
|
v-for="(item,index) in tabList" :key="index" @click="towcontentclick(index,item)">
|
||||||
<text class="title">{{item.name}}</text>
|
<text class="title">{{item.name}}</text>
|
||||||
<image v-if="towcontentclickindex == index"
|
<image v-if="tabIndex == index"
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
@@ -74,27 +74,27 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
listbox: [{
|
tabList: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
type: ''
|
type: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '未使用',
|
name: '未使用',
|
||||||
type: '0'
|
type: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '已使用',
|
name: '已使用',
|
||||||
type: '1'
|
type: '2'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
towcontentclickindex: 0,
|
tabIndex: 0,
|
||||||
list: [],
|
list: [],
|
||||||
status: "",
|
status: "",
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.ordermineCouponsthis()
|
this.getCouponList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -105,15 +105,15 @@
|
|||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
*/
|
*/
|
||||||
towcontentclick(index, item) {
|
towcontentclick(index, item) {
|
||||||
this.towcontentclickindex = index;
|
this.tabIndex = index;
|
||||||
this.status = item.type;
|
this.status = item.type;
|
||||||
this.ordermineCouponsthis()
|
this.getCouponList()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取优惠券数据
|
* 获取优惠券数据
|
||||||
*/
|
*/
|
||||||
async ordermineCouponsthis() {
|
async getCouponList() {
|
||||||
try {
|
try {
|
||||||
let res = await this.api.getUserConpons({
|
let res = await this.api.getUserConpons({
|
||||||
userId: uni.cache.get('userInfo').id,
|
userId: uni.cache.get('userInfo').id,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<text class="t">备注:</text>
|
<text class="t">备注:</text>
|
||||||
<text class="info">{{ listinfo.orderInfo.remark}}</text>
|
<text class="info">{{ listinfo.orderInfo.remark||""}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<text class="t">就餐人数:</text>
|
<text class="t">就餐人数:</text>
|
||||||
|
|||||||
300
pagesOrder/components/orderInfoPoints.vue
Normal file
300
pagesOrder/components/orderInfoPoints.vue
Normal file
@@ -0,0 +1,300 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="card_box">
|
||||||
|
<view class="card_head_box">
|
||||||
|
<view class="card_head_item" v-for="(item,index) in 8" :key="index"></view>
|
||||||
|
</view>
|
||||||
|
<view class="card">
|
||||||
|
<!-- 订单头部 -->
|
||||||
|
<view class="top">
|
||||||
|
<view class="title">
|
||||||
|
<view>自提凭证</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card_item">
|
||||||
|
<view>
|
||||||
|
<view class="code">提货码:241578956432</view>
|
||||||
|
<tki-qrcode ref="tkiQrcode" show :size="qrcodeSize"></tki-qrcode>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="semicircle_icon" >
|
||||||
|
<view class="semicircle_left_icon"></view>
|
||||||
|
<view class="semicircle_right_icon"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="total-wrap">
|
||||||
|
<view class="info">
|
||||||
|
<u-icon name="map" color="#666" size="28"></u-icon>
|
||||||
|
<view class="shopName">自取店:{{ listinfo.name }}</view>
|
||||||
|
<u-icon name="phone" color="#666" size="28"></u-icon>
|
||||||
|
<view class="phone">15303589754</view>
|
||||||
|
</view>
|
||||||
|
<view class="address">
|
||||||
|
<view class="lable">门店地址:</view>
|
||||||
|
<view>门店地址门店地址门店地址门店地址门店地址门店地址门店地址门店地址</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="product">
|
||||||
|
<view></view>
|
||||||
|
<view class="product_info">
|
||||||
|
<view class="name">DIMO联名马克杯</view>
|
||||||
|
<view class="numBox"><view class="points">100积分</view><view class="num">X1</view></view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="productInfo"></view> -->
|
||||||
|
</view>
|
||||||
|
<view class="orderInfo">
|
||||||
|
<view class="row">
|
||||||
|
<text class="t">支付方式:</text>
|
||||||
|
<text class="info">{{listinfo.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<text class="t">兑换时间:</text>
|
||||||
|
<text class="info">{{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="row" @click="copyHandle(listinfo.orderNo)">
|
||||||
|
<text class="t">订单编号:</text>
|
||||||
|
<text class="info">{{listinfo.orderNo}}(点击复制)</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
|
||||||
|
export default {
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
qrcodeSize: 200,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
listinfo:{
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.setQrcode();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
setQrcode () {
|
||||||
|
this.$refs.tkiQrcode.setval('241578956432') //操作属性
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复制订单号
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
copyHandle(e) {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: e,
|
||||||
|
success() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '复制成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.card_box{
|
||||||
|
background-color: #fff;
|
||||||
|
// box-shadow: 0rpx 8rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
||||||
|
border-radius: 18rpx;
|
||||||
|
padding-bottom: 32rpx;
|
||||||
|
.card_head_box{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: -22.5rpx;
|
||||||
|
padding: 0 44rpx;
|
||||||
|
.card_head_item{
|
||||||
|
width: 45rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border-radius: 50%;
|
||||||
|
// box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
// background-color: #fff;
|
||||||
|
border-radius: 20upx;
|
||||||
|
margin-bottom: 28upx;
|
||||||
|
position: relative;
|
||||||
|
.top{
|
||||||
|
padding: 0 34rpx;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
border-bottom: 2rpx dashed #E3E3E3;
|
||||||
|
padding-bottom: 36rpx;
|
||||||
|
padding-top: 50rpx;
|
||||||
|
}
|
||||||
|
.card_item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
|
padding: 32rpx 34rpx 48rpx 34rpx;
|
||||||
|
border-bottom: 2rpx dashed #E3E3E3;
|
||||||
|
align-items: center;
|
||||||
|
.code{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 48rpx;
|
||||||
|
}
|
||||||
|
::v-deep.vue-ref{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.semicircle_icon{
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -22.5rpx;
|
||||||
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.semicircle_left_icon{
|
||||||
|
width: 45rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
margin-left: -22.5rpx;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border-radius: 50%;
|
||||||
|
// box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
|
||||||
|
|
||||||
|
}
|
||||||
|
.semicircle_right_icon{
|
||||||
|
width: 45rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
margin-right: -22.5rpx;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border-radius: 50%;
|
||||||
|
// box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.total-wrap {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-top: 38rpx;
|
||||||
|
.info{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
.shopName{
|
||||||
|
margin-right: 48rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
.phone{
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.address{
|
||||||
|
margin-left: 36rpx;
|
||||||
|
align-self: center;
|
||||||
|
display: flex;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666666;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
align-self: center;
|
||||||
|
.lable{
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.product{
|
||||||
|
padding: 32rpx 34rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
.product_info{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
.name{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
.numBox{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
.points{
|
||||||
|
color: #F7853D;
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
color: #999999
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.orderInfo{
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
padding: 32rpx 34rpx;
|
||||||
|
// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
|
||||||
|
.t {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.row:last-child{
|
||||||
|
margin-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -92,6 +92,7 @@
|
|||||||
.paymentMethod{
|
.paymentMethod{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
padding: 0 20rpx 220rpx 20rpx;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
.paymentMethod_content{
|
.paymentMethod_content{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
80
pagesOrder/components/rechargeFree.vue
Normal file
80
pagesOrder/components/rechargeFree.vue
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 充值免单 -->
|
||||||
|
<view class="rechargeFree">
|
||||||
|
<view class="rechargeFree_bg" @click="changeFree">
|
||||||
|
<view class="left">
|
||||||
|
<view class="icon">优惠</view>
|
||||||
|
<view class="text">充值消费2倍(¥50),本单立享免单!</view>
|
||||||
|
</view>
|
||||||
|
<u-checkbox-group iconPlacement="right" >
|
||||||
|
<u-checkbox v-model="rechargeFreeChecked" :checked="rechargeFreeChecked" @change="changeFree" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
|
||||||
|
</u-checkbox>
|
||||||
|
</u-checkbox-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rechargeFreeChecked: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
shopUserInfo:{
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听是否免单
|
||||||
|
*/
|
||||||
|
changeFree ( e ) {
|
||||||
|
this.rechargeFreeChecked = !this.rechargeFreeChecked;
|
||||||
|
this.$emit("changeFree",this.rechargeFreeChecked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 充值免单
|
||||||
|
.rechargeFree{
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
.rechargeFree_bg{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 32rpx 24rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
.left{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.icon{
|
||||||
|
width: 68rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 36rpx;
|
||||||
|
background: linear-gradient( 180deg, #FEDE81 0%, #FEB263 100%);
|
||||||
|
border-radius: 12rpx 0rpx 12rpx 0rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
142
pagesOrder/components/topUpActivity.vue
Normal file
142
pagesOrder/components/topUpActivity.vue
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 充值活动 -->
|
||||||
|
<view class="topUp">
|
||||||
|
<view class="topUpActivity">
|
||||||
|
<view class="topUpActivity_title">充值更划算</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="content_item" @click="goTopUp(item)" v-for="(item,index) in list" :key="index">
|
||||||
|
<view class="fit">首充优惠</view>
|
||||||
|
<view class="amount">{{ item.amount }}元</view>
|
||||||
|
<view class="zs"><text class="zamount">赠{{ item.giftAmount }}元</text><text class="points">50积分</text></view>
|
||||||
|
<view class="coupon">赠送2张优惠券</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
shopUserInfo:{
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log(this.shopUserInfo)
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 去充值
|
||||||
|
*/
|
||||||
|
goTopUp( item ) {
|
||||||
|
uni.pro.navigateTo('/pages/member/index', {
|
||||||
|
shopId: uni.cache.get('shopId'),
|
||||||
|
type: "topUpActivity",
|
||||||
|
amount: item.amount,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取充值数据
|
||||||
|
*/
|
||||||
|
async getData () {
|
||||||
|
let res = await this.api.paygetActive({
|
||||||
|
shopId: uni.cache.get('shopId'),
|
||||||
|
page: 1,
|
||||||
|
pageSize: 99
|
||||||
|
})
|
||||||
|
this.list = res.data.list;
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.topUp{
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border-radius: 18rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
.topUpActivity{
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 22rpx;
|
||||||
|
padding: 32rpx 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.topUpActivity_title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
display: flex;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding-top: 32rpx;
|
||||||
|
.content_item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
background: linear-gradient( 180deg, #FFF7E6 0%, #FFFFFF 100%);
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
border: 2rpx solid #FEE082;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
padding: 22rpx 42rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
.fit{
|
||||||
|
width: 102rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient( 180deg, #FEE082 0%, #FFA158 100%);
|
||||||
|
border-radius: 12rpx 0rpx 12rpx 0rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: -14rpx;
|
||||||
|
}
|
||||||
|
.amount{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.zs{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
text{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
text:nth-child(1){
|
||||||
|
padding-right: 12rpx;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.coupon{
|
||||||
|
padding: 6rpx 12rpx;
|
||||||
|
background: rgba(250,236,205,0.88);
|
||||||
|
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #F7955C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 占位符导航栏 -->
|
|
||||||
<!-- <navseat class="navbar" :opacity='opacitys' :backColor="'#E8AD7B'" :title='toplist.name' :titleshow='true'></navseat> -->
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- <view :style="{'height':HeighT.customBar+HeighT.heightBar+'px;background-color: #E8AD7B;position: fixed;top: 0;width: 100%;z-index: 9'}"></view> -->
|
|
||||||
<!-- <view :style="{'height':HeighT.customBar+HeighT.heightBar+'px;background-color: #E8AD7B;'}"></view> -->
|
|
||||||
<!-- #endif -->
|
|
||||||
<!-- 头部内容 -->
|
<!-- 头部内容 -->
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<view class="head_bg"></view>
|
<view class="head_bg"></view>
|
||||||
@@ -83,13 +77,20 @@
|
|||||||
<view>{{(shopTableInfo.seatNum*storeInfo.tableFee).toFixed(2)}}</view>
|
<view>{{(shopTableInfo.seatNum*storeInfo.tableFee).toFixed(2)}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="favorable" v-for="(item,index) in favorable" :key="index">
|
<view class="favorable" v-for="(item,index) in favorable" :key="index">
|
||||||
<view class="favorable_left">
|
<view class="favorable_left">
|
||||||
<image class="icon" :src="item.url" mode="aspectFill"/>
|
<image class="icon" :src="item.url" mode="aspectFill"/>
|
||||||
<text class="name"> {{ item.name }} </text>
|
<text class="name"> {{ item.name }} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="favorable_right"><text class="favorable_right_text">暂无可用优惠券</text> <u-icon name="arrow-right" color="#575B66" size="28"></u-icon></view>
|
<view class="favorable_right" v-if="item.type == 'points'" @click="isPointsChecked = !isPointsChecked">
|
||||||
</view> -->
|
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;">使用29积分抵扣¥29.00</text>
|
||||||
|
<u-checkbox-group iconPlacement="right">
|
||||||
|
<u-checkbox v-model="isPointsChecked" :checked="isPointsChecked" activeColor="#E8AD7B" shape="circle" icon-size="36" size="36">
|
||||||
|
</u-checkbox>
|
||||||
|
</u-checkbox-group>
|
||||||
|
</view>
|
||||||
|
<view class="favorable_right" v-else ><text class="favorable_right_text">暂无可用优惠券</text> <u-icon name="arrow-right" color="#575B66" size="28"></u-icon></view>
|
||||||
|
</view>
|
||||||
<view class="totalPrice">
|
<view class="totalPrice">
|
||||||
<text style="margin-bottom: 5rpx;">小计¥</text>
|
<text style="margin-bottom: 5rpx;">小计¥</text>
|
||||||
<text class="totalPriceNum"> {{listinfo.payAmount}} </text>
|
<text class="totalPriceNum"> {{listinfo.payAmount}} </text>
|
||||||
@@ -105,38 +106,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 充值免单 -->
|
||||||
|
<!-- <rechargeFree ref="rechargeFree" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree> -->
|
||||||
|
<!-- 充值活动 -->
|
||||||
|
<!-- <topUpActivity ref="topUpActivity" :shopUserInfo="amountVIP" ></topUpActivity> -->
|
||||||
<!-- 支付方式 -->
|
<!-- 支付方式 -->
|
||||||
<!-- <view class="paymentMethod" v-if="storeInfo.registerType == 'munchies'">
|
|
||||||
<view class="paymentMethod_content">
|
|
||||||
<view class="paymentMethod_title">支付方式</view>
|
|
||||||
<u-radio-group v-model="radiovalue" iconPlacement="right" @change="groupChange" :size="28"
|
|
||||||
placement="column">
|
|
||||||
<block v-for="(item,index) in paymentMethodList" :key="index">
|
|
||||||
<view class="method_list" @click="groupChange(index+1)">
|
|
||||||
<view class="method_list_top">
|
|
||||||
<view class="method_list_top_left">
|
|
||||||
<image class="icon" :src="item.url" mode="aspectFill"/>
|
|
||||||
<view class="method_list_top_cen">
|
|
||||||
<view class="name"> {{ item.name }} </view>
|
|
||||||
<view class="method_list_bom" v-if="item.type == 1">
|
|
||||||
<text class="balance">会员卡余额 ¥{{amountVIP?amountVIP.amount:0}}</text>
|
|
||||||
<text class="topUpNow" @click="goRecharge">去充值</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<u-radio activeColor="#E8AD7B" icon-size="36" size="36" :name="index+1">
|
|
||||||
</u-radio>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</u-radio-group>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<paymentMethod ref="paymentMethod" :amountVIP="amountVIP" v-if="storeInfo.registerType == 'munchies'" @groupChange="groupChange"></paymentMethod>
|
<paymentMethod ref="paymentMethod" :amountVIP="amountVIP" v-if="storeInfo.registerType == 'munchies'" @groupChange="groupChange"></paymentMethod>
|
||||||
|
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="bottom_left">
|
<view class="bottom_left">
|
||||||
<text style="margin-bottom: 5rpx;">实付金额</text>
|
<text style="margin-bottom: 5rpx;">实付金额</text>
|
||||||
@@ -173,10 +149,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navseat from '@/components/navseat.vue'
|
|
||||||
import webSocketUtils from '@/common/js/websocket.js'
|
import webSocketUtils from '@/common/js/websocket.js'
|
||||||
import payPasswordtwo from '@/components/payPasswordtwo.vue'
|
import payPasswordtwo from '@/components/payPasswordtwo.vue'
|
||||||
import paymentMethod from '../components/paymentMethod.vue'
|
import paymentMethod from '../components/paymentMethod.vue'
|
||||||
|
import rechargeFree from '../components/rechargeFree.vue'
|
||||||
|
import topUpActivity from '../components/topUpActivity.vue'
|
||||||
// import cwxKeyboard from '@/components/cwx-keyboard/cwx-keyboard.vue'
|
// import cwxKeyboard from '@/components/cwx-keyboard/cwx-keyboard.vue'
|
||||||
|
|
||||||
|
|
||||||
@@ -184,7 +161,8 @@
|
|||||||
components: {
|
components: {
|
||||||
payPasswordtwo,
|
payPasswordtwo,
|
||||||
paymentMethod,
|
paymentMethod,
|
||||||
navseat
|
rechargeFree,
|
||||||
|
topUpActivity,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -200,9 +178,12 @@
|
|||||||
sendType: "table",
|
sendType: "table",
|
||||||
eatModel: [],
|
eatModel: [],
|
||||||
favorable: [
|
favorable: [
|
||||||
{ name: "优惠券", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
|
// { name: "优惠券", type: "coupon", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
|
||||||
{ name: "团购优惠", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
|
// { name: "团购优惠", type: "group", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
|
||||||
|
// { name: "积分抵扣", type: "points", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png"},
|
||||||
],
|
],
|
||||||
|
isPointsChecked: false,
|
||||||
|
rechargeFreeChecked: false,
|
||||||
order: {
|
order: {
|
||||||
phone: "",
|
phone: "",
|
||||||
},
|
},
|
||||||
@@ -284,6 +265,14 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeFree ( val ) {
|
||||||
|
console.log(val)
|
||||||
|
if ( val ) {
|
||||||
|
this.listinfo.payAmount = this.listinfo.payAmount*2
|
||||||
|
} else {
|
||||||
|
this.listinfo.payAmount = this.listinfo.payAmount/2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取桌台码
|
* 获取桌台码
|
||||||
@@ -757,7 +746,7 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.container{
|
.container{
|
||||||
padding-bottom: 246rpx;
|
// padding-bottom: 246rpx;
|
||||||
}
|
}
|
||||||
.head{
|
.head{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1010,7 +999,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content_box{
|
.content_box{
|
||||||
padding: 0 30rpx;
|
padding: 0 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -1180,11 +1169,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 备注
|
||||||
.remark{
|
.remark{
|
||||||
padding: 0 30rpx;
|
padding: 0 20rpx;
|
||||||
box-sizing: border-box;
|
margin-top: 32rpx;
|
||||||
margin-top: 30rpx;
|
|
||||||
.remark_bg{
|
.remark_bg{
|
||||||
background-color: $uni-bg-color;
|
background-color: $uni-bg-color;
|
||||||
border-radius: 22rpx;
|
border-radius: 22rpx;
|
||||||
@@ -1209,68 +1197,10 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.paymentMethod{
|
|
||||||
padding: 0 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
|
|
||||||
.paymentMethod_content{
|
|
||||||
background-color: $uni-bg-color;
|
|
||||||
border-radius: 22rpx;
|
|
||||||
padding:30rpx 0 0 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
.paymentMethod_title{
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
// margin-bottom: 30rpx;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.method_list{
|
|
||||||
padding: 40rpx 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
.method_list_top{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
.method_list_top_left{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.icon{
|
|
||||||
width: 54.67rpx!important;
|
|
||||||
height: 48rpx!important;
|
|
||||||
margin-right: 22rpx;
|
|
||||||
}
|
|
||||||
.name{
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.method_list_top_cen{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.method_list_bom{
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.balance{
|
|
||||||
margin-right: 20rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
.topUpNow{
|
|
||||||
color: #FF803D;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.method_list:nth-child(odd){
|
|
||||||
border-bottom: 2rpx solid #ccc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom{
|
.bottom{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<view class="headStatus" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'||listinfo.status=='closed'">
|
<view class="headStatus" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'||listinfo.status=='closed'">
|
||||||
<view class="status">
|
<view class="status">
|
||||||
<u-icon name="checkmark-circle-fill" color="#03C061" size="46"></u-icon>
|
<u-icon name="checkmark-circle-fill" color="#03C061" size="46"></u-icon>
|
||||||
<view class="statusName" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">下单成功</view>
|
<view class="statusName" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">{{listinfo.registerType == 'munchies'?'待支付':'下单成功'}}</view>
|
||||||
<view class="statusName" v-if="listinfo.status=='closed'">已完成</view>
|
<view class="statusName" v-if="listinfo.status=='closed'">已完成</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="time" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">下单时间:{{listinfo.createdAt}}</view>
|
<view class="time" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">下单时间:{{ listinfo.createdAt }}</view>
|
||||||
<view class="time" v-if="listinfo.status=='closed'">付款时间:{{listinfo.paidTime}}</view>
|
<view class="time" v-if="listinfo.status=='closed'">付款时间:{{listinfo.paidTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -26,9 +26,12 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 先下单后支付 -->
|
||||||
<orderInfoAfter ref="orderInfoAfter" :listinfo="listinfo" v-if="listinfo.useType == 'dine-in-after'"></orderInfoAfter>
|
<orderInfoAfter ref="orderInfoAfter" :listinfo="listinfo" v-if="listinfo.useType == 'dine-in-after'"></orderInfoAfter>
|
||||||
|
<!-- 先支付后下单 -->
|
||||||
<orderInfoBefore ref="orderInfoBefore" :listinfo="listinfo" v-else></orderInfoBefore>
|
<orderInfoBefore ref="orderInfoBefore" :listinfo="listinfo" v-else></orderInfoBefore>
|
||||||
|
<!-- 积分兑换订单详情 -->
|
||||||
|
<!-- <orderInfoPoints ref="orderInfoPoints" :listinfo="listinfo" ></orderInfoPoints> -->
|
||||||
|
|
||||||
<paymentMethod ref="paymentMethod" v-if="amountVIP&&listinfo.status == 'unpaid' || listinfo.status == 'paying'" :amountVIP="amountVIP" @groupChange="groupChange"></paymentMethod>
|
<paymentMethod ref="paymentMethod" v-if="amountVIP&&listinfo.status == 'unpaid' || listinfo.status == 'paying'" :amountVIP="amountVIP" @groupChange="groupChange"></paymentMethod>
|
||||||
|
|
||||||
@@ -68,12 +71,14 @@
|
|||||||
import payPasswordtwo from '@/components/payPasswordtwo.vue'
|
import payPasswordtwo from '@/components/payPasswordtwo.vue'
|
||||||
import orderInfoAfter from '../components/orderInfoAfter.vue'
|
import orderInfoAfter from '../components/orderInfoAfter.vue'
|
||||||
import orderInfoBefore from '../components/orderInfoBefore.vue'
|
import orderInfoBefore from '../components/orderInfoBefore.vue'
|
||||||
|
import orderInfoPoints from '../components/orderInfoPoints.vue'
|
||||||
import paymentMethod from '../components/paymentMethod.vue'
|
import paymentMethod from '../components/paymentMethod.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
payPasswordtwo,
|
payPasswordtwo,
|
||||||
orderInfoAfter,
|
orderInfoAfter,
|
||||||
orderInfoBefore,
|
orderInfoBefore,
|
||||||
|
orderInfoPoints,
|
||||||
paymentMethod,
|
paymentMethod,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -377,7 +382,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 32rpx 28rpx 224rpx 28rpx;
|
padding: 32rpx 28rpx 32rpx 28rpx;
|
||||||
}
|
}
|
||||||
.headStatus{
|
.headStatus{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -137,11 +137,16 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
if (options.q) {
|
if (options.q) {
|
||||||
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
|
this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
|
||||||
this.queueId = this.getQueryString(decodeURIComponent(options.q), 'queueId')
|
this.queueId = this.getQueryString(decodeURIComponent(options.q), 'queueId')
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
|
if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
|
||||||
|
if (getApp().globalData.queueId) { this.queueId = getApp().globalData.queueId }
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getQueueUpState();
|
this.getQueueUpState();
|
||||||
|
|||||||
@@ -90,6 +90,7 @@
|
|||||||
* @param {Number} index
|
* @param {Number} index
|
||||||
*/
|
*/
|
||||||
onKeyList(item, index) {
|
onKeyList(item, index) {
|
||||||
|
console.log(item)
|
||||||
let KeyInfo = item;
|
let KeyInfo = item;
|
||||||
// 删除键
|
// 删除键
|
||||||
if (KeyInfo.keyCode === 8 && this.keyIndex > -1) {
|
if (KeyInfo.keyCode === 8 && this.keyIndex > -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user