refactor: 优化图片路径处理及样式调整
- 统一使用 `apiImgUrl` 拼接图片路径,提升代码可维护性 - 调整部分页面样式,优化用户体验 - 更新 `vuex_version` 至 1.0.52
This commit is contained in:
parent
1cc556a15c
commit
6574738694
@ -15,7 +15,7 @@
|
|||||||
<block v-for="(item, index) in list" :key="index">
|
<block v-for="(item, index) in list" :key="index">
|
||||||
<tn-list-cell padding="36rpx" :arrow="true"
|
<tn-list-cell padding="36rpx" :arrow="true"
|
||||||
@click="openUrl('/pages/packageA/info/policy_list?id='+item.id)">
|
@click="openUrl('/pages/packageA/info/policy_list?id='+item.id)">
|
||||||
<image :src="item.image"
|
<image :src="apiImgUrl+item.image"
|
||||||
style="width: 50rpx;height: 50rpx;vertical-align: middle;margin-right: 20rpx;"></image>
|
style="width: 50rpx;height: 50rpx;vertical-align: middle;margin-right: 20rpx;"></image>
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
<view class="list__right">
|
<view class="list__right">
|
||||||
@ -36,6 +36,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
apiImgUrl: store.state.imgUrl,
|
||||||
list: []
|
list: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding-left: 20rpx;position: relative;">
|
<view style="padding-left: 20rpx;position: relative;">
|
||||||
<view>{{item.article_title}}</view>
|
<view class="tn-text-ellipsis-2">{{item.article_title}}</view>
|
||||||
<view style="position: absolute;bottom: 10rpx;width: 100%;">
|
<view style="position: absolute;bottom: 10rpx;width: 100%;">
|
||||||
<view style="color: #9B9B9B;">发布时间:{{formatTimestamp(item.create_time)}}</view>
|
<view style="color: #9B9B9B;font-size: 24rpx;white-space: nowrap;">发布时间:{{formatTimestamp(item.create_time)}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
action: store.state.apiUrl+'/api/common/upload',
|
action: store.state.apiUrl+'/common/upload',
|
||||||
|
//action: 'http://192.168.10.176/api/common/upload',
|
||||||
issue_names: '',
|
issue_names: '',
|
||||||
fileList: '',
|
fileList: '',
|
||||||
formData: {},
|
formData: {},
|
||||||
@ -60,7 +61,7 @@
|
|||||||
var user = uni.getStorageSync('userInfo');
|
var user = uni.getStorageSync('userInfo');
|
||||||
let problem_images = [];
|
let problem_images = [];
|
||||||
this.fileList.forEach(function(item, index) {
|
this.fileList.forEach(function(item, index) {
|
||||||
problem_images.push(item.response.data.fullurl);
|
problem_images.push(item.response.data.url);
|
||||||
});
|
});
|
||||||
var form = {};
|
var form = {};
|
||||||
form.association_id = user.association_id;
|
form.association_id = user.association_id;
|
||||||
|
@ -16,10 +16,13 @@
|
|||||||
<view v-for="item in list" @click="openUrl('/pages/packageB/ask/info?id='+item.id)"
|
<view v-for="item in list" @click="openUrl('/pages/packageB/ask/info?id='+item.id)"
|
||||||
style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;">
|
style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;">
|
||||||
<view>
|
<view>
|
||||||
<image v-if="item.photo_image !='' && item.photo_image!=null" :src="apiImgUrl+item.photo_image" style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
<image v-if="item.photo_image !='' && item.photo_image!=null"
|
||||||
|
:src="apiImgUrl+item.photo_image"
|
||||||
|
style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||||
|
mode="aspectFill"></image>
|
||||||
|
<image v-if="item.photo_image =='' || item.photo_image==null" src="/static/def.png"
|
||||||
|
style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image v-if="item.photo_image =='' || item.photo_image==null" src="/static/def.png" style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
<text
|
<text
|
||||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">{{item.member_name}}</text>
|
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">{{item.member_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -34,11 +37,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="item.problem_images!=null && item.problem_images!=''"
|
<view v-if="item.problem_images!=null && item.problem_images!=''"
|
||||||
style="text-align: center;margin-top: 20rpx;">
|
style="text-align: center;margin-top: 20rpx;">
|
||||||
<image :src="item.problem_images[0]"
|
<image :src="apiImgUrl+item.problem_images[0]"
|
||||||
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
||||||
<image :src="item.problem_images[1]" style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
<image :src="apiImgUrl+item.problem_images[1]"
|
||||||
|
style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
||||||
</image>
|
</image>
|
||||||
<image :src="item.problem_images[2]"
|
<image :src="apiImgUrl+item.problem_images[2]"
|
||||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.answer_content !=''&&item.answer_content!=null" class="tn-flex"
|
<view v-if="item.answer_content !=''&&item.answer_content!=null" class="tn-flex"
|
||||||
@ -78,7 +82,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiImgUrl: this.$store.state.imgUrl,
|
apiImgUrl: store.state.imgUrl,
|
||||||
list: [],
|
list: [],
|
||||||
page: 1
|
page: 1
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="info.problem_images!=null && info.problem_images!=''"
|
<view v-if="info.problem_images!=null && info.problem_images!=''"
|
||||||
style="text-align: center;margin-top: 20rpx;">
|
style="text-align: center;margin-top: 20rpx;">
|
||||||
<image @click="previewImage(0)" :src="info.problem_images[0]"
|
<image @click="previewImage(0)" :src="apiImgUrl+info.problem_images[0]"
|
||||||
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
||||||
<image @click="previewImage(1)" :src="info.problem_images[1]"
|
<image @click="previewImage(1)" :src="apiImgUrl+info.problem_images[1]"
|
||||||
style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
||||||
</image>
|
</image>
|
||||||
<image @click="previewImage(2)" :src="info.problem_images[2]"
|
<image @click="previewImage(2)" :src="apiImgUrl+info.problem_images[2]"
|
||||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -57,7 +57,7 @@
|
|||||||
<image src="/static/da.png" style="width: 35rpx;" class="no-img" mode="widthFix">
|
<image src="/static/da.png" style="width: 35rpx;" class="no-img" mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view class="tn-text-ellipsis-2"
|
<view
|
||||||
style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;color: #9B9B9B;">
|
style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;color: #9B9B9B;">
|
||||||
<view v-html="info.answer_content"></view>
|
<view v-html="info.answer_content"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiImgUrl: this.$store.state.imgUrl,
|
apiImgUrl: store.state.imgUrl,
|
||||||
id: 0,
|
id: 0,
|
||||||
info: {}
|
info: {}
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,22 @@
|
|||||||
<view style="padding: 30rpx;">
|
<view style="padding: 30rpx;">
|
||||||
<view v-for="item in userList"
|
<view v-for="item in userList"
|
||||||
style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;position: relative;">
|
style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;position: relative;">
|
||||||
<image src="/static/ask_ok.png" style="width: 100rpx;position: absolute;right: 0;top: 0;"
|
<image v-if="current==0" src="/static/ask_dai.png"
|
||||||
mode="widthFix" class="no-img"></image>
|
style="width: 100rpx;position: absolute;right: 0;top: 0;" mode="widthFix" class="no-img">
|
||||||
|
</image>
|
||||||
|
<image v-if="current==1" src="/static/ask_ok.png"
|
||||||
|
style="width: 100rpx;position: absolute;right: 0;top: 0;" mode="widthFix" class="no-img">
|
||||||
|
</image>
|
||||||
|
<image v-if="current==2" src="/static/ask_no.png"
|
||||||
|
style="width: 100rpx;position: absolute;right: 0;top: 0;" mode="widthFix" class="no-img">
|
||||||
|
</image>
|
||||||
<view>
|
<view>
|
||||||
<image v-if="item.photo_image !='' && item.photo_image!=null" :src="apiImgUrl+item.photo_image" style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
<image v-if="item.photo_image !='' && item.photo_image!=null" :src="apiImgUrl+item.photo_image"
|
||||||
|
style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||||
|
mode="aspectFill"></image>
|
||||||
|
<image v-if="item.photo_image =='' || item.photo_image==null" src="/static/def.png"
|
||||||
|
style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image v-if="item.photo_image =='' || item.photo_image==null" src="/static/def.png" style="border-radius: 50%;width: 50rpx;height: 50rpx;vertical-align: middle;"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
<text
|
<text
|
||||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">{{item.member_name}}</text>
|
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">{{item.member_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -40,12 +49,14 @@
|
|||||||
{{item.issue_names}}
|
{{item.issue_names}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.problem_images!=null && item.problem_images!=''" style="text-align: center;margin-top: 20rpx;">
|
<view v-if="item.problem_images!=null && item.problem_images!=''"
|
||||||
<image src="/static/def.png"
|
style="text-align: center;margin-top: 20rpx;">
|
||||||
|
<image @click="previewImage(0)" :src="apiImgUrl+item.problem_images[0]"
|
||||||
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
||||||
<image src="/static/def.png" style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
<image @click="previewImage(1)" :src="apiImgUrl+item.problem_images[1]"
|
||||||
|
style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
||||||
</image>
|
</image>
|
||||||
<image src="/static/def.png"
|
<image @click="previewImage(2)" :src="apiImgUrl+item.problem_images[2]"
|
||||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -71,7 +82,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiImgUrl: this.$store.state.imgUrl,
|
apiImgUrl: store.state.imgUrl,
|
||||||
current: 0,
|
current: 0,
|
||||||
List: [{
|
List: [{
|
||||||
'name': '待审核',
|
'name': '待审核',
|
||||||
@ -85,20 +96,20 @@
|
|||||||
}],
|
}],
|
||||||
status: 1,
|
status: 1,
|
||||||
userList: [],
|
userList: [],
|
||||||
page:1
|
page: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getUserList();
|
this.getUserList();
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.page+=1;
|
this.page += 1;
|
||||||
this.getUserList();
|
this.getUserList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
change(e) {
|
change(e) {
|
||||||
this.userList=[];
|
this.userList = [];
|
||||||
this.page=1;
|
this.page = 1;
|
||||||
this.current = e;
|
this.current = e;
|
||||||
this.status = this.List[e].type;
|
this.status = this.List[e].type;
|
||||||
this.getUserList();
|
this.getUserList();
|
||||||
@ -106,8 +117,8 @@
|
|||||||
getUserList() {
|
getUserList() {
|
||||||
getNwwbUser({
|
getNwwbUser({
|
||||||
status: this.status,
|
status: this.status,
|
||||||
page:this.page,
|
page: this.page,
|
||||||
size:10
|
size: 10
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
@ -39,7 +39,7 @@ const store = new Vuex.Store({
|
|||||||
|
|
||||||
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
|
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
|
||||||
// app版本
|
// app版本
|
||||||
vuex_version: "1.0.49",
|
vuex_version: "1.0.52",
|
||||||
// 是否使用自定义导航栏
|
// 是否使用自定义导航栏
|
||||||
vuex_custom_nav_bar: true,
|
vuex_custom_nav_bar: true,
|
||||||
// 状态栏高度
|
// 状态栏高度
|
||||||
|
Loading…
x
Reference in New Issue
Block a user