shish 4 سال پیش
والد
کامیت
8d5eab5ce5
4فایلهای تغییر یافته به همراه153 افزوده شده و 19 حذف شده
  1. 4 0
      hdApp/src/api/shop/index.js
  2. 2 1
      hdApp/src/pages.json
  3. 34 18
      hdApp/src/pagesClient/official/apply.vue
  4. 113 0
      hdApp/src/pagesClient/official/toLogin.vue

+ 4 - 0
hdApp/src/api/shop/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 import https from '@/plugins/luch-request_0.0.7/request'
 
 
+export const checkShop = data => {
+	return https.get('/shop/check-shop', data)
+}
+
 export const addMtCloudPrint = data => {
 export const addMtCloudPrint = data => {
 	return https.get('/shop-ext/add-mt-print', data)
 	return https.get('/shop-ext/add-mt-print', data)
 }
 }

+ 2 - 1
hdApp/src/pages.json

@@ -108,7 +108,8 @@
 				{ "path": "official/callback", "style": { "navigationBarTitleText": "回调" } },
 				{ "path": "official/callback", "style": { "navigationBarTitleText": "回调" } },
 				{ "path": "official/latest-shop", "style": { "navigationBarTitleText": "最近访问" } },
 				{ "path": "official/latest-shop", "style": { "navigationBarTitleText": "最近访问" } },
 				{ "path": "official/result", "style": { "navigationBarTitleText": "结果" } },
 				{ "path": "official/result", "style": { "navigationBarTitleText": "结果" } },
-				{ "path": "official/warn", "style": { "navigationBarTitleText": "开启微信提醒" } }
+				{ "path": "official/warn", "style": { "navigationBarTitleText": "开启微信提醒" } },
+				{ "path": "official/toLogin", "style": { "navigationBarTitleText": "登录方式" } }
 			]
 			]
 		},
 		},
 		{
 		{

+ 34 - 18
hdApp/src/pagesClient/official/apply.vue

@@ -1,6 +1,25 @@
 <template>
 <template>
   <div class="app-content">
   <div class="app-content">
     <form @submit="formSubmit">
     <form @submit="formSubmit">
+
+      <view class="module-com">
+          <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title required">手机号</div>
+              <input v-model="form.mobile" type="number" placeholder-class="phcolor" @blur="checkShopFn"
+             placeholder-style="color:#CCCCCC" class="tui-input" name="mobile" placeholder="申请人手机号" />
+          </tui-list-cell>
+          <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title required">验证码</div>
+              <input v-model="form.authCode" type="number" style="width:330upx;" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="authCode" placeholder="请填写验证码" />
+              <button v-if="hasGet == false" class="admin-button-com blue middle" @click="requestAuthCode()">获取</button>
+              <button v-else class="admin-button-com default middle" >{{count}}</button>
+          </tui-list-cell>
+          <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title required">姓名</div>
+              <input v-model="form.adminName" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="adminName" placeholder="申请人姓名" />
+          </tui-list-cell>
+      </view>
+
       <view class="module-com">
       <view class="module-com">
         <tui-list-cell class="line-cell" :hover="false" >
         <tui-list-cell class="line-cell" :hover="false" >
           <div class="tui-title">花店名称</div>
           <div class="tui-title">花店名称</div>
@@ -22,24 +41,6 @@
         </tui-list-cell>
         </tui-list-cell>
       </view>
       </view>
 
 
-      <view class="module-com">
-          <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title required">姓名</div>
-              <input v-model="form.adminName" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="adminName" placeholder="申请人姓名" />
-          </tui-list-cell>
-          <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title required">手机号</div>
-              <input v-model="form.mobile" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile" placeholder="申请人手机号" />
-          </tui-list-cell>
-
-          <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title required">验证码</div>
-              <input v-model="form.authCode" type="number" style="width:330upx;" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="authCode" placeholder="请填写验证码" />
-              <button v-if="hasGet == false" class="admin-button-com blue middle" @click="requestAuthCode()">获取</button>
-              <button v-else class="admin-button-com default middle" >{{count}}</button>
-          </tui-list-cell>
-      </view>
-
       <view class="module-com">
       <view class="module-com">
         <view class="module-tit">
         <view class="module-tit">
           <span>门店照片</span>
           <span>门店照片</span>
@@ -106,6 +107,7 @@ import util from '@/utils/util';
 import { APIHOST } from '@/config'
 import { APIHOST } from '@/config'
 import { getShopInfo} from "@/utils/auth";
 import { getShopInfo} from "@/utils/auth";
 import { getDictionaries } from '@/api/mini'
 import { getDictionaries } from '@/api/mini'
+import { checkShop } from '@/api/shop'
 export default {
 export default {
   name: "apply-data",
   name: "apply-data",
   components: {
   components: {
@@ -186,6 +188,20 @@ export default {
 	},
 	},
   methods: {
   methods: {
     ...mapActions(['setUserShopAll']),
     ...mapActions(['setUserShopAll']),
+    checkShopFn(val){
+      // #ifdef MP-WEIXIN
+      let that = this
+      checkShop({mobile:val.detail.value}).then(res=>{
+          if(res.code == 1){
+            if(res.data.has == 1){
+                that.$util.confirmModal({content:'此手机号已开店(可能由批发商添加),您可直接登录',okText:'去登录'},() => {
+                  that.pageTo({url: '/pagesClient/official/toLogin'})
+                })
+            }
+          }
+      })
+      // #endif
+    },
 		goToService(){
 		goToService(){
 			plus.runtime.openURL('http://www.wixhb.com/main/hzg-register')
 			plus.runtime.openURL('http://www.wixhb.com/main/hzg-register')
 		},
 		},

+ 113 - 0
hdApp/src/pagesClient/official/toLogin.vue

@@ -0,0 +1,113 @@
+<template>
+	<view class="app-content">
+        <view class="list">
+            <view>
+                <view class="title" style="font-size:40upx;">登录方式说明:</view>
+            </view>
+            <view>
+                <view class="title">一、如果刚填的手机号【是】本微信手机号</view>
+            </view>
+            <view>
+                <view class="info">首先,点下面按钮返回首页</view>
+            </view>
+            <view>
+                <view class="book-button"><button @click="goHome" class="admin-button-com big blue">返回首页</button></view>
+            </view>
+            <view class="info">然后</view>
+            <view>
+                <image class="image" :src="img1" mode="widthFix"></image>
+            </view>
+            <view class="info">最后</view>
+            <view>
+                <image class="image" :src="img2" mode="widthFix"></image>
+            </view>
+            <view class="info">点这里采购花材</view>
+            <view>
+                <image class="image" :src="img3" mode="widthFix"></image>
+            </view>
+
+            <view style="margin-top:120upx;">
+                <view class="title">二、如果刚填的手机号【不是】本微信手机号</view>
+            </view>
+            <view>
+                <view class="info">请看视频,添加员工后可登录:</view>
+            </view>
+            <view>
+                <view class="video" @click="playVide"><video id="myVideo" :src="videoUrl" object-fit="contain" style="width:700upx;height:1100upx;"></video></view>
+            </view>
+        </view>
+	</view>
+</template>
+<script>
+import { IMGHOST } from '@/config'
+export default {
+	name: "toLogin",
+	components: {
+	},
+	mixins: [],
+	data() {
+		return {
+			bookList:[],
+			pageTitle:'',
+            videoUrl:'',
+            img1:'',
+            img2:'',
+            img3:''
+		};
+	},
+	onLoad() {
+        this.videoUrl = IMGHOST+"/video/staff.mp4"
+        this.img1 = IMGHOST+"/book/register/me.png"
+        this.img2 = IMGHOST+"/book/register/wx.png"
+        this.img3 = IMGHOST+"/book/register/cg.png"
+	},
+	computed:{
+	},
+	onShow() {
+	},
+	methods: {
+        goHome(){
+            this.pageTo({url: '/admin/home/workbench',type:3})
+        },
+		playVide(){
+			this.videoContext = uni.createVideoContext('myVideo',this)
+			this.videoContext.play()
+		},
+	},
+};
+</script>
+<style lang="scss" scoped>
+.app-content{
+	padding:20upx 20upx 60upx 20upx;
+    .title{
+		font-weight: bold;
+		font-size:32upx;
+		margin-bottom:22upx;
+	}
+	.smallTitle{
+		font-weight: bold;
+		font-size:30upx;
+		font-weight: bold;
+		margin:25upx 0 25upx 0;
+	}
+	.info{
+    	font-size:30upx;
+		margin-bottom:20upx;
+	}
+	.image{
+		width:60vw;
+		margin-bottom:20upx;
+	}
+	.video{
+		margin:0 auto;
+        text-align: center;
+		margin-bottom:10upx;
+	}
+	.book-button{
+		margin-bottom:15upx;
+	}
+	.go-back{
+		margin:0 auto;
+	}
+}
+</style>