|
|
@@ -383,7 +383,6 @@
|
|
|
if (data.loginType){
|
|
|
// data.loginType =2 需要根据merchantId查询商户临时数据
|
|
|
// data.loginType =3 不需要回显
|
|
|
- console.log(data.loginType)
|
|
|
this.loginType = data.loginType;
|
|
|
if(data.loginType === '2') {
|
|
|
this.$http.post('/merchant/examine/new/info/temporary', {
|
|
|
@@ -393,7 +392,7 @@
|
|
|
this.form = {
|
|
|
id: data.merchantId,
|
|
|
ordinaryUserId: data.ordinaryUserId,
|
|
|
- name: data.name==null?"":data.name,
|
|
|
+ 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,
|
|
|
@@ -424,7 +423,7 @@
|
|
|
});
|
|
|
}else if(data.loginType === '3') {
|
|
|
this.form.ordinaryUserId =data.ordinaryUserId;
|
|
|
- this.form.name = data.name;
|
|
|
+ name: (data.name==null || data.name =='null') ?"":data.name,
|
|
|
this.form.passWord =data.passWord;
|
|
|
this.form.phone =data.phone;
|
|
|
}
|
|
|
@@ -451,11 +450,9 @@
|
|
|
},
|
|
|
methods: {
|
|
|
getCurrentLocation() {
|
|
|
- console.log('1111111')
|
|
|
uni.getStorage({
|
|
|
key: 'currentAddress',
|
|
|
success: (res) => {
|
|
|
- console.log(res, '2222222');
|
|
|
if (res.data && res.data.location) {
|
|
|
let temp = res.data.location.split(',');
|
|
|
this.latitude = temp[1];
|
|
|
@@ -484,20 +481,16 @@ this.$forceUpdate();
|
|
|
|
|
|
},
|
|
|
fail: () => {
|
|
|
- console.log('3333333')
|
|
|
// 如果没有存储的位置,可以设置默认位置
|
|
|
this.setDefaultLocation();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
setDefaultLocation() {
|
|
|
- console.log('444444444')
|
|
|
let that = this
|
|
|
uni.getLocation({
|
|
|
type: 'gcj02',
|
|
|
success: function(res) {
|
|
|
- console.log('555555555')
|
|
|
- console.log(res)
|
|
|
that.latitude = res.latitude;
|
|
|
that.longitude = res.longitude;
|
|
|
that.marker = [{
|
|
|
@@ -512,7 +505,7 @@ this.$forceUpdate();
|
|
|
|
|
|
},
|
|
|
fail() {
|
|
|
- console.log('666666666')
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -800,23 +793,11 @@ this.$forceUpdate();
|
|
|
//放入session
|
|
|
const result = res.data.result
|
|
|
const userInfo = result.userInfo
|
|
|
- // uni.showToast({
|
|
|
- // title: '111111!',
|
|
|
- // icon: 'none'
|
|
|
- // })
|
|
|
uni.setStorageSync(ACCESS_TOKEN,result.token);
|
|
|
uni.setStorageSync(USER_INFO,userInfo);
|
|
|
- // uni.showToast({
|
|
|
- // title: '222222222!',
|
|
|
- // icon: 'none'
|
|
|
- // })
|
|
|
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.showToast({
|
|
|
- // title: '44444444444444!',
|
|
|
- // icon: 'none'
|
|
|
- // })
|
|
|
// #ifdef APP-PLUS
|
|
|
uni.switchTab({
|
|
|
url: '/pages/index/index'
|
|
|
@@ -828,10 +809,6 @@ this.$forceUpdate();
|
|
|
name: 'index'
|
|
|
})
|
|
|
// #endif
|
|
|
- // uni.showToast({
|
|
|
- // title: '888888888888888888!',
|
|
|
- // icon: 'none'
|
|
|
- // })
|
|
|
} else {
|
|
|
this.$tip.error(res.data.message);
|
|
|
}
|