Browse Source

绿色有机

master
jiazhipeng 1 month ago
parent
commit
1e335bcf43
  1. 10
      pages.json
  2. 140
      pages/user/user.vue
  3. 332
      subPackages/activity/greenOrganic.vue
  4. 10
      subPackages/sales/index.vue
  5. 10
      subPackages/sales/indexs.vue
  6. 4
      subPackages/techan/cartOrder.vue
  7. 3
      subPackages/techan/cartOrder1.vue

10
pages.json

@ -287,13 +287,13 @@
{ {
"path" : "sales/index", "path" : "sales/index",
"style" : { "style" : {
"navigationBarTitleText" : "不时不食" "navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "sales/indexs", "path" : "sales/indexs",
"style" : { "style" : {
"navigationBarTitleText" : "限时特惠" "navigationBarTitleText" : ""
} }
}, },
{ {
@ -355,6 +355,12 @@
"style": { "style": {
"navigationBarTitleText" : "苏式月饼" "navigationBarTitleText" : "苏式月饼"
} }
},
{
"path": "activity/greenOrganic",
"style": {
"navigationBarTitleText" : "绿色有机标准认证"
}
} }
] ]
}], }],

140
pages/user/user.vue

@ -52,14 +52,14 @@
<view class="cygj"> <view class="cygj">
<view v-for="(item,index) in cyList" :key="index" <view v-for="(item,index) in cyList" :key="index"
@click="gotoUrl(item,index)" v-if="item.isShow"> @click="gotoUrl(item,index)" v-if="item.isShow">
<button id="contact" class="cyItem flex-between" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" v-if="index == 2"> <!-- <button id="contact" class="cyItem flex-between" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" v-if="index == 2">
<view class="flex-center"> <view class="flex-center">
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png" class="headIcon"> <img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png" class="headIcon">
联系我们 联系我们
</view> </view>
<img src="https://static.ticket.sz-trip.com/dongtai/images/user/rightIcon-gray.png" class="rightIcon"> <img src="https://static.ticket.sz-trip.com/dongtai/images/user/rightIcon-gray.png" class="rightIcon">
</button> </button> -->
<view class="cyItem flex-between" v-else> <view class="cyItem flex-between">
<view class="flex-center"> <view class="flex-center">
<img :src="item.src" class="headIcon"> <img :src="item.src" class="headIcon">
{{item.title}} {{item.title}}
@ -81,6 +81,46 @@
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="kfpopup" type="bottom" :safe-area="false">
<view class="kf-popup-content">
<!-- 标题栏 -->
<view class="popup-header">
<text class="title">联系我们</text>
<text class="close-icon" @click="$refs.kfpopup.close()">×</text>
</view>
<!-- 内容区域 -->
<view class="popup-body">
<!-- 电话咨询 -->
<view class="contact-item" @click="clickPhone('0512-80822586')">
<view class="info">
<text class="label">电话咨询</text>
<text class="detail">0512-80822586</text>
</view>
<view class="arrow">
<image style="width: 100%;height: 100%;" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250911/a58432ad47582207f9f03ac31a6e2d98.png"></image>
</view>
</view>
<!-- 在线客服 -->
<button class="concat-btn" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="contact-item">
<view class="info">
<text class="label">在线客服</text>
<text class="detail">工作时间: 9:00-18:00</text>
</view>
<view class="arrow">
<image style="width: 100%;height: 100%;" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250911/11761e83954ecb845a8c9ea26e95c6e0.png"></image>
</view>
</view>
</button>
</view>
</view>
</uni-popup>
<CustomTabBar :currentTab="4" /> <CustomTabBar :currentTab="4" />
</view> </view>
</template> </template>
@ -137,8 +177,8 @@
isShow: true isShow: true
}, },
{ {
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxwm.png', src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png',
title: '联系客服', title: '联系我们',
path: '', path: '',
isShow: true isShow: true
}, },
@ -301,7 +341,7 @@
// }, // },
gotoUrl(item, index) { gotoUrl(item, index) {
if (index == 2) { if (index == 2) {
// this.$refs.popup.open() this.$refs.kfpopup.open()
return; return;
} }
if (index == 4) { if (index == 4) {
@ -676,4 +716,92 @@
} }
} }
} }
/* 弹窗内容容器 */
.kf-popup-content {
width: 100%;
background-color: #fff;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
overflow: hidden;
.popup-header {
display: flex;
justify-content: center;
align-items: center;
padding: 16px;
position: relative;
border-bottom: 1px solid #f5f5f5;
}
.title {
font-size: 18px;
font-weight: bold;
}
.close-icon {
position: absolute;
right: 16px;
font-size: 20px;
color: #999;
}
/* 弹窗内容区 */
.popup-body {
padding: 10px 0;
}
/* 联系项样式 */
.contact-item {
display: flex;
align-items: center;
padding: 16px 20px;
border-bottom: 1px solid #f5f5f5;
}
.info {
flex: 1;
}
.label {
font-size: 16px;
display: block;
margin-bottom: 4px;
}
.detail {
font-size: 14px;
color: #666;
}
.arrow {
width: 20px;
height: 20px;
color: #ccc;
font-size: 18px;
}
}
.concat-btn{
/* 清除默认背景和边框 */
background: none;
border: none;
padding: 0;
margin: 0;
/* 清除默认圆角 */
border-radius: 0;
/* 清除默认文字样式 */
color: inherit;
font-size: inherit;
line-height: inherit;
/* 清除点击效果(灰色背景) */
-webkit-tap-highlight-color: transparent;
text-align: left;
}
</style> </style>

332
subPackages/activity/greenOrganic.vue

@ -0,0 +1,332 @@
<template>
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<image class="what-img" @click="openPop()" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250915/798f91cfde30414c091603666be573b7.png"></image>
<view class="main-container" style="margin-top: -2400rpx;position: relative;" >
<view class="type-container no-scrollbar">
<view :class="['type-item']" @click="typeIndex=i"
v-for="(item,i) in typeList" :key="i">
<image v-show="typeIndex==i" mode="aspectFill" :src="item.imgs"></image>
<image v-show="typeIndex!=i" mode="aspectFill" :src="item.img"></image>
</view>
</view>
<view class="type-container">
<image :src="typeList[typeIndex].textImg" mode="widthFix" style="width: 100%;margin: 14rpx 0 30rpx;"></image>
</view>
<view class="flex-between" style="flex-wrap: wrap;padding: 0 26rpx;">
<view class="column-product" @click="gotoDetailByType(item)" :key="index"
v-for="(item,index) in typeList[typeIndex].list.slice(0,typeList[typeIndex].viewNum)">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title text-overflowRows">{{item.title}}</view>
<view>
<view class="tags" v-if="item.display_tags">
<view class="tag text-overflow" v-for="(tag,tagI) in item.display_tags.split(',')" :key="tagI">{{tag}}</view>
</view>
<view class="flex-between">
<view class="price">{{item.price/100}}</view>
<view class="btn">立即购买</view>
</view>
</view>
</view>
</view>
</view>
<view class="view-more" v-if="typeList[typeIndex].list.length>0&&typeList[typeIndex].viewNum<=6" @click="typeList[typeIndex].viewNum=999">
查看更多<image src="https://static.ticket.sz-trip.com/uploads/20250909/848e3a18b3ad3227fa4b2952890b91ef.png"></image>
</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20250909/55c100f9650df6cbd4a4e5a18c8201de.png"></image>
<image @click="returnTop" v-show="showGoTop" class="back-img" src="https://static.ticket.sz-trip.com/uploads/20250915/74031edf3be17888e522df104e790540.png"></image>
</view>
<uni-popup ref="popup" type="center" mask-background-color="rgba(10,13,11,0.72);">
<view style="idth: 608.67rpx;height: 592.67rpx;position: relative;">
<image style="width: 608.67rpx;height: 592.67rpx;" mode="aspectFill"
src="https://static.ticket.sz-trip.com/uploads/20250915/7a262bdbe38f2fb6efb202d2a14d7512.png"></image>
<view style="position: absolute;width: 60rpx;height: 60rpx;top: 10rpx;right: 10rpx;"
@click="$refs.popup.close()"></view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
viewNum: 3,
headImg: '',
typeIndex: 0,
typeList: [
{
id: 104,title: "绿色食品",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/d0f14bd53f532c48a2d5bd22bca1158f.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/d0f14bd53f532c48a2d5bd22bca1158f.png",
textImg: "https://static.ticket.sz-trip.com/uploads/20250915/cd9a01bfa17006675d0294847f20caa8.png",
},
{
id: 105,title: "有机农产品",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/cd09a87a9c154f07b7f470aa1e62049c.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/1eb123c06d0f0bd860e107cf4adf57a8.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250915/6f8105990a5d701d5b384ce22c05d28e.png",
},
{
id: 106,title: "名特优新",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/2148b40317d93d6ed2a710ff3488f3b7.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/c5140db3128bb15f4e34b68ddf31b644.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250915/bfa055d9cacd07e839c3219e0c198459.png",
},
{
id: 107,title: "农产品地理标志",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250915/cb572317ca0cdeba972d430c7fea2b5d.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250915/8fbde0a77dca289c96100581b550c511.png",
textImg:"https://static.ticket.sz-trip.com/uploads/20250915/697ecdc92a344884ddbb6982ca453031.png",
},
],
showGoTop: false,
}
},
onLoad(option) {
this.getHeadImg(2397)
this.getGoods()
},
onReady() {
},
methods: {
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
});
},
goRule (id) {
uni.navigateTo({
url:"/subPackages/activity/commonRule?id="+id
})
},
openPop () {
this.$refs.popup.open()
},
//
getGoods() {
for(let p of this.typeList) {
this.Post({
tag_id: p.id,
offset: 0,
limit: 999,
},'/api/product/get_product_by_tag_subject').then(res => {
if (res.data.list.length < p.viewNum) {
p.viewNum = 999
}
p.list = res.data.list
console.log(p)
})
}
},
viewDetail(item) {
this.gotoDetailByType(item)
},
returnTop(){
uni.pageScrollTo({
scrollTop: 0,
duration: 200,
})
},
},
onPageScroll(res) {
this.showGoTop = res.scrollTop > 200 ? true : false;
}
}
</script>
<style lang="scss" scoped>
view{
box-sizing: border-box;
}
.bg {
width: 750rpx;
min-height: 100vh;
padding-bottom: 60rpx;
position: relative;
background: white;
}
.topImg {
width: 100%;
}
.what-img{
position: absolute;
top: 40rpx;
right: 0;
width: 230.67rpx;
height: 46.67rpx;
}
.main-container{
width: 100%;
padding: 48rpx 0 60rpx;
}
.type-item:first-of-type{
width: 238.67rpx;
}
.type-item:nth-of-type(1){
width: 262.67rpx
}
.type-item:nth-of-type(2){
width: 238.67rpx
}
.type-item:nth-of-type(2){
width: 307.33rpx
}
.title{
font-weight: 600;
font-size: 28rpx;
color: #000000;
}
.tags{
width: 100%;
display: flex;
overflow: hidden;
margin-bottom: 18rpx;
.tag{
height: 40rpx;
line-height: 38rpx;
font-weight: 400;
font-size: 24rpx;
color: #0E6500;
padding: 0rpx 10rpx;
border-radius: 20rpx;
border: 1px solid #317626;
margin-right: 13rpx;
}
}
.view-more{
font-weight: 400;
font-size: 24rpx;
color: #8C8C8C;
text-align: center;
margin: 27rpx auto 40rpx;
image{
width: 18.67rpx;
height: 18.67rpx;
margin-left: 8rpx;
}
}
.type-container{
display: flex;
flex-wrap: nowrap;
margin: 0 0 32rpx;
width: 100%;
overflow-y: hidden;
overflow-x: auto;
padding:0 26rpx;
.type-item{
height: 88rpx;
margin-right: 13rpx;
flex-shrink: 0;
image{
width: 100%;
height: 100%;
}
}
.type-item:first-of-type{
width: 238.67rpx;
}
.type-item:nth-of-type(2){
width: 262.67rpx
}
.type-item:nth-of-type(3){
width: 238.67rpx
}
.type-item:nth-of-type(4){
width: 307.33rpx
}
}
.column-product{
width: 335rpx;
height: 569rpx;
background: #ECFFE9;
border-radius: 25rpx;
overflow: hidden;
margin-bottom: 32rpx;
font-size: 0;
box-shadow: 0rpx 3rpx 15rpx 0rpx rgba(0,0,0,0.18);
.img{
width: 335rpx;
height: 335rpx;
border-radius: 25rpx 25rpx 0rpx 0rpx;
flex-shrink: 0;
}
.content{
width: 100%;
flex: 1;
height: 234rpx;
justify-content: space-between;
padding:10rpx 16rpx 20rpx;
}
.price{
font-weight: bold;
font-size: 28rpx;
color: #FF7700;
&::before{
content: "¥";
font-size: 24rpx;
font-weight: 500;
}
&::after{
content: "起";
font-size: 24rpx;
font-weight: 500;
}
}
.btn{
width: 160rpx;
height: 57rpx;
background: linear-gradient( 270deg, #319F56 0%, #9CED46 100%);
border-radius: 200rpx 200rpx 200rpx 200rpx;
font-weight: bold;
font-size: 28rpx;
color: #FFFFFF;
line-height: 57rpx;
text-align: center;
text-shadow: 0px 2px 4px #244705;
}
}
.bottom-img{
width: 149.33rpx;
height: 64rpx;
margin: 27rpx auto 0;
display: block;
}
.back-img{
position: fixed;
width: 68rpx;
height: 68rpx;
bottom: 66rpx;
right: 26rpx;
}
</style>

10
subPackages/sales/index.vue

@ -28,7 +28,7 @@
}, },
mounted() { mounted() {
// //
this.getHeadImg(2374).then(res => {this.headImg = res}) this.getHeadImg(2374)
this.getList() this.getList()
}, },
onReachBottom() { onReachBottom() {
@ -37,6 +37,14 @@
},1000) },1000)
}, },
methods: { methods: {
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
});
},
getList() { getList() {
this.Post({ this.Post({
offset: this.list.length, offset: this.list.length,

10
subPackages/sales/indexs.vue

@ -28,7 +28,7 @@
}, },
mounted() { mounted() {
// //
this.getHeadImg(2375).then(res => {this.headImg = res}) this.getHeadImg(2375)
this.getList() this.getList()
}, },
onReachBottom() { onReachBottom() {
@ -37,6 +37,14 @@
},1000) },1000)
}, },
methods: { methods: {
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
});
},
getList() { getList() {
this.Post({ this.Post({
offset: this.list.length, offset: this.list.length,

4
subPackages/techan/cartOrder.vue

@ -430,6 +430,10 @@ export default {
// //
this.contacts = item this.contacts = item
this.orderList.forEach(v=>{
v.contacts = JSON.parse(JSON.stringify(this.contacts))
})
if (this.flag) { if (this.flag) {
this.getPost(); this.getPost();

3
subPackages/techan/cartOrder1.vue

@ -423,6 +423,9 @@ export default {
// //
this.contacts = item this.contacts = item
this.orderList.forEach(v=>{
v.contacts = JSON.parse(JSON.stringify(this.contacts))
})
if (this.flag) { if (this.flag) {
this.getPost(); this.getPost();

Loading…
Cancel
Save