Browse Source

首页优化

master
jiazhipeng 2 months ago
parent
commit
95976ab447
  1. 50
      pages.json
  2. 178
      pages/index/index.vue
  3. 4
      pages/user/user.vue
  4. 4
      static/js/request.js
  5. 412
      subPackages/activity/agriculturalProd.vue
  6. 148
      subPackages/activity/agriculturalProdNH.vue
  7. 46
      subPackages/activity/commonRule.vue
  8. 149
      subPackages/food/cafe.vue
  9. 4
      subPackages/food/order.vue
  10. 4
      subPackages/homestay/order.vue
  11. 145
      subPackages/letter/detail.vue
  12. 163
      subPackages/letter/index.vue
  13. 4
      subPackages/line/orders.vue
  14. 4
      subPackages/order/cartOrder.vue
  15. 4
      subPackages/order/orderDetail.vue
  16. 4
      subPackages/order/trades.vue
  17. 354
      subPackages/search/shopResult.vue
  18. 101
      subPackages/techan/detail.vue
  19. 54
      subPackages/techan/index.vue
  20. 294
      subPackages/techan/manualIndex.vue
  21. 4
      subPackages/techan/order.vue
  22. 4
      subPackages/ticket/order.vue

50
pages.json

@ -66,6 +66,12 @@
"navigationBarTitleText" : "搜索"
}
},
{
"path" : "search/shopResult",
"style" : {
"navigationStyle": "custom"
}
},
{
"path" : "video/video",
"style" : {
@ -132,6 +138,12 @@
"navigationBarTitleText" : "农家烟火"
}
},
{
"path": "food/cafe",
"style": {
"navigationBarTitleText" : "啡尝美味"
}
},
{
"path": "food/detail",
"style": {
@ -148,7 +160,7 @@
{
"path" : "line/index",
"style" : {
"navigationBarTitleText" : "精选线路"
"navigationBarTitleText" : "乡村漫游"
}
},
{
@ -283,6 +295,42 @@
"style" : {
"navigationBarTitleText" : "限时特惠"
}
},
{
"path" : "letter/index",
"style" : {
"navigationBarTitleText" : ""
}
},
{
"path" : "letter/detail",
"style" : {
"navigationBarTitleText" : "详情"
}
},
{
"path" : "techan/manualIndex",
"style" : {
"navigationBarTitleText" : "非遗手作"
}
},
{
"path": "activity/agriculturalProd",
"style": {
"navigationBarTitleText" : ""
}
},
{
"path": "activity/agriculturalProdNH",
"style": {
"navigationBarTitleText" : ""
}
},
{
"path": "activity/commonRule",
"style": {
"navigationBarTitleText" : ""
}
}
]
}],

178
pages/index/index.vue

@ -2,12 +2,16 @@
<view class="bg bg-padding">
<CustomTabBar :currentTab="2" />
<image :src="homeUi.dbtp" mode="heightFix" class="topImg"></image>
<view class="top-image" :style="{'height':height+'px'}">
<image :src="homeUi.dbtp" mode="heightFix" class="topImg"></image>
</view>
<!-- 搜索框 -->
<view class="search-box" @click="gotoPath('/subPackages/search/index')">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/index/search.png" mode=""></image>
搜一搜您想要的
<view class="search-btn">搜索</view>
</view>
<!-- 顶部轮播 -->
@ -27,6 +31,7 @@
</view>
<!-- 小轮播 -->
<!-- 2025-8-13 固定一个打开村咖地图 -->
<swiper class="small-banner" :circular="true" :interval="6000" style="margin-top: 27rpx;"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="smallBanner && smallBanner.length > 0">
<swiper-item v-for="(item, index) in smallBanner" :key="index" @click.stop="gotoBannerDetail(item)">
@ -35,12 +40,22 @@
</swiper>
<!-- 推荐广告 -->
<view class="recommend-box">
<view v-for="(item,index) in recommendNav" :key="index" @click="gotoHomeDetail(item)">
<image :src="item.icon" mode="" class="recommend-item"></image>
<view class="flex-between" style="margin-top: 36rpx;" v-if="recommendNav.length>0">
<view class="country-box">
<image class="img1" :src="xcsh.img1.image" @click.stop="gotoPath('/subPackages/food/cafe')" mode="aspectFill"></image>
<view class="flex-between" style="padding-top: 10rpx;">
<image v-for="(item,i) in xcsh.img2" :key="i" class="img2"
:src="item.image" @click="gotoPath(item.path)" mode="aspectFill"></image>
</view>
</view>
<view class="recommend-box">
<view v-for="(item,index) in recommendNav" :key="index" @click="gotoHomeDetail(item)">
<image :src="item.icon" mode="" class="recommend-item"></image>
</view>
</view>
</view>
<!-- 模块 -->
<view class="module-box">
<view v-for="(item,index) in moduleList" :key="index" @click="gotoHomeDetail(item)">
@ -50,16 +65,27 @@
<!-- 热门推荐 -->
<image :src="homeUi.rmtjbttp" mode="heightFix" class="rmtj-img"></image>
<view class="hot-box">
<!-- <view class="hot-box">
<view v-for="(num,nums) in 2" :key="nums">
<view v-for="(item,index) in hotList" :key="index" v-if="index % 2 == nums" class="hot-item" @click="gotoDetailByType(item)">
<image :src="item.headimg" mode="widthFix"></image>
<image :src="item.headimg" mode="aspectFill"></image>
<view class="hot-content">
<view class="title">{{item.title}}</view>
<view class="price">{{item.price / 100}}</view>
</view>
</view>
</view>
</view> -->
<view class="new-hot-box hot-box">
<image class="hot-adv" v-if="hotAdv" :src="hotAdv.head_img" mode="aspectFill" @click.stop="gotoBannerDetail(hotAdv)"></image>
<view v-for="(item,index) in hotList" :key="index" class="hot-item" @click="gotoDetailByType(item)">
<image :src="item.headimg" mode="aspectFill"></image>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="price">{{item.price / 100}}</view>
</view>
</view>
</view>
</view>
</template>
@ -72,6 +98,8 @@
},
data() {
return {
height: 0,
statusBarHeight: 0,
homeUi: {},
navList: [],
topBanner: [],
@ -79,7 +107,26 @@
recommendNav: [],
moduleList: [],
hotList: [],
finished: false
finished: false,
hotAdv: null,
CKMap: null,
//
xcsh: {
img1: {
image: "https://static.ticket.sz-trip.com/uploads/20250814/306961c1869208fb80f15c3e1566dfdf.png"
},
img2: [
{
image: "https://static.ticket.sz-trip.com/uploads/20250814/bf1b1cb267299a59285e32035684798b.png",
path: "/subPackages/letter/index?type=yxdw&imgId=2380"
},
{
image: "https://static.ticket.sz-trip.com/uploads/20250814/f74a19e9de6ee0165a0d45919e753034.png",
path: '/subPackages/letter/index?type=whck&imgId=2379'
}
]
}
}
},
onLoad() {
@ -90,9 +137,17 @@
// this.getLocation()
},
onReady() {
this.initRectInfo()
this.sendRequest()
this.getHeadImg(2378).then(res => {this.CKMap = res})
},
methods: {
initRectInfo () {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight
//
this.height = sysInfo.statusBarHeight + 40
},
// UI
gotoHomeDetail(item) {
if(item.jump_type == 'page') {
@ -197,15 +252,37 @@
},
getHotList() {
this.Post({
tag_id: 648,
// tag_id: 648,
offset: this.hotList.length,
limit: 4
},'/api/product/get_product_by_tag').then(res => {
limit: 5,
order: "sales_number"
},'/api/product/get_product_by_type').then(res => {
this.hotList = [...this.hotList, ...res.data.list]
if(res.data.list.length < 4) this.finished = true
if(res.data.list.length < 5) this.finished = true
})
}
// 广
if (!this.hotAdv) {
this.Post({
type_id: 5,
position: 6,
},"/api/adv/getAdv").then(res => {
if (res) {
if (Array.isArray(res.data) && res.data.length>0)
this.hotAdv = res.data[0]
}
});
}
},
openCKMap () {
uni.previewImage({
urls: [this.CKMap]
})
},
},
onReachBottom() {
setTimeout(() => {
@ -219,23 +296,29 @@
.bg {
width: 100%;
min-height: 100vh;
background: #CDE29E;
padding: 145rpx 26rpx;
// background: #CDE29E;
background: linear-gradient(to bottom, #CDE29E 0%, #EDF5DC 360px, #EDF5DC 100%);
padding: 0 26rpx 145rpx;
}
image {
display: block;
}
.topImg {
height: 114.67rpx;
margin-left: 30rpx;
.top-image{
width: 100%;
display: flex;
align-items: flex-end;
.topImg {
height: 81.33rpx;
margin-left: 30rpx;
}
}
.search-box {
height: 67rpx;
background: rgba(255, 255, 255, .66);
border-radius: 20rpx;
border-radius: 33rpx;
margin-top: 24rpx;
display: flex;
align-items: center;
@ -248,6 +331,19 @@
height: 30.67rpx;
margin: 0 19rpx 0 27rpx;
}
.search-btn{
width: 107rpx;
height: 53rpx;
background: rgba(106, 138, 39, 0.66);
border-radius: 27rpx;
text-align: center;
line-height: 53rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
margin-left: auto;
margin-right: 7rpx;
}
}
.top-banner {
@ -260,12 +356,15 @@
margin-top: 45rpx;
display: flex;
flex-wrap: wrap;
font-size: 23rpx;
.nav-item {
width: 20%;
display: flex;
flex-direction: column;
align-items: center;
// font-size: 23rpx;
image {
width: 100rpx;
@ -284,16 +383,34 @@
height: 200rpx;
border-radius: 20rpx;
}
.country-box{
width: 343.33rpx;
height: 451.33rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250813/542650d396ff373150917432ac6204e5.png");
background-size: 100% 100%;
padding: 101rpx 13rpx 0;
flex-shrink: 0;
.img1{
width: 100%;
height: 173.33rpx;
}
.img2{
width: 153.33rpx;
height: 153.33rpx;
}
}
.recommend-box {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
flex-direction: column;
width: 343.33rpx;
height: 451.33rpx;
.recommend-item {
width: 336.67rpx;
height: 225.33rpx;
margin-top: 40rpx;
height: 220rpx;
}
}
@ -315,9 +432,20 @@
margin-top: 40rpx;
display: flex;
justify-content: space-between;
&.new-hot-box{
flex-wrap: wrap;
.hot-adv{
width: 340rpx;
height: 490rpx;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 16rpx;
}
}
.hot-item {
width: 340rpx;
height: 490rpx;
background: #FFFFFF;
border-radius: 20rpx;
overflow: hidden;
@ -325,11 +453,15 @@
image {
width: 340rpx;
height: 340rpx;
}
.hot-content {
padding: 13rpx 13rpx 26rpx 13rpx;
height: 150rpx;
padding: 6rpx 13rpx 10rpx 13rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-weight: 500;
font-size: 28rpx;

4
pages/user/user.vue

@ -221,8 +221,8 @@
that.orderId = id;
that.Post({
order_id: id,
pay_method: 'abc',
pay_platform: "miniprogram",
pay_method: 'WEIXIN',
pay_platform: "MINI",
},
'/api/pay/unify'
).then(res => {

4
static/js/request.js

@ -3,8 +3,8 @@ import store from '@/store';
// 定义 API URL
// const DEV_API_URL = 'https://api.cloud.sz-trip.com';
const DEV_API_URL = 'https://swsz.api.js-dyyj.com'
const PROD_API_URL = 'https://swsz.api.js-dyyj.com';
const DEV_API_URL = 'https://api.sutenong.com'
const PROD_API_URL = 'https://api.sutenong.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
// 获取token

412
subPackages/activity/agriculturalProd.vue

@ -0,0 +1,412 @@
<template>
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<view class="main-container">
<image class="title-image" src="https://static.ticket.sz-trip.com/uploads/20250815/36ddcb32b78b28ee6f6991ae9af8c52f.png"></image>
<view class="coupon-box">
<view class="rule" @click="goRule(1)">活动规则</view>
<view class="coupon-tip">消费券领取后3天内未使用自动失效<br>失效后可再次领取</view>
<view class="flex-between" style="flex-wrap: wrap;margin-top: 26rpx;">
<image class="coupon-img" v-for="(item,i) in couponList" :key="i"
:src="item.img" @click="getCoupon(item)" mode="aspectFill"></image>
</view>
</view>
<image class="adv-image" mode="aspectFill" @click="gotoPath('/subPackages/activity/agriculturalProdNH')"
src="https://static.ticket.sz-trip.com/uploads/20250815/3786f50e9baa674b850df7383fa6ed88.png"></image>
<image class="title-image" style="margin-bottom: 30rpx;" src="https://static.ticket.sz-trip.com/uploads/20250815/f6265c71d82564b08a4610822d90159b.png"></image>
<view class="row-product" v-for="(item,index) in list.slice(0,viewNum)"
:key="index" @click="gotoDetailByType(item)">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="tags" v-if="item.display_tags">
<view class="tag" 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 class="view-more" v-if="list.length>0&&viewNum<=3" @click="viewNum=999">查看更多</view>
<view class="type-container">
<view :class="['type-item',typeIndex==i?'active':'']" @click="typeIndex=i"
v-for="(item,i) in typeList" :key="i">{{item.title}}</view>
</view>
<view class="flex-between" style="flex-wrap: wrap;">
<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-overflow">{{item.title}}</view>
<view class="tags" v-if="item.display_tags">
<view class="tag" 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 class="view-more" v-if="typeList[typeIndex].list.length>0&&typeList[typeIndex].viewNum<=4" @click="typeList[typeIndex].viewNum=999">查看更多</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20250815/877b45bf01e0181fd489f0e1086c62fd.png"></image>
<image @click="returnTop" v-show="showGoTop" class="back-img" src="https://static.ticket.sz-trip.com/uploads/20250815/108583b6b888b0e5556393b140a7cb84.png"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
viewNum: 3,
headImg: '',
couponList: [
{id: null, img: "https://static.ticket.sz-trip.com/uploads/20250815/f41aea639d47410e6e2fb23fbc7061a4.png"},
{id: null, img: "https://static.ticket.sz-trip.com/uploads/20250815/1373e0b00e33d21f951d992f01a54ca6.png"},
{id: null, img: "https://static.ticket.sz-trip.com/uploads/20250815/0a0574f43a008c57a4ac13ad2695260a.png"},
{id: null, img: "https://static.ticket.sz-trip.com/uploads/20250815/b37ab2354e27a715760c3c963a5da90f.png"},
],
isReceive: true,
typeIndex: 0,
typeList: [
{id: 96,title: "当季鲜享",viewNum:4, list: []},
{id: 97,title: "风味特产",viewNum:4, list: []},
{id: 98,title: "入秋养生",viewNum:4, list: []},
{id: 99,title: "啡尝美味",viewNum:4, list: []},
],
showGoTop: false,
}
},
onLoad(option) {
},
onReady() {
this.getHeadImg(2384)
this.getGoods()
},
methods: {
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
if (res.data.company_name) {
res.data.company_name.split(',').forEach((item, index) => {
this.couponList[index].id = item
})
}
});
},
goRule (id) {
uni.navigateTo({
url:"/subPackages/activity/commonRule?id="+id
})
},
//
getGoods() {
this.Post({
tag_id: 95,
offset: 0,
limit: 999,
},'/api/product/get_product_by_tag_subject').then(res => {
if (res.data.length < this.viewNum) {
this.viewNum = 999
}
this.list = res.data.list
})
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)
})
}
},
getCoupon(item) {
if (!this.isReceive) {
uni.showToast({
title: "短时间内请勿重复点击!",
icon: 'none'
})
return;
}
this.isReceive = false
setTimeout(() => {this.isReceive = true}, 3000)
this.Post({
ids: item.id,
is_all: 1,
},"/api/coupon/getNewCouponsByActivitiesIds").then(res => {
if (res) {
uni.showToast({
title: res.data,
icon: 'none'
})
}
})
},
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>
.bg {
width: 750rpx;
min-height: 100vh;
background: #E9F5EC;
padding-bottom: 60rpx;
}
.topImg {
width: 100%;
}
.main-container{
width: 100%;
margin-top: -10rpx;
padding: 0 26rpx 60rpx;
.title-image{
width: 417.33rpx;
height: 66.67rpx;
margin: 0 auto;
display: block;
position: relative;
z-index: 10;
}
.adv-image{
margin: 47rpx 0 57rpx;
width: 100%;
height: 200rpx;
}
}
.coupon-box{
height: 529rpx;
background: #FFFFFF;
border-radius: 13rpx;
border: 1px solid #629FAE;
position: relative;
padding: 60rpx 18rpx 0;
margin-top: -33rpx;
overflow: hidden;
.rule{
width: 66rpx;
height: 64rpx;
background: #4C9BB4;
border-radius: 0rpx 2rpx 0rpx 13rpx;
font-weight: 500;
font-size: 21rpx;
color: #FFFFFF;
text-align: center;
padding:0 10rpx;
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
line-height: 1.2;
}
.coupon-tip{
font-weight: 500;
font-size: 24rpx;
color: #F13E35;
text-align: center;
}
.coupon-img{
width: 323.33rpx;
height: 171.33rpx;
margin-bottom: 15rpx;
}
}
.row-product{
width: 100%;
height: 227rpx;
background: #FFFFFF;
border-radius: 8rpx;
padding: 6rpx;
display: flex;
margin-bottom: 22rpx;
.img{
width: 213rpx;
height: 100%;
border-radius: 7rpx;
flex-shrink: 0;
}
.content{
width: 100rpx;
flex: 1;
justify-content: space-between;
padding: 6rpx 0 6rpx 22rpx;
}
.price{
font-weight: bold;
font-size: 40rpx;
color: #F13E35;
&::before{
content: "¥";
font-size: 24rpx;
}
&::after{
content: "起";
font-size: 24rpx;
}
}
.btn{
width: 164rpx;
height: 50rpx;
background: #FF9838;
border-radius: 25rpx;
font-weight: bold;
font-size: 27rpx;
color: #FFFFFF;
line-height: 50rpx;
text-align: center;
}
}
.title{
font-weight: bold;
font-size: 29rpx;
color: #000000;
}
.tags{
width: 100%;
display: flex;
overflow: hidden;
.tag{
font-weight: 500;
font-size: 24rpx;
height: 38rpx;
line-height: 38rpx;
color: #4C9BB4;
padding: 0rpx 6rpx;
border-radius: 5rpx;
border: 1px solid #4C9BB4;
margin-right: 13rpx;
}
}
.view-more{
width: 227rpx;
height: 49rpx;
border-radius: 8rpx;
border: 1px solid #4C9BB4;
line-height: 49rpx;
font-weight: 500;
font-size: 25rpx;
color: #4C9BB4;
text-align: center;
margin: 40rpx auto 0;
}
.type-container{
display: flex;
justify-content: space-between;
margin: 52rpx 0 30rpx;
.type-item{
width: 164rpx;
height: 66.67rpx;
text-align: center;
line-height: 66.67rpx;
font-weight: bold;
font-size: 31rpx;
color: #4C9BB4;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250815/e165c4614ae82351d8b96f4dd0ab947c.png");
background-size: 100% 100%;
&.active{
color: #FFFFFF;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250815/dba0ff60f303c031420958d67fa36614.png");
}
}
}
.column-product{
width: 340rpx;
height: 497rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 6rpx;
overflow: hidden;
margin-bottom: 16rpx;
.img{
width: 327rpx;
height: 327rpx;
border-radius: 13rpx 13rpx 0rpx 0rpx;
}
.content{
width: 100%;
flex: 1;
height: 150rpx;
justify-content: space-between;
padding: 4rpx 10rpx;
}
.price{
font-weight: bold;
font-size: 28rpx;
color: #E62525;
&::before{
content: "¥";
}
}
.btn{
width: 100rpx;
height: 40rpx;
background: #FF9838;
border-radius: 20rpx;
font-weight: bold;
font-size: 27rpx;
color: #FFFFFF;
line-height: 40rpx;
text-align: center;
}
}
.bottom-img{
width: 174.67rpx;
height: 78rpx;
margin: 74rpx auto 0;
display: block;
}
.back-img{
position: fixed;
width: 66rpx;
height: 66rpx;
bottom: 66rpx;
right: 26rpx;
}
</style>

148
subPackages/activity/agriculturalProdNH.vue

@ -0,0 +1,148 @@
<template>
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<view class="main-container">
<view class="common-box" style="padding-bottom: 82rpx;">
<view class="title">客户领取路径</view>
<view style="text-align: center;margin: 34rpx 0 70rpx;">微信或农行掌银APP扫码领取优惠</view>
<image style="display:block;width: 266.67rpx;height: 266.67rpx;margin: 0 auto;" mode="aspectFill"
:src="codeImg" :show-menu-by-longpress="true"></image>
</view>
<view class="common-box" style="line-height: 40rpx;" v-html="formateRichText(ruleContent)"></view>
<view class="common-box" style="padding-bottom: 120rpx;">
<view class="title" style="margin-bottom: 50rpx;">活动流程</view>
<image style="width: 100%;" mode="widthFix" :src="ruleImg"></image>
</view>
<view class="btn" @click="goBack()">返回活动页</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20250815/877b45bf01e0181fd489f0e1086c62fd.png"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
headImg: '',
codeImg: "",
ruleImg: "",
ruleContent: "",
}
},
onLoad(option) {
},
onReady() {
this.getHeadImg()
},
methods: {
goBack () {
let pages = getCurrentPages()
let prePage = null
//
if (pages.length>=2) {
prePage = pages[pages.length - 2];
} else {
uni.redirectTo({
url: "/subPackages/activity/agriculturalProd"
})
return
}
//
if (prePage.$page.fullPath.indexOf('agriculturalProd')>=0) {
uni.navigateBack()
} else {
uni.redirectTo({
url: "/subPackages/activity/agriculturalProd"
})
}
},
getHeadImg (id) {
this.Post({id:2385},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
});
this.Post({id:2386},'/api/multimedia/detail').then(res => {
this.codeImg = res.data.head_img
});
this.Post({id:2387},'/api/multimedia/detail').then(res => {
this.ruleImg = res.data.head_img
});
this.Post({id: 2},"/api/sweepstakes/sweepstakes_act/getActInfo").then(res => {
this.ruleContent = res.data.rule_desc
})
},
},
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
background: #E9F5EC;
padding-bottom: 60rpx;
}
.topImg {
width: 100%;
}
.main-container{
width: 100%;
margin-top: -84rpx;
padding: 0 26rpx 60rpx;
position: relative;
z-index: 10;
}
.btn{
width: 227rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin: 52rpx auto 0;
font-weight: 500;
font-size: 25rpx;
color: #333333;
text-align: center;
line-height: 60rpx;
}
.common-box{
width: 100%;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(248,118,35,0.19);
border-radius: 20rpx;
padding: 38rpx 26rpx;
font-weight: 500;
font-size: 25rpx;
color: #333333;
margin-bottom: 22rpx;
.title{
font-weight: bold;
font-size: 37rpx;
color: #4C9BB4;
text-align: center;
}
}
.bottom-img{
width: 174.67rpx;
height: 78rpx;
margin: 74rpx auto 0;
display: block;
}
</style>

46
subPackages/activity/commonRule.vue

@ -0,0 +1,46 @@
<template>
<view class="bg" >
<view class="content" v-html="formateRichText(rele_content)"></view>
</view>
</template>
<script>
export default {
data() {
return {
rele_content: '',
headerTitle: '',
id: null
}
},
onLoad(option) {
this.id = option.id;
this.Post({
id: option.id
},"/api/sweepstakes/sweepstakes_act/getActInfo").then(res => {
this.rele_content = res.data.rule_desc
uni.setNavigationBarTitle({
title:res.data.title
})
})
},
onReady() {
},
methods: {
},
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
padding-bottom: 60rpx;
}
</style>

149
subPackages/food/cafe.vue

@ -0,0 +1,149 @@
<template>
<view class="bg">
<view class="topImg relative">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
</view>
<view class="goodBox">
<view @click="gotoDetailByType(item)" class="goodItem" v-for="(item,index) in list" :key="index">
<image class="left-image" :src="showImg(item.headimg||'')" mode="aspectFill"></image>
<view class="contentBox flex-column flex-1 w-1rpx">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="subtitle text-overflow" v-if="item.display_tags" style="font-size: 24rpx;color: #6A8A27;">
{{item.display_tags.split(',').join(" | ")}}
</view>
<view class="subtitle text-overflowRows">{{item.address}}</view>
<view class="price price-money">
{{item.price/100}}
</view>
</view>
</view>
</view>
<!-- <view class="finished-text" v-if="finished">没有更多数据了</view> -->
</view>
</template>
<script>
export default{
data(){
return {
headImg:null,
list: [],
finished: false,
type_id: 661,//id
}
},
onShow() {
this.finished = false
},
onReady() {
this.getHeadImg(2383).then(res => {this.headImg = res})
this.getList()
},
onLoad(options) {
},
methods: {
//
getList(){
this.Post({tag_id: this.type_id,offset: this.list.length,limit: 10},
'/api/product/get_product_by_tag').then(res => {
this.list = [...this.list, ...res.data.list];
if (res.data.length < 10) {
this.finished = true
}
})
},
viewDetail (item) {
uni.navigateTo({
url:'/subPackages/food/detail?id='+item.id
})
},
},
onReachBottom() {
setTimeout(() => {
if (!this.finished) this.getList()
},1000)
}
}
</script>
<style scoped lang="scss">
*{
box-sizing: border-box;
font-family: PingFangSC;
}
.bg{
min-height: 100vh;
background: #F9FCF3;
}
.topImg{
width: 100%;
}
.goodBox{
width: 100%;
z-index: 2;
padding: 26rpx;
.goodItem{
width: 100%;
height: 240rpx;
margin-bottom: 30rpx;
display: flex;
.left-image{
width: 240rpx;
height: 100%;
border-radius: 20rpx;
flex-shrink: 0;
}
.contentBox{
padding: 10rpx 20rpx 0;
height: 100%;
justify-content: space-between;
.title{
width: 100%;
font-weight: bold;
font-size: 31rpx;
color: #333333;
}
.subtitle{
font-weight: 400;
font-size: 23rpx;
color: #999999;
}
.price{
font-family: PingFang SC;
font-weight: bold;
font-size: 33rpx;
color: #DC2525;
text-align: right;
}
.price-money::before{
content: '¥';
font-size: 24rpx;
}
.price-money::after{
content: '起';
color: #999;
font-size: 24rpx;
font-weight: normal;
}
}
}
}
</style>

4
subPackages/food/order.vue

@ -261,8 +261,8 @@
this.$store.commit("choseCoupon", "");
this.Post({
order_id: order_id,
pay_method: 'abc',
pay_platform: "miniprogram",
pay_method: 'WEIXIN',
pay_platform: "MINI",
}, '/api/order/pay').then(res => {
if (res.data) {
uni.requestPayment({

4
subPackages/homestay/order.vue

@ -335,8 +335,8 @@ export default {
uni.removeStorageSync('hotelOrderInfo');
this.Post({
order_id: res.data.order_id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
}, '/api/order/pay').then(res => {
if (res.data) {
uni.requestPayment({

145
subPackages/letter/detail.vue

@ -0,0 +1,145 @@
<template>
<view class="bg">
<view style="position: relative;">
<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000"
circular v-if="imgList.length>0" @change="handleSwiperChange" :current="currentIndex">
<swiper-item v-for="(item, index) in imgList" :key="index">
<view class="swiper-item">
<image class="item-img" :src="showImg(item)" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
<view class="swiper-pointer">
<view :class="['poiner-item',currentIndex==i?'active':'']" v-for="(item,i) in imgList" :key="i"></view>
</view>
</view>
<view class="topBox">
<view class="title text-overflowRows">{{detail.title}}</view>
<view class="name">
<image :src="showImg(detail.avatar)"></image>
{{detail.nickname}}
</view>
<view class="content" style="padding-top: 52rpx;" v-html="formateRichText(detail.detail)"></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {},
imgList: [],
currentIndex: 0,
}
},
onLoad(option) {
this.getDetail(option.id)
},
methods: {
handleSwiperChange(e) {
this.currentIndex = e.detail.current;
},
getDetail(id) {
this.Post({id: id},'/api/travels/getDetail').then(res => {
this.detail = res.data;
if (res.data.img) {
this.imgList = res.data.img.split(',') || []
}
});
this.Post({id: id},"/api/travels/addView")
}
},
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
background: #FFFFFF;
padding-bottom: 100rpx;
}
.swiper {
height: 750rpx;
.swiper-item {
width: 100%;
height: 750rpx;
.item-img {
width: 750rpx;
height: 750rpx;
}
}
}
.topBox {
width: 100%;
padding: 28rpx 32rpx;
background: #fff;
margin-top: -20rpx;
background: white;
border-radius: 20rpx 20rpx 0 0;
position: relative;
.title {
font-weight: 500;
font-size: 36rpx;
color: #000000;
}
.flex-between{
padding: 28rpx 0;
border-bottom: 2rpx solid #F7F7F7;
}
.name {
font-weight: 500;
font-size: 27rpx;
color: #999999;
display: flex;
align-items: center;
margin-top: 24rpx;
image {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
margin-right: 12rpx;
}
}
}
.content {
width: 100%;
background: #FFFFFF;
padding-top: 20rpx;
}
.swiper-pointer{
position: absolute;
right: 20rpx;
bottom: 40rpx;
display: flex;
.poiner-item{
width: 12rpx;
height: 12rpx;
background: #FFFFFF;
border-radius: 50%;
opacity: 0.5;
margin-left: 15rpx;
}
.poiner-item.active{
opacity: 1;
}
}
</style>

163
subPackages/letter/index.vue

@ -0,0 +1,163 @@
<template>
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<view class="article-container">
<view @click="viewDetail(item)" v-for="(item,index) in list" :key="index" class="item">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="text-overflowRows" style="font-size: 24rpx;color: #848484;" v-if="item.page">
地址{{item.page}}
</view>
<view class="btn">详情介绍</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
titleObj: {
"gxnz":"共享农庄",
"whck":"网红村咖",
"yxdw":"乡村研学工坊",
},
type: null,
imgId: null,
list: [],
finished: false,
headImg: '',
page_no: 1,
}
},
onLoad(option) {
this.type = option.type
this.imgId = option.imgId
if (!this.type) {
uni.showToast({
title: '分类不存在',
icon: 'none',
})
uni.navigateBack()
return
}
let title = this.titleObj[this.type] || '点位';
uni.setNavigationBarTitle({
title: title
})
this.getArticleByType()
if (this.imgId) {
this.getHeadImg(this.imgId).then(res => {this.headImg = res})
}
},
methods: {
//
getArticleByType() {
this.Post({
type_key: this.type,
offset: this.list.length,
page_no: this.page_no,
page_num: 10,
},'/api/travels/getList').then(res => {
if (res.data.rows.length >= 10) {
this.page_no++
} else {
this.finished = true
}
this.list = [...this.list, ...res.data.rows]
})
},
viewDetail(item) {
if (item.url) {
uni.navigateTo({
url:"/subPackages/webPage/webPage?url="+encodeURIComponent(item.url)
})
return
}
if (item.appId) {
uni.navigateToMiniProgram({
appId:item.appId,
path:item.page
})
return
}
uni.navigateTo({
url:'/subPackages/letter/detail?id='+item.id
})
},
},
//
onReachBottom() {
setTimeout(() => {
if (!this.finished) this.getArticleByType();
}, 1000);
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
background: #F9FCF3;
padding-bottom: 50rpx;
}
.topImg {
width: 100%;
}
.article-container{
width: 100%;
border-radius: 24rpx ;
position: relative;
padding: 32rpx;
}
.item {
width: 100%;
height: 240rpx;
margin-bottom:30rpx;
display: flex;
.img {
width: 240rpx;
height: 240rpx;
border-radius: 24rpx;
flex-shrink: 0;
}
.content {
width: 370rpx;
flex: 1;
height: 240rpx;
padding: 12rpx 0 0 24rpx;
justify-content: space-between;
.title {
font-weight: bold;
font-size: 31rpx;
color: #333333;
}
.btn{
width: 160rpx;
height: 53rpx;
line-height: 53rpx;
background: #6A8A27;
border-radius: 27rpx;
text-align: center;
font-weight: 400;
font-size: 27rpx;
color: #FFFFFF;
margin-left: auto;
}
}
}
</style>

4
subPackages/line/orders.vue

@ -261,8 +261,8 @@
this.Post({
order_id: order_id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
}, '/api/order/pay').then(res => {
if (res.data) {
uni.requestPayment({

4
subPackages/order/cartOrder.vue

@ -379,8 +379,8 @@ export default {
this.$store.commit("changeHotelOrderList", []);
this.Post({
order_id: res.data.order_id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
}, '/api/order/pay').then(res => {
if (res.data) {
uni.requestPayment({

4
subPackages/order/orderDetail.vue

@ -613,8 +613,8 @@
setOrderId(id) {
this.Post({
order_id: this.info.order_id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
}, '/api/order/pay')
.then(res => {
if (res.code == 1) {

4
subPackages/order/trades.vue

@ -187,8 +187,8 @@ export default {
this.orderId = id;
this.Post({
order_id: id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
}, '/api/order/pay')
.then(res => {
if (res.data) {

354
subPackages/search/shopResult.vue

@ -0,0 +1,354 @@
<template>
<view class="bg" v-if="supplierInfo">
<!-- 搜索 -->
<view class="search-header" :style="{'height': height+'px','padding-top':statusBarHeight+'px'}">
<uni-icons type="left" size="20" @click="goBack" style="flex-shrink: 0;"></uni-icons>
<view class="input-model" >
<uni-icons style="height: 1.4rem;line-height: 1.4rem;" type="search" size="15" color="#ABAAAD" ></uni-icons>
<input class="input-text" v-model="searchText" placeholder="搜索"></text>
<view class="search-btn" @click="search()">搜索</view>
</view>
</view>
<div :style="{'height':height+'px','flex-shrink':0}"></div>
<view class="price-box supplier-box">
<image v-if="supplierInfo.headimg" class="supplier-image" :src="supplierInfo.headimg"></image>
<view class="supplier-content">
<view class="text-overflowRows">{{supplierInfo.shop_name}}</view>
<view class="tags" v-if="supplierInfo.display_tags">
<view class="tags-item" v-for="(item,i) in supplierInfo.display_tags.split(',')" :key="i">
{{item}}
</view>
</view>
</view>
</view>
<!-- 搜索 -->
<view class="data-container" style="height: 100rpx;flex: 1;">
<view class="no-data-zhanwei" v-if="list.length<=0">
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
<view style="padding:50rpx 0 67rpx">暂无数据</view>
</view>
<scroll-view class="right-container no-scrollbar" :scroll-y="true" @scrolltolower="scrollLow()" v-else>
<view class="search-result" >
<view v-for="(item,i) in list" class="search-item" :key="i" @click="viewDetail(item)">
<image :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="search-result-container">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="flex-between" style="padding-top: 20rpx;">
<view class="price">{{item.price/100}}</view>
<view class="btn">购买</view>
</view>
</view>
</view>
</view>
</scroll-view >
</view>
</view>
</template>
<script>
export default {
data() {
return {
height: 0,
statusBarHeight: 0,
id: null,
supplierInfo:null,
searchText: '',
list:[],
finished: false,
}
},
onLoad(options) {
this.id = options.id;
this.getSupplierInfo();
},
onReady() {
this.initRectInfo()
},
methods: {
initRectInfo () {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight
//
this.height = sysInfo.statusBarHeight + 40
},
getSupplierInfo () {
this.Post({supplier_id: this.id},
'/api/supplier/get_supplier_detail').then(res => {
if (res.code != 1) {
uni.showToast({
title: '店铺不存在',
icon: 'none'
})
setTimeout(() => {
this.goBack()
}, 2000)
return
}
this.supplierInfo = res.data;
this.search()
});
},
search () {
this.finished = false
this.list = []
this.getList()
},
//
getList(){
let param = {}
this.Post({
title: this.searchText.trim(),
supplier_id: this.id,
offset: this.list.length,
limit: 10,
},'/api/supplier/get_product_by_supplier_id').then(res => {
this.list = [...this.list, ...res.data.list];
if (res.data.list.length < 10) {
this.finished = true
}
console.log(this.list)
})
},
scrollLow () {
if (!this.finished) {
this.getList()
}
},
viewDetail(item) {
// uni.navigateTo({
// url: '/subPackages/techan/detail?id=' + item.id
// })
this.gotoDetailByType(item)
},
},
onReachBottom() {
}
}
</script>
<style lang="scss" scoped>
view {
box-sizing: border-box;
}
.search-header{
width: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
padding-left: 10rpx;
padding-right: 120px;
background: #fff;
.input-model{
flex: 1;
width: 1rpx;
height: 64rpx;
background: #F2F4F7;
border-radius: 55rpx;
margin-left: 12rpx;
display: flex;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #999999;
padding-left: 24rpx;
}
.input-text{
height:19px;
padding-left: 14rpx;
font-weight: 400;
font-size: 24rpx;
color: #030000;
}
.search-btn{
font-weight: 500;
font-size: 29rpx;
color: #6A8A2D;
padding-left: 25rpx;
width: 85rpx;
height: 50%;
line-height: 1;
border-left: 1px solid #CCCCCC;
}
}
.bg {
height: 100vh;
padding-bottom: 26rpx;
display: flex;
flex-direction: column;
background: #F8FAFB;
}
.data-container{
background: #F7F7F7;
display: flex;
flex-direction: column;
}
.right-container{
flex: 1;
width: 100%;
height: 1rpx;
.search-result{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
flex: 1;
flex-shrink: 0;
padding:30rpx 26rpx 0;
.search-item{
width: 335rpx;
height: 510rpx;
overflow: hidden;
background: #FFFFFF;
border-radius: 13rpx;
margin-bottom: 26rpx;
display: flex;
flex-direction: column;
image{
width: 335rpx;
height: 342rpx;
background: #87CD93;
border-radius: 13rpx 13rpx 0rpx 0rpx;
}
}
.search-result-container{
flex: 1;
padding:6rpx 12rpx 12rpx;
width: 100%;
height: 1rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title{
font-weight: 500;
font-size: 29rpx;
color: #000000;
}
.price{
font-weight: 400;
font-size: 33rpx;
color: #C3282E;
}
.price:before{
content: "¥";
font-size: 23rpx;
}
.price:after{
content: "起";
font-size: 23rpx;
color: #999;
}
.btn{
width: 107rpx;
height: 47rpx;
background: #6A8A2D;
border-radius: 11rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
line-height: 47rpx;
}
}
}
}
.placeholder-content{
background: white;
position: relative;
.btn-cover{
z-index: 200;
position: fixed;
bottom: 0;
width: 750rpx;
height: 148rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6,0,1,0.1);
.btn{
width: 670rpx;
height: 78rpx;
text-align: center;
line-height: 78rpx;
background: #6A8A2D;
border-radius: 11rpx;
font-size: 34rpx;
font-family: PingFangSC;
font-weight: 500;
color: #FFFFFF;
}
}
}
.supplier-box{
display: flex;
align-items: center;
padding: 28rpx 23rpx;
width: 100%;
background: #ffffff;
flex-shrink: 0;
.supplier-image{
width: 113.07rpx;
height: 113.07rpx;
border-radius: 50%;
flex-shrink: 0 ;
}
.supplier-content{
flex: 1;
width: 1px;
padding: 0 50rpx 0 20rpx;
height: 113.07rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: bold;
font-size: 32rpx;
color: #010101;
}
.tags{
display: flex;
width: 100%;
overflow: hidden;
.tags-item{
padding: 4rpx 10rpx;
font-weight: 500;
font-size: 24rpx;
color: #6A8A27;
border-radius: 5rpx 4rpx 4rpx 5rpx;
border: 1px solid #6A8A27;
margin-right: 15rpx;
}
}
}
</style>

101
subPackages/techan/detail.vue

@ -43,6 +43,21 @@
</view>
</view>
<view class="price-box supplier-box" style="margin-top: 20rpx;" v-if="supplierInfo">
<image v-if="supplierInfo.headimg" class="supplier-image" :src="supplierInfo.headimg"></image>
<view class="supplier-content">
<view class="text-overflowRows">{{supplierInfo.shop_name}}</view>
<view class="tags" v-if="supplierInfo.display_tags">
<view class="tags-item" v-for="(item,i) in supplierInfo.display_tags.split(',')" :key="i">
{{item}}
</view>
</view>
</view>
<view class="supplier-btn" @click="goShopDetail(supplierInfo.id)">
进店
</view>
</view>
<view class="price-box info-box-query" id="box2" style="margin-top: 20rpx;">
<view class="pro-title">产品详情</view>
<view class="notice" >
@ -152,6 +167,7 @@
addCart: false,
cartNum: 0,
supplierInfo: null,
};
},
@ -164,7 +180,6 @@
this.down = true
query.selectAll(".info-box-query").boundingClientRect(res=>{
let i = res.findLastIndex(v=>v.top-100<=0)
console.log(res, i)
if (i>=0) {
this.type = i+1
}
@ -197,8 +212,22 @@
}
this.info = res.data;
this.sku = res.data.sku || []
this.getSupplierInfo(res.data.supplier_id)
});
},
getSupplierInfo (supplier_id) {
this.Post({supplier_id: supplier_id},
'/api/supplier/get_supplier_detail').then(res => {
if (res.code == 1) {
this.supplierInfo = res.data;
}
});
},
goShopDetail(id) {
uni.navigateTo({
url:"/subPackages/search/shopResult?id="+id
})
},
//
addNumber() {
@ -276,7 +305,7 @@
},
//
getCartList () {
this.Post({},'/api/cart/get_cart_count').then(res=>{
this.Post({noForceLogin: true},'/api/cart/get_cart_count').then(res=>{
this.cartNum = res.data || 0
})
},
@ -328,19 +357,19 @@
}
.swipe-box {
height: 413rpx;
height: 750rpx;
position: relative;
.swiper {
height: 413rpx;
height: 750rpx;
position: relative;
.swiper-item {
width: 100%;
height: 413rpx;
height: 750rpx;
.item-img {
width: 750rpx;
height: 413rpx;
height: 750rpx;
}
}
}
@ -378,7 +407,7 @@
}
.swipe-box {
height: 400rpx;
height: 750rpx;
position: relative;
.swiper-item-num {
@ -399,16 +428,16 @@
}
.swiper {
height: 400rpx;
height: 750rpx;
position: relative;
.swiper-item {
width: 100%;
height: 400rpx;
height: 750rpx;
.item-img {
width: 750rpx;
height: 400rpx;
height: 750rpx;
}
}
}
@ -865,4 +894,56 @@
z-index: 1;
}
}
.supplier-box{
display: flex;
align-items: center;
padding: 28rpx 23rpx;
.supplier-image{
width: 113.07rpx;
height: 113.07rpx;
border-radius: 50%;
flex-shrink: 0 ;
}
.supplier-content{
flex: 1;
width: 1px;
padding: 0 50rpx 0 20rpx;
height: 113.07rpx;
display: flex;
flex-direction: column;
justify-content: center;
font-weight: bold;
font-size: 32rpx;
color: #010101;
}
.supplier-btn{
flex-shrink: 0;
width: 133rpx;
height: 55rpx;
background: #6A8A2D;
border-radius: 13rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
text-align: center;
line-height: 55rpx;
}
.tags{
display: flex;
width: 100%;
overflow: hidden;
padding-top: 10rpx;
.tags-item{
padding: 4rpx 10rpx;
font-weight: 500;
font-size: 24rpx;
color: #6A8A27;
border-radius: 5rpx 4rpx 4rpx 5rpx;
border: 1px solid #6A8A27;
margin-right: 15rpx;
}
}
}
</style>

54
subPackages/techan/index.vue

@ -14,8 +14,9 @@
<!-- 正常产品 -->
<template>
<view style="width: 100%;position: relative;">
<scroll-view class="type-container" scroll-x="true" scroll-with-animation="true" enable-flex>
<view :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
<scroll-view class="type-container scroll-view" scroll-x="true" scroll-with-animation="true" enable-flex
:scroll-into-view="scrollIntoView">
<view :id="`item-${i}`" :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
<view class="img-container" >
<image :src="showImg(item.image)"></image>
</view>
@ -56,7 +57,10 @@
<image class="item-img" :src="showImg(item.headimg)" mode=""></image>
<view class="content">
<view class="title text-overflowRows">{{item.title}}</view>
<view style="font-weight: 500;font-size: 21rpx;color: #999999;">已售{{item.sales_number}}</view>
<!-- <view style="font-weight: 500;font-size: 21rpx;color: #999999;">已售{{item.sales_number}}</view> -->
<view class="tag-container" v-if="item.display_tags">
<view class="tag" v-for="(tag,tagI) in item.display_tags.split(',')" :key="tagI">{{tag}}</view>
</view>
<view class="bottom">
<view>
<text class="price">{{item.price/100}}</text>
@ -259,7 +263,8 @@
searchFinish: false,
search_type: 0,
typePopShow: false
typePopShow: false,
scrollIntoView: '',
}
},
@ -286,6 +291,18 @@
//
this.height = sysInfo.statusBarHeight + 40
},
changeSelectPosition (index) {
this.$nextTick(()=>{
index=index-2;
if (index<0) {index=0}
// 使scroll-into-view
this.scrollIntoView = `item-${index}`;
//
setTimeout(() => {
this.scrollIntoView = `item-${index}`;
}, 100);
})
},
changeTypePop (e) {
this.typePopShow = e.show
},
@ -297,6 +314,8 @@
this.typeParam = res.data || []
this.getList()
//
this.changeSelectPosition(this.typeIndex)
})
},
@ -309,6 +328,8 @@
this.getList()
this.showTypes(false)
}
this.changeSelectPosition(i)
},
changeSearchParm(value) {
@ -547,7 +568,7 @@
padding: 8rpx 0;
.type-item{
height: 120rpx;
width: 130rpx;
width: 150rpx;
flex-shrink: 0;
display: flex;
flex-direction: column;
@ -569,7 +590,8 @@
}
}
.type-name{
width: 80rpx;
max-width: 100%;
padding: 0 10rpx;
height: 30rpx;
line-height: 30rpx;
word-break: keep-all;
@ -602,6 +624,22 @@
line-height: 1.2;
}
.tag-container{
width: 100%;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
.tag{
font-weight: 500;
font-size: 20rpx;
color: #6A8A2D;
border-radius: 7rpx;
border: 1px solid #6A8A2D;
margin-right: 20rpx;
padding: 3rpx 6rpx;
}
}
.goods-container{
height: 1rpx;
flex: 1;
@ -657,6 +695,7 @@
flex-direction: column;
justify-content: space-between;
flex: 1;
width: 100rpx;
}
.title {
font-weight: 500;
@ -1013,13 +1052,14 @@
opacity: 0;
}
.type-container.typedata-container{
flex-wrap: wrap;background: #EDF5DC;padding: 30rpx 40rpx 0;
flex-wrap: wrap;background: #EDF5DC;padding: 30rpx 20rpx 0;
width: 100%;
display: flex;
height: auto;
padding-bottom: 30rpx;
.type-item {
margin-bottom: 30rpx;
width: 25%;
}
}
.bottom-close{

294
subPackages/techan/manualIndex.vue

@ -0,0 +1,294 @@
<template>
<view class="bg" >
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<!-- 搜索 -->
<view class="data-container" >
<view class="no-data-zhanwei" v-if="list.length<=0">
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
<view style="padding:50rpx 0 67rpx">暂无数据</view>
</view>
<scroll-view class="right-container no-scrollbar" :scroll-y="true" @scrolltolower="scrollLow()" v-else>
<view class="search-result" >
<view v-for="(item,i) in list" class="search-item" :key="i" @click="viewDetail(item)">
<image :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="search-result-container">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="flex-between" style="padding-top: 20rpx;">
<view class="price">{{item.price/100}}</view>
<view class="btn">购买</view>
</view>
</view>
</view>
</view>
</scroll-view >
</view>
<view style="height: 60rpx;"></view>
</view>
</template>
<script>
export default {
data() {
return {
id: null,
list:[],
finished: false,
headImg: null,
}
},
onLoad(options) {
},
onReady() {
this.getList()
this.getHeadImg(2381).then(res => {this.headImg = res})
},
methods: {
getList(){
this.Post({
tag_id: 662,
offset: this.list.length,
limit: 10,
},'/api/product/get_product_by_tag').then(res => {
this.list = [...this.list, ...res.data.list];
if (res.data.list.length < 10) {
this.finished = true
}
console.log(this.list)
})
},
viewDetail(item) {
// uni.navigateTo({
// url: '/subPackages/techan/detail?id=' + item.id
// })
this.gotoDetailByType(item)
},
},
onReachBottom() {
setTimeout(()=>{
if (!this.finished) {
this.getList()
}
},200)
}
}
</script>
<style lang="scss" scoped>
view {
box-sizing: border-box;
}
.search-header{
width: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
padding-left: 10rpx;
padding-right: 120px;
background: #fff;
.input-model{
flex: 1;
width: 1rpx;
height: 64rpx;
background: #F2F4F7;
border-radius: 55rpx;
margin-left: 12rpx;
display: flex;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #999999;
padding-left: 24rpx;
}
.input-text{
height:19px;
padding-left: 14rpx;
font-weight: 400;
font-size: 24rpx;
color: #030000;
}
.search-btn{
font-weight: 500;
font-size: 29rpx;
color: #6A8A2D;
padding-left: 25rpx;
width: 85rpx;
height: 50%;
line-height: 1;
border-left: 1px solid #CCCCCC;
}
}
.bg {
min-height: 100vh;
background: #F7F7F7;
}
.topImg{
width: 100%;
// height: 440rpx;
}
.data-container{
display: flex;
flex-direction: column;
}
.right-container{
flex: 1;
width: 100%;
height: 1rpx;
.search-result{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
flex: 1;
flex-shrink: 0;
padding:30rpx 26rpx 0;
.search-item{
width: 335rpx;
height: 510rpx;
overflow: hidden;
background: #FFFFFF;
border-radius: 13rpx;
margin-bottom: 26rpx;
display: flex;
flex-direction: column;
image{
width: 335rpx;
height: 342rpx;
background: #87CD93;
border-radius: 13rpx 13rpx 0rpx 0rpx;
}
}
.search-result-container{
flex: 1;
padding:6rpx 12rpx 12rpx;
width: 100%;
height: 1rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title{
font-weight: 500;
font-size: 29rpx;
color: #000000;
}
.price{
font-weight: 400;
font-size: 33rpx;
color: #C3282E;
}
.price:before{
content: "¥";
font-size: 23rpx;
}
.price:after{
content: "起";
font-size: 23rpx;
color: #999;
}
.btn{
width: 107rpx;
height: 47rpx;
background: #6A8A2D;
border-radius: 11rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
text-align: center;
line-height: 47rpx;
}
}
}
}
.placeholder-content{
background: white;
position: relative;
.btn-cover{
z-index: 200;
position: fixed;
bottom: 0;
width: 750rpx;
height: 148rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6,0,1,0.1);
.btn{
width: 670rpx;
height: 78rpx;
text-align: center;
line-height: 78rpx;
background: #6A8A2D;
border-radius: 11rpx;
font-size: 34rpx;
font-family: PingFangSC;
font-weight: 500;
color: #FFFFFF;
}
}
}
.supplier-box{
display: flex;
align-items: center;
padding: 28rpx 23rpx;
width: 100%;
background: #ffffff;
flex-shrink: 0;
.supplier-image{
width: 113.07rpx;
height: 113.07rpx;
border-radius: 50%;
flex-shrink: 0 ;
}
.supplier-content{
flex: 1;
width: 1px;
padding: 0 50rpx 0 20rpx;
height: 113.07rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: bold;
font-size: 32rpx;
color: #010101;
}
.tags{
display: flex;
width: 100%;
overflow: hidden;
.tags-item{
padding: 4rpx 10rpx;
font-weight: 500;
font-size: 24rpx;
color: #6A8A27;
border-radius: 5rpx 4rpx 4rpx 5rpx;
border: 1px solid #6A8A27;
margin-right: 15rpx;
}
}
}
</style>

4
subPackages/techan/order.vue

@ -510,8 +510,8 @@ export default {
this.Post(
{
order_id: res.data.order_id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
},
'/api/order/pay'
).then(res => {

4
subPackages/ticket/order.vue

@ -471,8 +471,8 @@
this.$store.commit("choseCoupon", "");
this.Post({
order_id: order_id,
pay_platform: "miniprogram",
pay_method: 'abc'
pay_platform: "MINI",
pay_method: 'WEIXIN',
}, '/api/order/pay').then(res => {
if (res.data) {
uni.requestPayment({

Loading…
Cancel
Save