Fix:[#988,#987,#986,#985,#983]修复测试反馈的问题和调整内容

This commit is contained in:
lifizer
2024-03-22 11:51:18 +08:00
parent 0febe3a5a4
commit 18aeb9bdfd
12 changed files with 536 additions and 282 deletions
+3 -2
View File
@@ -441,7 +441,7 @@ export default {
onPageScroll(e) {
this.scrollData = e
},
onLoad: function (options) {
onLoad(options) {
if (options.id) {
this.id = options.id || null
this.partnerId = options.partnerId || null
@@ -469,7 +469,7 @@ export default {
if (!this.isLoad) {
return
}
if (this.inn.hasProduct <= 0) {
if (this.inn.hasProduct > 0) {
this.fetchGoods()
}
this.fetchInnInfoList()
@@ -823,6 +823,7 @@ export default {
@import "@/assets/css/store.less";
.my-inn-page {
padding: 0 0 100rpx 0;
background-color: #f6f6f6;
}
.cover-box {
position: relative;
+33 -35
View File
@@ -8,7 +8,7 @@
'active': tabIndex === index
}"
@click="changeTab(index)"
>{{item.label}}</text>
>{{ item.label }}</text>
</view>
<form @submit="formSubmit">
<view class="form-item">
@@ -37,6 +37,7 @@
:dataList="picsArray"
:upload_img_wh="uploadImgWH"
:upload_max="uploadMax"
:upload_count="uploadCount"
:url="uploadUrl"
:type='uploadType'
:header="uploadHeader"
@@ -62,14 +63,14 @@
</template>
<script>
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue';
import jinEdit from '@/pagesInn/components/jin-edit/jin-edit.vue';
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue'
import jinEdit from '@/pagesInn/components/jin-edit/jin-edit.vue'
import {
VUE_APP_API_URL
} from "@/config";
} from '@/config'
import {
postHotelNewsAdd
} from "@/api/inn.js";
} from '@/api/inn.js'
export default {
components: {
tmUpload,
@@ -77,7 +78,6 @@
},
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
uploadUrl: VUE_APP_API_URL + '/api/upload',
uploadType: 'image',
uploadCount: 9,
@@ -88,19 +88,18 @@
uploadedFilesArray: [],
uploadMax:10,
picsArray: [],
showUpload:true,
showUpload: true,
hotelId: 0,
tabData: [{
label: "图文动态",
type: "NT_TEXT",
uploadType: "image",
label: '图文动态',
type: 'NT_TEXT',
uploadType: 'image',
uploadCount: 9
},
{
label: "视频动态",
type: "NT_VIDEO",
uploadType: "video",
label: '视频动态',
type: 'NT_VIDEO',
uploadType: 'video',
uploadCount: 1
}
],
@@ -113,17 +112,16 @@
}
},
onLoad(option) {
this.hotelId = option.hotelId;
this.hotelId = option.hotelId
},
methods: {
changeTab(index) {
this.tabIndex = index;
this.showUpload = false;
this.uploadType = this.tabData[index].uploadType;
this.uploadCount = this.tabData[index].uploadCount;
this.tabIndex = index
this.showUpload = false
this.uploadType = this.tabData[index].uploadType
this.uploadCount = this.tabData[index].uploadCount
setTimeout(()=>{
this.showUpload = true;
this.showUpload = true
},100)
},
editOk(res) {
@@ -135,41 +133,41 @@
},
formSubmit(e) {
if (!this.form.title) {
this.$dialog.error("请输入动态标题");
return;
this.$dialog.error('请输入动态标题')
return
}
if (!this.form.intro) {
this.$dialog.error("请输入简介");
return;
this.$dialog.error('请输入简介')
return
}
if (!this.form.content) {
this.$dialog.error("请输入资讯详情");
return;
this.$dialog.error('请输入资讯详情')
return
}
if (this.uploadedFilesArray.length == 0) {
this.$dialog.error("请上传动态图片或视频");
return;
this.$dialog.error('请上传动态图片或视频')
return
}
uni.showLoading();
postHotelNewsAdd({
hotelId: this.hotelId,
name: this.form.title,
intro: this.form.intro,
content: this.form.content,
content: this.form.content.replace(/\<img src/g, '<img style="display: block;max-width: 100%;" src'),
type: this.uploadType === 'image' ? 'NT_TEXT' : 'NT_VIDEO',
resources: this.uploadType === 'image' ? this.uploadedFilesArray : [],
video: this.uploadType === 'image' ? '' : this.uploadedFilesArray[0]
}).then(res => {
uni.hideLoading();
this.$dialog.toast({
mes: "发布成功!"
});
mes: '发布成功!'
})
setTimeout(() => {
this.$yrouter.back();
}, 1000);
this.$yrouter.back()
}, 3000)
}).catch((err) => {
uni.hideLoading();
this.$dialog.error(err.msg);
this.$dialog.error(err.msg)
})
}
}