Merge branch 'dev' into test

This commit is contained in:
linxi
2025-03-27 18:13:53 +08:00
25 changed files with 376 additions and 82 deletions
+6
View File
@@ -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})
}
+2
View File
@@ -204,12 +204,14 @@ export default {
selectCoupon(id) { selectCoupon(id) {
this.couponId = id this.couponId = id
this.selectItem = this.list.find(e => e.id === id) || {} this.selectItem = this.list.find(e => e.id === id) || {}
// this.$emit('select', this.selectItem)
this.list.map(item => { this.list.map(item => {
item.checked = id === item.id item.checked = id === item.id
}) })
}, },
setCoupon() { setCoupon() {
if (this.current === 1) return if (this.current === 1) return
console.log(this.current, '====1=======');
uni.setStorageSync('couponId', this.couponId) uni.setStorageSync('couponId', this.couponId)
this.$emit('change', this.selectItem || {}) this.$emit('change', this.selectItem || {})
this.$emit('ok', this.couponId) this.$emit('ok', this.couponId)
+1 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<view v-if="show" class="guide-remark white" @touchmove.stop.prevent="" > <view v-if="show" class="guide-remark white" @touchmove.stop.prevent="" @click="next">
<view class="guid-wrap"> <view class="guid-wrap">
<image <image
v-for="(img, index) in functionGuideData.imgs" v-for="(img, index) in functionGuideData.imgs"
+39 -4
View File
@@ -46,7 +46,14 @@
<view class="titlev12-dark-text f12-font-32">购买数量</view> <view class="titlev12-dark-text f12-font-32">购买数量</view>
<view class="carnum acea-row row-left"> <view class="carnum acea-row row-left">
<view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view> <view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
<view class="item v12-font-36 v12-font-bold v12-dark-text cart-btn">{{ cartNum }}</view> <input
type="number"
:min="1"
:max="attrObj.productSelect.stock"
@input="inputNumer"
v-model="cartNumber"
style="height: 55rpx !important;"
class="item v12-font-36 v12-font-bold v12-dark-text cart-btn" />
<view <view
style="border-radius:0 40rpx 40rpx 0" style="border-radius:0 40rpx 40rpx 0"
class="item plus v12-font-bold v12-white-text v12-primary v12-primary-border v12-font-36 cart-btn" class="item plus v12-font-bold v12-white-text v12-primary v12-primary-border v12-font-36 cart-btn"
@@ -89,7 +96,7 @@ export default {
}, },
paddingBottom: { paddingBottom: {
type: String, type: String,
default: '140rpx' default: '160rpx'
}, },
showOk: { showOk: {
type: Boolean, type: Boolean,
@@ -110,17 +117,43 @@ export default {
}, },
data() { data() {
return { return {
cartNumber: this.cartNum,
attrObj: { attrObj: {
productSelect: {}, productSelect: {},
productAttr: [] productAttr: []
} }
} }
}, },
watch: {
cartNum: {
handler(val) {
console.log(val, 'cardNum');
this.cartNumber = val || 1
},
deep: true
},
cartNumber(val) {
console.log(+val <= 1 || val === '', 'cartNumber');
if(+val <= 1 || val === '') {
this.cartNumber = 1
this.$forceUpdate()
this.$emit('input', 1)
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 })
return
} else {
this.$emit('input', +val)
this.$emit("changeFun", { action: "ChangeCartNum", value: +val })
}
}
},
created() { created() {
this.$set(this, 'attrObj', JSON.parse(JSON.stringify(this.attr))) this.$set(this, 'attrObj', JSON.parse(JSON.stringify(this.attr)))
console.log(this.attrObj) console.log(this.attrObj)
}, },
methods: { methods: {
inputNumer(e) {
},
reRender(data) { reRender(data) {
this.$set(this, 'attrObj', JSON.parse(JSON.stringify(data))) this.$set(this, 'attrObj', JSON.parse(JSON.stringify(data)))
// console.log(this.attrObj.productAttr) // console.log(this.attrObj.productAttr)
@@ -135,10 +168,12 @@ export default {
this.$emit("changeFun", { action: "changeattr", value: false }) this.$emit("changeFun", { action: "changeattr", value: false })
}, },
CartNumDes() { CartNumDes() {
this.$emit("changeFun", { action: "ChangeCartNum", value: false }) this.cartNumber--
this.$emit("changeFun", { action: "ChangeCartNum", value: this.cartNumber })
}, },
CartNumAdd() { CartNumAdd() {
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 }) this.cartNumber++
this.$emit("changeFun", { action: "ChangeCartNum", value: this.cartNumber })
}, },
tapAttr(index, subIndex, subItem) { tapAttr(index, subIndex, subItem) {
// 缺货的点击了没效果 // 缺货的点击了没效果
+4 -4
View File
@@ -139,10 +139,10 @@ export default {
} }
}, },
videoError(e) { videoError(e) {
uni.showModal({ // uni.showModal({
content: '网络错误,请稍后重试!', // content: '网络错误,请稍后重试!',
showCancel: false // showCancel: false
}); // });
}, },
uploadFile(paths) { uploadFile(paths) {
const promises = paths.map((path) => { const promises = paths.map((path) => {
@@ -113,6 +113,10 @@ export default{
this.$refs.popup.open(); this.$refs.popup.open();
}, },
closePopup(action=""){ closePopup(action=""){
if(action == "cancel"){
this.$refs.popup.close();
return false;
}
if(this.compareTwoTimeRange(this.startDefaultTimeArr , this.endDefaultTimeArr)){ if(this.compareTwoTimeRange(this.startDefaultTimeArr , this.endDefaultTimeArr)){
uni.showToast({ uni.showToast({
title:"开始时间不能大于结束时间", title:"开始时间不能大于结束时间",
+6 -2
View File
@@ -276,7 +276,11 @@ export default {
let stock = productSelect.stock || 0 let stock = productSelect.stock || 0
let num = this.attr.productSelect let num = this.attr.productSelect
if (changeValue) { if (changeValue) {
num.cart_num++ if(changeValue > 1) {
num.cart_num = changeValue
} else {
num.cart_num++
}
if (num.cart_num > stock) { if (num.cart_num > stock) {
if(stock < 1) { if(stock < 1) {
this.$set(this.attr.productSelect, 'cart_num', 1) this.$set(this.attr.productSelect, 'cart_num', 1)
@@ -291,7 +295,7 @@ export default {
this.$set(this, 'cart_num', 1) this.$set(this, 'cart_num', 1)
} else { } else {
this.$set(this.attr.productSelect, 'cart_num', num.cart_num) this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
this.$set(this, 'cart_num', num.cart_num) // this.$set(this, 'cart_num', num.cart_num)
} }
} }
} else { } else {
+1
View File
@@ -383,6 +383,7 @@ export default {
this.mescroll && this.mescroll.triggerDownScroll() this.mescroll && this.mescroll.triggerDownScroll()
}, },
search() { search() {
if(this.keyword === '') return
this.listGroup.findIndex((group, index) => { this.listGroup.findIndex((group, index) => {
let result let result
group.city.forEach(item => { group.city.forEach(item => {
+1 -1
View File
@@ -28,7 +28,7 @@
:text="recommendKeyword" :text="recommendKeyword"
:icon="' '" :icon="' '"
color="#333" color="#333"
fontSize="12" fontSize="14"
bgColor="transparent" bgColor="transparent"
@change="changeRecommendKeyword" @change="changeRecommendKeyword"
direction="column"> direction="column">
+1 -2
View File
@@ -476,9 +476,8 @@ export default {
this.changeType(this.type); this.changeType(this.type);
}, },
tabChange(item) { tabChange(item) {
this.type = item.index this.type = item.index
this.$yroute.query.type = this.type
this.changeType(); this.changeType();
}, },
changeType() { changeType() {
+10 -2
View File
@@ -111,7 +111,7 @@
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white"> <view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> --> <!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in orderInfo.cartInfo" :key="d"> <view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in orderInfo.cartInfo" :key="d" @click="goGoodsCon(cart)">
<view class="v12-justify-between"> <view class="v12-justify-between">
<view class=""> <view class="">
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.productInfo.image"></image> <image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.productInfo.image"></image>
@@ -136,7 +136,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1)"> <view class="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1)">
<view class="v12-justify-between v12-mt-3 v12-dark-text"> <view class="v12-justify-between v12-mt-3 v12-dark-text">
<view class="v12-font-24 v12-dark-text"> <view class="v12-font-24 v12-dark-text">
商品总价 商品总价
@@ -546,6 +546,14 @@ export default {
}, },
methods: { methods: {
copyClipboard, copyClipboard,
goGoodsCon(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.productId
}
})
},
handleShowMore() { handleShowMore() {
this.showMoreDeliver = !this.showMoreDeliver; this.showMoreDeliver = !this.showMoreDeliver;
}, },
+3 -1
View File
@@ -388,7 +388,8 @@ export default {
this.computedPrice('shipping_type'); this.computedPrice('shipping_type');
}, },
async couponId(value) { async couponId(value) {
this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === value) this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === +value)
this.couponTitle = this.couponList['usable']?.[this.couponIndex]?.couponTitle
await this.computedPrice('couponId') await this.computedPrice('couponId')
} }
}, },
@@ -438,6 +439,7 @@ export default {
methods: { methods: {
isNullOrEmpty, isNullOrEmpty,
couponMax(e) { couponMax(e) {
console.log(e, 'dxdhkasjhdajks');
this.couponTitle = e.couponTitle this.couponTitle = e.couponTitle
this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0 this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
}, },
+46 -11
View File
@@ -19,7 +19,15 @@
<text>搜索</text> <text>搜索</text>
</button> </button>
<view class="swpier-bar" v-if="showkey"> <view class="swpier-bar" v-if="showkey">
<u-notice-bar duration="4000" @change="change" :text="recommendKeyword" :icon="' '" color="#999" fontSize="12" bgColor="transparent" direction="column"></u-notice-bar> <u-notice-bar
duration="4000"
@change="change"
:text="recommendKeyword"
:icon="' '"
color="#999"
fontSize="14"
bgColor="transparent"
direction="column"></u-notice-bar>
</view> </view>
</view> </view>
<view @click="goShoppingCart()" class="item animated bounceIn"> <view @click="goShoppingCart()" class="item animated bounceIn">
@@ -44,7 +52,7 @@
<view <view
v-for="item of historyKey" v-for="item of historyKey"
:key="item.id" :key="item.id"
class="item one-t" class="item one-t v12-font-28"
@click="toSearch(item.word)" @click="toSearch(item.word)"
> >
{{ item.word }} {{ item.word }}
@@ -55,12 +63,20 @@
<view class="title">热门搜索</view> <view class="title">热门搜索</view>
<view class="list acea-row"> <view class="list acea-row">
<view <view
v-for="keywordsKey of keywords" v-for="(hot, key) in keywords"
:key="keywordsKey" :key="key"
class="item" class="item v12-font-28 v12-align-center"
@click="toSearch(keywordsKey)" :style="{paddingRight: hot.isNew === 1 ? '0 !important' : '24rpx !important'}"
@click="toSearch(hot.keyword)"
> >
{{ keywordsKey }}
<view v-if="hot.isNew === 2">
<image :src="webUrl + '/icon/fire.png'" class="fire-icon"></image>
</view>
{{ hot.keyword }}
<view class="new-icon-box" v-if="hot.isNew === 1" >
<image class="new-icon" :src="webUrl + '/icon/new.png'"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -128,6 +144,7 @@ export default {
name: 'GoodSearch', name: 'GoodSearch',
data: function () { data: function () {
return { return {
webUrl: this.$VUE_APP_RESOURCES_URL,
showkey: true, showkey: true,
currentSearch: '', currentSearch: '',
keywords: [], keywords: [],
@@ -219,7 +236,7 @@ export default {
getSearchPageConfig().then(res => { getSearchPageConfig().then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
this.keywords = data.hotKeyword this.keywords = data.searchKeywords
this.rankingArr.push(data.ranking1) this.rankingArr.push(data.ranking1)
this.rankingArr.push(data.ranking2) this.rankingArr.push(data.ranking2)
this.recommendKeyword = data.recommendKeyword.split(',') this.recommendKeyword = data.recommendKeyword.split(',')
@@ -269,6 +286,23 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.new-icon-box{
position: relative;
width: 50rpx;
height: 100%;
}
.fire-icon{
width: 24rpx;
height: 24rpx;
margin-right: 5rpx;
}
.new-icon{
width: 40rpx;
height: 26rpx;
left: 10rpx;
top: -5rpx;
position: absolute;
}
.iconfont{ .iconfont{
position: relative; position: relative;
} }
@@ -351,11 +385,12 @@ export default {
box-sizing: border-box; box-sizing: border-box;
margin: 0 24rpx 20rpx 0; margin: 0 24rpx 20rpx 0;
padding: 0 24rpx; padding: 0 24rpx;
border-radius: 28rpx; border-radius: 12rpx;
background: #F1F0EE; background: #F2F2F2;
color: #666; color: #333;
font-size: 24rpx; font-size: 24rpx;
line-height: 48rpx; line-height: 48rpx;
position: relative;
} }
} }
+36 -17
View File
@@ -17,13 +17,16 @@
<view> <view>
<view class="share acea-row row-between row-middle" style="flex-wrap: nowrap;margin-top: 0;"> <view class="share acea-row row-between row-middle" style="flex-wrap: nowrap;margin-top: 0;">
<view class="money font-color-lightred acea-row v12-align-center"> <view class="money font-color-lightred acea-row v12-align-center">
<view> <view v-if="!storeInfo.isNegotiable">
<text class="v12-font-22 v12-red-text"></text> <text class="v12-font-22 v12-red-text"></text>
<text class=" v12-primary-text v12-font-44 v12-red-text">{{ attr.productSelect.price }}</text> <text class=" v12-primary-text v12-font-44 v12-red-text">{{ attr.productSelect.price }}</text>
<text class="v12-ml-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;"></text> <text class="v12-ml-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;"></text>
<text class="v12-mr-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;">{{ attr.productSelect.otPrice }}</text> <text class="v12-mr-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;">{{ attr.productSelect.otPrice }}</text>
<text v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" class="v12-white-text v12-red v12-font-22 v12-radius-40 v12-px-1 v12-font-weight-400">会员价</text> <text v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" class="v12-white-text v12-red v12-font-22 v12-radius-40 v12-px-1 v12-font-weight-400">会员价</text>
</view> </view>
<view v-if="storeInfo.isNegotiable === 1" class="v12-primary-text v12-font-32 v12-font-weight" @click="goRoom">
价格面议
</view>
</view> </view>
<view style="flex-shrink:0;" class="acea-row row-middle share-btn" @click="listenerActionSheet"> <view style="flex-shrink:0;" class="acea-row row-middle share-btn" @click="listenerActionSheet">
<image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image> <image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image>
@@ -192,7 +195,13 @@
<!-- v9 优惠券开始 --> <!-- v9 优惠券开始 -->
<u-popup :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons()"> <u-popup :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons()">
<CouponsPopup :two-list="couponList" @ok="setCoupon" @change="changeCoupons" @close="changeCoupons()" :showTab="false" :currentPrice="storeInfo.price" /> <CouponsPopup
:two-list="couponList"
@ok="setCoupon"
@change="changeCoupons"
@close="changeCoupons()"
:showTab="false"
:currentPrice="storeInfo.price" />
</u-popup> </u-popup>
<!-- v9 优惠券结束 --> <!-- v9 优惠券结束 -->
@@ -402,7 +411,7 @@
<!-- 商品详情结束 --> <!-- 商品详情结束 -->
<!-- 购买须知开始 --> <!-- 购买须知开始 -->
<view class="acea-row row-column bg-white" style="padding: 20rpx;border-width: 2px;border-color: #939390;"> <view class="acea-row row-column bg-white" style="padding: 20rpx;border-width: 2px;border-color: #939390;padding-bottom: 60rpx;">
<view class="conter"> <view class="conter">
<rich-text :nodes="buyNotice" /> <rich-text :nodes="buyNotice" />
</view> </view>
@@ -449,7 +458,7 @@
<view <view
class="btn-car v12-primary-text v12-primary-border" class="btn-car v12-primary-text v12-primary-border"
:class="{ :class="{
'btn-car-disabled': (attr.productSelect.stock === 0 && attr.cartAttr) || storeInfo.stock === 0 'btn-car-disabled': (attr.productSelect.stock === 0 && attr.cartAttr) || storeInfo.stock === 0 || storeInfo.isNegotiable === 1
}" }"
@click="joinCart" @click="joinCart"
> >
@@ -458,7 +467,7 @@
<view <view
class="btn-buy" class="btn-buy"
:class="{ :class="{
'btn-buy-disabled': (attr.productSelect.stock === 0 && attr.cartAttr) || storeInfo.stock === 0 'btn-buy-disabled': (attr.productSelect.stock === 0 && attr.cartAttr) || storeInfo.stock === 0 || storeInfo.isNegotiable === 1
}" }"
@click="tapBuy" @click="tapBuy"
> >
@@ -806,6 +815,7 @@ export default {
}) })
}, },
goRoom() { goRoom() {
console.log(this.systemStore);
const params = { const params = {
goodsId: this.id, goodsId: this.id,
goodsName: this.attr.productSelect.store_name, goodsName: this.attr.productSelect.store_name,
@@ -816,8 +826,9 @@ export default {
goodsData: '', goodsData: '',
seckillData: '' seckillData: ''
} }
const name = this.storeInfo.merName
uni.navigateTo({ uni.navigateTo({
url: `/pkg_common/views/room?id=${this.storeInfo.merId}&name=${this. systemStore.name}&params=${JSON.stringify(params)}` url: `/pkg_common/views/room?id=${this.storeInfo.merId}&name=${name}&params=${JSON.stringify(params)}`
}) })
}, },
goodsDetail(item) { goodsDetail(item) {
@@ -1238,7 +1249,12 @@ export default {
let stock = productSelect.stock || 0 let stock = productSelect.stock || 0
let num = this.attr.productSelect let num = this.attr.productSelect
if (changeValue) { if (changeValue) {
num.cart_num++ console.log(changeValue);
if(changeValue > 1) {
num.cart_num = changeValue
} else {
num.cart_num++
}
if (num.cart_num > stock) { if (num.cart_num > stock) {
if(stock < 1) { if(stock < 1) {
this.$set(this.attr.productSelect, 'cart_num', 1) this.$set(this.attr.productSelect, 'cart_num', 1)
@@ -1253,7 +1269,7 @@ export default {
this.$set(this, 'cart_num', 1) this.$set(this, 'cart_num', 1)
} else { } else {
this.$set(this.attr.productSelect, 'cart_num', num.cart_num) this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
this.$set(this, 'cart_num', num.cart_num) // this.$set(this, 'cart_num', num.cart_num)
} }
} }
} else { } else {
@@ -1347,7 +1363,7 @@ export default {
}, },
// 点击加入购物车按钮 // 点击加入购物车按钮
joinCart() { joinCart() {
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0) { if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || this.storeInfo.isNegotiable === 1) {
return return
} }
// 0=加入购物车 // 0=加入购物车
@@ -1356,7 +1372,7 @@ export default {
}, },
// 立即购买 // 立即购买
tapBuy() { tapBuy() {
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0) { if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0 || this.storeInfo.isNegotiable === 1) {
return return
} }
// 1=直接购买 // 1=直接购买
@@ -1766,12 +1782,12 @@ export default {
.btn-car { .btn-car {
width: 200rpx; width: 200rpx;
height: 60rpx; height: 70rpx;
line-height: 60rpx; line-height: 70rpx;
box-sizing: border-box; box-sizing: border-box;
margin-right: 20rpx; margin-right: 20rpx;
border: 2rpx solid #FF564A; border: 2rpx solid #FF564A;
border-radius: 30rpx; border-radius:100rpx;
color: #FF564A; color: #FF564A;
} }
@@ -1782,9 +1798,9 @@ export default {
.btn-buy { .btn-buy {
width: 200rpx; width: 200rpx;
height: 60rpx; height: 70rpx;
line-height: 60rpx; line-height: 70rpx;
border-radius: 30rpx; border-radius: 70rpx;
background: #C52733; background: #C52733;
color: #FFFFFF; color: #FFFFFF;
} }
@@ -2015,7 +2031,10 @@ export default {
.footer .icon-shoucang1 { .footer .icon-shoucang1 {
color: #eb3729; color: #eb3729;
} }
.product-con .footer{
height: 140rpx !important;
padding-bottom: 20rpx;
}
.product-con .product-intro .conter view { .product-con .product-intro .conter view {
width: 100% !important; width: 100% !important;
} }
+102
View File
@@ -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)">
点击进入
</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])
uni.setStorageSync('homeId', this.list[e].id)
this.show = false
})
},
open(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: #BD3124;
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: #BD3124;
border-radius: 20rpx;
opacity: 0.5;
}
</style>
+1 -1
View File
@@ -248,7 +248,7 @@
:show-fullscreen-btn="false" :show-fullscreen-btn="false"
class="video-item" class="video-item"
:id="'video-item' + index" :id="'video-item' + index"
@play="infoItemViewClick(item, index)" @click="infoItemViewClick(item, index)"
> >
</video> </video>
+42 -7
View File
@@ -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,
@@ -543,7 +551,7 @@ export default {
break break
} }
if (id) { if (id) {
this.id = id || null this.id = uni.getStorageSync('homeId') || id
this.partnerId = options.partnerId || null this.partnerId = options.partnerId || null
} else { } else {
let obj = uni.getEnterOptionsSync() let obj = uni.getEnterOptionsSync()
@@ -587,7 +595,36 @@ export default {
} }
this.fetchInnDetail() this.fetchInnDetail()
}, },
watch: {
activeIndex: {
handler(val) {
console.log(val);
if (val === 1) {
this.fetchInnInfoList()
}
},
deep: true,
immediate: true
}
},
methods: { methods: {
goHome(e) {
this.id = e.id
if(this.activeIndex !==1) {
this.activeInde = 1
} else {
this.fetchInnInfoList()
}
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
}, },
@@ -1065,11 +1102,9 @@ export default {
background: #fff; background: #fff;
.name { .name {
padding: 8rpx 6rpx; padding: 0 6rpx;
font-size: 26rpx; font-size: 26rpx;
line-height: 36rpx;
color: #333333; color: #333333;
height: 70rpx;
} }
.price-line { .price-line {
+1 -1
View File
@@ -28,7 +28,7 @@
<view class="datetime" v-if="item.last_msg">{{ item.last_msg.created_at }}</view> <view class="datetime" v-if="item.last_msg">{{ item.last_msg.created_at }}</view>
</view> </view>
<view class="sub v12-align-center v12-justify-between" v-if="item.last_msg"> <view class="sub v12-align-center v12-justify-between" v-if="item.last_msg">
<view class="one-t">{{ item.last_msg.msg_type===0?item.last_msg.msg_content:'[图片]' }}</view> <view class="one-t" style="width: 90%;">{{ item.last_msg.msg_type===0?item.last_msg.msg_content:'[图片]' }}</view>
<view v-if="item.unread_num > 0" class="unread-num v12-primary"> {{ item.unread_num < 99 ? item.unread_num : '99+' }}</view> <view v-if="item.unread_num > 0" class="unread-num v12-primary"> {{ item.unread_num < 99 ? item.unread_num : '99+' }}</view>
</view> </view>
</view> </view>
+10 -5
View File
@@ -51,7 +51,8 @@ export default {
hasSupplier: null, hasSupplier: null,
hasWholesaler: null, hasWholesaler: null,
images: null, images: null,
pageKeyId: Object.freeze('merchantApplyIndex') pageKeyId: Object.freeze('merchantApplyIndex'),
canApplyHotel: false
} }
}, },
onLoad(options) { onLoad(options) {
@@ -63,6 +64,7 @@ export default {
this.hasHotel = data.hasHotel this.hasHotel = data.hasHotel
this.hasSupplier = data.hasSupplier this.hasSupplier = data.hasSupplier
this.hasWholesaler = data.hasWholesaler this.hasWholesaler = data.hasWholesaler
this.canApplyHotel = data.canApplyHotel
}) })
}, },
methods: { methods: {
@@ -83,11 +85,14 @@ export default {
} }
break break
case 'shop': case 'shop':
if (this.hasHotel === 1) { if (!this.canApplyHotel) {
this.$yrouter.push('/pagesInn/inn/innHome?id='+this.hotelId) uni.showToast({ // 使用uni-app官方提示API
} else { title: '您的店铺数量已到达上限,不能继续申请店铺',
this.$yrouter.push('/pkg_join/views/shop?partnerId=' + this.partnerId) icon: 'none'
})
return
} }
this.$yrouter.push('/pkg_join/views/shop?partnerId=' + this.partnerId)
break break
case 'wholesaler': case 'wholesaler':
if (this.hasWholesaler === 1) { if (this.hasWholesaler === 1) {
+5 -1
View File
@@ -732,6 +732,8 @@ export default {
const local = uni.getStorageSync(type) || {} const local = uni.getStorageSync(type) || {}
const local_form = uni.getStorageSync(type + '_form') || {} const local_form = uni.getStorageSync(type + '_form') || {}
this.quaPics = uni.getStorageSync(type + '_quaPics') || [] this.quaPics = uni.getStorageSync(type + '_quaPics') || []
console.log(this.quaPics, 'this.quaPics');
if(!local_form.serviceTime) { if(!local_form.serviceTime) {
local_form.serviceTime = '00:00' local_form.serviceTime = '00:00'
} }
@@ -894,9 +896,11 @@ export default {
}) })
} }
// 商家资质 // 商家资质
this.quaPics = []
const quaPicsTemp = this.form.qualification && this.form.qualification.split(',') || [] const quaPicsTemp = this.form.qualification && this.form.qualification.split(',') || []
if (quaPicsTemp.length > 0) { if (quaPicsTemp.length > 0) {
console.log(quaPicsTemp, 'quaPicsTemp--------');
this.quaPics = []
quaPicsTemp.map(item => { quaPicsTemp.map(item => {
if (item) { if (item) {
this.quaPics.push({url: item}) this.quaPics.push({url: item})
+4 -3
View File
@@ -844,6 +844,7 @@ export default {
scrollTop: 100, scrollTop: 100,
duration: 300 duration: 300
}) })
console.log(res.top);
const imgs = [ const imgs = [
{ {
url: this.webUrl + '/引导页素材/千县名品/Group 4/Group 4-1.png', url: this.webUrl + '/引导页素材/千县名品/Group 4/Group 4-1.png',
@@ -851,7 +852,7 @@ export default {
position: 'absolute', position: 'absolute',
zIndex: 99, zIndex: 99,
width: '366rpx', width: '366rpx',
top: 460*2+'rpx', top: (res.top-180)*2+'rpx',
left: 80*2+'rpx', left: 80*2+'rpx',
height: '167rpx', height: '167rpx',
/* px: ; */ /* px: ; */
@@ -864,7 +865,7 @@ export default {
position: 'absolute', position: 'absolute',
zIndex: 99, zIndex: 99,
width: '117rpx', width: '117rpx',
top: 440*2+'rpx', top: (res.top-200)*2+'rpx',
left: -60*2+'rpx', left: -60*2+'rpx',
right: 0, right: 0,
margin: 'auto', margin: 'auto',
@@ -878,7 +879,7 @@ export default {
position: 'absolute', position: 'absolute',
zIndex: 99, zIndex: 99,
width: '117rpx', width: '117rpx',
top: 440*2+'rpx', top: (res.top-200)*2+'rpx',
left: 200*2+'rpx', left: 200*2+'rpx',
height: '46rpx', height: '46rpx',
}, },
@@ -491,7 +491,7 @@
position: relative; position: relative;
/* width: 40px; */ /* width: 40px; */
/* height: 40px; */ /* height: 40px; */
background: #fff; /* background: #fff; */
border-radius: 20px; border-radius: 20px;
padding: 10px; padding: 10px;
display: inline-block; display: inline-block;
+21 -7
View File
@@ -24,17 +24,17 @@
<u-icon :name="webUrl + '/icon/share.png'" ></u-icon> <u-icon :name="webUrl + '/icon/share.png'" ></u-icon>
</button> </button>
</view> </view>
<view v-if="myGift.isCurrentUser === 1" @click="toOrder" style="z-index: 10"> <view v-if="myGift.isCurrentUser === 1" @click="toOrder" style="z-index: 10; display: flex;flex-direction: column;align-items: center;">
<view class="address-btn v12-white-text v12-primary"> <view class="address-btn v12-white-text v12-primary">
您已领取礼包 您已领取礼包
</view> </view>
<view class="v12-text-center v12-font-26 v12-primary-text v12-mt-3">查看礼包详情>></view> <view class="info-btn v12-text-center v12-font-32 v12-mt-3">查看礼包详情>></view>
</view> </view>
<view v-if="isReceive && myGift.isCurrentUser !== 1" @click="toHome" style="z-index: 10"> <view v-if="isReceive && myGift.isCurrentUser !== 1" @click="toHome" style="z-index: 10; display: flex;flex-direction: column;align-items: center;">
<view class="address-btn v12-white-text v12-primary"> <view class="address-btn v12-white-text v12-primary">
礼包已被领取 礼包已被领取
</view> </view>
<view class="v12-text-center v12-font-26 v12-primary-text v12-mt-3" style="z-index: 10">去商城看看>></view> <view class="info-btn v12-text-center v12-font-32 v12-mt-3" style="z-index: 10">去商城看看>></view>
</view> </view>
<view class="tips"> <view class="tips">
<view class="tip-text v12-mr-1" @click="showTips"> <view class="tip-text v12-mr-1" @click="showTips">
@@ -176,6 +176,18 @@ export default {
</script> </script>
<style scoped> <style scoped>
.info-btn{
border: 1px solid #C52733;
color: #C52733;
width: 240rpx;
border-radius: 100rpx;
padding: 5rpx 40rpx;
line-height: 60rpx;
height: 60rpx;
font-weight: 600;
font-size: 32rpx;
white-space: nowrap;
}
.dialog-conent{ .dialog-conent{
height: 100vh; height: 100vh;
display: flex; display: flex;
@@ -263,14 +275,16 @@ export default {
} }
.address-btn{ .address-btn{
width: fit-content; width: fit-content;
padding: 10rpx 40rpx; padding: 5rpx 40rpx;
border-radius: 100rpx; border-radius: 100rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
height: 80rpx; height: 60rpx;
line-height: 80rpx; line-height: 60rpx;
width: 240rpx;
/* margin-top: 40rpx; */ /* margin-top: 40rpx; */
z-index: 999; z-index: 999;
text-align: center;
} }
.gift-card-modal { .gift-card-modal {
height: 704rpx; height: 704rpx;
+14 -10
View File
@@ -60,19 +60,19 @@
v-model="goodsInfo.cartNum" v-model="goodsInfo.cartNum"
:max="goodsInfo['productInfo']['attrInfo']['stock']" :max="goodsInfo['productInfo']['attrInfo']['stock']"
integer integer
disabledInput
iconStyle="color: #fff" iconStyle="color: #fff"
class="num-step" class="num-step"
@change="numberChange" @change="numberChange"
> >
<template v-slot:minus> <template v-slot:minus>
<view class="v12-minus-btn v12-font-bold flex jc-center ai-center"> <view class="v12-minus-btn v12-font-bold flex jc-center ai-center">
<u-icon name="minus" size="12" color="#FFFFFF"/> <u-icon name="minus" size="12" color="#FFFFFF"/>
</view> </view>
</template> </template>
<template v-slot:input> <!-- <template v-slot:input>
<view class="num-input tc v12-num-input">{{ goodsInfo['cartNum'] }}</view> <input type="number" @input="numberChange" class="num-input tc v12-num-input" v-model="goodsInfo['cartNum']" />
</template> </template> -->
<template v-slot:plus> <template v-slot:plus>
<view class="v12-plus-btn v12-font-bold flex jc-center ai-center v12-primary"> <view class="v12-plus-btn v12-font-bold flex jc-center ai-center v12-primary">
<u-icon name="plus" size="12" color="#FFFFFF"/> <u-icon name="plus" size="12" color="#FFFFFF"/>
@@ -397,7 +397,7 @@ export default {
console.log(err); console.log(err);
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title:"创建订单失败", title:err.msg,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
@@ -410,10 +410,14 @@ export default {
} }
} }
</script> </script>
<style>
.gift-page .u-number-box input {
height: 40rpx !important;
}
</style>
<style lang="less" scoped> <style lang="less" scoped>
.custom-cover{ .custom-cover{
height: 58rpx; height: 40rpx;
} }
.info-wrap{ .info-wrap{
width: 100%; width: 100%;
@@ -423,8 +427,8 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
.v12-num-input{ .v12-num-input{
height: 40rpx; height: 56rpx;
width: 40rpx; width: 56rpx;
border: 1px solid #E6E6E6; border: 1px solid #E6E6E6;
line-height: 40rpx; line-height: 40rpx;
font-weight: bold; font-weight: bold;
@@ -436,8 +440,8 @@ export default {
} }
.v12-minus-btn{ .v12-minus-btn{
border-radius: 28rpx 0rpx 0rpx 28rpx; border-radius: 28rpx 0rpx 0rpx 28rpx;
border: 1px solid #E6E6E6;
background-color: rgba(208,208,208,0.39); background-color: rgba(208,208,208,0.39);
border: 1px solid rgba(208,208,208,0.39);
height: 40rpx; height: 40rpx;
width: 40rpx; width: 40rpx;
font-weight: bold; font-weight: bold;
+15 -1
View File
@@ -25,9 +25,13 @@
<view style="color:#E92727;font-size: 32rpx;">{{ item['extractPrice'] }}</view> <view style="color:#E92727;font-size: 32rpx;">{{ item['extractPrice'] }}</view>
</view> </view>
</view> </view>
</view> </view>
<view>
<image class="empty-img" :src="webUrl + '/orderIcon/nodata1.png'" mode="heightFix" lazy-load="false">
</image>
</view>
</scroll-view> </scroll-view>
</template> </template>
@@ -73,12 +77,22 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.empty-img{
width: 100%;
position: absolute;
top: 0;
bottom: 200rpx;
left: 0;
right: 0;
margin: auto;
}
view { view {
line-height: 1; line-height: 1;
} }
.scroll-body { .scroll-body {
height: 100vh; height: 100vh;
background: #fff;
} }
.logs { .logs {