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. 16
      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: '智游常熟', title: '智游常熟',
type: 0, type: 0,
summary: "edewdewdewf", 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() { onShareAppMessage() {
@ -31,11 +31,10 @@ export const myMixins ={
url = uni.getStorageSync('webUrl'); url = uni.getStorageSync('webUrl');
} }
console.log(111,url,`${view.route}?url=${url}`)
return { return {
title: '智游常熟', // 分享的名称 title: '智游常熟', // 分享的名称
path: `${view.route}?url=${url}`, // 将 url 作为参数传递 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 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> <image src="https://static.ticket.sz-trip.com/changshu/images/index/title3.png" mode="heightFix" class="title-img"></image>
<view class="flex-between"> <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> </view>
<!-- 公共服务 --> <!-- 公共服务 -->
<image src="https://static.ticket.sz-trip.com/changshu/images/index/title4.png" mode="heightFix" class="title-img"></image> <image src="https://static.ticket.sz-trip.com/changshu/images/index/title4.png" mode="heightFix" class="title-img"></image>
<view class="public-box"> <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> <image :src="item.img" mode="aspectFill"></image>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
@ -87,10 +87,9 @@
<view class="hot-box"> <view class="hot-box">
<view class="hot-column" v-for="(column, index) in 2" :key="index"> <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"> <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="item.src" mode="widthFix" class="hot-img"></image>
<image :src="showImgs(item.headimg)" mode="widthFix" class="hot-img" v-else></image>
<image src="https://static.ticket.sz-trip.com/changshu/images/index/play.png" mode="" class="play-img" v-if="typeIndex == 5"></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>
<view class="hot-content"> <view class="hot-content">
@ -162,6 +161,7 @@
title: '一卡游玩', title: '一卡游玩',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/ykyw.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/ykyw.png',
path: '', path: '',
shortLink: '#小程序://旅游年卡/bgJOy4DGeuOXBMg',
}, },
{ {
title: '活动日历', title: '活动日历',
@ -184,7 +184,7 @@
winnowList: [ winnowList: [
{ {
title: '景点', title: '景点',
id: '619', id: '5',
spanColor: '#529AE7', spanColor: '#529AE7',
list: [], list: [],
url: { url: {
@ -194,7 +194,7 @@
}, },
{ {
title: '特产', title: '特产',
id: '620', id: '11',
spanColor: '#EE710C', spanColor: '#EE710C',
list: [], list: [],
url: { url: {
@ -286,6 +286,11 @@
}, },
methods: { methods: {
goPath (item) { goPath (item) {
if (item.shortLink) {
uni.navigateToMiniProgram({
shortLink: item.shortLink
})
}
if (item.url) { if (item.url) {
let isJDSZ = this.goJDSZMiniProgram(item.url) let isJDSZ = this.goJDSZMiniProgram(item.url)
if (isJDSZ) return if (isJDSZ) return
@ -297,6 +302,13 @@
if(item.path) { if(item.path) {
this.gotoPath(item.path) this.gotoPath(item.path)
} }
if(!item.url && !item.path && !item.shortLink) {
uni.showToast({
title: '开发中',
icon: 'none'
})
}
}, },
// banner // banner
@ -379,6 +391,17 @@
getColumnItems(columnIndex) { getColumnItems(columnIndex) {
const columnItems = []; const columnItems = [];
this.hotList.forEach((item, index) => { 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) { if (index % 2 === columnIndex) {
columnItems.push(item); columnItems.push(item);
} }
@ -408,13 +431,13 @@
}, },
// //
getWinnowList() { getWinnowList() {
this.winnowList.map(item => { this.winnowList.map((item,index) => {
this.Post({ this.Post({
apiType: 'jdsz', apiType: 'jdsz',
tag_id: item.id, tag_id: item.id,
offset: 0, offset: 0,
limit: 3, 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) { if(res) {
item.list = res.data.list item.list = res.data.list
} }
@ -467,6 +490,18 @@
this.pageNo++ 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 { }else {
this.Post({ this.Post({
apiType: 'jdsz', apiType: 'jdsz',

12
pages/user/user.vue

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

16
static/js/CommonFunction.js

@ -268,6 +268,13 @@ Vue.prototype.checkIsLoginJdsz = () => {
resolve('') resolve('')
return; return;
} }
if(res.data.code == 0) {
uni.showToast({
title: res.data.msg,
icon: 'none'
})
return;
}
uni.setStorageSync('jdszToken', res.data.data.token) uni.setStorageSync('jdszToken', res.data.data.token)
resolve(res.data.data.token) resolve(res.data.data.token)
} }
@ -335,7 +342,7 @@ Vue.prototype.gotoDetailByTypeToJdsz = item => {
url = httpUrl + 'MovieDetail?id=' + item.third_id || item.id url = httpUrl + 'MovieDetail?id=' + item.third_id || item.id
break; break;
case 'scenic': // 是场景的 景点 case 'scenic': // 是场景的 景点
url = httpUrl + 'ScenicDetail?id=' + item.scene_id || item.id url = httpUrl + 'ScenicDetail?id=' + item.id
break; break;
case 'room': // 是场景的 酒店 case 'room': // 是场景的 酒店
url = httpUrl + 'HotelDetail?id=' + item.scene_id || item.id url = httpUrl + 'HotelDetail?id=' + item.scene_id || item.id
@ -374,3 +381,10 @@ 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'; import store from '@/store';
// 定义 API URL // 定义 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 JDSZ_API_URL = 'https://api.cloud.sz-trip.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? CS_API_URL : CS_API_URL; const NEWAPIURL = process.env.NODE_ENV === 'development' ? CS_API_URL : CS_API_URL;

23
subPackages/order/detail.vue

@ -547,27 +547,8 @@
}, },
// //
gotoDetail() { gotoDetail() {
// info.order_child[0].goods_genretickethotelfoodpgoods let url = '/subPackages/venue/venueDetail?id=' + this.info.order_child[0].goods_id
let url = '' this.gotoPath(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
})
}, },
// 退 // 退
refund(id) { refund(id) {

1
subPackages/venue/venueList.vue

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

4
subPackages/venue/venueOrder.vue

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

2
subPackages/webPage/webPage.vue

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

Loading…
Cancel
Save