|
@ -30,6 +30,7 @@ |
|
|
multiple |
|
|
multiple |
|
|
width="150rpx" |
|
|
width="150rpx" |
|
|
height="150rpx" |
|
|
height="150rpx" |
|
|
|
|
|
name="fileList" |
|
|
@delete="deleteImage" |
|
|
@delete="deleteImage" |
|
|
@afterRead="afterRead" |
|
|
@afterRead="afterRead" |
|
|
:previewFullImage="true"></uv-upload> |
|
|
:previewFullImage="true"></uv-upload> |
|
@ -65,61 +66,49 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> --> |
|
|
</view> --> |
|
|
|
|
|
|
|
|
<view class="title-input box"> |
|
|
|
|
|
|
|
|
<view class="category" |
|
|
|
|
|
v-if="categoryRole.includes('code')"> |
|
|
|
|
|
<view class="title"> |
|
|
|
|
|
上传二维码(选填) |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="images box"> |
|
|
|
|
|
<uv-upload |
|
|
|
|
|
:fileList="codeFileList" |
|
|
|
|
|
:maxCount="1" |
|
|
|
|
|
multiple |
|
|
|
|
|
width="150rpx" |
|
|
|
|
|
height="150rpx" |
|
|
|
|
|
name="codeFileList" |
|
|
|
|
|
@delete="deleteImage" |
|
|
|
|
|
@afterRead="afterRead" |
|
|
|
|
|
:previewFullImage="true"></uv-upload> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="title-input box" |
|
|
|
|
|
v-if="categoryRole.includes('phone')"> |
|
|
<input type="text" placeholder="手机号码(选填)" v-model="form.phone"/> |
|
|
<input type="text" placeholder="手机号码(选填)" v-model="form.phone"/> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="title-input box" |
|
|
<view class="title-input box" |
|
|
|
|
|
v-if="categoryRole.includes('address')" |
|
|
@click="selectAddr"> |
|
|
@click="selectAddr"> |
|
|
<input type="text" |
|
|
<input type="text" |
|
|
placeholder="选择位置(选填)" |
|
|
|
|
|
|
|
|
placeholder="选择位置(选填)" |
|
|
v-model="form.address"/> |
|
|
v-model="form.address"/> |
|
|
<uv-icon |
|
|
<uv-icon |
|
|
size="40rpx" |
|
|
size="40rpx" |
|
|
name="map"></uv-icon> |
|
|
name="map"></uv-icon> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- <view class="upTop" |
|
|
|
|
|
> |
|
|
|
|
|
<view class="title"> |
|
|
|
|
|
<uv-icon name="pushpin-fill"></uv-icon> |
|
|
|
|
|
是否置顶 |
|
|
|
|
|
</view> |
|
|
|
|
|
<uv-radio-group v-model="form.topId"> |
|
|
|
|
|
<view class="list"> |
|
|
|
|
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
|
|
<view class="left"> |
|
|
|
|
|
不需要置顶 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="right"> |
|
|
|
|
|
<uv-radio |
|
|
|
|
|
size="35rpx" |
|
|
|
|
|
icon-size="35rpx" |
|
|
|
|
|
:disabled="!!id" |
|
|
|
|
|
:name="0"> |
|
|
|
|
|
</uv-radio> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="item" |
|
|
|
|
|
v-for="(item, index) in upTopList" |
|
|
|
|
|
:key="index"> |
|
|
|
|
|
<view class="left"> |
|
|
|
|
|
置顶{{ item.day }}天{{ item.money }}元 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="right"> |
|
|
|
|
|
<uv-radio |
|
|
|
|
|
size="35rpx" |
|
|
|
|
|
:disabled="!!id" |
|
|
|
|
|
icon-size="35rpx" |
|
|
|
|
|
:name="item.id"> |
|
|
|
|
|
</uv-radio> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uv-radio-group> |
|
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
<view class="title-input box" |
|
|
|
|
|
v-if="categoryRole.includes('shop')"> |
|
|
|
|
|
<input type="text" |
|
|
|
|
|
placeholder="关联店铺(选填)" |
|
|
|
|
|
v-model="form.shop"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="configBtn" |
|
|
<view class="configBtn" |
|
|
@click="$refs.configPopup.open('getPublishPostNotice')"> |
|
|
@click="$refs.configPopup.open('getPublishPostNotice')"> |
|
@ -136,14 +125,20 @@ |
|
|
ref="configPopup" |
|
|
ref="configPopup" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<pickerHospital |
|
|
|
|
|
mixinsListApi="getStorePage" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { mapState } from 'vuex' |
|
|
import { mapState } from 'vuex' |
|
|
import Position from '@/utils/position.js' |
|
|
import Position from '@/utils/position.js' |
|
|
|
|
|
import pickerHospital from '@/components/base/pickerHospital.vue' |
|
|
export default { |
|
|
export default { |
|
|
components : { |
|
|
components : { |
|
|
|
|
|
pickerHospital, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -155,11 +150,24 @@ |
|
|
}, |
|
|
}, |
|
|
id : 0, |
|
|
id : 0, |
|
|
fileList : [], |
|
|
fileList : [], |
|
|
|
|
|
codeFileList : [], |
|
|
imageMax : 9, |
|
|
imageMax : 9, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
computed : { |
|
|
computed : { |
|
|
...mapState(['cityList', 'category']), |
|
|
...mapState(['cityList', 'category']), |
|
|
|
|
|
categoryRole(){ |
|
|
|
|
|
if(!this.form.classId){ |
|
|
|
|
|
return [] |
|
|
|
|
|
} |
|
|
|
|
|
for(let i = 0;i < this.category.length;i++){ |
|
|
|
|
|
let c = this.category[i] |
|
|
|
|
|
if(c.id == this.form.classId){ |
|
|
|
|
|
return 'code,phone,address,shop'.split(',') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return [] |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
onLoad(args) { |
|
|
onLoad(args) { |
|
|
this.id = args.id |
|
|
this.id = args.id |
|
@ -208,13 +216,13 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
deleteImage(e){ |
|
|
deleteImage(e){ |
|
|
this.fileList.splice(e.index, 1) |
|
|
|
|
|
|
|
|
this[e.name].splice(e.index, 1) |
|
|
}, |
|
|
}, |
|
|
afterRead(e){ |
|
|
afterRead(e){ |
|
|
let self = this |
|
|
let self = this |
|
|
e.file.forEach(file => { |
|
|
e.file.forEach(file => { |
|
|
self.$Oss.ossUpload(file.url).then(url => { |
|
|
self.$Oss.ossUpload(file.url).then(url => { |
|
|
self.fileList.push({ |
|
|
|
|
|
|
|
|
self[e.name].push({ |
|
|
url |
|
|
url |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|