|
|
@@ -2,10 +2,7 @@
|
|
|
<div class="app-content">
|
|
|
<form @submit="formSubmit">
|
|
|
<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>
|
|
|
<input
|
|
|
v-model="form.name"
|
|
|
@@ -23,14 +20,10 @@
|
|
|
@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"
|
|
|
@@ -39,19 +32,10 @@
|
|
|
@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>
|
|
|
+ <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"
|
|
|
@@ -62,24 +46,14 @@
|
|
|
placeholder="楼号门牌号(选填)"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell
|
|
|
- class="line-cell"
|
|
|
- :hover="false"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">花店头像</div>
|
|
|
- <app-uploader
|
|
|
- @resultData="_resultData"
|
|
|
- :num="1"
|
|
|
- />
|
|
|
+ <app-uploader @resultData="_resultData" :num="1" />
|
|
|
</tui-list-cell>
|
|
|
</div>
|
|
|
<!-- 店长昵称 -->
|
|
|
<div class="module-com">
|
|
|
- <AppBindInfo
|
|
|
- @bindInfo="bindInfo"
|
|
|
- nameTetx="我的昵称"
|
|
|
- >
|
|
|
- </AppBindInfo>
|
|
|
+ <AppBindInfo @bindInfo="bindInfo" nameTetx="我的昵称"> </AppBindInfo>
|
|
|
</div>
|
|
|
<!-- 手机号 -->
|
|
|
<div class="module-com">
|
|
|
@@ -92,23 +66,28 @@
|
|
|
<div>
|
|
|
<button
|
|
|
@click="changeMain(1)"
|
|
|
- :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']"
|
|
|
+ :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']"
|
|
|
+ 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"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">营业执照编号</div>
|
|
|
<input
|
|
|
v-model="form.licenseNo"
|
|
|
@@ -119,18 +98,10 @@
|
|
|
placeholder="请输入营业执照编号"
|
|
|
/>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell
|
|
|
- class="line-cell"
|
|
|
- :hover="false"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">营业执照</div>
|
|
|
- <app-uploader
|
|
|
- @resultData="resultData"
|
|
|
- ref="appUploader"
|
|
|
- :num="1"
|
|
|
- />
|
|
|
+ <app-uploader @resultData="resultData" ref="appUploader" :num="1" />
|
|
|
</tui-list-cell>
|
|
|
-
|
|
|
</div>
|
|
|
<!-- 推荐人 -->
|
|
|
<div
|
|
|
@@ -140,9 +111,9 @@
|
|
|
<div class="recommend-tag">推荐人</div>
|
|
|
<div class="recommend-det">
|
|
|
<image
|
|
|
- style="width:90rpx;height:90rpx;border-radius:42rpx;"
|
|
|
+ style="width: 90rpx; height: 90rpx; border-radius: 42rpx"
|
|
|
mode="scaleToFill"
|
|
|
- :src="merchantData.smallLogoUrl"
|
|
|
+ :src="merchantData.logoUrl"
|
|
|
@error="imageError"
|
|
|
/>
|
|
|
<div class="recommend-info">
|
|
|
@@ -153,10 +124,9 @@
|
|
|
</div>
|
|
|
|
|
|
<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
|
|
|
@@ -179,18 +149,10 @@ 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");
|
|
|
-// api
|
|
|
-import {
|
|
|
- getIntroduce,
|
|
|
- applyRegister,
|
|
|
- // sendSmsW,
|
|
|
- // regionTree
|
|
|
-} from "@/api/official";
|
|
|
-// import { getShopUser } from '@/utils/auth'
|
|
|
+import { getIntroduce, applyRegister } from "@/api/official";
|
|
|
export default {
|
|
|
name: "apply-data",
|
|
|
components: {
|
|
|
@@ -199,9 +161,9 @@ export default {
|
|
|
SimpleAddress,
|
|
|
AppAvatarModule,
|
|
|
AppUploader,
|
|
|
- AppBindInfo
|
|
|
+ AppBindInfo,
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
merchantData: {},
|
|
|
form: {
|
|
|
@@ -211,14 +173,14 @@ export default {
|
|
|
city: "",
|
|
|
dist: "",
|
|
|
address: "",
|
|
|
- adminName: '',
|
|
|
+ adminName: "",
|
|
|
main: 1,
|
|
|
licenseNo: "",
|
|
|
license: "",
|
|
|
// floor: "",
|
|
|
longitude: "",
|
|
|
latitude: "",
|
|
|
- logo: ''
|
|
|
+ logo: "",
|
|
|
},
|
|
|
showRegion: false,
|
|
|
// 省市联动
|
|
|
@@ -228,121 +190,91 @@ export default {
|
|
|
isSend: 0,
|
|
|
countDown: 119,
|
|
|
timer: null,
|
|
|
- adminName: ""
|
|
|
+ adminName: "",
|
|
|
};
|
|
|
},
|
|
|
- onLoad () {
|
|
|
- },
|
|
|
+ onLoad() {},
|
|
|
methods: {
|
|
|
//图片地址
|
|
|
- resultData (val) {
|
|
|
- this.form.license = val.shortUrl
|
|
|
+ resultData(val) {
|
|
|
+ this.form.license = val.shortUrl;
|
|
|
},
|
|
|
- _resultData (val) {
|
|
|
- console.log(val)
|
|
|
- this.form.logo = val.shortUrl
|
|
|
+ _resultData(val) {
|
|
|
+ console.log(val);
|
|
|
+ this.form.logo = val.shortUrl;
|
|
|
},
|
|
|
- changeMain (val) {
|
|
|
- this.form.main = val
|
|
|
+ changeMain(val) {
|
|
|
+ this.form.main = val;
|
|
|
},
|
|
|
- bindInfo (val) {
|
|
|
+ bindInfo(val) {
|
|
|
this.form.adminName = val.name;
|
|
|
- this.form.mobile = val.mobile
|
|
|
+ this.form.mobile = val.mobile;
|
|
|
},
|
|
|
- init () {
|
|
|
- this.$util.getCheckLogin().then(res => {
|
|
|
- if (res) {
|
|
|
- if (this.option.introMerchantId) {
|
|
|
- this._getMerchantDet();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ init() {
|
|
|
+ this.getIntroduceInfo();
|
|
|
},
|
|
|
- _getMerchantDet () {
|
|
|
- getIntroduce({ id: this.option.introMerchantId || 0 }).then(res => {
|
|
|
- this.merchantData = res.data;
|
|
|
- });
|
|
|
+ getIntroduceInfo() {
|
|
|
+ getIntroduce(this.option).then((res) => {
|
|
|
+ this.merchantData = res.data.introduce
|
|
|
+ })
|
|
|
},
|
|
|
- // ==============
|
|
|
- confirmFn () {
|
|
|
+ confirmFn() {
|
|
|
applyRegister({
|
|
|
- shopAdminId: this.option.shopAdminId,
|
|
|
+ hdShopAdminId: this.option.hdShopAdminId,
|
|
|
+ ghsShopAdminId: this.option.ghsShopAdminId,
|
|
|
...this.form,
|
|
|
style: this.option.style || 0,
|
|
|
- from: this.option.from || 0
|
|
|
- }).then(res => {
|
|
|
+ from: this.option.from || 0,
|
|
|
+ }).then((res) => {
|
|
|
this.$util.pageTo({
|
|
|
url: "/pagesClient/official/result",
|
|
|
type: 2,
|
|
|
query: {
|
|
|
- pagestatus: 3
|
|
|
- }
|
|
|
+ pagestatus: 3,
|
|
|
+ },
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
// 选择地址
|
|
|
- selRegionFn () {
|
|
|
+ selRegionFn() {
|
|
|
if (!this.form.city) {
|
|
|
this.$msg("请先选择城市!");
|
|
|
return false;
|
|
|
}
|
|
|
this.showRegion = true;
|
|
|
- // let that = this
|
|
|
- // uni.chooseLocation({
|
|
|
- // success: (res) => {
|
|
|
- // this.form.address = res.address
|
|
|
- // this.form.latitude = res.latitude
|
|
|
- // this.form.longitude = res.longitude
|
|
|
- // console.log('位置名称:' + res.name)
|
|
|
- // console.log('详细地址:' + res.address)
|
|
|
- // console.log('纬度:' + res.latitude)
|
|
|
- // console.log('经度:' + res.longitude)
|
|
|
- // }
|
|
|
- // })
|
|
|
},
|
|
|
- changeAreaFn (e) {
|
|
|
- console.log("changeAreaFn", e);
|
|
|
+ changeAreaFn(e) {
|
|
|
this.form.address = e.address;
|
|
|
this.form.latitude = e.location.lat;
|
|
|
this.form.longitude = e.location.lng;
|
|
|
- this.form.dist = e.district
|
|
|
+ this.form.dist = e.district;
|
|
|
},
|
|
|
- // -----
|
|
|
// 省市联动
|
|
|
- openAddres () {
|
|
|
+ openAddres() {
|
|
|
this.$refs.simpleAddress.open();
|
|
|
},
|
|
|
- onCityConfirm (e) {
|
|
|
- // this.form.receiveAddress = e.label
|
|
|
+ onCityConfirm(e) {
|
|
|
this.form.province = e.provinceName;
|
|
|
this.form.city = e.cityName;
|
|
|
- // this.pickerText = JSON.stringify(e)
|
|
|
},
|
|
|
// 表单验证
|
|
|
- formSubmit (e) {
|
|
|
+ formSubmit(e) {
|
|
|
// 表单规则
|
|
|
let rules = [
|
|
|
{
|
|
|
name: "name",
|
|
|
rule: ["required"],
|
|
|
- msg: ["请填写昵称"]
|
|
|
+ msg: ["请填写昵称"],
|
|
|
},
|
|
|
{
|
|
|
name: "licenseNo",
|
|
|
rule: ["required"],
|
|
|
- msg: ["请输入营业执照编号"]
|
|
|
- }
|
|
|
+ msg: ["请输入营业执照编号"],
|
|
|
+ },
|
|
|
];
|
|
|
// 进行表单检查
|
|
|
let formData = this.form;
|
|
|
let checkRes = form.validation(formData, rules);
|
|
|
- // this.$util.pageTo({
|
|
|
- // url: "/pagesClient/official/callback",
|
|
|
- // type: 2,
|
|
|
- // query: {
|
|
|
- // pagestatus: 1
|
|
|
- // }
|
|
|
- // });
|
|
|
// 验证通过!
|
|
|
if (!checkRes) {
|
|
|
setTimeout(() => {
|
|
|
@@ -351,14 +283,9 @@ export default {
|
|
|
} else {
|
|
|
this.$msg(checkRes);
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
- watch: {
|
|
|
- // imageList(val){
|
|
|
- // this.form.
|
|
|
- // console.log(val)
|
|
|
- // }
|
|
|
- }
|
|
|
+ watch: {},
|
|
|
};
|
|
|
</script>
|
|
|
|