chenkainan 7 months ago
parent
commit
03bceab939
  1. 5
      mixins/myMixins.js
  2. 53
      pages/index/index.vue
  3. 12
      pages/user/user.vue
  4. 18
      static/js/CommonFunction.js
  5. 2
      static/js/request.js
  6. 23
      subPackages/order/detail.vue
  7. 1
      subPackages/venue/venueList.vue
  8. 4
      subPackages/venue/venueOrder.vue
  9. 2
      subPackages/webPage/webPage.vue

5
mixins/myMixins.js

@ -18,7 +18,7 @@ export const myMixins ={
title: '智游常熟',
type: 0,
summary: "edewdewdewf",
imageUrl: "https://static.ticket.sz-trip.com/dongtai/images/index/share.jpg"
imageUrl: "https://static.ticket.sz-trip.com/changshu/images/index/share.jpg"
}
},
onShareAppMessage() {
@ -31,11 +31,10 @@ export const myMixins ={
url = uni.getStorageSync('webUrl');
}
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",
imageUrl: "https://static.ticket.sz-trip.com/changshu/images/index/share.jpg",
mpId: 'wxb8f15afe2765976d' // 此处配置微信小程序的 AppId
};
}

53
pages/index/index.vue

@ -65,13 +65,13 @@
<!-- 旅游助手 -->
<image src="https://static.ticket.sz-trip.com/changshu/images/index/title3.png" mode="heightFix" class="title-img"></image>
<view class="flex-between">
<image :src="item.img" mode="aspectFill" class="travel-img" v-for="(item,index) in travelList" :key="index"></image>
<image :src="item.img" mode="aspectFill" class="travel-img" v-for="(item,index) in travelList" :key="index" @click="exploit"></image>
</view>
<!-- 公共服务 -->
<image src="https://static.ticket.sz-trip.com/changshu/images/index/title4.png" mode="heightFix" class="title-img"></image>
<view class="public-box">
<view v-for="(item,index) in publicList" :key="index">
<view v-for="(item,index) in publicList" :key="index" @click="exploit">
<image :src="item.img" mode="aspectFill"></image>
<view>{{item.title}}</view>
</view>
@ -87,10 +87,9 @@
<view class="hot-box">
<view class="hot-column" v-for="(column, index) in 2" :key="index">
<view v-for="(item,index) in getColumnItems(index)" :key="index" class="hot-item" @click="gotoHotDetail(item)">
<view v-for="(item,indexs) in getColumnItems(index)" :key="indexs" class="hot-item" @click="gotoHotDetail(item)">
<view class="image-container">
<image :src="showImgs(item.headimg || item.head_img)" mode="widthFix" class="hot-img" v-if="index == 1 || index == 5"></image>
<image :src="showImgs(item.headimg)" mode="widthFix" class="hot-img" v-else></image>
<image :src="item.src" mode="widthFix" class="hot-img"></image>
<image src="https://static.ticket.sz-trip.com/changshu/images/index/play.png" mode="" class="play-img" v-if="typeIndex == 5"></image>
</view>
<view class="hot-content">
@ -162,6 +161,7 @@
title: '一卡游玩',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/ykyw.png',
path: '',
shortLink: '#小程序://旅游年卡/bgJOy4DGeuOXBMg',
},
{
title: '活动日历',
@ -184,7 +184,7 @@
winnowList: [
{
title: '景点',
id: '619',
id: '5',
spanColor: '#529AE7',
list: [],
url: {
@ -194,7 +194,7 @@
},
{
title: '特产',
id: '620',
id: '11',
spanColor: '#EE710C',
list: [],
url: {
@ -286,6 +286,11 @@
},
methods: {
goPath (item) {
if (item.shortLink) {
uni.navigateToMiniProgram({
shortLink: item.shortLink
})
}
if (item.url) {
let isJDSZ = this.goJDSZMiniProgram(item.url)
if (isJDSZ) return
@ -297,6 +302,13 @@
if(item.path) {
this.gotoPath(item.path)
}
if(!item.url && !item.path && !item.shortLink) {
uni.showToast({
title: '开发中',
icon: 'none'
})
}
},
// banner
@ -379,6 +391,17 @@
getColumnItems(columnIndex) {
const columnItems = [];
this.hotList.forEach((item, index) => {
switch (this.typeIndex) {
case 1:
item.src = this.showImg(item.image);
break;
case 5:
item.src = this.showImg(item.head_img);
break;
default:
item.src = item.headimg;
}
if (index % 2 === columnIndex) {
columnItems.push(item);
}
@ -408,13 +431,13 @@
},
//
getWinnowList() {
this.winnowList.map(item => {
this.winnowList.map((item,index) => {
this.Post({
apiType: 'jdsz',
tag_id: item.id,
offset: 0,
limit: 3,
}, '/api/product/get_product_by_tag').then(res => {
}, index ? '/api/product/get_product_by_tag_partners' : '/api/scene/get_scene_by_tag_partners').then(res => {
if(res) {
item.list = res.data.list
}
@ -467,6 +490,18 @@
this.pageNo++
}
})
}else if(this.typeIndex == 2 || this.typeIndex == 4) {
this.Post({
apiType: 'jdsz',
tag_id: this.hotType[this.typeIndex].id,
offset: this.hotList.length,
limit: this.limit,
}, '/api/product/get_product_by_tag_partners').then(res => {
if(res) {
if(res.data.list.length < this.limit) this.isLoading = true
this.hotList = this.hotList.concat(res.data.list)
}
})
}else {
this.Post({
apiType: 'jdsz',

12
pages/user/user.vue

@ -137,12 +137,12 @@
path: '',
isShow: true
},
{
src: 'https://changshu.js-dyyj.com/uploads/20250326/3e977f62b6cbfeec5a17d945b96b8c8c.png',
title: '投诉建议',
path: '/subPackages/service/service',
isShow: true
},
// {
// src: 'https://changshu.js-dyyj.com/uploads/20250326/3e977f62b6cbfeec5a17d945b96b8c8c.png',
// title: '',
// path: '/subPackages/service/service',
// isShow: true
// },
{
src: 'https://changshu.js-dyyj.com/uploads/20250326/f408663f7251085771d83ff13420eb33.png',
title: '隐私管理',

18
static/js/CommonFunction.js

@ -268,6 +268,13 @@ Vue.prototype.checkIsLoginJdsz = () => {
resolve('')
return;
}
if(res.data.code == 0) {
uni.showToast({
title: res.data.msg,
icon: 'none'
})
return;
}
uni.setStorageSync('jdszToken', res.data.data.token)
resolve(res.data.data.token)
}
@ -297,7 +304,7 @@ Vue.prototype.checkIsLoginJdsz = () => {
Vue.prototype.gotoDetailByTypeToJdsz = item => {
let httpUrl = 'https://test.m.cloud.sz-trip.com/'
let url = ''
// 酒景套餐
if (item.is_package) {
url = httpUrl + 'MailMerchandiseDetail?id=' + item.id
@ -335,7 +342,7 @@ Vue.prototype.gotoDetailByTypeToJdsz = item => {
url = httpUrl + 'MovieDetail?id=' + item.third_id || item.id
break;
case 'scenic': // 是场景的 景点
url = httpUrl + 'ScenicDetail?id=' + item.scene_id || item.id
url = httpUrl + 'ScenicDetail?id=' + item.id
break;
case 'room': // 是场景的 酒店
url = httpUrl + 'HotelDetail?id=' + item.scene_id || item.id
@ -373,4 +380,11 @@ Vue.prototype.gotoDetailByTypeToJdsz = item => {
});
}
})
}
Vue.prototype.exploit = () => {
uni.showToast({
title: '开发中',
icon: 'none'
})
}

2
static/js/request.js

@ -2,7 +2,7 @@ import Vue from 'vue';
import store from '@/store';
// 定义 API URL
const CS_API_URL = 'http://changshu.js-dyyj.com';
const CS_API_URL = 'https://changshu.js-dyyj.com';
const JDSZ_API_URL = 'https://api.cloud.sz-trip.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? CS_API_URL : CS_API_URL;

23
subPackages/order/detail.vue

@ -547,27 +547,8 @@
},
//
gotoDetail() {
// info.order_child[0].goods_genretickethotelfoodpgoods
let url = ''
switch (this.info.order_child[0].goods_genre) {
case 'ticket':
url = '/subPackages/ticketBooking/detail?id=' + this.info.order_child[0].scenic_data.id
break;
case 'hotel':
url = '/subPackages/hotelHomestay/detail?id=' + this.info.order_child[0].scenic_data.id
break;
case 'food':
url = '/subPackages/food/foodDetail?id=' + this.info.order_child[0].goods_id
break;
case 'pgoods':
url = '/subPackages/techan/detail?id=' + this.info.order_child[0].goods_id
break;
default:
break;
}
uni.navigateTo({
url: url
})
let url = '/subPackages/venue/venueDetail?id=' + this.info.order_child[0].goods_id
this.gotoPath(url)
},
// 退
refund(id) {

1
subPackages/venue/venueList.vue

@ -89,6 +89,7 @@
width: 696.67rpx;
height: 266.67rpx;
border-radius: 15rpx;
background-size: cover;
&>view {
height: 100%;

4
subPackages/venue/venueOrder.vue

@ -143,13 +143,13 @@
num: this.buyNum,
date: this.dateList[this.dateIndex].date,
start_time: this.stockIndex != null ? this.stockList[this.stockIndex].start_time : '',
end_time: this.stockIndex != null ? this.stockList[this.stockIndex].end_time : '',
reserve_mobile: this.phone,
end_time: this.stockIndex != null ? this.stockList[this.stockIndex].end_time : ''
}
goods.push(param)
let data = {
goods: goods,
reserve_mobile: this.phone
}
this.Post({

2
subPackages/webPage/webPage.vue

@ -52,6 +52,7 @@ export default {
this.checkIsLoginJdsz().then(res => {
if(res) {
param.token = res
param.platform = 'changshu'
let baseUrl = param.tempUrl
let queryString = Object.entries(param).filter(v=>v[0]!='tempUrl')
.map(([key, value]) => `${(key)}=${(value)}`)
@ -73,6 +74,7 @@ export default {
if(res) {
param.token = res
param.platform = 'changshu'
let baseUrl = param.tempUrl
let queryString = Object.entries(param).filter(v=>v[0]!='tempUrl')
.map(([key, value]) => `${(key)}=${(value)}`)

Loading…
Cancel
Save