zpj 1 gadu atpakaļ
vecāks
revīzija
85a80598f7
1 mainītis faili ar 22 papildinājumiem un 28 dzēšanām
  1. 22 28
      pages/index/order.vue

+ 22 - 28
pages/index/order.vue

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