Task:多店铺选择
This commit is contained in:
@@ -266,5 +266,11 @@ export function shareTown(id) {
|
|||||||
return request.get("/ancientTown/poster/" + id, {login: true})
|
return request.get("/ancientTown/poster/" + id, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户店铺列表
|
||||||
|
*/
|
||||||
|
export function getMerchantApply() {
|
||||||
|
return request.get("/merchantApply/userHotels", {}, {login: true})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1363,7 +1363,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击加入购物车按钮
|
// 点击加入购物车按钮
|
||||||
joinCart() {
|
joinCart() {
|
||||||
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || storeInfo.isNegotiable === 1) {
|
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || this.storeInfo.isNegotiable === 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 0=加入购物车
|
// 0=加入购物车
|
||||||
@@ -1372,7 +1372,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 立即购买
|
// 立即购买
|
||||||
tapBuy() {
|
tapBuy() {
|
||||||
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || storeInfo.isNegotiable === 1) {
|
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || this.storeInfo.isNegotiable === 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 1=直接购买
|
// 1=直接购买
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
<template>
|
||||||
|
<u-popup
|
||||||
|
:show="show"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
mode="center"
|
||||||
|
closeable
|
||||||
|
round="10"
|
||||||
|
>
|
||||||
|
<view class="v12-pa-3 pop-content">
|
||||||
|
<view class="v12-dark-text v12-font-bold pop-title">请选择登录的店铺</view>
|
||||||
|
<view v-for="(item, index) in list" :key="index" class="home-wrap">
|
||||||
|
<view>
|
||||||
|
<u-avatar :src="item.logo"></u-avatar>
|
||||||
|
</view>
|
||||||
|
<view class="name-wrap one-t">{{ item.name }}</view>
|
||||||
|
<view class="enter-btn" @click="queryHome(index)">
|
||||||
|
点击进入{{ item.id }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
show: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
queryHome(e) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$emit('enter', this.list[e])
|
||||||
|
this.show = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
open(records) {
|
||||||
|
console.log(records);
|
||||||
|
if(!records) return;
|
||||||
|
this.show = true;
|
||||||
|
this.list = records && [...records] || []
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.home-wrap{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
background: #F6F6F6;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.name-wrap{
|
||||||
|
width: 280rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.enter-btn{
|
||||||
|
width: 118rpx;
|
||||||
|
height: 42rpx;
|
||||||
|
background: #0DC5C5;
|
||||||
|
border-radius: 22rpx;
|
||||||
|
padding: 2rpx 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 42rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.pop-content{
|
||||||
|
width: 568rpx;
|
||||||
|
max-height: 860rpx;
|
||||||
|
background: rgba(255,255,255,0.39);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
.pop-title{
|
||||||
|
position: relative;
|
||||||
|
width: fit-content;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.pop-title::after{
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0rpx;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #0DC5C5;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -401,6 +401,10 @@
|
|||||||
<image :src="webUrl + '/page/hotel/edit.png'" class="img" />
|
<image :src="webUrl + '/page/hotel/edit.png'" class="img" />
|
||||||
修改资料
|
修改资料
|
||||||
</view>
|
</view>
|
||||||
|
<view class="bottom-btn" @click="changeHome">
|
||||||
|
<image :src="webUrl + '/icon/qiehuan.png'" class="img" />
|
||||||
|
切换店铺
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<goo-skeleton v-else />
|
<goo-skeleton v-else />
|
||||||
@@ -431,6 +435,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<homeList ref="homeList" @enter="goHome"></homeList>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -446,7 +451,8 @@ import {
|
|||||||
setTopHotelNew,
|
setTopHotelNew,
|
||||||
getHotelNewsZan,
|
getHotelNewsZan,
|
||||||
getHotelShareBackgroundImage,
|
getHotelShareBackgroundImage,
|
||||||
hotelNewsView
|
hotelNewsView,
|
||||||
|
getMerchantApply
|
||||||
} from "@/api/inn.js"
|
} from "@/api/inn.js"
|
||||||
import {formatDateTime} from "@/utils"
|
import {formatDateTime} from "@/utils"
|
||||||
import {getUrlParam} from "@/utils/common.js"
|
import {getUrlParam} from "@/utils/common.js"
|
||||||
@@ -454,14 +460,16 @@ import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
|||||||
import cookie from "@/utils/store/cookie"
|
import cookie from "@/utils/store/cookie"
|
||||||
import {addStore, removeStore} from "@/api/favorite"
|
import {addStore, removeStore} from "@/api/favorite"
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
import homeList from "../components/jin-edit/homeList.vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
imgBox
|
imgBox,
|
||||||
|
homeList
|
||||||
},
|
},
|
||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
homeList: [],
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
isLoad: false,
|
isLoad: false,
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
@@ -588,6 +596,18 @@ export default {
|
|||||||
this.fetchInnDetail()
|
this.fetchInnDetail()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goHome(e) {
|
||||||
|
this.id = e.id
|
||||||
|
this.fetchInnDetail()
|
||||||
|
},
|
||||||
|
changeHome() {
|
||||||
|
uni.showLoading()
|
||||||
|
getMerchantApply().then(res => {
|
||||||
|
this.$refs.homeList.open(res.data || [])
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
|
},
|
||||||
changeShare() {
|
changeShare() {
|
||||||
this.showShare = !this.showShare
|
this.showShare = !this.showShare
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user