lhl 1 year ago
parent
commit
1d66991989
2 changed files with 22 additions and 10 deletions
  1. 21 9
      pages/goods/three/index.vue
  2. 1 1
      pages/goods/three/order.vue

+ 21 - 9
pages/goods/three/index.vue

@@ -32,6 +32,13 @@
 				</view>
 				<input type="text" placeholder="请输入户主姓名" class="name-inp" v-model="userName"/>
 			</view>
+			<!-- 户号 -->
+			<view class="search-box sf-wrap flex">
+				<view class="">
+					户号
+				</view>
+				<input type="text" placeholder="请输入户号" class="name-inp" v-model="rechargeno"/>
+			</view>
 		</template>
 		
 		<view class='search-box sf-wrap flex'>
@@ -105,7 +112,7 @@
 				</view>
 			</view>
 		</uni-popup>
-		<payment v-if="totalPrice" :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="totalPrice"
+		<payment  :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="totalPrice"
 			@changePayType="changePayType" @onChangeFun="onChangeFun"></payment>
 	</view>
 
@@ -131,15 +138,17 @@
 		},
 		data() {
 			return {
+				rechargeno: '',
 				toPay: false,
 				paying: false,
 				navList: [{
-						name: '话费充',
+						name: '话费充',
 						ctype: 0
-					}, {
-						name: '话费快充',
-						ctype: 1
 					},
+					// {
+					// 	name: '话费快充',
+					// 	ctype: 1
+					// },
 					{
 						name: '电费充值',
 						ctype: 2
@@ -222,7 +231,7 @@
 			computedPrice() {
 				computedCz({
 					integral: this.useIntegral ? 1: 0,
-					num: this.choose.num,
+					price: this.choose.price,
 					uid: this.userInfo.uid
 				}).then(res => {
 					this.priceInfo = res.data
@@ -343,9 +352,8 @@
 						store_id: 0,
 						user_phone: this.phone,
 						real_name: this.userName,
-						deduction_price: this.priceInfo.deduction_price,
-						deduction_integral: this.priceInfo.deduction_integral,
-						deduction_price: this.priceInfo.deduction_price,
+						deduction_price: this.priceInfo.deductionPrice,
+						deduction_integral: this.priceInfo.usedIntegral,
 						cid: this.choose.cid,
 						goods_name: this.choose.goods_name,
 						type: this.ctype,
@@ -356,6 +364,9 @@
 						'from': this.$wechat.isWeixin() ? 'weixin' : 'weixinh5',
 						// #endif
 					}
+					if(this.ctype == 2) {
+						qdata.rechargeno = this.rechargeno
+					}
 					if(that.paying) {
 						return
 					}
@@ -363,6 +374,7 @@
 					createCz(qdata).then(res => {
 						setTimeout(()=> {
 							that.paying = false
+							that.getUserInfo()
 						},2500)
 						let status = res.data.status,
 							// orderId = res.data.result.order_id,

+ 1 - 1
pages/goods/three/order.vue

@@ -5,7 +5,7 @@
 				名称:{{item.goods_name}}
 			</view>
 			<view class="tit">
-				支付方式:{{item.pay_type == 'yue'?'余额': (item.pay_type == 'weixin'?'微信':'支付宝')}}{{item.pay_type}}
+				支付方式:{{item.pay_type == 'yue'?'余额': (item.pay_type == 'weixin'?'微信':'支付宝')}}
 			</view>
 			<view class="tit">
 				充值号码:{{item.rechargeno}}