|
|
|
@ -4,7 +4,7 @@ |
|
|
|
<view class="top-bar"> |
|
|
|
<image class="top-bar-bg" src="@/static/images/mingqi-beij@2x.png" mode="aspectFill"></image> |
|
|
|
<view class="library-info"> |
|
|
|
<image class="avatar" src="@/static/images/logo.jpg" mode="aspectFill"></image> |
|
|
|
<image class="avatar" :src="libraryLogo" mode="aspectFill"></image> |
|
|
|
<view class="library-name">葛店经济技术开发区图书馆</view> |
|
|
|
<view class="sub-title">读者证办理</view> |
|
|
|
</view> |
|
|
|
@ -118,7 +118,7 @@ |
|
|
|
<script> |
|
|
|
import config from '@/utils/config'; |
|
|
|
import { getOpenId } from '@/utils/storage'; |
|
|
|
import { FetchSessionKey, FetchDecryptPhone } from '@/api/user.js'; |
|
|
|
import {FetchInitScreenSetting, FetchSessionKey, FetchDecryptPhone } from '@/api/user.js'; |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
@ -140,6 +140,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
onLoad() { |
|
|
|
this.getScreenSetting(); |
|
|
|
this.getSessionKey(); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -165,7 +166,15 @@ export default { |
|
|
|
console.error('获取sessionKey失败:', error); |
|
|
|
} |
|
|
|
}, |
|
|
|
async getScreenSetting() { |
|
|
|
const res = await FetchInitScreenSetting({ libcode: config.LIB_CODE }); |
|
|
|
|
|
|
|
if(res.data.library_logo && res.data.library_logo.context){ |
|
|
|
this.libraryLogo = config.baseUrl + '/files/' + res.data.library_logo.context; |
|
|
|
}else{ |
|
|
|
this.libraryLogo = null; |
|
|
|
} |
|
|
|
}, |
|
|
|
getPhoneNumber(e) { |
|
|
|
if (e.detail.errMsg !== 'getPhoneNumber:ok') { |
|
|
|
uni.showToast({ title: '取消授权', icon: 'none' }); |
|
|
|
|