Browse Source

logo全更新

master
xuhuajiao 3 weeks ago
parent
commit
0e5ec7f2ca
  1. 7
      pages/home/home.vue
  2. 9
      pages/login/login.vue
  3. 2
      pages/user/user.vue
  4. 3
      subpkg/pages/book-detail/book-detail.vue
  5. 13
      subpkg/pages/register/register-form.vue
  6. 16
      subpkg/pages/register/register.vue
  7. 2
      subpkg/pages/user-info/user-info.vue

7
pages/home/home.vue

@ -4,8 +4,7 @@
<uni-icons class="erweima-top" custom-prefix="iconfont" type="icon-erweima" size="22" color="#fff" @click="showTopImgPopup"></uni-icons>
<image class="top-bar-bg" src="@/static/images/mingqi-beij@2x.png" mode="aspectFill"></image>
<view class="library-info">
<!-- 动态logo兜底本地静态图 -->
<image class="avatar" :src="libraryLogo || '/static/images/logo.jpg'" mode="aspectFill"></image>
<image class="avatar" :src="libraryLogo" mode="aspectFill"></image>
<view class="library-name">葛店经济技术开发区图书馆</view>
</view>
<uni-icons class="search-icon" type="search" size="24" @click="onToSearch"></uni-icons>
@ -233,16 +232,12 @@
</view>
</template>
<script>
import { FetchInitScreenSetting, FetchOpenId, FetchFindAllReaderBindByOpenId} from '@/api/user';
import { FetchInitScreenBookRecommend } from '@/api/book';
import config from '@/utils/config';
import { STORAGE_KEYS } from '@/utils/storage';
export default {
data() {
return {

9
pages/login/login.vue

@ -3,7 +3,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>
</view>
@ -59,6 +59,7 @@ export default {
return {
queryvalue: '',
rdpasswd: '',
libraryLogo: null,
showPwd: false,
screenConfig: {},
avatarUrl: '',
@ -141,6 +142,12 @@ export default {
thirdSecret: data.open_lib_secret?.context || '',
sm4Key: data.sm4_key?.context || ''
};
if(data.library_logo && data.library_logo.context){
this.libraryLogo = config.baseUrl + '/files/' + data.library_logo.context;
}else{
this.libraryLogo = null;
}
} catch (err) {
console.error('获取配置失败:', err);
}

2
pages/user/user.vue

@ -5,7 +5,7 @@
<view class="user-info">
<view class="avatar-btn" @click="toUserInfoPage">
<image v-if="userInfo.avatarId" :src="base64Img" class="avatar-img"></image>
<image v-else src="@/static/images/logo.jpg" class="avatar-img"></image>
<image v-else src="@/static/images/default-avatar.png" class="avatar-img"></image>
</view>
<view class="user-info-text">

3
subpkg/pages/book-detail/book-detail.vue

@ -558,7 +558,8 @@ export default {
bottom:0;
left:0;
right:0;
height:60px;
height: 50px;
padding: 0 15px;
background:#fff;
display:flex;
justify-content: space-around;

13
subpkg/pages/register/register-form.vue

@ -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' });

16
subpkg/pages/register/register.vue

@ -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>
@ -53,14 +53,28 @@
</template>
<script>
import { FetchInitScreenSetting } from '@/api/user';
import config from '@/utils/config';
export default {
data() {
return {
libraryLogo: null,
};
},
onLoad() {
this.getScreenSetting()
},
methods: {
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;
}
}
}
};
</script>

2
subpkg/pages/user-info/user-info.vue

@ -5,7 +5,7 @@
<!-- 点击获取头像 -->
<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar" class="avatar-btn">
<image v-show="avatarUrl" :src="avatarUrl" class="avatar-img"></image>
<image v-show="!avatarUrl" src="@/static/images/logo.jpg" class="avatar-img"></image>
<image v-show="!avatarUrl" src="@/static/images/default-avatar.png" class="avatar-img"></image>
<text class="tip-text">点击更换头像</text>
</button>
</view>

Loading…
Cancel
Save