shish 4 tahun lalu
induk
melakukan
c1a3ed3c35

+ 1 - 1
ghsApp/src/admin/book/index.vue

@@ -38,7 +38,7 @@ export default {
     },
   	onShareAppMessage(res) {
 		return {
-			title: '销花宝使用手册',
+			title: '销花宝使用教程',
 			desc: "图文视频教学,带您快速上手",
 			imgUrl: `${this.$constant.imgUrl}/logo.png`,
 			path: "admin/book/index",

+ 1 - 1
ghsApp/src/admin/home/me.vue

@@ -76,7 +76,7 @@
             </tui-list-cell>
 
             <tui-list-cell @click="pageTo({ url: '/admin/book/index' })" class="line-cell" :hover="false" :arrow="true">
-              <div class="tui-title">使用手册</div>
+              <div class="tui-title">使用教程</div>
             </tui-list-cell>
 
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/cashSet' })" class="line-cell" :hover="false" :arrow="true" >

+ 17 - 23
ghsApp/src/admin/home/workbench.vue

@@ -58,7 +58,7 @@
 				<image @click="customKd()" :src="isScanEnv ? pfSrc3 : pfSrc" mode="widthFix" ></image>				
 			</view>
 			
-			<!-- 使用手册 -->
+			<!-- 使用教程 -->
 			<view v-if="loginInfo.showBook == 1" style="text-align:center;position:relative;padding:0 22upx;" @click="pageTo({ url: '/admin/book/index'})">
 				<view @click.stop="closeBook" style="position:absolute;right:30upx;top:10upx;z-index:9999;"><image style="width:38upx;" :src="`${constant.imgUrl}/book/close1.png`" mode="widthFix"></image></view>
 				<image style="border:4upx solid #DDDDDD;margin:0 auto;border-radius:15upx;" :src="`${constant.imgUrl}/book/book5.png`" mode="widthFix"></image>
@@ -190,7 +190,7 @@ export default {
 		//PDA扫码开单前准备好所有花材
 		allProduct().then(res=>{
 			this.allProduct = res.data.list
-			console.log('................载入最新花材和库存................')
+			console.log('................载入最新花材................')
 		})
 		// #endif
 	},
@@ -198,31 +198,20 @@ export default {
 		...mapActions(['setUserShopAll']),
 		mobileLogin(){
 			let that = this
+			uni.showLoading({mask:true})
 			uni.preLogin({
 				provider: 'univerify',
 				success:()=>{
 					uni.login({
 						provider: 'univerify',
-						univerifyStyle: { // 自定义登录框样式
-						},
+						// 自定义登录框样式
+						univerifyStyle: {"fullScreen": true},
 						success:(res)=>{ // 登录成功
 							let openid = res.authResult.openid
 							let access_token = res.authResult.access_token
 							phoneLogin({openid,access_token}).then(subRes=>{
-
 								let currentShopId = subRes.data.admin.currentShopId || 0
-								if(Number(currentShopId) <= 0){
-									//没店
-									let openShop = subRes.data.admin.openShop || 1
-									if(openShop == 1){
-										//没店没申请
-									}
-									if(openShop == 2){
-										//没店已申请
-									}
-								}else{
-									//有店
-
+								if(Number(currentShopId) > 0){
 									//有几个地方涉及登陆,需要统一方法,请搜索关键词 uni_login
 									if(subRes.code == 1){
 										if (that.$util.isEmpty(subRes)) {
@@ -252,7 +241,7 @@ export default {
 
 										that.setUserShopAll()
 										that.init()
-										uni.hideLoading()
+
 										// #ifdef APP-PLUS
 										//保存安卓的clientId
 										let hasClientId = !that.$util.isEmpty(subRes.data.admin.clientId) ? subRes.data.admin.clientId : ''
@@ -263,16 +252,21 @@ export default {
 										}
 										// #endif
 									}
-
-
+									uni.hideLoading()
+								}else{
+									that.$msg('您还没有注册')
 								}
 							})
 						},
-						fail(res){  // 登录失败
-							uni.closeAuthView()//关闭一键登录弹出窗口
+						fail(res){  
+							// 登录失败
+							//关闭一键登录弹出窗口
+							uni.closeAuthView()
+							uni.hideLoading()
 						},
 						complete: () => {
 							uni.closeAuthView()
+							uni.hideLoading()
 						}
 					})
 				},
@@ -334,7 +328,7 @@ export default {
 		},
 		closeBook(){
 			let that = this
-			that.$util.confirmModal({title:"确定关闭?",content:'关闭后可以在底部菜单【我的】,找到【使用手册】重新打开'},() => {
+			that.$util.confirmModal({title:"确定关闭?",content:'关闭后可以在底部菜单【我的】,找到【使用教程】重新打开'},() => {
 				closeBook().then((res) => {
 					//有多处相似地方,请全项目搜索about_store_clear
 					// #ifdef MP-WEIXIN

+ 6 - 1
ghsApp/src/api/apply/index.js

@@ -11,6 +11,11 @@ export const applyInviteHdPoster = name => {
  * 邀请供应商(零售、供应商相同)
  * @param {*} name
  */
- export const applyInviteGhsPoster = name => {
+export const applyInviteGhsPoster = name => {
 	return https.get("/apply/invite-ghs-poster", { name });
+};
+
+//获取验证码
+export const getAuthCode = data => {
+	return https.get("/apply/get-auth-code", data);
 };

+ 1 - 1
ghsApp/src/components/app-area-sel-bak.vue

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

+ 1 - 1
ghsApp/src/components/app-area-sel.vue

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

+ 4 - 0
ghsApp/src/components/login-model.vue

@@ -20,6 +20,10 @@
           <button class="admin-button-com small blue buttonText" @click="mobileLogin">本机号码一键登录</button>
         </view>
 
+        <view style="margin-top:60upx;color:#999999;width:88%;font-size:30upx;">
+          <text style="float:right;" @click="pageTo({ url: '/pagesClient/official/apply'})">注册帐号</text><text style="float:right;margin-right:80upx;" @click="pageTo({ url: '/admin/book/index'})">使用教程</text>
+        </view>
+
       </view>
     </view>
   </view>

+ 1 - 7
ghsApp/src/components/plugin/simple-address.vue

@@ -51,14 +51,8 @@
 
 	</view>
 </template>
-
 <script>
-// import provinceData from './city-data/province.js'
-// import cityData from './city-data/city.js'
-// import areaData from './city-data/area.js'
-import {
-  regionTree
-} from "@/api/official";
+import {regionTree} from "@/api/official";
 export default {
 	name: 'simpleAddress',
 	props: {

+ 1 - 1
ghsApp/src/pages.json

@@ -149,7 +149,7 @@
 		{
 			"root": "admin/jc",
 			"pages": [
-				{"path": "index","style": {"navigationBarTitleText": "新手使用教程"}},
+				{"path": "index","style": {"navigationBarTitleText": "使用教程"}},
 				{"path": "video","style": {"navigationBarTitleText": "播放视频"}}
 			]
 		},

+ 98 - 221
ghsApp/src/pagesClient/official/apply.vue

@@ -1,180 +1,63 @@
 <template>
   <div class="app-content">
     <form @submit="formSubmit">
-      <div class="module-com">
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-        >
+      <view class="module-com">
+        <tui-list-cell class="line-cell" :hover="false" >
           <div class="tui-title">花店名称</div>
-          <input
-            v-model="form.name"
-            placeholder-class="phcolor"
-            placeholder-style="color:#CCCCCC"
-            class="tui-input"
-            name="name"
-            placeholder="请输入名称"
-          />
+          <input v-model="form.name" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="name" placeholder="请输入名称" />
         </tui-list-cell>
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-          :arrow="true"
-          @click="openAddres"
-        >
+        <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres" >
           <div class="tui-title">所在城市</div>
-          <div
-            class="tui-input"
-            v-if="form.province"
-          >{{ form.province + '-' + form.city }}</div>
-          <div
-            class="tui-placeholder"
-            v-else
-          >请选择</div>
+          <div class="tui-input" v-if="form.province" >{{ form.province + '-' + form.city }}</div>
+          <div class="tui-placeholder" v-else >请选择</div>
         </tui-list-cell>
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-          :arrow="true"
-          @click="selRegionFn"
-        >
-          <div class="tui-title">详细地址</div>
-          <div
-            class="tui-input"
-            v-if="form.address"
-          >{{ form.address }}</div>
-          <div
-            class="tui-placeholder"
-            v-else
-          >请填写详细地址</div>
+        <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn" >
+          <div class="tui-title">所在地址</div>
+          <div class="tui-input" v-if="form.address" >{{ form.address }}</div>
+          <div class="tui-placeholder" v-else >详细地址</div>
         </tui-list-cell>
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-        >
+        <tui-list-cell class="line-cell" :hover="false" >
           <div class="tui-title">楼号门牌</div>
-          <input
-            v-model="form.floor"
-            placeholder-class="phcolor"
-            placeholder-style="color:#CCCCCC"
-            class="tui-input"
-            name="floor"
-            placeholder="选填"
-          />
+          <input v-model="form.floor" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="floor" placeholder="选填" />
         </tui-list-cell>
-<!--
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-        >
-          <div class="tui-title">花店头像</div>
-          <app-uploader
-            @resultData="_resultData"
-            :num="1"
-          />
-        </tui-list-cell>
--->
-      </div>
-      <!-- 店长昵称 -->
-      <div class="module-com">
-        <AppBindInfo
-          @bindInfo="bindInfo"
-          nameTetx="昵称"
-        >
-        </AppBindInfo>
-      </div>
-      <!-- 手机号 -->
-      <!--
-      <div class="module-com">
-        <tui-list-cell
-          v-if="option.style == 1"
-          class="line-cell code-wrap"
-          :hover="false"
-        >
-          <div class="tui-title">主营业务</div>
-          <div>
-            <button
-              @click="changeMain(1)"
-              :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']"
-            >
-              零售
-            </button>
-            <button
-              @click="changeMain(2)"
-              style="margin-left:10upx;"
-              :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']"
-            >
-              培训
-            </button>
-          </div>
-        </tui-list-cell>
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-        >
+      </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>
 
-          <div class="tui-title">营业执照编号</div>
-          <input
-            v-model="form.licenseNo"
-            placeholder-class="phcolor"
-            placeholder-style="color:#CCCCCC"
-            class="tui-input"
-            name="name"
-            placeholder="请输入营业执照编号"
-          />
-        </tui-list-cell>
-        <tui-list-cell
-          class="line-cell"
-          :hover="false"
-        >
-          <div class="tui-title">营业执照</div>
-          <app-uploader
-            @resultData="resultData"
-            ref="appUploader"
-            :num="1"
-          />
-        </tui-list-cell>
-
-      </div>
--->
-      <!-- 推荐人 -->
-      <div
-        class="module-com recommend-wrap"
-        v-if="!$util.isEmpty(merchantData)"
-      >
+          <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title required">验证码</div>
+              <input v-model="form.authCode" 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 recommend-wrap" v-if="!$util.isEmpty(merchantData)" >
         <div class="recommend-tag">推荐人</div>
         <div class="recommend-det">
-          <image
-            style="width:90upx;height:90upx;border-radius:42upx;"
-            mode="scaleToFill"
-            :src="merchantData.logoUrl"
-            @error="imageError"
-          />
+          <image style="width:90upx;height:90upx;border-radius:42upx;" mode="scaleToFill" :src="merchantData.logoUrl" @error="imageError" />
           <div class="recommend-info">
             <div class="app-size-32">{{ merchantData.name }}</div>
             <div class="app-color-2"></div>
           </div>
         </div>
-      </div>
+      </view>
 
       <div class="btn-wrap">
-        <button
-          class="admin-button-com blue big"
-          formType="submit"
-        >确认</button>
+        <button class="admin-button-com blue big" formType="submit" >确认</button>
       </div>
+
       <!-- 选择地区 -->
-      <app-area-sel
-        :show.sync="showRegion"
-        @change="changeAreaFn"
-        :city="form.city"
-      />
+      <app-area-sel :show.sync="showRegion" @change="changeAreaFn" :city="form.city" />
       <!-- 省市联动 -->
-      <simple-address
-        ref="simpleAddress"
-        :pickerValueDefault="cityPickerValueDefault"
-        @onConfirm="onCityConfirm"
-      ></simple-address>
+      <simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm" ></simple-address>
+
     </form>
   </div>
 </template>
@@ -184,14 +67,12 @@ 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";
-// import { getWxInfo, getWxPhone } from "@/api/mini";
 import AppUploader from "@/components/app-uploader";
-import AppBindInfo from "@/components/app-bind-info";
 const form = require("@/utils/formValidation.js");
 import {getIntroduce,applyRegister} from "@/api/official";
+import {getAuthCode} from "@/api/apply";
 import { mapResolve } from "@/api/map";
 import util from '@/utils/util';
-
 export default {
   name: "apply-data",
   components: {
@@ -199,8 +80,7 @@ export default {
     AppAreaSel,
     SimpleAddress,
     AppAvatarModule,
-    AppUploader,
-    AppBindInfo
+    AppUploader
   },
   data () {
     return {
@@ -219,51 +99,71 @@ export default {
         // floor: "",
         longitude: "",
         latitude: "",
-        showAddress:""
+        showAddress:"",
+        authCode:""
       },
       showRegion: false,
       // 省市联动
       regionData: [],
       cityPickerValueDefault: [0, 0],
-      // 验证码
-      isSend: 0,
-      countDown: 119,
-      timer: null,
       adminName: "",
-      logo: ''
+      logo: '',
+      hasGet:false,
+      count:120,
+      INT:false
     };
   },
   onLoad () {
+  },
+  onUnload(){
+    clearInterval(this.INT)
   },
 	onShow() {
-		let self = this
-		uni.getLocation({
-			type: 'wgs84',
-			success: function (res) {
-				mapResolve({lat:res.latitude,long:res.longitude}).then((obj) => {
-          if(!util.isEmpty(obj.data)){
-            console.log(obj)
-            self.form.longitude=res.longitude,
-            self.form.latitude=res.latitude,
-            self.form.province = obj.data.province
-            self.form.city = obj.data.city
-            self.form.address = obj.data.address
-            self.form.showAddress = obj.data.showAddress
+    
+		// let self = this
+		// uni.getLocation({
+		// 	type: 'wgs84',
+		// 	success: function (res) {
+		// 		mapResolve({lat:res.latitude,long:res.longitude}).then((obj) => {
+    //       if(!util.isEmpty(obj.data)){
+    //         console.log(obj)
+    //         self.form.longitude=res.longitude,
+    //         self.form.latitude=res.latitude,
+    //         self.form.province = obj.data.province
+    //         self.form.city = obj.data.city
+    //         self.form.address = obj.data.address
+    //         self.form.showAddress = obj.data.showAddress
+    //         uni.showToast({ title: '已自动填写地址', duration: 2500 })
+    //       }
+		// 		})
+		// 	}
+		// })
 
-            uni.showToast({
-                title: '已自动填写地址',
-                duration: 2500
-            });
-
-          }
-				})
-				// console.log('当前位置的经度:' + res.longitude);
-				// console.log('当前位置的纬度:' + res.latitude);
-			}
-		});
 	},
   methods: {
-    //图片地址
+    requestAuthCode(){
+      let that = this
+      let mobile = this.form.mobile
+      if(this.$util.checkMobile(mobile) == false){
+        this.$msg('请输入正确手机号')
+        return
+      }
+      getAuthCode({mobile}).then(res=>{
+        if(res.code == 1){
+          that.hasGet = true
+          that.count = 120
+          that.INT = setInterval(function(){
+            if(that.count <= 0){
+              clearInterval(that.INT)
+              that.hasGet = false
+              that.count = 120
+              return
+            }
+            that.count--
+          },1000)
+        }
+      })
+    },
     resultData (val) {
       this.form.license = val.shortUrl
     },
@@ -279,7 +179,6 @@ export default {
     },
     init () {
       this._getMerchantDet()
-
     },
     _getMerchantDet () {
       getIntroduce(this.option).then(res => {
@@ -306,13 +205,12 @@ export default {
     // 选择地址
     selRegionFn () {
       if (!this.form.city) {
-        this.$msg("请先选择城市");
+        this.$msg("请先选择城市");
         return false;
       }
       this.showRegion = true;
     },
     changeAreaFn (e) {
-      console.log("changeAreaFn", e);
       this.form.address = e.title;
       this.form.showAddress = e.address;
       this.form.latitude = e.location.lat;
@@ -329,36 +227,16 @@ export default {
     },
     formSubmit (e) {
       let rules = [
-        {
-          name: "name",
-          rule: ["required"],
-          msg: ["请填写花店名称"]
-        },
-        {
-          name: "city",
-          rule: ["required"],
-          msg: ["请选择城市"]
-        },
-        {
-          name: "address",
-          rule: ["required"],
-          msg: ["请填写地址"]
-        },
-        {
-          name: "adminName",
-          rule: ["required"],
-          msg: ["请填写昵称"]
-        },
-        {
-          name: "mobile",
-          rule: ["required"],
-          msg: ["请填写手机号"]
-        }
+        { name: "name", rule: ["required"], msg: ["请填写花店名称"] },
+        { name: "city", rule: ["required"], msg: ["请选择城市"] },
+        { name: "address", rule: ["required"], msg: ["请填写地址"] },
+        { name: "adminName", rule: ["required"], msg: ["请填写姓名"] },
+        { name: "mobile", rule: ["required"], msg: ["请填写手机号"] }
       ];
       let formData = this.form;
       let checkRes = form.validation(formData, rules);
       if (!checkRes) {
-        uni.showLoading({title: '加载中',mask:true})
+        uni.showLoading({mask:true})
         setTimeout(() => {
           this.confirmFn()
         })
@@ -372,7 +250,6 @@ export default {
   }
 };
 </script>
-
 <style lang="scss" scoped>
 .module-com {
   margin-bottom: 20upx;
@@ -443,4 +320,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 1 - 1
ghsApp/src/pagesClient/official/index.vue

@@ -23,7 +23,7 @@
       <app-swiper :height="{type: 'number',val: 400}" :list="swiper" :width="{type: 'string',val: '95%'}"/>
     </view>
     <view class="footer_bar">
-      <view class="relation" @click="pageTo({url:'/admin/book/index'})">使用手册</view>
+      <view class="relation" @click="pageTo({url:'/admin/book/index'})">使用教程</view>
       <view class="free" @click="register()">申请</view>
     </view>
   </view>