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

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

View File

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

View File

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

View File

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

View File

@@ -239,6 +239,14 @@ const apiService = {
console.log(data); console.log(data);
resolve(service.post(url,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 { export {