首先引入copyRight方法
import {
newcomerList,
copyRight
} from '@/api/api.js';
在 methods中增加getCopyRight方法,修改文件/uniapp/pages/user/index.vue
methods:{
getCopyRight(){
this.copyRightText = uni.getStorageSync('copyNameInfo');
this.copyRightImg = uni.getStorageSync('copyImageInfo');
if(!this.copyRightText || !this.copyRightImg){
copyRight().then(res => {
let data = res.data;
// #ifndef APP-PLUS
this.site_config = data.record_No;
// #endif
if(!data.copyrightContext && !data.copyrightImage){
data.copyrightImage = '/static/images/support.png'
}
this.copyRightText = data.copyrightContext
this.copyRightImg = data.copyrightImage
uni.setStorageSync('copyNameInfo', data.copyrightContext);
uni.setStorageSync('copyImageInfo', data.copyrightImage);
// #ifdef MP
uni.setStorageSync('MPSiteData', JSON.stringify({site_logo:data.site_logo,site_name:data.site_name}));
// #endif
}).catch(err => {
return this.$util.Tips({
title: err.msg
});
});
}
},
},
在onShow事件中调用getCopyRight方法,onShow中其他逻辑请勿动;
onShow:function(){
this.getCopyRight();
},
修改后需要从新打包H5,小程序端需要重新发布审核
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}