|
@@ -2,7 +2,75 @@
|
|
|
<div class="surrounding">
|
|
|
<van-tabs :active="active" @change="onChange">
|
|
|
<van-tab title="新增发布" :name="0">
|
|
|
- <newRelease_com></newRelease_com>
|
|
|
+ <div class="newRelease_com">
|
|
|
+ <ul class="predetermineUl">
|
|
|
+ <li class="predetermineLi2" style="border-bottom: none">
|
|
|
+ <div class="liName">标题</div>
|
|
|
+ <van-field
|
|
|
+ :value="postData.constant"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入"
|
|
|
+ class="myField"
|
|
|
+ maxlength="50"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <ul class="predetermineUl">
|
|
|
+ <li class="detailLi2" style="border-bottom: none">
|
|
|
+ <span class="liName">
|
|
|
+ 快捷选择
|
|
|
+ </span>
|
|
|
+ <div class="detailLi2Box">
|
|
|
+ <div class="detailLi2BoxTop">
|
|
|
+ <div class="checkItem" :class="checkedName===item.label?'checked':''" v-for="item in checkList" :key="item.id" @click="clickCheck(item)">{{item.label}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">地址</span>
|
|
|
+ <span >
|
|
|
+ <input class="liInfo" placeholder="选择地址" disabled>
|
|
|
+ <van-icon name="location" style="color: rgba(51, 51, 51, 0.90)"/>
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" style="border-bottom: none">
|
|
|
+ <span class="liName">电话</span>
|
|
|
+ <span >
|
|
|
+ <input class="liInfo" placeholder="请填写">
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <ul class="predetermineUl">
|
|
|
+ <li class="detailLi2">
|
|
|
+ <div class="titleBox" style="margin-bottom: 24rpx">
|
|
|
+ <span class="liName">简介</span>
|
|
|
+ <span class="tips">(支持图片上传限20M内,最多1张)</span>
|
|
|
+ </div>
|
|
|
+ <van-uploader
|
|
|
+ :max-count="12"
|
|
|
+ @delete="deleteRYXXZP"
|
|
|
+ :file-list="fileList"
|
|
|
+ @after-read="uploadRYXXZP"
|
|
|
+ :show-upload="true"
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ :value="postData.constant"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入"
|
|
|
+ class="myField"
|
|
|
+ maxlength="2000"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="buttonBox">
|
|
|
+ <button class="btn zcBtn">暂存</button>
|
|
|
+ <button class="btn tjBtn">发布</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</van-tab>
|
|
|
<van-tab title="发布记录" :name="1">
|
|
|
<releaseRecord_com/>
|
|
@@ -12,34 +80,37 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import newRelease_com from "./components/newRelease_com.vue";
|
|
|
import releaseRecord_com from "./components/releaseRecord_com.vue";
|
|
|
export default {
|
|
|
name: "index",
|
|
|
components:{
|
|
|
- newRelease_com,
|
|
|
releaseRecord_com
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
- active: 0,
|
|
|
+ active:0,
|
|
|
+ dc_key: ['periphery_type'],
|
|
|
+ fileList:[],
|
|
|
+ checkList:[],
|
|
|
postData:{},
|
|
|
- checkList:[
|
|
|
- {name:'干洗',isCheck:true},
|
|
|
- {name:'维修',isCheck:false},
|
|
|
- {name:'家政服务',isCheck:false},
|
|
|
- {name:'桶装水',isCheck:false},
|
|
|
- {name:'其他',isCheck:false},
|
|
|
- ],
|
|
|
checkedName:'干洗'
|
|
|
}
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.getByCodes()
|
|
|
+ },
|
|
|
methods:{
|
|
|
- onChange(e) {
|
|
|
-
|
|
|
+ async getByCodes() {
|
|
|
+ let data = await getByCodes(JSON.stringify(this.dc_key));
|
|
|
+ this.dic_SelectList = this.$common.handleDicList(data);
|
|
|
+ this.checkList = this.dic_SelectList.periphery_type
|
|
|
+ console.log('checkList',this.checkList)
|
|
|
},
|
|
|
- clickCheck(item) {
|
|
|
- this.checkedName = item.name
|
|
|
+ clickCheck(item){
|
|
|
+ this.checkedName = item.label
|
|
|
+ },
|
|
|
+ onChange(e){
|
|
|
+
|
|
|
},
|
|
|
deleteRYXXZP(event) {
|
|
|
this.fileList.splice(event.detail.index, 1);
|
|
@@ -57,6 +128,7 @@ export default {
|
|
|
success(res) {
|
|
|
// 上传完成需要更新 fileList
|
|
|
let data = JSON.parse(res.data);
|
|
|
+ console.log('data',data)
|
|
|
that.fileList.push({
|
|
|
imgUrl: "/FileController/download/" + data.data[0],
|
|
|
id: data.data[0],
|