Browse Source

Merge branch 'master' into dev_delivery

dev_delivery
jiazhipeng 2 months ago
parent
commit
8462f3a41f
  1. 13
      App.vue
  2. 10
      components/cartData.vue
  3. 29
      mixins/myMixins.js
  4. 56
      pages.json
  5. 214
      pages/index/index.vue
  6. 6
      pages/user/user.vue
  7. 3
      static/css/base.css
  8. 16
      static/js/CommonFunction.js
  9. 22
      static/js/request.js
  10. 412
      subPackages/activity/agriculturalProd.vue
  11. 148
      subPackages/activity/agriculturalProdNH.vue
  12. 46
      subPackages/activity/commonRule.vue
  13. 218
      subPackages/activity/jitoumi.vue
  14. 149
      subPackages/food/cafe.vue
  15. 71
      subPackages/food/detail.vue
  16. 3
      subPackages/food/index.vue
  17. 4
      subPackages/food/order.vue
  18. 3
      subPackages/homestay/detail.vue
  19. 3
      subPackages/homestay/index.vue
  20. 4
      subPackages/homestay/order.vue
  21. 145
      subPackages/letter/detail.vue
  22. 163
      subPackages/letter/index.vue
  23. 8
      subPackages/line/index.vue
  24. 4
      subPackages/line/orders.vue
  25. 4
      subPackages/order/cartOrder.vue
  26. 2
      subPackages/order/orderCoupon.vue
  27. 4
      subPackages/order/orderDetail.vue
  28. 4
      subPackages/order/trades.vue
  29. 4
      subPackages/search/result.vue
  30. 354
      subPackages/search/shopResult.vue
  31. 3
      subPackages/search/techanResult.vue
  32. 169
      subPackages/techan/detail.vue
  33. 54
      subPackages/techan/index.vue
  34. 294
      subPackages/techan/manualIndex.vue
  35. 4
      subPackages/techan/order.vue
  36. 66
      subPackages/ticket/detail.vue
  37. 4
      subPackages/ticket/index.vue
  38. 4
      subPackages/ticket/order.vue

13
App.vue

@ -3,6 +3,19 @@
onLaunch: function() {
console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
console.log('App Launch')
// 1
uni.setStorageSync('SHFlag', true)
this.Post({id:2388},'/api/multimedia/detail').then(res => {
if (res && res.data) {
let SHFlag = res.data.company_name == 1 ? true : false
// let SHFlag = res.data.ext_link == 1 ? true : false
uni.setStorageSync('SHFlag', SHFlag)
return
} else {
uni.setStorageSync('SHFlag', false)
}
});
},
onShow: function() {
console.log('App Show')

10
components/cartData.vue

@ -159,7 +159,7 @@
this.cartData = data
this.setAllSelect()
} else {
this.Post({},'/api/cart/get_post_list').then(res => {
this.Post({noForceLogin: true},'/api/cart/get_post_list').then(res => {
if (res) {
this.cartData = (res.data || []).map(v=>{
if (v.delivery_method) {
@ -221,9 +221,9 @@
},
clearAllGoods(){
let ids = this.cartData.map(v=>v.sku.id)
let ids = this.cartData.map(v=>v.id)
if (ids.length>0) {
this.Post({sku_id:ids.join(',')},'/api/cart/del_sku').then(res=>{
this.Post({id:ids.join(',')},'/api/cart/del_sku').then(res=>{
this.cartData = []
this.setAllSelect()
})
@ -247,13 +247,13 @@
addBuyNum(item, num,index){
if (num == -1 && item.num == 1) {
this.Post({sku_id: item.sku_id, num: 0},'/api/cart/del_sku').then(res =>{
this.Post({id: item.id, num: 0},'/api/cart/del_sku').then(res =>{
this.cartData.splice(index,1)
this.setAllSelect()
})
} else {
let numData = item.num + num
this.Post({sku_id: item.sku_id, num: numData},'/api/cart/update_sku').then(res =>{
this.Post({id: item.id, num: numData},'/api/cart/update_sku').then(res =>{
item.num += num
this.setAllSelect()
})

29
mixins/myMixins.js

@ -1,5 +1,11 @@
export const myMixins ={
data() {
return {
shareParam: {},
}
},
onLoad(option) {
console.log('option',option)
if(option && option.wechat_qrcode){
@ -15,28 +21,33 @@ export const myMixins ={
// 分享到朋友圈
onShareTimeline() {
return {
title: '智游常熟',
title: '时味苏州',
type: 0,
summary: "edewdewdewf",
imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg"
imageUrl: "https://static.ticket.sz-trip.com/uploads/20250818/5ea2c18a15db8a438f2ce642194b6051.jpg"
}
},
onShareAppMessage() {
const pages = getCurrentPages(); // 获取加载的页面
const view = pages[pages.length - 1]; // 获取当前页面的对象
let url = '';
if (view.options.url) {
url = view.options.url;
let shareParam = {}
console.log(view)
if (view.$page.fullPath) {
url = view.options.fullPath;
} else {
url = uni.getStorageSync('webUrl');
}
if (view.data && view.data.shareParam) {
shareParam = view.data.shareParam
}
console.log(111,url,`${view.route}?url=${url}`)
return {
title: '智游常熟', // 分享的名称
path: `${view.route}?url=${url}`, // 将 url 作为参数传递
imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg",
mpId: 'wxb8f15afe2765976d' // 此处配置微信小程序的 AppId
title: '时味苏州', // 分享的名称
path: `${view.$page.fullPath}`,
// imageUrl: "https://static.ticket.sz-trip.com/uploads/20250818/5ea2c18a15db8a438f2ce642194b6051.jpg",
mpId: 'wx699ed131345cf8dd', // 此处配置微信小程序的 AppId
...shareParam
};
}
}

56
pages.json

@ -66,6 +66,12 @@
"navigationBarTitleText" : "搜索"
}
},
{
"path" : "search/shopResult",
"style" : {
"navigationStyle": "custom"
}
},
{
"path" : "video/video",
"style" : {
@ -138,6 +144,12 @@
"navigationBarTitleText" : "农家烟火"
}
},
{
"path": "food/cafe",
"style": {
"navigationBarTitleText" : "啡尝美味"
}
},
{
"path": "food/detail",
"style": {
@ -154,7 +166,7 @@
{
"path" : "line/index",
"style" : {
"navigationBarTitleText" : "精选线路"
"navigationBarTitleText" : "乡村漫游"
}
},
{
@ -295,6 +307,48 @@
"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" : ""
}
},
{
"path": "activity/jitoumi",
"style": {
"navigationBarTitleText" : "水八仙之首—苏州芡实 (鸡头米)"
}
}
]
}],

214
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')">
<view class="search-box" @click="gotoPath('/subPackages/search/index')" v-if="!SHFlag">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/index/search.png" mode=""></image>
搜一搜您想要的
<view class="search-btn">搜索</view>
</view>
<!-- 顶部轮播 -->
@ -35,31 +39,52 @@
</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&&!SHFlag">
<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 class="module-box" v-if="!SHFlag">
<view v-for="(item,index) in moduleList" :key="index" @click="gotoHomeDetail(item)">
<image :src="item.icon" mode="widthFix" class="module-item"></image>
</view>
</view>
<!-- 热门推荐 -->
<image :src="homeUi.rmtjbttp" mode="heightFix" class="rmtj-img"></image>
<view class="hot-box">
<image :src="homeUi.rmtjbttp" mode="heightFix" class="rmtj-img" v-if="!SHFlag"></image>
<!-- <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" v-if="!SHFlag">
<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 +97,8 @@
},
data() {
return {
height: 0,
statusBarHeight: 0,
homeUi: {},
navList: [],
topBanner: [],
@ -79,22 +106,75 @@
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'
}
]
},
SHFlag: true,
}
},
onLoad() {
},
onShow() {
this.initSHFlag()
},
//
onHide() {
// this.getLocation()
},
onReady() {
this.initRectInfo()
this.sendRequest()
this.getHeadImg(2378).then(res => {this.CKMap = res})
},
methods: {
initSHFlag () {
let _this = this
//
try {
_this.SHFlag = uni.getStorageSync('SHFlag')?true: false
} catch (e) {
_this.SHFlag = false
}
console.log(_this.SHFlag)
setTimeout(()=>{
try {
_this.SHFlag = uni.getStorageSync('SHFlag')?true: false
} catch (e) {
_this.SHFlag = false
}
console.log(_this.SHFlag)
},500)
},
initRectInfo () {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight
//
this.height = sysInfo.statusBarHeight + 40
},
// UI
gotoHomeDetail(item) {
if(item.jump_type == 'page') {
//
// 4 5 6
@ -122,6 +202,9 @@
},
// 广
gotoBannerDetail(item) {
if (this.SHFlag) { return }
// 1 2 3 4
switch (item.jump_type){
case 1:
@ -197,15 +280,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 +324,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 +359,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 +384,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 +411,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 +460,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 +481,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;

6
pages/user/user.vue

@ -153,7 +153,7 @@
title: '商户核销',
path: '',
isShow: true,
webUrl: "https://swsz.supplier-h5.js-dyyj.com",
webUrl: "https://supplier-h5.sutenong.com",
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhxy.png',
@ -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 => {

3
static/css/base.css

@ -89,6 +89,9 @@ view {
}
.h-1rpx{
height: 1rpx;
}
.no-scrollbar::-webkit-scrollbar{
display: none;
}
.no-data-zhanwei{
display: flex;

16
static/js/CommonFunction.js

@ -323,6 +323,22 @@ Vue.prototype.goCartNextPage= function(currentPageIndex){
}
Vue.prototype.sharePage = function(param) {
const pages = getCurrentPages(); // 获取加载的页面
const view = pages[pages.length - 1]; // 获取当前页面的对象
let shareParam = {
title: '时味苏州', // 分享的名称
path: `${view.$page.fullPath}`,
imageUrl: "https://static.ticket.sz-trip.com/uploads/20250818/5ea2c18a15db8a438f2ce642194b6051.jpg",
mpId: 'wx699ed131345cf8dd', // 此处配置微信小程序的 AppId
...param,
}
return shareParam;
}
// 配送时间
/**
* 解析"小时:分钟"格式的时间为总分钟数

22
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
@ -20,15 +20,17 @@ const getToken = () => {
};
// 定义错误处理函数
const handleError = (res, reject) => {
const handleError = (res, reject, noForceLogin) => {
setTimeout(() => {
uni.showToast({
title: res.data?.msg || res.msg,
icon: 'none'
});
if (!noForceLogin) {
uni.showToast({
title: res.data?.msg || res.msg,
icon: 'none'
});
}
reject(res);
}, 0);
if (res.data?.code === 401) {
if (res.data?.code === 401 && !noForceLogin) {
store.commit('changeLoginPath');
}
};
@ -64,13 +66,13 @@ Vue.prototype.Post = (params = {}, apiurl) => {
if (res.data.code === 200 || res.data.code === 1) {
resolve(res.data);
} else {
handleError(res, reject);
handleError(res, reject,params.noForceLogin);
}
},
fail: (err) => {
console.log('err', err);
uni.hideLoading()
handleError(err, reject);
handleError(err, reject,params.noForceLogin);
}
});
});

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/20250821/e45546af63bafab92ac2e8783d7b079c.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: #FCE1B6;
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>

218
subPackages/activity/jitoumi.vue

@ -0,0 +1,218 @@
<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/20250822/a7ab5b85fcc1085c14f4a2ec23f0692f.png"></image>
<image class="adv-image" mode="aspectFill" @click="gotoPath('/subPackages/activity/agriculturalProdNH')"
src="https://static.ticket.sz-trip.com/uploads/20250822/2393a3923a07f2f1112ad0210f37021d.png"></image>
<image class="title-image" style="margin-bottom: 38rpx;width: 100%;height: 3rpx;"
src="https://static.ticket.sz-trip.com/uploads/20250822/321e0c681ddbcc6853d6312eb69742c9.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<=5" @click="viewNum=999">查看更多</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20250822/19236de541dc0d75e4e23be36ba98a45.png"></image>
<image @click="returnTop" v-show="showGoTop" class="back-img" src="https://static.ticket.sz-trip.com/uploads/20250822/ebc1045d4519507258b9aff74d004b36.png"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
viewNum: 5,
headImg: '',
showGoTop: false,
}
},
onLoad(option) {
},
onReady() {
this.getHeadImg(2390)
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
})
});
},
//
getGoods() {
this.Post({
tag_id: 100,
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
})
},
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: #FFE9CD;
padding-bottom: 60rpx;
}
.topImg {
width: 100%;
}
.main-container{
width: 100%;
padding: 0 26rpx;
.title-image{
width: 494.67rpx;
height: 36rpx;
margin: 0 auto;
display: block;
}
.adv-image{
margin: 31rpx 0 40rpx;
width: 100%;
height: 200rpx;
}
}
.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: #682809;
padding: 0rpx 6rpx;
border-radius: 5rpx;
border: 1px solid #682809;
margin-right: 13rpx;
}
}
.view-more{
// border: 1px solid #4C9BB4;
line-height: 53rpx;
font-weight: 500;
font-size: 25rpx;
color: #682809;
text-align: center;
margin: 32rpx auto 50rpx;
width: 253rpx;
height: 53rpx;
background: #FFFFFF;
border-radius: 27rpx;
}
.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>

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>

71
subPackages/food/detail.vue

@ -75,26 +75,35 @@
</view>
<!-- 底部按钮 -->
<view class="btn-box flex-center">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="icon-container">
<view class="icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"></image>
<text>客服</text>
<view style="width: 180rpx;" class="flex-between">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="icon-container">
<view class="icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"></image>
<text>客服</text>
</view>
</view>
</button>
<view class="icon-container">
<view class="icon-item" style="position: relative;width: 80rpx;" @click="goCartPage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/17eeecf12ba9fdc56bce3b84fd5fb45f.png" mode="aspectFill"></image>
<text>购物车</text>
<view class="cartNum" v-if="cartNum">{{cartNum}}</view>
</view>
</view>
</view>
</button>
<view class="flex">
<view class="btn" @click="openPop(true)">加入购物车</view>
<view class="btn" @click="openPop(false)">立即购买</view>
</view>
</view>
<!-- 购物车图标 -->
<view class="add-cart-icon" @click="goCartPage()">
<!-- <view class="add-cart-icon" @click="goCartPage()">
<uni-badge class="uni-badge-left-margin" :text="cartNum" absolute="rightTop" :offset="[-3, -3]" size="small"
:custom-style="{background:'#DC2525',color:'#ffffff'}">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/f8c2078ad76754a0b0251f9b65784dc2.png"></image>
</uni-badge>
</view>
</view> -->
<!-- 预定弹窗 -->
<uni-popup ref="popup" type="bottom" :safe-area="false" @change="changPopShow" style="position: relative;z-index: 50;">
@ -222,11 +231,12 @@
} catch(e) {}
this.info = resData
this.sku = resData.sku
this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
goMap () {
if (!this.info.lat || !this.info.lon) {
if (!this.info.scene_lat || !this.info.scene_lon) {
uni.showToast({
title: '暂未配置地理位置',
icon: 'none'
@ -235,13 +245,13 @@
}
uni.openLocation({
latitude: Number(this.info.lat),
longitude: Number(this.info.lon),
name: this.info.title,
address: this.info.address,
success: function () {
console.log('success');
}
latitude: Number(this.info.scene_lat),
longitude: Number(this.info.scene_lon),
name: this.info.scene_name,
address: this.info.scene_address,
// success: function () {
// console.log('success');
// }
});
},
@ -257,7 +267,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
})
},
@ -592,7 +602,7 @@
align-items: center;
justify-content: space-between;
z-index: 10;
padding: 0 46rpx;
padding: 0 26rpx;
.icon-container{
font-weight: 400;
font-size: 23rpx;
@ -613,17 +623,17 @@
.btn{
width: 200rpx;
height: 60rpx;
height: 75rpx;
line-height: 75rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
line-height: 60rpx;
text-align: center;
background: #6A8A27;
border-radius: 0rpx 11rpx 11rpx 0rpx;
border-radius: 0rpx 20rpx 20rpx 0rpx;
&:first-of-type{
background: #D3E8A7;
border-radius: 11rpx 0rpx 0rpx 11rpx;
border-radius: 20rpx 0rpx 0rpx 20rpx;
color: #6A8A27;
}
}
@ -844,4 +854,21 @@
button::after {
border: none;
}
.cartNum{
width: 28rpx;
height: 28rpx;
background: #DC2525;
border-radius: 50%;
border: 1px solid #DC2525;
font-weight: normal;
font-size: 23rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: -10rpx;
right: -6rpx;
}
</style>

3
subPackages/food/index.vue

@ -1,7 +1,7 @@
<template>
<view class="bg">
<view class="topImg relative">
<img v-if="headImg" :src="showImg(headImg)" class="topImg" mode="aspectFill">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
</view>
@ -86,7 +86,6 @@
}
.topImg{
width: 100%;
height: 386rpx;
}

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({

3
subPackages/homestay/detail.vue

@ -244,7 +244,7 @@
methods: {
//
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
})
},
@ -299,6 +299,7 @@
let info = res.data;
this.info = info
console.log(info)
this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
// id

3
subPackages/homestay/index.vue

@ -1,6 +1,6 @@
<template>
<view class="bg">
<image :src="headImg" class="topImg" mode="aspectFill"></image>
<image :src="headImg" class="topImg" mode="widthFix"></image>
<view @click="gotoDetailByType(item)" class="item" v-for="(item,index) in list" :key="index">
<image :src="item.headimg" mode="aspectFill" class="image"></image>
@ -64,7 +64,6 @@
.topImg {
width: 100%;
height: 386.67rpx;
}
.item {

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>

8
subPackages/line/index.vue

@ -1,5 +1,8 @@
<template>
<view class="bg">
<view class="topImg relative">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
</view>
<view class="item" v-for="(item,index) in list" :key="index" @click="gotoDetailByType(item)">
<image :src="showImg(item.headimg)" mode="aspectFill "></image>
<view class="content flex-column">
@ -24,12 +27,14 @@
export default {
data() {
return {
headImg:null,
list: [],
finished: false
}
},
onReady() {
this.getList()
this.getHeadImg(2377).then(res => {this.headImg = res})
},
onReachBottom() {
setTimeout(() => {
@ -61,6 +66,9 @@
background-color: rgba(249, 252, 243, 1);
padding-bottom: 100rpx;
}
.topImg{
width: 100%;
}
.item {
margin: 30rpx 26rpx;

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

@ -455,8 +455,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({

2
subPackages/order/orderCoupon.vue

@ -114,7 +114,7 @@
console.log('选中的',this.list[index].selected);
if(item.selected) {
if (item.activity.discount_type == 'pricebreak') {
this.reducePrice = item.activity.mini_money/100+'元'
this.reducePrice = item.activity.money/100+'元'
this.coupon = item
} else{
this.coupon = item

4
subPackages/order/orderDetail.vue

@ -695,8 +695,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) {

4
subPackages/search/result.vue

@ -99,6 +99,10 @@
this.getList();
},
pushHis(keywords) {
if (!keywords.trim()) {
return
}
let history = JSON.parse(uni.getStorageSync('tz_trip_keyowrds')) || [];
let index = history.findIndex(item => item == keywords);
if (index >= 0) history.splice(index, 1);

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>

3
subPackages/search/techanResult.vue

@ -243,6 +243,9 @@
this.getList()
},
pushHis(keywords) {
if (!keywords.trim()) {
return
}
let history = JSON.parse(uni.getStorageSync('tz_trip_keyowrds')) || [];
let index = history.findIndex(item => item == keywords);
if (index >= 0) history.splice(index, 1);

169
subPackages/techan/detail.vue

@ -45,6 +45,21 @@
限制{{info.display_tags.split(',').join(' | ')}}
</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" >
@ -54,16 +69,22 @@
</view>
<view class="btn-list" >
<view class="left-box">
<view class="left-box flex-between">
<view class="img-box" v-if="supplierInfo" @click="goShopDetail(supplierInfo.id)">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/ead79154bae29fde0cd05b41539a1a74.png" mode="aspectFill"></image>
<view class="text">店铺</view>
</view>
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="img-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"
mode="aspectFill"></image>
<view class="text">
客服
</view>
<image src="https://static.ticket.sz-trip.com/uploads/20250820/194e12115940d2c67619a2d1fd9120c3.png" mode="aspectFill"></image>
<view class="text">客服</view>
</view>
</button>
<view class="img-box" style="position: relative;" @click="goCartPage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/17eeecf12ba9fdc56bce3b84fd5fb45f.png" mode="aspectFill"></image>
<view class="text">购物车</view>
<view class="cartNum" v-if="cartNum">{{cartNum}}</view>
</view>
</view>
<view class="btn-post">
@ -72,13 +93,6 @@
</view>
</view>
<!-- 购物车图标 -->
<view class="add-cart-icon" @click="goCartPage()">
<uni-badge class="uni-badge-left-margin" :text="cartNum" absolute="rightTop" :offset="[-3, -3]" size="small"
:custom-style="{background:'#DC2525',color:'#ffffff'}">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/f8c2078ad76754a0b0251f9b65784dc2.png"></image>
</uni-badge>
</view>
<uni-popup ref="popup" type="bottom" @change="changPopShow" :safe-area="false" style="position: relative;z-index: 99;">
<view class="popup-content" v-if="sku.length>0">
@ -178,6 +192,7 @@
addCart: false,
cartNum: 0,
supplierInfo: null,
};
},
@ -190,7 +205,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
}
@ -228,8 +242,24 @@
console.log(data)
this.info = data;
this.sku = data.sku || []
this.getSupplierInfo(res.data.supplier_id)
this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
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() {
@ -323,7 +353,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
})
},
@ -375,19 +405,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;
}
}
}
@ -425,7 +455,7 @@
}
.swipe-box {
height: 400rpx;
height: 750rpx;
position: relative;
.swiper-item-num {
@ -446,16 +476,16 @@
}
.swiper {
height: 400rpx;
height: 750rpx;
position: relative;
.swiper-item {
width: 100%;
height: 400rpx;
height: 750rpx;
.item-img {
width: 750rpx;
height: 400rpx;
height: 750rpx;
}
}
}
@ -578,11 +608,14 @@
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6, 0, 1, 0.1);
display: flex;
justify-content: space-between;
padding: 30rpx 50rpx 0 50rpx;
padding: 30rpx 26rpx 0 ;
.left-box {
display: flex;
align-items: flex-start;
flex: 1;
width: 100rpx;
padding-right: 50rpx;
.bottom-price{
display: flex;
@ -608,11 +641,10 @@
flex-direction: column;
align-items: center;
justify-content: center;
margin-right: 64rpx;
image {
width: 48rpx;
height: 48rpx;
width: 44rpx;
height: 44rpx;
}
.text {
@ -832,19 +864,22 @@
line-height: 60rpx;
text-align: center;
display: flex;
flex-shrink: 0;
.left-btn-buy{
width: 207rpx;
height: 60rpx;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
color: #6A8A27;
background: #D3E8A7;
border-radius: 11rpx 0rpx 0rpx 11rpx;
border-radius: 20rpx 0rpx 0rpx 20rpx;
}
.right-btn-buy{
width: 207rpx;
height: 60rpx;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
background: #6A8A27;
border-radius: 0rpx 11rpx 11rpx 0rpx;
border-radius: 0rpx 20rpx 20rpx 0rpx;
}
}
.add-cart-icon{
@ -938,4 +973,72 @@
padding: 27rpx;
border-top: 1px solid #D8D8D8;
}
.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;
}
}
}
.cartNum{
width: 28rpx;
height: 28rpx;
background: #DC2525;
border-radius: 50%;
border: 1px solid #DC2525;
font-weight: normal;
font-size: 23rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: -10rpx;
right: -6rpx;
}
</style>

54
subPackages/techan/index.vue

@ -14,8 +14,9 @@
<!-- 正常产品 -->
<template>
<view style="width: 100%;position: relative;" :class="[methodPopShow?'methodShow':'']">
<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>
@ -68,7 +69,10 @@
</view>
<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>
@ -315,7 +319,8 @@
{title: '配送', value: 3}
],
typePopShow: false,
methodPopShow: false,
methodPopShow: false,,
scrollIntoView: '',
}
},
@ -342,6 +347,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
},
@ -378,6 +395,8 @@
this.typeParam = res.data || []
this.getList()
//
this.changeSelectPosition(this.typeIndex)
})
},
@ -390,6 +409,8 @@
this.getList()
this.showTypes(false)
}
this.changeSelectPosition(i)
},
changeSearchParm(value) {
@ -650,7 +671,7 @@
padding: 8rpx 0;
.type-item{
height: 120rpx;
width: 130rpx;
width: 150rpx;
flex-shrink: 0;
display: flex;
flex-direction: column;
@ -672,7 +693,8 @@
}
}
.type-name{
width: 80rpx;
max-width: 100%;
padding: 0 10rpx;
height: 30rpx;
line-height: 30rpx;
word-break: keep-all;
@ -705,6 +727,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;
@ -761,6 +799,7 @@
flex-direction: column;
justify-content: space-between;
flex: 1;
width: 100rpx;
}
.title {
font-weight: 500;
@ -1117,13 +1156,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

@ -737,8 +737,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 => {

66
subPackages/ticket/detail.vue

@ -97,23 +97,33 @@
</view>
<!-- 底部按钮 -->
<view class="btn-box flex-center">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="icon-container">
<view class="icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"></image>
<text>客服</text>
<view style="width: 180rpx;" class="flex-between">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="icon-container">
<view class="icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"></image>
<text>客服</text>
</view>
</view>
</button>
<view class="icon-container">
<view class="icon-item" style="position: relative;width: 80rpx;" @click="goCartPage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/17eeecf12ba9fdc56bce3b84fd5fb45f.png" mode="aspectFill"></image>
<text>购物车</text>
<view class="cartNum" v-if="cartNum">{{cartNum}}</view>
</view>
</view>
</view>
</button>
<view class="btn" @click="showCartPopup">加入购物车</view>
</view>
<!-- 购物车图标 -->
<view class="add-cart-icon" @click="goCartPage()">
<!-- <view class="add-cart-icon" @click="goCartPage()">
<uni-badge class="uni-badge-left-margin" :text="cartNum" absolute="rightTop" :offset="[-3, -3]" size="small"
:custom-style="{background:'#DC2525',color:'#ffffff'}">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/f8c2078ad76754a0b0251f9b65784dc2.png"></image>
</uni-badge>
</view>
</view> -->
<!-- 预订须知的弹窗 -->
<uni-popup ref="popupRule" type="bottom" :safe-area="false">
@ -301,6 +311,7 @@
title: this.info.title
})
}
this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
@ -440,6 +451,21 @@
//
changeSku(itemSku,goods) {
//
console.log(itemSku, goods)
if(goods.is_package == 1) {
let orderInfo = [{
pInfo: goods,
sInfo: {...itemSku, buyNum: 1},
}]
this.$store.commit("changeFoodOrderList", orderInfo);
uni.navigateTo({
url: '/subPackages/food/order'
});
return
}
this.skuInfo = itemSku
this.selectGoods = goods
this.getPriceCal(itemSku,goods)
@ -517,7 +543,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
})
},
@ -872,7 +898,7 @@
align-items: center;
justify-content: space-between;
z-index: 10;
padding: 0 46rpx;
padding: 0 26rpx;
.icon-container{
font-weight: 400;
font-size: 23rpx;
@ -893,13 +919,13 @@
.btn{
width: 200rpx;
height: 60rpx;
height: 75rpx;
background: #6A8A27;
border-radius: 11rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
line-height: 60rpx;
line-height: 75rpx;
text-align: center;
}
@ -1308,4 +1334,20 @@
button::after {
border: none;
}
.cartNum{
width: 28rpx;
height: 28rpx;
background: #DC2525;
border-radius: 50%;
border: 1px solid #DC2525;
font-weight: normal;
font-size: 23rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: -10rpx;
right: -6rpx;
}
</style>

4
subPackages/ticket/index.vue

@ -1,7 +1,7 @@
<template>
<view class="bg">
<view class="topImg relative">
<img v-if="headImg" :src="showImg(headImg)" class="topImg" mode="aspectFill">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
</view>
@ -107,7 +107,7 @@
}
.topImg{
width: 100%;
height: 440rpx;
// height: 440rpx;
}

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