罗世杰:招商、出租推广发布跳转

This commit is contained in:
LuoShijie
2023-11-17 15:17:03 +08:00
parent 10136f43f7
commit 46ea8e4ee9
5 changed files with 47 additions and 11 deletions

View File

@@ -5,6 +5,7 @@
:key="shopid"
:shopInfo="item"
:is-adshow="isADshow"
:adlinkPath="adlinkPath"
:show-style="showStyle"
:is-edit="isEdit"
@delItem="handleDel"
@@ -39,6 +40,12 @@
return true
}
},
adlinkPath: {
type: String,
default() {
return ''
}
},
isEdit: {
type: Boolean,
default() {

View File

@@ -67,7 +67,7 @@
v-if="isADShow"
class="list-ads bottom-common"
style="font-size: 11px;"
@click="handleAD()"
@click="handleAD"
>
<view>
<text>已将该店推给</text>
@@ -95,7 +95,8 @@
* @property {Object} shopInfo 传入商铺对象数据
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
* @property {Boolean} isADshow 是否显示推广广告
* @property {Boolean} isEdit 是否显示编辑和删除
* @property {Boolean} isEdit 是否显示编辑和删除
* @property {String} adlinkPath 推广广告链接
*/
export default {
props: {
@@ -107,24 +108,35 @@
}
}
},
// 展示商铺的样式类型
showStyle:{
type: Number,
default() {
return 0
}
},
// 是否展示推广广告
isADShow: {
type: Boolean,
default() {
return true
}
},
// 推广广告链接
adlinkPath: {
type: String,
default() {
return ''
}
},
// 是否可编辑
isEdit: {
type: Boolean,
default() {
return false
}
}
},
},
data() {
@@ -142,6 +154,7 @@
console.log("点击了编辑ID为",shopid);
},
handleDel(shopid) {
// 需完善删除请求
this.$emit('delItem', shopid)
},
enterDetail(){
@@ -150,11 +163,19 @@
})
},
handleAD(){
uni.navigateTo({
url: '/pages/publish/publishTransfer/publishTransfer'
})
// TODO 完成页面跳转
if (this.adlinkPath) {
uni.navigateTo({
url: this.adlinkPath
})
}else {
uni.navigateTo({
url: '/pages/publish/publishTransfer/publishTransfer'
})
}
}
}
},
}
</script>

View File

@@ -15,7 +15,7 @@
<DropDown></DropDown>
</view>
<view class="marginLR10">
<ShowShopList :showStyle="2"/>
<ShowShopList :showStyle="2" :adlinkPath = "adlinkPath"/>
</view>
</view>
</template>
@@ -24,7 +24,7 @@
export default {
data() {
return {
adlinkPath: "/pages/publish/publishRent/publishRent"
}
},
methods: {

View File

@@ -15,7 +15,7 @@
<DropDown></DropDown>
</view>
<view class="marginLR10">
<ShowShopList :showStyle="2"/>
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath"/>
</view>
</view>
</template>
@@ -24,7 +24,7 @@
export default {
data() {
return {
adlinkPath: "/pages/publish/publishInvestment/publishInvestment"
}
},
methods: {

View File

@@ -239,6 +239,14 @@ const apiService = {
console.log(data);
resolve(service.post(url,data))
})
},
//获取商铺列表
getShopList(data){
const type = data.type
const url = `shop/alllist/?type=${type}`
return new Promise((resolve,reject) => {
resolve(service.get(url))
})
}
}
export {