|
@@ -21,6 +21,14 @@
|
|
|
<view class="">
|
|
|
头像{{userInfo.head_photo}}
|
|
|
</view>
|
|
|
+ <block v-if="userInfo.current_ent">
|
|
|
+ <view class="">
|
|
|
+ 企业名称{{userInfo.current_ent.ent_name}}
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ 统一社会信用代码{{userInfo.current_ent.credit_code}}
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -41,15 +49,17 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
-
|
|
|
+ console.log('options===>', options)
|
|
|
this.yigeauth = options.yigeauth === 'true' ? true : false
|
|
|
/**
|
|
|
* 判断是否需要授权
|
|
|
*/
|
|
|
if (this.yigeauth) {
|
|
|
+ console.log(1111111)
|
|
|
// 需要授权
|
|
|
this.getYigeauth()
|
|
|
} else if (options.yigeopenid) {
|
|
|
+ console.log(222222)
|
|
|
// 如果已经授权,并且返回了 openid,则通过 openid 去获取用户信息
|
|
|
this.getUerByOpenId(options.yigeopenid)
|
|
|
}
|
|
@@ -67,6 +77,7 @@
|
|
|
*/
|
|
|
getYigeauth() {
|
|
|
this.$http.get('/auth/build_auth').then(res => {
|
|
|
+ console.log(res, 3333333333)
|
|
|
try {
|
|
|
uniWeb.webView.postMessage({
|
|
|
data: res.data
|
|
@@ -81,6 +92,7 @@
|
|
|
this.$http.post('/auth/getUserByOpenId', {
|
|
|
yigeOpenId: yigeopenid
|
|
|
}).then(res => {
|
|
|
+ console.log(res, 4444444444)
|
|
|
if (res.code == 200) {
|
|
|
// 获取用户信息
|
|
|
this.userInfo = res.data
|