+51
-49
@@ -1,23 +1,42 @@
|
||||
<template>
|
||||
<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>-->
|
||||
|
||||
<image class="img-item" mode="widthFix" :src="images.goodSupplierImage"
|
||||
@click="goto('goods_supplier')" v-show="partnerType==='province_partner'||partnerType===''"/>
|
||||
<image class="img-item" mode="widthFix" :src="images.wenwanSupplierImage"
|
||||
@click="goto('wenwan_supplier')" v-show="partnerType==='pioneer'||partnerType===''"/>
|
||||
<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')"/>
|
||||
<image
|
||||
:src="images.topImage"
|
||||
class="img-banner"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-show="partnerType === 'province_partner' || partnerType === ''"
|
||||
:src="images.goodSupplierImage"
|
||||
class="img-item"
|
||||
mode="widthFix"
|
||||
@click="goto('goods_supplier')"
|
||||
/>
|
||||
<image
|
||||
v-show="partnerType === 'pioneer' || partnerType === ''"
|
||||
:src="images.wenwanSupplierImage"
|
||||
class="img-item"
|
||||
mode="widthFix"
|
||||
@click="goto('wenwan_supplier')"
|
||||
/>
|
||||
<image
|
||||
v-show="partnerType === 'pioneer' || partnerType === ''"
|
||||
:src="images.hotelImage"
|
||||
class="img-item"
|
||||
mode="widthFix"
|
||||
@click="goto('shop')"
|
||||
/>
|
||||
<image
|
||||
:src="images.wholesalerImage"
|
||||
class="img-item"
|
||||
mode="widthFix"
|
||||
@click="goto('wholesaler')"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getImages, getShopData} from '@/api/join'
|
||||
import { getImages, getShopData } from '@/api/join'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
export default {
|
||||
name: 'PkgJoinIndex',
|
||||
@@ -37,63 +56,46 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.partnerId = options.partnerId || ''
|
||||
getImages().then(({data}) => this.images = data);
|
||||
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;
|
||||
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":
|
||||
case 'goods_supplier':
|
||||
if (this.hasSupplier === 1) {
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为供应商/员工,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
this.$global.goSupplierMini()
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}`)
|
||||
}
|
||||
break;
|
||||
case "wenwan_supplier":
|
||||
break
|
||||
case 'wenwan_supplier':
|
||||
if (this.hasSupplier === 1) {
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为供应商/员工,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
this.$global.goSupplierMini()
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}`)
|
||||
}
|
||||
break;
|
||||
case "shop":
|
||||
break
|
||||
case 'shop':
|
||||
if (this.hasHotel === 1) {
|
||||
// uni.showToast({
|
||||
// title: "您已开通店铺,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
this.$yrouter.push("/pagesInn/inn/innHome?id="+this.hotelId)
|
||||
this.$yrouter.push('/pagesInn/inn/innHome?id='+this.hotelId)
|
||||
} else {
|
||||
this.$yrouter.push('/pkg_join/views/shop?partnerId=' + this.partnerId)
|
||||
}
|
||||
break;
|
||||
case "wholesaler":
|
||||
break
|
||||
case 'wholesaler':
|
||||
if (this.hasWholesaler === 1) {
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为采购批发商,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
this.$global.goSupplierMini()
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/wholesaler`)
|
||||
}
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user