20261008
This commit is contained in:
+136
-33
@@ -1,30 +1,37 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white">
|
||||
<image src="/static/images/old/liucheng2.png" class="w-full" mode="widthFix"/>
|
||||
<view class="p-20">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="拍卖信息发布" name="0">
|
||||
<type_0/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购信息发布" name="1">
|
||||
<type_1/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="承租信息发布" name="2">
|
||||
<type_2/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物资回收信息发布" name="3">
|
||||
<type_3/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a bg-white">
|
||||
<image src="/static/images/old/liucheng2.png" class="w-full" mode="widthFix"/>
|
||||
<view class="p-20">
|
||||
<el-tabs v-model="activeName" stretch>
|
||||
<el-tab-pane label="拍卖信息发布" name="0">
|
||||
<type_0 v-if="parseInt(activeName) === 0" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum" :unitList="unitList"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="采购信息发布" name="1">
|
||||
<type_1 v-if="parseInt(activeName) === 1" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="承租、租赁信息发布" name="2">
|
||||
<type_2 v-if="parseInt(activeName) === 2" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement"
|
||||
:commonContractUrl="commonContractUrl" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物资回收信息发布" name="3">
|
||||
<type_3 v-if="parseInt(activeName) === 3" :urgentAmount="urgentAmount" :remainOldNum="remainOldNum"
|
||||
:buyOldNumAmount="buyOldNumAmount" :agreement="agreement" :contactList="contactList"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -34,13 +41,109 @@ import Type_2 from "./release/type_2.vue";
|
||||
import Type_3 from "./release/type_3.vue";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
components: {Type_3, Type_2, Type_1, Type_0},
|
||||
data() {
|
||||
return {
|
||||
activeName: '0'
|
||||
}
|
||||
name: "list",
|
||||
components: {Type_3, Type_2, Type_1, Type_0},
|
||||
data() {
|
||||
return {
|
||||
activeName: '0',
|
||||
urgentAmount: 1,
|
||||
remainOldNum: vk.getVuex('$user.userInfo.remainOldNum') ? parseInt(vk.getVuex('$user.userInfo.remainOldNum')) : 0,
|
||||
buyOldNumAmount: 5,
|
||||
agreement: '',
|
||||
commonContractUrl: '',
|
||||
contactList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUrgentAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587dd2fe0ec19027452c5b5'
|
||||
},
|
||||
})
|
||||
this.urgentAmount = res.content
|
||||
},
|
||||
methods: {}
|
||||
async getBuyOldAmount() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '6587dd54189f86d49b3d5ff5'
|
||||
},
|
||||
})
|
||||
this.buyOldNumAmount = res.content
|
||||
},
|
||||
async getUnitList() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: 'a45325976635f10600341a7f2f472cd1'
|
||||
},
|
||||
})
|
||||
this.unitList = res.content.split(',')
|
||||
},
|
||||
async getAgreement() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '65885d5b862066f18a4e4a36'
|
||||
},
|
||||
})
|
||||
this.agreement = res.content
|
||||
},
|
||||
async getCommonContractUrl() {
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/dict/pub/getDetail',
|
||||
data: {
|
||||
id: '657d36befe975f63af1f24e7'
|
||||
},
|
||||
})
|
||||
this.commonContractUrl = res.content
|
||||
},
|
||||
async getContactList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/businessContact/kh/getList',
|
||||
})
|
||||
this.contactList = rows
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.getUnitList()
|
||||
this.getUrgentAmount()
|
||||
this.getBuyOldAmount()
|
||||
this.getAgreement()
|
||||
this.getCommonContractUrl()
|
||||
this.getContactList()
|
||||
},
|
||||
onShow() {
|
||||
vk.userCenter.getCurrentUserInfo({
|
||||
success: (data) => {
|
||||
this.remainOldNum = data.userInfo.remainOldNum ? parseInt(data.userInfo.remainOldNum) : 0
|
||||
if (this.remainOldNum === 0) {
|
||||
this.$confirm('您的旧货发布次数已用完,是否立即购买?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {data} = await vk.callFunction({
|
||||
url: 'client/old/kh/buyNum',
|
||||
})
|
||||
vk.navigateTo({
|
||||
url: `/pages/index/shop/pay?id=${data}`
|
||||
})
|
||||
}).catch(() => {
|
||||
vk.navigateBack()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/deep/ .el-tabs__item.is-active{
|
||||
font-size: 1.2rem!important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user