|
@@ -121,9 +121,9 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState,mapMutations } from 'vuex'
|
|
|
- import { uploadFileImage } from "@/services/public.js"
|
|
|
+ import { uploadFileImage } from '@/services/public.js'
|
|
|
import authorize from '@/common/config/authorize.js'
|
|
|
- import wxLogin from "@/common/config/wxLogin.js"
|
|
|
+ import wxLogin from '@/common/config/wxLogin.js'
|
|
|
export default{
|
|
|
data() {
|
|
|
return{
|
|
@@ -157,27 +157,30 @@
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
console.log('option=========>',this.option)
|
|
|
- uni.setStorageSync('bind_id', option.bindId);
|
|
|
+ uni.setStorageSync('bind_id', option.bindId)
|
|
|
this.bindId = Number(option.bindId)
|
|
|
this.isUserIdentity = option.Identity
|
|
|
},
|
|
|
filters: {
|
|
|
FirstFormat:function(type) {//处理金额
|
|
|
- let name='';
|
|
|
+ let name=''
|
|
|
switch(type){
|
|
|
- case 1: name = '医美'; break;
|
|
|
- case 2: name = '生美'; break;
|
|
|
+ case 1: name = '医美'; break
|
|
|
+ case 2: name = '生美'; break
|
|
|
+ case 3: name = '项目公司'; break
|
|
|
+ case 4: name = '个人'; break
|
|
|
+ case 5: name = '其他'; break
|
|
|
}
|
|
|
- return name;
|
|
|
+ return name
|
|
|
},
|
|
|
TwoFormat:function(type) {//处理金额
|
|
|
- let text='';
|
|
|
+ let text=''
|
|
|
switch(type){
|
|
|
- case 1: text = '诊所'; break;
|
|
|
- case 2: text = '门诊'; break;
|
|
|
- case 3: text = '医院'; break;
|
|
|
+ case 1: text = '诊所'; break
|
|
|
+ case 2: text = '门诊'; break
|
|
|
+ case 3: text = '医院'; break
|
|
|
}
|
|
|
- return text;
|
|
|
+ return text
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
@@ -186,15 +189,15 @@
|
|
|
methods:{
|
|
|
...mapMutations(['login','logout','wxLogin']),
|
|
|
async getWxAuthorize(){
|
|
|
- const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
|
|
|
- const getUserInfo = await authorize.getUserInfo('weixin');
|
|
|
+ const wechatCode = await authorize.getCode('weixin')// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
|
|
|
+ const getUserInfo = await authorize.getUserInfo('weixin')
|
|
|
this.UserService.UserLoginAuthApplets({
|
|
|
code:wechatCode,
|
|
|
encryptedData:getUserInfo.encryptedData,
|
|
|
iv:getUserInfo.iv ,
|
|
|
})
|
|
|
.then(response =>{
|
|
|
- this.login(response.data);
|
|
|
+ this.login(response.data)
|
|
|
this.$store.commit('updateStatus',response.data)
|
|
|
uni.setStorageSync('token',response.data.token)
|
|
|
uni.setStorageSync('unionId',response.data.unionId)
|
|
@@ -237,7 +240,7 @@
|
|
|
})
|
|
|
},
|
|
|
SubmitRegister(){//确认并登录绑定微信
|
|
|
- if(this.isSubLoading){ return; }
|
|
|
+ if(this.isSubLoading){ return }
|
|
|
this.GetUserProfile()
|
|
|
},
|
|
|
GetUserProfile(){//获取微信用户信息
|
|
@@ -271,7 +274,7 @@
|
|
|
},1000)
|
|
|
})
|
|
|
.catch(error =>{
|
|
|
- this.$util.msg(error.msg,2000);
|
|
|
+ this.$util.msg(error.msg,2000)
|
|
|
|
|
|
})
|
|
|
},
|