|
@@ -115,7 +115,7 @@
|
|
|
<uni-popup-dialog v-model="headValue" mode="input" title="输入条码" placeholder="请输入条码"
|
|
<uni-popup-dialog v-model="headValue" mode="input" title="输入条码" placeholder="请输入条码"
|
|
|
@confirm="dialogInputConfirm"></uni-popup-dialog>
|
|
@confirm="dialogInputConfirm"></uni-popup-dialog>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 选择会员登录方式 -->
|
|
<!-- 选择会员登录方式 -->
|
|
|
<uni-popup ref="memberType" type="center" :mask-click="false">
|
|
<uni-popup ref="memberType" type="center" :mask-click="false">
|
|
|
<view class="member-type-box">
|
|
<view class="member-type-box">
|
|
@@ -135,7 +135,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 会员输入手机号 -->
|
|
<!-- 会员输入手机号 -->
|
|
|
<uni-popup ref="inputPhone" type="bottom" :mask-click="false">
|
|
<uni-popup ref="inputPhone" type="bottom" :mask-click="false">
|
|
|
<view class="flex-common-css member-pop-view">
|
|
<view class="flex-common-css member-pop-view">
|
|
@@ -158,7 +158,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 会员扫码 -->
|
|
<!-- 会员扫码 -->
|
|
|
<uni-popup ref="inputMember" type="bottom" :mask-click="false">
|
|
<uni-popup ref="inputMember" type="bottom" :mask-click="false">
|
|
|
<view class="flex-common-css member-pop-view">
|
|
<view class="flex-common-css member-pop-view">
|
|
@@ -219,9 +219,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {
|
|
|
|
|
- projectDiscount, projectWriteDiscount
|
|
|
|
|
-} from '@/api/project.js';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ projectDiscount
|
|
|
|
|
+ } from '@/api/project.js';
|
|
|
|
|
|
|
|
import keyboardListener from 'uniapp-keyboard-listener';
|
|
import keyboardListener from 'uniapp-keyboard-listener';
|
|
|
import {
|
|
import {
|
|
@@ -260,7 +260,7 @@ import {
|
|
|
isAJAX: false,
|
|
isAJAX: false,
|
|
|
headValue: '', //手动输入的值
|
|
headValue: '', //手动输入的值
|
|
|
shop_id: '',
|
|
shop_id: '',
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
phone:'',
|
|
phone:'',
|
|
|
numList:[1,2,3,4,5,6,7,8,9],
|
|
numList:[1,2,3,4,5,6,7,8,9],
|
|
|
};
|
|
};
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
let num3 = (((num1*num2*10000)/100).toFixed(0)/100).toFixed(2)
|
|
let num3 = (((num1*num2*10000)/100).toFixed(0)/100).toFixed(2)
|
|
|
return num3
|
|
return num3
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
monitorKeyboard(e) {
|
|
monitorKeyboard(e) {
|
|
|
if (e.key.length == 1) { // 字母和数字的长度都是1,所以只要字母和数字的按键,适配不同的设备
|
|
if (e.key.length == 1) { // 字母和数字的长度都是1,所以只要字母和数字的按键,适配不同的设备
|
|
|
this.keyArr.push(e.key)
|
|
this.keyArr.push(e.key)
|
|
@@ -317,7 +317,6 @@ import {
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code == 1) {
|
|
if (res.code == 1) {
|
|
|
this.isAJAX = false;
|
|
this.isAJAX = false;
|
|
|
- this.phone = "";
|
|
|
|
|
this.member_id = res.data.member_id;
|
|
this.member_id = res.data.member_id;
|
|
|
this.discount = res.data.discount * 1 / 10;
|
|
this.discount = res.data.discount * 1 / 10;
|
|
|
this.isMemeber = false;
|
|
this.isMemeber = false;
|
|
@@ -351,7 +350,7 @@ import {
|
|
|
if (res.code == 1) {
|
|
if (res.code == 1) {
|
|
|
this.payFLag = true;
|
|
this.payFLag = true;
|
|
|
this.isAJAX = false;
|
|
this.isAJAX = false;
|
|
|
- this.upData()
|
|
|
|
|
|
|
+
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/success?money=' + this.totalPrice +
|
|
url: '/pages/index/success?money=' + this.totalPrice +
|
|
|
"&discount=" + this.discount + '&invite_code=' + this
|
|
"&discount=" + this.discount + '&invite_code=' + this
|
|
@@ -367,12 +366,7 @@ import {
|
|
|
this.keyArr = [];
|
|
this.keyArr = [];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- upData(){
|
|
|
|
|
- this.shop_id = uni.getStorageSync('shop_id')
|
|
|
|
|
- if(this.shop_id == 299){
|
|
|
|
|
- projectWriteDiscount({order_money:this.money,invite_code:this.invite_code,discount:this.discount,phone:this.phone}).then((res)=>{})
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
// 获取商品
|
|
// 获取商品
|
|
|
getGoods() {
|
|
getGoods() {
|
|
|
GoodsInfo({
|
|
GoodsInfo({
|
|
@@ -424,7 +418,7 @@ import {
|
|
|
this.totalNum -= 1;
|
|
this.totalNum -= 1;
|
|
|
this.totalPrice = (this.totalPrice * 1 - (this.goodsList[i].price * 1)).toFixed(2);
|
|
this.totalPrice = (this.totalPrice * 1 - (this.goodsList[i].price * 1)).toFixed(2);
|
|
|
},
|
|
},
|
|
|
- // 添加
|
|
|
|
|
|
|
+ // 添加
|
|
|
add(i) {
|
|
add(i) {
|
|
|
this.goodsList[i].num += 1
|
|
this.goodsList[i].num += 1
|
|
|
this.totalNum += 1;
|
|
this.totalNum += 1;
|
|
@@ -489,12 +483,12 @@ import {
|
|
|
|
|
|
|
|
// 选择会员登录方式
|
|
// 选择会员登录方式
|
|
|
openMenber() {
|
|
openMenber() {
|
|
|
- this.$refs.memberType.open();
|
|
|
|
|
|
|
+ this.$refs.memberType.open();
|
|
|
},
|
|
},
|
|
|
closeMemberTypePop(){
|
|
closeMemberTypePop(){
|
|
|
this.$refs.memberType.close();
|
|
this.$refs.memberType.close();
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 扫码登录会员
|
|
// 扫码登录会员
|
|
|
openPOP(){
|
|
openPOP(){
|
|
|
this.isMemeber = true;
|
|
this.isMemeber = true;
|
|
@@ -505,7 +499,7 @@ import {
|
|
|
this.isMemeber = false;
|
|
this.isMemeber = false;
|
|
|
this.$refs.inputMember.close();
|
|
this.$refs.inputMember.close();
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 手机号登录会员
|
|
// 手机号登录会员
|
|
|
openPhone(){
|
|
openPhone(){
|
|
|
this.$refs.memberType.close();
|
|
this.$refs.memberType.close();
|
|
@@ -529,13 +523,13 @@ import {
|
|
|
if (this.isAJAX) {
|
|
if (this.isAJAX) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- this.isAJAX = true;
|
|
|
|
|
|
|
+ this.isAJAX = true;
|
|
|
projectDiscount({
|
|
projectDiscount({
|
|
|
phone: this.phone
|
|
phone: this.phone
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.isAJAX = false;
|
|
this.isAJAX = false;
|
|
|
if (res.code == 1) {
|
|
if (res.code == 1) {
|
|
|
- // this.phone = '';
|
|
|
|
|
|
|
+ this.phone = '';
|
|
|
this.member_id = res.data.member_id;
|
|
this.member_id = res.data.member_id;
|
|
|
this.discount = res.data.discount * 1 / 10;
|
|
this.discount = res.data.discount * 1 / 10;
|
|
|
this.$refs.inputPhone.close();
|
|
this.$refs.inputPhone.close();
|
|
@@ -577,7 +571,7 @@ import {
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.member-type-box-title{
|
|
.member-type-box-title{
|
|
|
position: relative;
|
|
position: relative;
|
|
|
image{
|
|
image{
|
|
@@ -595,7 +589,7 @@ import {
|
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
padding: 24rpx;
|
|
padding: 24rpx;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.member-type-box-icon{
|
|
.member-type-box-icon{
|
|
|
image{
|
|
image{
|
|
|
width: 100rpx;
|
|
width: 100rpx;
|
|
@@ -604,12 +598,12 @@ import {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.member-pop-view {
|
|
.member-pop-view {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100vh;
|
|
height: 100vh;
|
|
|
background: #939394;
|
|
background: #939394;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.member-pop-phone-1{
|
|
.member-pop-phone-1{
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
@@ -621,7 +615,7 @@ import {
|
|
|
padding: 38rpx;
|
|
padding: 38rpx;
|
|
|
border-radius: 20rpx 20rpx 0 0;
|
|
border-radius: 20rpx 20rpx 0 0;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
.member-pop-view-1 {
|
|
.member-pop-view-1 {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -852,4 +846,4 @@ import {
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|