Feat(时令尝鲜):接口对接
This commit is contained in:
+45
-78
@@ -2,28 +2,22 @@
|
||||
<view class="pkg-join-index">
|
||||
<image class="img-banner" :src="images.topImage" mode="scaleToFill"/>
|
||||
|
||||
<view class="box flex flex-col ai-center">
|
||||
<image class="img-title" :src="webUrl+'/20230413103123003753.png'" mode="scaleToFill"/>
|
||||
<!-- <view class="content flex ai-center">-->
|
||||
<!-- <image class="img-fire" :src="webUrl+'/20230413103130660107.png'" mode="scaleToFill"/>-->
|
||||
<!-- <view class="txt flex ai-center">目前已有-->
|
||||
<!-- <text>{{ count }}</text>-->
|
||||
<!-- 人参加活动-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<!-- <view class="box flex flex-col ai-center">-->
|
||||
<!-- <image class="img-title" :src="webUrl+'/20230413103123003753.png'" mode="scaleToFill"/>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<image class="img-item" :src="images.goodSupplierImage"
|
||||
<image class="img-item" mode="widthFix" :src="images.goodSupplierImage"
|
||||
@click="goto('goods_supplier')" v-show="partnerType==='province_partner'||partnerType===''"/>
|
||||
<image class="img-item" :src="images.wenwanSupplierImage"
|
||||
<image class="img-item" mode="widthFix" :src="images.wenwanSupplierImage"
|
||||
@click="goto('wenwan_supplier')" v-show="partnerType==='pioneer'||partnerType===''"/>
|
||||
<image class="img-item" :src="images.hotelImage"
|
||||
<image class="img-item" mode="widthFix" :src="images.hotelImage"
|
||||
@click="goto('shop')" v-show="partnerType==='pioneer'||partnerType===''"/>
|
||||
<image class="img-item" mode="widthFix" :src="images.wholesalerImage" @click="goto('wholesaler')"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCount, getImages, getShopData} from "@/api/join";
|
||||
import {getImages, getShopData} from "@/api/join";
|
||||
|
||||
export default {
|
||||
name: "pkgJoinIndex",
|
||||
@@ -32,55 +26,72 @@ export default {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
partnerId: "",
|
||||
partnerType: "",
|
||||
count: 0,
|
||||
hotelId: null,
|
||||
hasHotel: null,
|
||||
hasSupplier: null,
|
||||
hasWholesaler: null,
|
||||
images: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.partnerId = options.partnerId || "";
|
||||
getCount().then(({data}) => this.count = data.count);
|
||||
getImages().then(({data}) => this.images = data);
|
||||
getShopData(this.partnerId).then(({data}) => {
|
||||
this.partnerType = data.partnerType;
|
||||
this.hotelId = data.hotelId;
|
||||
this.hasHotel = data.hasHotel;
|
||||
this.hasSupplier = data.hasSupplier;
|
||||
this.hasWholesaler = data.hasWholesaler;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goto(target) {
|
||||
|
||||
switch (target) {
|
||||
case "goods_supplier":
|
||||
if (this.hasSupplier === 1) {
|
||||
uni.showToast({
|
||||
title: "您已成为供应商/员工,无需重复申请",
|
||||
icon: "none"
|
||||
})
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为供应商/员工,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}`)
|
||||
}
|
||||
break;
|
||||
case "wenwan_supplier":
|
||||
if (this.hasSupplier === 1) {
|
||||
uni.showToast({
|
||||
title: "您已成为供应商/员工,无需重复申请",
|
||||
icon: "none"
|
||||
})
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为供应商/员工,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}`)
|
||||
}
|
||||
break;
|
||||
case "shop":
|
||||
if (this.hasHotel === 1) {
|
||||
uni.showToast({
|
||||
title: "您已开通店铺,无需重复申请",
|
||||
icon: "none"
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: "您已开通店铺,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
this.$yrouter.push("/pagesInn/inn/innHome?id="+this.hotelId)
|
||||
} else {
|
||||
this.$yrouter.push('/pkg_join/views/shop?partnerId=' + this.partnerId)
|
||||
}
|
||||
break;
|
||||
case "wholesaler":
|
||||
if (this.hasWholesaler === 1) {
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为采购批发商,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/wholesaler`)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,6 +100,8 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
.pkg-join-index {
|
||||
padding-bottom: 46rpx;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -98,57 +111,11 @@ export default {
|
||||
height: 378rpx;
|
||||
}
|
||||
|
||||
.img-title {
|
||||
width: 556rpx;
|
||||
height: 104rpx;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.img-fire {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.img-item {
|
||||
width: 682rpx;
|
||||
height: 320rpx;
|
||||
margin: 0 34rpx 46rpx;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 682rpx;
|
||||
//height: 240rpx;
|
||||
margin: 24rpx auto 30rpx;
|
||||
border-radius: 40rpx;
|
||||
background: rgba(255, 0, 85, 0.02);
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 516rpx;
|
||||
height: 64rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 28rpx;
|
||||
border-radius: 36rpx;
|
||||
background: rgba(255, 86, 74, 0.08);
|
||||
}
|
||||
|
||||
.txt {
|
||||
color: #FF564A;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 40rpx;
|
||||
margin: 0 8rpx;
|
||||
padding: 0 18rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #FF0055;
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
height: auto;
|
||||
margin: 40rpx 34rpx 0;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user