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">
|
||||
<tn-list-cell padding="36rpx" :arrow="true"
|
||||
@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>
|
||||
{{item.name}}
|
||||
<view class="list__right">
|
||||
@ -36,6 +36,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apiImgUrl: store.state.imgUrl,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
|
@ -25,9 +25,9 @@
|
||||
</image>
|
||||
</view>
|
||||
<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="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>
|
||||
|
@ -44,7 +44,8 @@
|
||||
export default {
|
||||
data() {
|
||||
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: '',
|
||||
fileList: '',
|
||||
formData: {},
|
||||
@ -60,7 +61,7 @@
|
||||
var user = uni.getStorageSync('userInfo');
|
||||
let problem_images = [];
|
||||
this.fileList.forEach(function(item, index) {
|
||||
problem_images.push(item.response.data.fullurl);
|
||||
problem_images.push(item.response.data.url);
|
||||
});
|
||||
var form = {};
|
||||
form.association_id = user.association_id;
|
||||
|
@ -16,9 +16,12 @@
|
||||
<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;">
|
||||
<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;"
|
||||
<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
|
||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">{{item.member_name}}</text>
|
||||
@ -34,11 +37,12 @@
|
||||
</view>
|
||||
<view v-if="item.problem_images!=null && item.problem_images!=''"
|
||||
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>
|
||||
<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 :src="item.problem_images[2]"
|
||||
<image :src="apiImgUrl+item.problem_images[2]"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||
</view>
|
||||
<view v-if="item.answer_content !=''&&item.answer_content!=null" class="tn-flex"
|
||||
@ -78,7 +82,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
apiImgUrl: store.state.imgUrl,
|
||||
list: [],
|
||||
page: 1
|
||||
}
|
||||
|
@ -32,12 +32,12 @@
|
||||
</view>
|
||||
<view v-if="info.problem_images!=null && info.problem_images!=''"
|
||||
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>
|
||||
<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;">
|
||||
</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>
|
||||
</view>
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
<image src="/static/da.png" style="width: 35rpx;" class="no-img" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="tn-text-ellipsis-2"
|
||||
<view
|
||||
style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;color: #9B9B9B;">
|
||||
<view v-html="info.answer_content"></view>
|
||||
</view>
|
||||
@ -76,7 +76,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
apiImgUrl: store.state.imgUrl,
|
||||
id: 0,
|
||||
info: {}
|
||||
}
|
||||
|
@ -21,12 +21,21 @@
|
||||
<view style="padding: 30rpx;">
|
||||
<view v-for="item in userList"
|
||||
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;"
|
||||
mode="widthFix" class="no-img"></image>
|
||||
<image v-if="current==0" src="/static/ask_dai.png"
|
||||
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>
|
||||
<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;"
|
||||
<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
|
||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">{{item.member_name}}</text>
|
||||
@ -40,12 +49,14 @@
|
||||
{{item.issue_names}}
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.problem_images!=null && item.problem_images!=''" style="text-align: center;margin-top: 20rpx;">
|
||||
<image src="/static/def.png"
|
||||
<view v-if="item.problem_images!=null && item.problem_images!=''"
|
||||
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>
|
||||
<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 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>
|
||||
</view>
|
||||
|
||||
@ -71,7 +82,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
apiImgUrl: store.state.imgUrl,
|
||||
current: 0,
|
||||
List: [{
|
||||
'name': '待审核',
|
||||
|
@ -39,7 +39,7 @@ const store = new Vuex.Store({
|
||||
|
||||
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
|
||||
// app版本
|
||||
vuex_version: "1.0.49",
|
||||
vuex_version: "1.0.52",
|
||||
// 是否使用自定义导航栏
|
||||
vuex_custom_nav_bar: true,
|
||||
// 状态栏高度
|
||||
|
Loading…
x
Reference in New Issue
Block a user