liujd 6 ani în urmă
părinte
comite
c2b7c63fa4

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

@@ -23,5 +23,5 @@ export const getFestList = param => https.get('/fest/list', param)
 // 商家的门店 m
 export const getShop = param => https.get('/shop/detail', param)
 
-// 商家的门店 m
+// 获取验证码 m
 export const sendSms = param => https.get('/inform-user/send-sms', param)

+ 13 - 0
mobile-code/src/api/official/index.js

@@ -34,3 +34,16 @@ export const merchantDet = data => {
 export const applyRegister = data => {
 	return https.get('/apply/register', data)
 }
+
+// 获取验证码 w
+export const sendSmsW = param => https.get('/inform-user/send-sms', param)
+
+// 地区和腾讯KEY w
+export const regionTreeW = param => https.get('/region/tree', param)
+
+/** *
+ * 登陆客户的帐号信息(到期时间) w
+ */
+export const accountDet = data => {
+	return https.get('/merchant/login-account', data)
+}

+ 1 - 1
mobile-code/src/components/app-wrapper-empty.vue

@@ -4,7 +4,7 @@
 			<slot v-if="!isEmpty" name="empty_body" />
 			<slot v-if="isEmpty && !isLoading" name="empty_content">
 				<!-- :style="`width:${pictureWidth};`" -->
-				<div class="app-empty__img" :style="`width:${pictureWidth};`">
+				<div class="app-empty__img" :style="{width: pictureWidth}">
 					<img :src="src" mode="widthFix" />
 				</div>
 				<div class="app-empty__title">

+ 9 - 8
mobile-code/src/official/apply.vue

@@ -52,21 +52,19 @@
 			<!-- 选择地区 -->
 			<!-- <app-area-sel :show="showRegion" @hide="hideAreaSel" @change="changeAreaFn" /> -->
 			<!-- 省市联动 -->
-			<simple-address ref="simpleAddress" :region="orderShop.region" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
+			<simple-address ref="simpleAddress" :region="regionData" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
 		</form>
 	</div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
 import TuiListCell from '@/components/plugin/list-cell'
 // import AppAreaSel from '@/components/app-area-sel'
 import SimpleAddress from '@/components/plugin/simple-address'
 import AppAvatarModule from '@/components/module/app-avatar'
 const form = require('@/utils/formValidation.js')
 // api
-import { sendSms } from '@/api/common'
-import { merchantDet, applyRegister } from '@/api/official'
+import { merchantDet, applyRegister, sendSms, regionTreeW } from '@/api/official'
 import { getShopUser } from '@/utils/auth'
 export default {
 	name: 'apply-data',
@@ -93,6 +91,7 @@ export default {
 				// oldId: ''
 			},
 			// 省市联动
+			regionData: [],
 			cityPickerValueDefault: [0, 0],
 			// 验证码
 			isSend: 0,
@@ -108,15 +107,18 @@ export default {
 		}
 		this.init()
 	},
-	computed: {
-		...mapGetters({ orderShop: 'getOrderShop' })
-	},
 	methods: {
 		init() {
 			let id = this.option.merchantId
 			if (id) {
 				this._getMerchantDet()
 			}
+			this._regionTree()
+		},
+		_regionTree() {
+			regionTreeW().then(res => {
+				this.regionData = res.data.tree
+			})
 		},
 		_getMerchantDet() {
 			merchantDet({ id: this.option.merchantId }).then(res => {
@@ -141,7 +143,6 @@ export default {
 		},
 		// 验证码
 		getCode() {
-			alert(this.form.mobile)
 			if (!this.form.mobile || !this.$util.checkMobile(this.form.mobile)) {
 				this.$msg('请输入正确的手机号!')
 				return false

+ 65 - 6
mobile-code/src/official/callback.vue

@@ -32,10 +32,16 @@
 					<!-- prompt-wrap -->
 					<div class="prompt-wrap">
 						<block v-if="pageStatus == 1">
-							<div class="prompt-tit">恭喜您, 续订成功!</div>
+							<div class="prompt-tit" style="color: #09bb07">恭喜您, 续订成功!</div>
 							<div>
 								<span class="app-color-2">你的帐号有效期已延长至:</span>
-								<span>2020-11-05 23:09</span>
+								<span>{{ data.deadline | formatTime('YYYY-MM-DD hh:mm:ss') }}</span>
+							</div>
+						</block>
+						<block v-if="pageStatus == 2">
+							<div class="prompt-tit">申请已提交</div>
+							<div>
+								<span class="app-color-2">审核大约需要一个工作日,请耐心等候</span>
 							</div>
 						</block>
 					</div>
@@ -51,10 +57,10 @@
 				<!-- button -->
 				<div class="button-wrap">
 					<block v-if="pageStatus == 1 || pageStatus == 7">
-						<button class="admin-button-com big blue">{{ btnText }}</button>
+						<button class="admin-button-com big blue" @click="jumpPage">{{ btnText }}</button>
 					</block>
 					<block v-else>
-						<button class="admin-button-com big default">{{ btnText }}</button>
+						<button class="admin-button-com big default" @click="jumpPage">{{ btnText }}</button>
 					</block>
 				</div>
 			</div>
@@ -74,11 +80,14 @@
 	 * @parmas 6 授权成功 - 扫码支付 -- successPayCode
 	 * @parmas 7 授权提示 - 扫码支付 -- successPayCode
 	 */
+import { accountDet, applyStatus } from '@/api/official'
+import { getShopUser } from '@/utils/auth'
 export default {
 	name: 'callback',
 	data() {
 		return {
-			pageStatus: 7,
+			data: {},
+			pageStatus: '2',
 			promptData: [
 				'确认你已经有公众号(服务号),并且已认证和申请微 信支付',
 				'满足以上条件,可以点下方按钮开始授权。',
@@ -117,6 +126,57 @@ export default {
 			}
 			return text
 		}
+	},
+	onLoad() {
+		let token = uni.getStorageSync('token')
+		if (!token) {
+			getShopUser()
+			return false
+		}
+	},
+	mounted() {
+		// this.pageStatus = this.option.pageStatus
+		// this.init()
+	},
+	methods: {
+		init() {
+			this._getStatus()
+			if (this.pageStatus == 1 || this.pageStatus == 5) {
+				this._accountDet()
+			}
+		},
+		// 获取状态
+		_getStatus() {
+			applyStatus().then(res => {
+				let status = res.data.status
+				if (status == 1) {
+					this.pageStatus = 2
+				}
+			})
+		},
+		// 获取用户信息
+		_accountDet() {
+			accountDet().then(res => {
+				this.data = res.data
+			})
+		},
+		jumpPage() {
+			if (this.btnText == '返回首页') {
+				this.$util.pageTo({
+					url: '/official/index',
+					query: {
+						id: this.option.id
+					}
+				})
+			} else if (this.btnText == '返回管理中心') {
+				this.$util.pageTo({
+					url: '/official/index',
+					query: {
+						id: this.option.id
+					}
+				})
+			}
+		}
 	}
 }
 </script>
@@ -177,7 +237,6 @@ export default {
 		.prompt-wrap {
 			margin-top: 60px;
 			.prompt-tit {
-				color: #09bb07;
 				font-size: 36px;
 				margin-bottom: 10px;
 			}