lalala 6 лет назад
Родитель
Сommit
40a1e28a94

+ 3 - 3
mobile-code/src/App.vue

@@ -16,10 +16,10 @@ export default {
 		uni.setStorageSync('account', extConfig.account)
 		// #endif
 		// 开发
-		if (process.env.NODE_ENV == 'development') {
+		// if (process.env.NODE_ENV == 'development') {
 		// 	uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfMTI1NDM3NDUifQ.eyJpc3MiOiJodHRwczpcL1wvYXBpLmIuaHVhbWwuY29tIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5iLmh1YW1sLmNvbSIsImp0aSI6IjBfMTI1NDM3NDUiLCJpYXQiOjE1ODA3MTA1NjEsIm5iZiI6MTU4MDcxMDU2MSwiZXhwIjoxNTg5MzUwNTYxLCJ1bmlxdWVJZCI6IjEyNTQzNzQ1Iiwic291cmNlSWQiOjB9.kHrIKm0MUOnX8fCDjOXwd7wQ4jOSEV8gvwR4H4hn_hQ')
-			uni.setStorageSync('account', '12362')
-		}
+		uni.setStorageSync('account', '12362')
+		// }
 	},
 	onShow() {
 		// this.isLogin()

+ 2 - 2
mobile-code/src/admin/member/add.vue

@@ -4,11 +4,11 @@
 			<div class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">手机号</div>
-					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入" maxlength="50" type="phone" />
+					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入" maxlength="50" type="tel" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">确认手机号</div>
-					<input v-model="form.confirmMobile" placeholder-class="phcolor" class="tui-input" name="confirmMobile" placeholder="请输入" maxlength="50" type="phone" />
+					<input v-model="form.confirmMobile" placeholder-class="phcolor" class="tui-input" name="confirmMobile" placeholder="请输入" maxlength="50" type="tel" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">余额</div>

+ 1 - 1
mobile-code/src/api/pay/index.js

@@ -14,5 +14,5 @@ export const pay = data => {
  * 快捷下单-微信余额支付宝 m
  */
 export const fastPay = data => {
-	return https.post('/order/fast-pay', data)
+	return https.post('/order/fast-pay', data, {}, { hideError: true })
 }

+ 1 - 1
mobile-code/src/components/app-area-sel.vue

@@ -8,7 +8,7 @@
 				</div>
 				<!-- 搜索 -->
 				<div class="map-search">
-					<app-search-module placeholder="请输入你的收货地址" @search="searchFn" />
+					<app-search-module placeholder="请输入你的收货地址" @input="searchFn" />
 				</div>
 				<!-- 地图 -->
 				<!-- <div class="map-box">

+ 9 - 2
mobile-code/src/components/app-delivery.vue

@@ -9,7 +9,7 @@
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">电话</div>
-				<input v-model="form.receiveMobile" placeholder-class="phcolor" class="tui-input" name="receiveMobile" placeholder="请输入电话" type="phone" />
+				<input v-model="form.receiveMobile" placeholder-class="phcolor" class="tui-input" name="receiveMobile" placeholder="请输入电话" type="tel" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
 				<div class="tui-title">收花人城市</div>
@@ -39,7 +39,7 @@
 			</tui-list-cell>-->
 			<tui-list-cell class="line-cell" :hover="false">
 				<div class="tui-title">订花人电话</div>
-				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="bookMobile" placeholder="填了花送到了会通知您 (选填)" type="phone" />
+				<input v-model="form.bookMobile" placeholder-class="phcolor" class="tui-input" name="bookMobile" placeholder="填了花送到了会通知您 (选填)" type="tel" />
 			</tui-list-cell>
 			<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 				<div class="tui-title">送达时间</div>
@@ -137,10 +137,17 @@ export default {
 	},
 	watch: {
 		orderShop(val) {
+			console.log('val', val)
 			this.form.receiveProvince = val.shop.shopProvince ? val.shop.shopProvince : ''
 			this.form.receiveCity = val.shop.shopCity ? val.shop.shopCity : ''
 		}
 	},
+	mounted() {
+		if (!this.$util.isEmpty(this.orderShop)) {
+			this.form.receiveProvince = this.orderShop.shop.shopProvince ? this.orderShop.shop.shopProvince : ''
+			this.form.receiveCity = this.orderShop.shop.shopCity ? this.orderShop.shop.shopCity : ''
+		}
+	},
 	methods: {
 		selTimeFn(e) {
 			this.form.reachTime = e.detail.value

+ 9 - 3
mobile-code/src/components/module/app-search.vue

@@ -5,13 +5,13 @@
 				<i class="iconfont" :class="[icon]"></i>
 			</div>
 			<div class="input-wrap">
-				<input type="text" v-model="search" :style="{fontSize: fontSize + 'rpx'}" :placeholder="placeholder" placeholder-class="placeholder" />
+				<input type="text" v-model="search" @input="inputFn" :style="{fontSize: fontSize + 'rpx'}" :placeholder="placeholder" placeholder-class="placeholder" />
 			</div>
 		</div>
-        <!-- <block v-if="isBtn"> -->
+        <block v-if="isBtn">
             <button v-if="isTextBtn" class="search-btn" :style="{fontSize: fontSize + 'rpx'}" @click="searchFn">{{ btnText }}</button>
 		    <button v-else class="search-btn admin-button-com middle blue" :style="{fontSize: fontSize + 'rpx'}" @click="searchFn">{{ btnText }}</button>
-        <!-- </block> -->
+        </block>
 	</div>
 </template>
 
@@ -72,6 +72,12 @@ export default {
 	methods: {
 		searchFn() {
 			this.$emit('search', this.search)
+		},
+		inputFn(e) {
+			// console.log('sdfa', e)
+			setTimeout(() => {
+				this.$emit('input', this.search)
+			})
 		}
 	}
 }

+ 1 - 1
mobile-code/src/official/apply.vue

@@ -25,7 +25,7 @@
 			<div class="module-com">
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">手机号</div>
-					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入" type="phone" />
+					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入" type="tel" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell code-wrap" :hover="false">
 					<div class="tui-title">验证码</div>

+ 2 - 2
mobile-code/src/pages/member/add.vue

@@ -4,11 +4,11 @@
 			<div class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">手机号</div>
-					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入" maxlength="50" type="phone" />
+					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入" maxlength="50" type="tel" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">确认手机号</div>
-					<input v-model="form.confirmMobile" placeholder-class="phcolor" class="tui-input" name="confirmMobile" placeholder="请输入" maxlength="50" type="phone" />
+					<input v-model="form.confirmMobile" placeholder-class="phcolor" class="tui-input" name="confirmMobile" placeholder="请输入" maxlength="50" type="tel" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title required">余额</div>

+ 1 - 1
mobile-code/src/pages/order/buy.vue

@@ -17,7 +17,7 @@
 					</tui-list-cell>-->
 					<tui-list-cell class="line-cell" :hover="false">
 						<div class="tui-title">手机号</div>
-						<input v-model="mentionForm.bookMobile" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入手机号" type="phone" />
+						<input v-model="mentionForm.bookMobile" placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入手机号" type="tel" />
 					</tui-list-cell>
 				</div>
 			</block>

+ 33 - 10
mobile-code/src/pages/pay/index.vue

@@ -17,7 +17,7 @@
 				</div>
 				<div class="pay-input-wrap">
 					<pay-input-module :focus="inpFocus" :num="amount" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
-					<div class="balance" v-if="!$util.isEmpty(shopUser)">
+					<div class="balance" v-if="!$util.isEmpty(shopUser) && shopUser.userAsset.balance != '0.00'">
 						<span>账户余额 ¥</span>
 						<span class="app-size-30">{{ shopUser.userAsset.balance }}</span>
 					</div>
@@ -41,7 +41,7 @@
 				</div>
 				<div class="module-com pay-input-wrap">
 					<pay-input-module :focus="inpFocus" :num="amount" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
-					<div class="balance" v-if="!$util.isEmpty(shopUser)">
+					<div class="balance" v-if="!$util.isEmpty(shopUser) && shopUser.userAsset.balance != '0.00'">
 						<span>账户余额 ¥</span>
 						<span class="app-size-30">{{ shopUser.userAsset.balance }}</span>
 					</div>
@@ -63,8 +63,8 @@
 				<!-- 按钮 -->
 				<div class="btn-wrap">
 					<button v-if="!$util.isEmpty(shopUser) && shopUser.userAsset.balance && shopUser.userAsset.balance != '0.00'" class="button-com red" @click="balancePayFn">余额支付</button>
-						<button class="button-com green" v-if="isWxBrowser()" @click="wexinPayFn">微信支付</button>
-						<button class="button-com red" v-else @click="aliPayFn">支付宝支付</button>
+					<button class="button-com green" v-if="isWxBrowser()" @click="wexinPayFn">微信支付</button>
+					<button class="button-com red" v-else @click="aliPayFn">支付宝支付</button>
 				</div>
 			</div>
 		</block>
@@ -82,6 +82,8 @@
 				</div>
 			</template>
 		</modal-module>
+		<!-- 阿里支付 -->
+		<div class="al-pay" v-html="aliPayHtml" ref="alipayWap"></div>
 	</div>
 </template>
 
@@ -130,6 +132,7 @@ export default {
 				payWay: 0 // 0微信 1支付宝 2余额
 			},
 			// 支付相关 ============
+			aliPayHtml: '',
 			passwordModal: false,
 			modalForm: {
 				payPassword: ''
@@ -157,6 +160,9 @@ export default {
 		// }
 		this.specialInit()
 	},
+	mounted() {
+		this.inpFocus = true
+	},
 	methods: {
 		isWxBrowser: isWxBrowser,
 		specialInit() {
@@ -183,18 +189,34 @@ export default {
 				host = recharge
 			} else {
 				params = {
-					needSend: this.tabIndex == 0 ? '1' : '0',
-					prePrice: this.amount
+					needSend: this.tabIndex == 0 ? '0' : '1',
+					prePrice: this.amount,
+					payWay: this.form.payWay
 					// sourceType: 1,
 					// shopId: 15680
 				}
+				if (this.tabIndex == 1) {
+					let deliveryForm = this.$refs.appDelivery.form ? this.$refs.appDelivery.form : {}
+					let deliveryRegion = this.$refs.appDelivery.region ? this.$refs.appDelivery.region : {}
+					params = {
+						...params,
+						...deliveryForm,
+						...deliveryRegion
+					}
+				}
 				host = fastPay
 			}
 			host(params).then(res => {
 				if (this.form.payWay == 0) {
 					wexinPay(res.data, this.paySuccess, this.payFail)
-				} else {
-					location.href = res.data
+				} else if (this.form.payWay == 1) {
+					console.log('res', res)
+					return false
+					this.aliPayHtml = res
+					this.$nextTick(() => {
+						this.$refs.alipayWap.children[0].submit()
+					})
+					// location.href = res.data
 				}
 				// window.location.href = res.data.pay_button.mweb_url
 			})
@@ -202,6 +224,7 @@ export default {
 		// tab切换
 		tabChange(e) {
 			this.tabIndex = e.index
+			this.inpFocus = true
 		},
 		// 点击输入框
 		focusFn() {
@@ -340,8 +363,8 @@ export default {
 			}
 		}
 		.shop-logo-wrap {
-			padding: 0 0 20px 30px;
-			@include disFlex(center, flex-start);
+			padding-bottom: 20px;
+			@include disFlex(center, center);
 			.logo-img {
 				width: 80px;
 				border-radius: 50%;

+ 1 - 1
mobile-code/src/pages/user/register.vue

@@ -4,7 +4,7 @@
 			<div class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">手机号</div>
-					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入手机号" type="phone" />
+					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入手机号" type="tel" />
 				</tui-list-cell>
 				<tui-list-cell class="line-cell code-wrap" :hover="false">
 					<div class="tui-title">验证码</div>