将部分本地图片上传服务器,避免小程序打包主包过大

This commit is contained in:
Double-_-Z 2025-02-07 21:50:05 +08:00
parent d82bbf1584
commit e8097e42f0
5 changed files with 4 additions and 2 deletions

View File

@ -54,7 +54,7 @@
:text="item.optionName" @click="selectElement" :class="judge(index)?'u-tag-select':''"></u-tag> --> :text="item.optionName" @click="selectElement" :class="judge(index)?'u-tag-select':''"></u-tag> -->
<view class="section-tags" v-for="(item,index) in getOptions" :key="item.id" <view class="section-tags" v-for="(item,index) in getOptions" :key="item.id"
:class="judge(index)?'section-tags-select':''" @click="selectElement(index)"> :class="judge(index)?'section-tags-select':''" @click="selectElement(index)">
<image :src="'/static/'+item.optionImage"></image> <image :src="fileUrl+item.optionImage"></image>
{{ item.optionName }} {{ item.optionName }}
</view> </view>
</view> </view>

View File

@ -63,7 +63,7 @@
:on-change="selectImage" :file-list="formData.fileList" :disabled="formData.resultFile===''&&(serviceItem.type===3||serviceItem.type===1)"> :on-change="selectImage" :file-list="formData.fileList" :disabled="formData.resultFile===''&&(serviceItem.type===3||serviceItem.type===1)">
<view class="ulview-block" v-if="formData.fileList&&formData.fileList.length === 0" <view class="ulview-block" v-if="formData.fileList&&formData.fileList.length === 0"
:style="formData.resultFile===''&&(serviceItem.type===3||serviceItem.type===1)?{opacity:0.6,cursor: 'default'}:{}"> :style="formData.resultFile===''&&(serviceItem.type===3||serviceItem.type===1)?{opacity:0.6,cursor: 'default'}:{}">
<image class="upload-gif" src="/static/upload-center.gif"></image> <image class="upload-gif" :src="fileUrl+uploadCenter"></image>
<view class="upload-title">点击 / 拖拽上传图片</view> <view class="upload-title">点击 / 拖拽上传图片</view>
<view class="upload-tips">请上传大小为<text>5KB~5MB</text>的图片</view> <view class="upload-tips">请上传大小为<text>5KB~5MB</text>的图片</view>
</view> </view>
@ -119,6 +119,8 @@ export default {
diamondIcon: 'diamond.png', diamondIcon: 'diamond.png',
// //
editorIcon: 'static/pixel/workshops/editor.png', editorIcon: 'static/pixel/workshops/editor.png',
//
uploadCenter: 'upload-center.gif',
// //
windowHeight: 0, windowHeight: 0,
// //

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 911 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 KiB