wangfukang 1 month ago
parent
commit
276e8a65dc
  1. 26
      package1/group/groupBuyDetail.vue
  2. 4
      package1/group/groupBuyList.vue
  3. 154
      package1/group/groupBuySingle.vue
  4. 101
      package1/group/shopEvaluate.vue

26
package1/group/groupBuyDetail.vue

@ -16,29 +16,28 @@
<view class="left">
<view style="display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/3721d2aa18ac4700aa7ac4dfeb272b09.png" alt="" style="width: 24px;height: 24px;"/>
<text style="height: 24px;line-height: 24px;font-size: 14px;font-weight: 700;margin-left: 5px;">竹仔园牛仔农庄(第六分店)</text>
<text style="height: 24px;line-height: 24px;font-size: 14px;font-weight: 700;margin-left: 5px;">{{shopItem.shopName}}</text>
</view>
<view style="line-height: 30px;height: 30px;color: #777;">
<uni-icons type="location" size="13"></uni-icons>
<text>北校区沁园春食堂3楼321窗口</text>
<text>{{shopItem.shopAddress}}</text>
</view>
<view style="line-height: 30px;height: 30px;color: #777;">
<uni-icons type="loop" size="13"></uni-icons>
<text>周一到周日 10:50-21:00</text>
<text>周一到周日 {{shopItem.shopTakeaway.businessHourBegin}}-{{shopItem.shopTakeaway.businessHourEnd}}</text>
</view>
</view>
<view class="right">
<img @tap="makeCall('15533910775')" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" alt="" style="width: 40px;height: 40px;position: absolute;top: 32px;right: 30px;"/>
<img @tap="makeCall(shopItem.contactPhone)" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" alt="" style="width: 40px;height: 40px;position: absolute;top: 32px;right: 30px;"/>
</view>
</view>
<view class="box1">
<view style="display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/86004fa6b60e477ea1622fc0bf4c99de.png" alt="" style="width: 24px;height: 24px;" />
<text style="height: 24px;line-height: 24px;font-size: 14px;font-weight: 700;margin-left: 5px;">商家承诺</text>
<text style="height: 24px;line-height: 24px;font-size: 14px;font-weight: 700;margin-left: 5px;">商家资质</text>
</view>
<view style="display: flex;margin-top: 10px;">
<img @tap="largeImg" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/5e54d31516264fd5b056d5d6b7009e40.png" alt="" style="width: 78px;height: 24px;margin-right: 20px;" />
<img @tap="largeImg" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d9a6c7b6ebdd4fb09b1b681133752909.png" alt="" style="width: 78px;height: 24px;" />
<img @tap="largeImg" :src="item" v-for="(item,index) in shopImages" :key="index" alt="" style="width: 78px;height: 24px;margin-right: 20px;" />
</view>
</view>
<view class="box1">
@ -47,7 +46,7 @@
<text style="height: 24px;line-height: 24px;font-size: 14px;font-weight: 700;margin-left: 5px;">商家公告</text>
</view>
<view style="color: #777;line-height: 24px;margin-top: 10px;">
公告这里是第三食堂美食top1好吃不贵欢迎下好吃不贵欢欢迎下单迎下单欢迎下单
公告{{shopItem.remark}}
</view>
</view>
</view>
@ -66,14 +65,17 @@
return {
menuButtonInfo: {},
isPintuan:true,
shopItem:{},
shopImages:[],
bigImg:''
}
},
components: {
},
onLoad() {
onLoad(option) {
this.shopItem = JSON.parse(option.item)
this.shopImages = this.shopItem.shopImages.split('@@')
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
@ -85,9 +87,9 @@
this.$refs.imgPopup.open()
},
//
makeCall() {
makeCall(phone) {
uni.makePhoneCall({
phoneNumber: '15533910775'
phoneNumber: phone
});
},
back() {

4
package1/group/groupBuyList.vue

@ -78,7 +78,7 @@
</view>
<view class="shop-tag">
<text style="padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;">
{{item.shopTypeTitle}}
{{item.shopTakeaway.type}}
</text>
</view>
</view>
@ -226,6 +226,7 @@
onLoad() {
this.getEatType();
this.getShopArea();
this.getShopList();
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
@ -233,7 +234,6 @@
title: '加载中...',
mask: true
})
this.getShopList();
},
methods: {
searchShop(type,value){

154
package1/group/groupBuySingle.vue

@ -80,21 +80,21 @@
<view class="goods-list">
<view class="menu-list">
<view class="menu1" @tap="checkTab(index)" v-for="(item,index) in menuList" :key="index" :style="{'font-size':item.checked?'40rpx':'30rpx','color':item.checked?'rgba(0, 35, 28, 1)':'#777','width':item.checked?'90px':'70px'}">
<view style="width: 90px;">{{item.name}}</view>
<view style="width: 90px;">{{item.categoryName}}</view>
<img v-if="item.checked" class="checked-img" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4bb5fc7725cb4a7a84d1d3a15f05b39c.png" alt="" />
</view>
</view>
<view class="goods-member">
<view class="goods-member" v-for="(item,index) in productItem" :key="index" @tap="goDetail('product',item)">
<view class="goods-top">
<view class="goods-img">
<img src="/static/images/img/shangpintu.png" alt="">
<img :src="item.productPicture" alt="" style="border-radius: 10px;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
</view>
<view class="goods-content" @tap="goDetail('goodsDetail')">
<view class="goods-name">
牛仔农庄(医专店)
{{item.productName}}
</view>
<view class="goods-content-center">
<view class="goods-deal1">
@ -111,23 +111,21 @@
</view>
</view>
</view>
<view class="goods-content-bottom">
<view style="font-size: 28rpx;line-height: 54rpx;margin-right: 20rpx;">
90.00
</view>
<view class="pintuan-left-price">
拼团<text style="color: red;">59.90</text>
</view>
<view class="shop-tag1">
<text
style="padding: 4rpx 10rpx;background: rgba(223, 255, 176, 1);color: #777;border-radius: 6rpx;">
{{item.attributeListPrice | sliceMsg1}}
</text>
</view>
</view>
</view>
<view class="goods-bottom">
<view class="goods-btn" @tap="openPopup('pintuan',1)"
<view class="goods-btn" @tap="openPopup('xiadan','dandu',item)"
style="background: rgba(166, 255, 234, 0.3);margin-right: 6%;border: 1px solid rgba(166, 255, 234, 0.5);">
直接购买
直接购买¥{{item.attributeListPrice | sliceMsg}}
</view>
<view class="goods-btn" @tap="openPopup('pintuan',0)">
拼团购买15.00
<view class="goods-btn" @tap="openPopup('xiadan','pintuan',item)">
拼团购买¥{{item.productGroupBuyPrices | slicePrice}}
</view>
</view>
</view>
@ -136,7 +134,7 @@
<view style="width: 100%;height: 160rpx;"></view>
<view class="bottom">
<view class="bottom-left">
<view style="position: relative;width: 60rpx;height: 80rpx;margin-top: 20rpx;" @tap="openPopup('car')">
<view style="position: relative;width: 60rpx;height: 80rpx;margin-top: 20rpx;" @tap="openPopup('car','','')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/60db52398a65459e9541881c926986a4.png" alt="" />
<view class="bottom-dot">1</view>
</view>
@ -159,7 +157,7 @@
</view>
<view class="goods-top" style="padding: 0;">
<view class="goods-img">
<img src="/static/images/img/shangpintu.png" alt="">
<img src="/static/images/img/shangpintu.png" alt="" style="border-radius: 10px;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
@ -197,7 +195,7 @@
<view style="width: 100%;height: 160rpx;"></view>
<view class="bottom" style="padding-bottom: 10px;">
<view class="bottom-left">
<view style="width: 60rpx;height: 80rpx;margin-top: 10rpx;" @tap="openPopup('car')">
<view style="width: 60rpx;height: 80rpx;margin-top: 10rpx;" @tap="openPopup('car','','')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/60db52398a65459e9541881c926986a4.png" alt="" />
</view>
<view class="bottom-price" style="line-height: 24px;">
@ -220,7 +218,7 @@
</view>
<view class="goods-top">
<view class="goods-img">
<img src="/static/images/img/shangpintu.png" alt="">
<img src="/static/images/img/shangpintu.png" alt="" style="border-radius: 10px;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
@ -396,28 +394,56 @@
shopItem:{},
productItem:{},
productId:'',
productItem:[],
buyCar:new Map(),
pageNum:1,
searchForm:{
shopId:'',
pageNum: 1,
pageSize: '10',
categoryId:''
},
menuButtonInfo: {},
isPintuan:true,
menuList:[{
name:'猜你喜欢',
categoryName:'猜你喜欢',
id:'',
checked:true
},{
name:'超值套餐',
checked:false
},{
name:'清爽解腻',
checked:false
},{
name:'随心搭配',
checked:false
},{
name:'风味炸鸡',
checked:false
}]
}
},
components: {
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name = newObj[as].specPrice
}
}
return name;
},
sliceMsg1(val) {
var name = '正在有'
let aa = Math.floor(Math.random() * (15 - 5 + 1)) + 1;
name+=aa+'人下单'
return name;
},
slicePrice(val){
let begin = ''
if(val != null){
begin = val[0].groupPrice
for(let i = 0;i < val.length;i++){
if(val[i].groupPrice < begin){
begin = val[i].groupPrice
}
}
}
return begin;
}
},
onLoad(option) {
this.type = option.type
@ -426,12 +452,52 @@
}else{
this.productItem = JSON.parse(option.item)
}
console.log(this.shopItem)
this.getCategory(this.shopItem.id)
this.getProduct('')
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
methods: {
getProduct(categoryId){
let that = this
this.searchForm.shopId = this.shopItem.id
this.searchForm.categoryId = categoryId
that.tui.request("/app/product/getShareList", "POST", this.searchForm, false, false).then((res) => {
if (res.code == 200) {
if (that.pageNum == 1) {
that.productItem = res.result.records
} else {
that.productItem = [...that.productItem, ...res.result.records]
}
that.$forceUpdate()
} else {
that.tui.toast(res.message)
return
}
uni.hideLoading()
}).catch((res) => {})
},
getCategory(id){
let that = this
that.tui.request("/app/productCategory/list", "GET", {
shopId:id
}, false, true).then((res) => {
if (res.code == 200) {
if(res.result.length >0){
for(let i = 0;i<res.result.length;i++){
res.result[i].checked = false
that.menuList.push(res.result[i])
}
}
that.$forceUpdate()
} else {
that.tui.toast(res.message)
return
}
uni.hideLoading()
}).catch((res) => {})
},
checkTab(index){
for(let i=0;i<this.menuList.length;i++){
if(i == index){
@ -440,18 +506,24 @@
this.menuList[i].checked = false
}
}
this.getProduct(this.menuList[index].id);
},
openPopup(type,index){
openPopup(type,index,item){
if(type == 'car'){
this.$refs.carPopup.open('bottom')
}else if(type == 'pintuan'){
if(index == 0){
}else if(type == 'xiadan'){
if(index == 'pintuan'){
this.isPintuan = true
}else{
this.isPintuan = false
}
if(item.attributeList == '' || item.attributeList == null){
this.buyCar.has(item.id)
}else{
this.$refs.pintuanPopup.open('bottom')
}
}
},
goDetail(type) {
if (type == 'goodsDetail') {
@ -460,11 +532,11 @@
})
}else if(type == 'shopDetail'){
uni.navigateTo({
url: '/package1/group/groupBuyDetail'
url: '/package1/group/groupBuyDetail?item=' + JSON.stringify(this.shopItem)
})
}else if(type == 'shopEvaluate'){
uni.navigateTo({
url: '/package1/group/shopEvaluate'
url: '/package1/group/shopEvaluate?item=' + JSON.stringify(this.shopItem)
})
}
},
@ -590,6 +662,12 @@
text-align: right;
}
.shop-tag1 {
flex: 1;
line-height: 40rpx;
text-align: left;
}
.shop-content-bottom {
display: flex;
}

101
package1/group/shopEvaluate.vue

@ -14,28 +14,10 @@
<view class="shop-rate">
<view class="rate-left">
<view class="rate-num">
4.3
{{shopItem.shopScore}}
</view>
<view class="rate-star">
<uni-rate :disabled="true" size="20" disabledColor="rgba(255, 184, 84, 1)" :value="4.3" />
</view>
</view>
<view class="rate-right">
<view class="right1">
<view class="">
4.8
</view>
<view style="color: #777;font-size: 12px;">
包装
</view>
</view>
<view class="right1">
<view class="">
4.8
</view>
<view style="color: #777;font-size: 12px;">
品质
</view>
<uni-rate :disabled="true" size="20" disabledColor="rgba(255, 184, 84, 1)" :value="shopItem.shopScore" />
</view>
</view>
</view>
@ -52,39 +34,34 @@
</view>
</view>
</view>
<view class="evaluate-list">
<view class="evaluate-list" v-for="(item,index) in shopComments" :key="index">
<view class="eval-title">
<view class="eval-icon">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/94f91382e76c4f289d53fbf858e8732b.png"
<img :src="item.createByIcon"
alt="" />
</view>
<view class="eval-name">
<view class="name1">
匿名用户
{{item.createByName}}
</view>
<view class="eval-time">
2026-03-12
{{item.createTime}}
</view>
</view>
</view>
<view class="eval-rate">
商品 <uni-rate :disabled="true" size="20" disabledColor="rgba(255, 184, 84, 1)" :value="4.3" />
包装 4.8 品质 4.8
</view>
<view class="eval-content">
<view class="eval-text">
配送超级好的环境很开心玩的很不错以后还回来喜欢喜欢喜欢!配送超级好的环境很开心玩的很不错以后还回来喜欢喜欢喜欢!
{{item.remark}}
</view>
<view class="eval-img">
<img @tap="largeImg" src="/static/images/img/shangpintu.png" alt="">
<img @tap="largeImg" src="/static/images/img/shangpintu.png" alt="">
<img @tap="largeImg" :src="item.picture" alt="">
</view>
<view class="reply-card" :class="{'expanded': isExpanded}">
<view class="reply-card" :class="{'expanded': isExpanded}" v-for="(item1,index1) in item.comments" :key="index1">
<!-- 标题行商家回复 + 展开/收起按钮 -->
<view class="reply-header">
<!-- 回复内容区域动态类控制展开/折叠 -->
<view class="reply-content" :class="{ collapsed: !isExpanded, expanded: isExpanded }">
<text>商家回复 {{ replyText }}</text>
<text>{{item1.createByName}} : {{ item1.remark }}</text>
</view>
<view class="reply-expand-btn" @click="toggleReply">
<text v-if="!isExpanded">展开</text>
@ -113,17 +90,29 @@
menuButtonInfo: {},
isPintuan: true,
bigImg: '',
shopItem:{},
pageNum:1,
searchAll:true,
total:0,
shopComments:[],
searchForm:{
shopId:'',
pageNum: 1,
score:0,
picture:0,
pageSize: '10'
},
menuList: [{
name: '全部',
num: 31,
num: 0,
checked: true
}, {
name: '有图/视频',
num: 21,
num: '',
checked: false
}, {
name: '中差评',
num: 10,
num: '',
checked: false
}]
}
@ -131,13 +120,36 @@
components: {
},
onLoad() {
onLoad(option) {
this.shopItem = JSON.parse(option.item)
this.getshopComments(this.shopItem.id)
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
methods: {
getshopComments(id){
let that = this
this.searchForm.shopId = id
that.tui.request("/app/comment/getCommentList", "POST", this.searchForm, false, false).then((res) => {
if (res.code == 200) {
if (that.pageNum == 1) {
that.shopComments = res.result.records
} else {
that.shopComments = [...that.shopComments, ...res.result.records]
}
that.$forceUpdate()
if(this.searchAll){
that.menuList[0].num = res.result.total
}
} else {
that.tui.toast(res.message)
return
}
uni.hideLoading()
}).catch((res) => {})
},
toggleReply() {
this.isExpanded = !this.isExpanded;
},
@ -149,6 +161,19 @@
this.menuList[i].checked = false
}
}
if(index == 0){
this.searchForm.picture = 0
this.searchForm.score = 0
}else if(index ==1){
this.searchAll = false
this.searchForm.picture = 1
this.searchForm.score = 0
}else{
this.searchAll = false
this.searchForm.picture = 0
this.searchForm.score = 1
}
this.getshopComments(this.shopItem.id)
},
//
largeImg(img) {

Loading…
Cancel
Save