Jelajahi Sumber

增加了申请试用的头像栏

wangn 5 tahun lalu
induk
melakukan
d0a3fd614a
1 mengubah file dengan 154 tambahan dan 70 penghapusan
  1. 154 70
      ghsApp/src/pagesClient/official/apply.vue

+ 154 - 70
ghsApp/src/pagesClient/official/apply.vue

@@ -2,7 +2,10 @@
   <div class="app-content">
   <div class="app-content">
     <form @submit="formSubmit">
     <form @submit="formSubmit">
       <div class="module-com">
       <div 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>
           <input
           <input
             v-model="form.name"
             v-model="form.name"
@@ -13,17 +16,42 @@
             placeholder="请输入花店名称"
             placeholder="请输入花店名称"
           />
           />
         </tui-list-cell>
         </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-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>
-        <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+          :arrow="true"
+          @click="selRegionFn"
+        >
           <div class="tui-title">详细地址</div>
           <div class="tui-title">详细地址</div>
-          <div class="tui-input" v-if="form.address">{{ form.address }}</div>
-          <div class="tui-placeholder" v-else>请填写详细地址</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>
-        <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>
           <input
           <input
             v-model="form.floor"
             v-model="form.floor"
@@ -34,10 +62,31 @@
             placeholder="楼号门牌号(选填)"
             placeholder="楼号门牌号(选填)"
           />
           />
         </tui-list-cell>
         </tui-list-cell>
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
+          <div class="tui-title">头像</div>
+          <app-uploader
+            @resultData="_resultData"
+            :num="1"
+          />
+          <!-- <input
+                v-model="form.name"
+                placeholder-class="phcolor"
+                placeholder-style="color:#CCCCCC"
+                class="tui-input"
+                name="name"
+                placeholder="请输入营业执照编号"
+              /> -->
+        </tui-list-cell>
       </div>
       </div>
       <!-- 店长昵称 -->
       <!-- 店长昵称 -->
       <div class="module-com">
       <div 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>
           <input
           <input
             v-model="form.adminName"
             v-model="form.adminName"
@@ -49,44 +98,60 @@
           />
           />
         </tui-list-cell>
         </tui-list-cell>
         <AppBindInfo
         <AppBindInfo
-            @bindInfo="bindInfo"
-            nameTetx="我的昵称">
+          @bindInfo="bindInfo"
+          nameTetx="我的昵称"
+        >
         </AppBindInfo>
         </AppBindInfo>
       </div>
       </div>
       <!-- 手机号 -->
       <!-- 手机号 -->
       <div class="module-com">
       <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:10px;" :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']">
-                培训
-              </button>
-            </div>
-          </tui-list-cell>
-          <tui-list-cell class="line-cell" :hover="false">
-              <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" />
-              <!-- <input
+        <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:10px;"
+              :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']"
+            >
+              培训
+            </button>
+          </div>
+        </tui-list-cell>
+        <tui-list-cell
+          class="line-cell"
+          :hover="false"
+        >
+          <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"
+          />
+          <!-- <input
                 v-model="form.name"
                 v-model="form.name"
                 placeholder-class="phcolor"
                 placeholder-class="phcolor"
                 placeholder-style="color:#CCCCCC"
                 placeholder-style="color:#CCCCCC"
@@ -94,14 +159,22 @@
                 name="name"
                 name="name"
                 placeholder="请输入营业执照编号"
                 placeholder="请输入营业执照编号"
               /> -->
               /> -->
-         </tui-list-cell>
+        </tui-list-cell>
 
 
       </div>
       </div>
       <!-- 推荐人 -->
       <!-- 推荐人 -->
-      <div class="module-com recommend-wrap" v-if="!$util.isEmpty(merchantData)">
+      <div
+        class="module-com recommend-wrap"
+        v-if="!$util.isEmpty(merchantData)"
+      >
         <div class="recommend-tag">推荐人</div>
         <div class="recommend-tag">推荐人</div>
         <div class="recommend-det">
         <div class="recommend-det">
-          <image style="width:90rpx;height:90rpx;border-radius:42rpx;" mode="scaleToFill" :src="merchantData.smallLogoUrl" @error="imageError" />
+          <image
+            style="width:90rpx;height:90rpx;border-radius:42rpx;"
+            mode="scaleToFill"
+            :src="merchantData.smallLogoUrl"
+            @error="imageError"
+          />
           <div class="recommend-info">
           <div class="recommend-info">
             <div class="app-size-32">{{ merchantData.name }}</div>
             <div class="app-size-32">{{ merchantData.name }}</div>
             <div class="app-color-2">{{ merchantData.fullAddress }}</div>
             <div class="app-color-2">{{ merchantData.fullAddress }}</div>
@@ -110,10 +183,17 @@
       </div>
       </div>
 
 
       <div class="btn-wrap">
       <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>
       </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
       <simple-address
         ref="simpleAddress"
         ref="simpleAddress"
@@ -151,7 +231,7 @@ export default {
     AppUploader,
     AppUploader,
     AppBindInfo
     AppBindInfo
   },
   },
-  data() {
+  data () {
     return {
     return {
       merchantData: {},
       merchantData: {},
       form: {
       form: {
@@ -161,11 +241,11 @@ export default {
         city: "",
         city: "",
         dist: "",
         dist: "",
         address: "",
         address: "",
-        adminName:'',
-        nickName:'',
+        adminName: '',
+        nickName: '',
         main: 1,
         main: 1,
         licenseNo: "",
         licenseNo: "",
-         license: "",
+        license: "",
         // floor: "",
         // floor: "",
         longitude: "",
         longitude: "",
         latitude: "",
         latitude: "",
@@ -179,10 +259,11 @@ export default {
       isSend: 0,
       isSend: 0,
       countDown: 119,
       countDown: 119,
       timer: null,
       timer: null,
-      nickName: ""
+      nickName: "",
+      logo: ''
     };
     };
   },
   },
-  onLoad() {
+  onLoad () {
     // form 来源  introMerchantId 推荐ID  style  供货商 | 零售
     // form 来源  introMerchantId 推荐ID  style  供货商 | 零售
     // if (!this.$util.isLogin()) {
     // if (!this.$util.isLogin()) {
     // 	// getShopUser()
     // 	// getShopUser()
@@ -192,22 +273,25 @@ export default {
   },
   },
   methods: {
   methods: {
     //图片地址
     //图片地址
-    resultData(val){
+    resultData (val) {
       this.form.license = val.shortUrl
       this.form.license = val.shortUrl
     },
     },
-    changeMain(val){
+    _resultData (val) {
+      this.form.logo = val.shortUrl
+    },
+    changeMain (val) {
       this.form.main = val
       this.form.main = val
     },
     },
-    bindInfo(val){
+    bindInfo (val) {
       this.form.nickName = val.nickName;
       this.form.nickName = val.nickName;
       this.form.mobile = val.mobile
       this.form.mobile = val.mobile
     },
     },
-    init() {
+    init () {
       this.$util.getCheckLogin().then(res => {
       this.$util.getCheckLogin().then(res => {
         if (res) {
         if (res) {
-            if(this.option.introMerchantId) {
-              this._getMerchantDet();
-            }
+          if (this.option.introMerchantId) {
+            this._getMerchantDet();
+          }
         }
         }
       });
       });
     },
     },
@@ -216,15 +300,15 @@ export default {
     //     this.regionData = res.data.tree;
     //     this.regionData = res.data.tree;
     //   });
     //   });
     // },
     // },
-    _getMerchantDet() {
+    _getMerchantDet () {
       // let id = uni.getStorageSync("introMerchantId");
       // let id = uni.getStorageSync("introMerchantId");
       getIntroduce({ id: this.option.introMerchantId || 0 }).then(res => {
       getIntroduce({ id: this.option.introMerchantId || 0 }).then(res => {
         this.merchantData = res.data;
         this.merchantData = res.data;
       });
       });
     },
     },
     // ==============
     // ==============
-    confirmFn() {
-    	// console.log('cs',this.option.shopAdminId)
+    confirmFn () {
+      // console.log('cs',this.option.shopAdminId)
       // let id = uni.getStorageSync("introMerchantId");
       // let id = uni.getStorageSync("introMerchantId");
       applyRegister({
       applyRegister({
         shopAdminId: this.option.shopAdminId,
         shopAdminId: this.option.shopAdminId,
@@ -242,7 +326,7 @@ export default {
       });
       });
     },
     },
     // 选择地址
     // 选择地址
-    selRegionFn() {
+    selRegionFn () {
       if (!this.form.city) {
       if (!this.form.city) {
         this.$msg("请先选择城市!");
         this.$msg("请先选择城市!");
         return false;
         return false;
@@ -261,7 +345,7 @@ export default {
       // 	}
       // 	}
       // })
       // })
     },
     },
-    changeAreaFn(e) {
+    changeAreaFn (e) {
       console.log("changeAreaFn", e);
       console.log("changeAreaFn", e);
       this.form.address = e.address;
       this.form.address = e.address;
       this.form.latitude = e.location.lat;
       this.form.latitude = e.location.lat;
@@ -270,17 +354,17 @@ export default {
     },
     },
     // -----
     // -----
     // 省市联动
     // 省市联动
-    openAddres() {
+    openAddres () {
       this.$refs.simpleAddress.open();
       this.$refs.simpleAddress.open();
     },
     },
-    onCityConfirm(e) {
+    onCityConfirm (e) {
       // this.form.receiveAddress = e.label
       // this.form.receiveAddress = e.label
       this.form.province = e.provinceName;
       this.form.province = e.provinceName;
       this.form.city = e.cityName;
       this.form.city = e.cityName;
       // this.pickerText = JSON.stringify(e)
       // this.pickerText = JSON.stringify(e)
     },
     },
     // 表单验证
     // 表单验证
-    formSubmit(e) {
+    formSubmit (e) {
       // 表单规则
       // 表单规则
       let rules = [
       let rules = [
         {
         {
@@ -309,7 +393,7 @@ export default {
       }
       }
     }
     }
   },
   },
-  watch:{
+  watch: {
     // imageList(val){
     // imageList(val){
     //   this.form.
     //   this.form.
     //   console.log(val)
     //   console.log(val)