|
|
@@ -384,44 +384,7 @@
|
|
|
// data.loginType =2 需要根据merchantId查询商户临时数据
|
|
|
// data.loginType =3 不需要回显
|
|
|
this.loginType = data.loginType;
|
|
|
- if(data.loginType === '2') {
|
|
|
- this.$http.post('/merchant/examine/new/info/temporary', {
|
|
|
- "merchantId": data.merchantId
|
|
|
- }).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.form = {
|
|
|
- id: data.merchantId,
|
|
|
- ordinaryUserId: data.ordinaryUserId,
|
|
|
- name: (data.name==null || data.name =='null') ?"":data.name,
|
|
|
- type: res.data.result.type == null ? null : res.data.result.type + '',
|
|
|
- corporateName: !res.data.result.corporateName ? null : res.data.result.corporateName,
|
|
|
- creditCode: !res.data.result.creditCode ? null : res.data.result.creditCode,
|
|
|
- lifespanType: !res.data.result.lifespanType ? null : res.data.result.lifespanType,
|
|
|
- lifespanBegin: !res.data.result.lifespanBegin ? null : res.data.result.lifespanBegin,
|
|
|
- lifespanEnd: !res.data.result.lifespanEnd ? null : res.data.result.lifespanEnd,
|
|
|
- businessLicense: !res.data.result.businessLicense ? null : res.data.result.businessLicense,
|
|
|
- legalPerson: !res.data.result.legalPerson ? null : res.data.result.legalPerson,
|
|
|
- legalPersonCode: !res.data.result.legalPersonCode ? null : res.data.result.legalPersonCode,
|
|
|
- storeName: !res.data.result.storeName ? null : res.data.result.storeName,
|
|
|
- country: !res.data.result.country ? null : res.data.result.country,
|
|
|
- locality: !res.data.result.locality ? null : res.data.result.locality,
|
|
|
- address: !res.data.result.address ? null : res.data.result.address,
|
|
|
- headPhoto: !res.data.result.headPhoto ? [] : res.data.result.headPhoto,
|
|
|
- passWord: data.passWord,
|
|
|
- phone: data.phone,
|
|
|
- }
|
|
|
- this.markers = res.data.result.longitude && res.data.result.latitude ? [{
|
|
|
- longitude: res.data.result.longitude,
|
|
|
- latitude: res.data.result.latitude,
|
|
|
- iconPath: '../../static/boiaoji.png'
|
|
|
- }] : []
|
|
|
- this.businessLicenseImg = !res.data.result.businessLicense ? null : configService.apiUrl + '/' + res.data.result.businessLicense;
|
|
|
- this.identityOneImg = !res.data.result.identityOne ? null : configService.apiUrl + '/' + res.data.result.identityOne;
|
|
|
- this.identityTwoImg = !res.data.result.identityTwo ? null : configService.apiUrl + '/' + res.data.result.identityTwo;
|
|
|
- this.headPhotoImg = res.data.result.headPhoto ? res.data.result.headPhoto.split(',').filter(id => id !== '') : []
|
|
|
- }
|
|
|
- });
|
|
|
- }else if(data.loginType === '3') {
|
|
|
+ if(data.loginType === '3') {
|
|
|
this.form.ordinaryUserId =data.ordinaryUserId;
|
|
|
name: (data.name==null || data.name =='null') ?"":data.name,
|
|
|
this.form.passWord =data.passWord;
|
|
|
@@ -727,37 +690,7 @@ this.$forceUpdate();
|
|
|
sumbit() {
|
|
|
if (this.title == '申请入驻') {
|
|
|
if(this.loginType){
|
|
|
- if(this.loginType === '2'){
|
|
|
- //商户临时用户回显 ,修改
|
|
|
- let data = {
|
|
|
- ...this.form,
|
|
|
- source: 2,
|
|
|
- headPhoto: Array.isArray(this.form.headPhoto) ? this.form.headPhoto.join(',') : this.form.headPhoto,
|
|
|
- longitude: this.markers.length > 0 ? this.markers[0].longitude : '',
|
|
|
- latitude: this.markers.length > 0 ? this.markers[0].latitude : ''
|
|
|
- }
|
|
|
- console.log(this.form.headPhoto, 88);
|
|
|
- this.$http.post('/merchant/localMerchantInfo/edit/new', data).then(res => {
|
|
|
- console.log(res.data.success, 11);
|
|
|
- if (res.data.success) {
|
|
|
- console.log(res.data.success, 99);
|
|
|
- //放入session
|
|
|
- const result = res.data.result
|
|
|
- const userInfo = result.userInfo
|
|
|
- console.log(res.data.success)
|
|
|
- uni.setStorageSync(ACCESS_TOKEN,result.token);
|
|
|
- uni.setStorageSync(USER_INFO,userInfo);
|
|
|
- this.$store.commit('SET_TOKEN', result.token)
|
|
|
- this.$store.commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname})
|
|
|
- this.$store.commit('SET_AVATAR', userInfo.avatar)
|
|
|
- uni.switchTab({
|
|
|
- url:'/pages/index/index'
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$tip.error(res.data.message);
|
|
|
- }
|
|
|
- })
|
|
|
- }else if(this.loginType === '3'){
|
|
|
+ if(this.loginType === '3'){
|
|
|
//普通用户没有商户新增
|
|
|
for (let j in this.form) {
|
|
|
console.log(j)
|
|
|
@@ -824,7 +757,6 @@ this.$forceUpdate();
|
|
|
longitude: this.markers.length > 0 ? this.markers[0].longitude : '',
|
|
|
latitude: this.markers.length > 0 ? this.markers[0].latitude : ''
|
|
|
}
|
|
|
- console.log(this.form.headPhoto, 88);
|
|
|
this.$http.post('/merchant/localMerchantInfo/edit', data).then(res => {
|
|
|
if (res.data.success) {
|
|
|
this.$tip.success(res.data.result || '成功')
|