8826cb0f by 华明祺

Merge branch 'master' of https://code.itechtop.cn/yangyang/gd_yc

2 parents 8ed5d1b6 6d5c091f
......@@ -7,9 +7,9 @@ function getTrainList(venueId) {
method: 'get'
})
}
function getActivityDetail(id) {
function getTrainDetail(id) {
return request({
url: `/logex/activity/${id}`,
url: `/train/info/${id}`,
method: 'get',
params: id
})
......@@ -230,7 +230,7 @@ function newsSubmitOrderHotel(form) {
params: form
})
}
export {getTrainList,getActivityHotelList,getActivityDetail,getHotelById,getHotelRooms,submitOrder,getbilllist,getbilldetailbyId,
export {getTrainList,getActivityHotelList,getTrainDetail,getHotelById,getHotelRooms,submitOrder,getbilllist,getbilldetailbyId,
payForOrder,cancelOrder,getCanInvoiceBills,submitInvoice,getInvoiceByActiveId,getInvoiceDetailBills,
getInvoiceDetail,getInvoiceByUserId,editInvoice,addAddress,regionsList,addressList,delAddress,
checkResidueRoom,getActivityRestaurantList,getMenuById,
......
{
"hash": "3d4f5fa7",
"browserHash": "a63ce521",
"hash": "a42c9c29",
"browserHash": "49b54077",
"optimized": {
"lodash": {
"src": "../../lodash/lodash.js",
"file": "lodash.js",
"fileHash": "ab53c0da",
"fileHash": "d2ae1b17",
"needsInterop": true
}
},
......
......@@ -3,9 +3,9 @@ var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// ../../../../../../Users/huamingqi/projects/train/gd_yc/node_modules/lodash/lodash.js
// ../../../../../../Users/yangyang/gd_yc/node_modules/lodash/lodash.js
var require_lodash = __commonJS({
"../../../../../../Users/huamingqi/projects/train/gd_yc/node_modules/lodash/lodash.js"(exports, module) {
"../../../../../../Users/yangyang/gd_yc/node_modules/lodash/lodash.js"(exports, module) {
(function() {
var undefined;
var VERSION = "4.17.21";
......
......@@ -7,14 +7,17 @@
</swiper>
<view class="whitepobox">
<view>{{form.name}}</view>
<view class="pp"><image src="./img/tag01.png" class="iconSquera"/>{{form.hdStart?.substring(0, 10)}}{{form.hdEnd?.substring(0, 10)}}</view>
<view class="pp"><image src="./img/tag02.png" class="iconSquera"/>{{form.address}}</view>
<view class="pp">培训时间:{{form.hdStart?.substring(0, 10)}}{{form.hdEnd?.substring(0, 10)}}</view>
<view class="pp">培训地点:{{form.address}}</view>
<view class="pp">报道时间:{{form.address}}</view>
<view class="pp">主办单位:{{form.address}}</view>
<view class="pp">承办单位:{{form.address}}</view>
</view>
<view class="whiteItem">
<view class="tt"> 预订说明</view>
<view class="pp" :class="allNow?'autoHeight':'onelineHeight'" v-html="form.reserveDes"></view>
<view class="formore" @click="changeIntroductionHeight" v-show="form.reserveDes?.length>20">
<view class="tt"> 培训简介</view>
<view class="pp" :class="allNow?'autoHeight':'onelineHeight'" v-html="form.introduction"></view>
<view class="formore" @click="changeIntroductionHeight" v-show="form.introduction?.length>20">
<view v-show="!allNow">展开详情 <uni-icons type="bottom" color='#1EC886' size="12"></uni-icons></view>
<view v-show="allNow"> 收起 <uni-icons type="top" color='#1EC886' size="12"></uni-icons></view>
......@@ -35,7 +38,7 @@
<view class="tt">其他事项</view>
<view class="myList">
<uni-list :border="false">
<uni-list-item :border="true" title="活动简介" showArrow :clickable="true" @click="goIllustrate">
<uni-list-item :border="true" title="报名提醒" showArrow :clickable="true" @click="goIllustrate">
<template v-slot:header>
<view class="slot-box">
<image class="slot-image" src="./img/qt01.png" mode="widthFix"></image>
......@@ -56,7 +59,7 @@
</view>
</template>
</uni-list-item>
<uni-list-item :border="true" title="在线客服" :clickable="true">
<!-- <uni-list-item :border="true" title="在线客服" :clickable="true">
<template v-slot:header>
<view class="slot-box">
<image class="slot-image" src="./img/qt04.png" mode="widthFix"></image>
......@@ -67,7 +70,7 @@
<uni-icons type="forward" color="#bbb" size="16"></uni-icons>
</button>
</template>
</uni-list-item>
</uni-list-item> -->
</uni-list>
</view>
......@@ -127,15 +130,15 @@
})
onShow(option => {
if (app.globalData.isLogin) {
getActivity()
getData()
} else {
app.firstLoadCallback = () => {
getActivity()
getData()
};
}
})
onPullDownRefresh(() => {
getActivity()
getData()
})
let goPath
let currUser
......@@ -181,8 +184,8 @@
}
}
function getActivity() {
hotel.getActivityDetail(id.value).then(res => {
function getData() {
hotel.getTrainDetail(id.value).then(res => {
form.value = res.data
app.globalData.carStart = res.data.carStart
app.globalData.carEnd = res.data.carEnd
......@@ -225,7 +228,7 @@
}
}
function goIllustrate(){
let path = `/pages_hotel/hotel/illustrate?activeId=${id.value}`;
let path = `/pages_hotel/hotel/illustrate?trainId=${id.value}`;
if (checkUserPhone(path)) {
uni.navigateTo({
url: path
......
......@@ -2,7 +2,7 @@
<view>
<!-- 预订说明 -->
<view class="whiteItem">
<view v-html="introduction" class="richzz">
<view v-html="reminder" class="richzz">
</view>
</view>
......@@ -25,14 +25,14 @@
const data = reactive({
id: null,
form:{},
introduction:''
reminder:''
})
const {
id,form,introduction
id,form,reminder
} = toRefs(data);
onLoad(option => {
hotel.getActivityDetail(option.activeId).then(res => {
introduction.value = res.data.introduction
hotel.getTrainDetail(option.trainId).then(res => {
reminder.value = res.data.reminder
})
})
......
No preview for this file type
<template>
<view class="pb50">
<view class="active" v-for="(item, index) in list" :key="index" @click="goDetail(item)">
<view style="padding:0 30rpx;">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button" activeColor="#15CFAB"></uni-segmented-control>
</view>
<view>
<view class="active" v-for="(item, index) in showList" :key="index" @click="goDetail(item)">
<swiper class="activeSwiper" circular :autoplay="autoplay">
<swiper-item v-for="(pic,index) in item.photos?.split(',')" :key="index">
<image class="cover" mode="aspectFill" :src="pic"></image>
......@@ -8,17 +12,19 @@
</swiper>
<view class="name">{{item.name}}</view>
<view class="pp" style="display: flex;"><image src="./img/tag01.png" class="iconSquera"/>{{item.hdStart.substring(0, 10)}}{{item.hdEnd.substring(0, 10)}}</view>
<view class="pp" style="display: flex;"><image src="./img/tag02.png" class="iconSquera"/>{{item.address}}</view>
<view class="pp" style="display: flex;">培训时间:{{item.trainStart.substring(0, 10)}}{{item.trainEnd.substring(0, 10)}}</view>
<view class="pp" style="display: flex;">报道时间:{{item.reportDate.substring(0, 10)}}</view>
<view class="pp" style="display: flex;">主办单位:{{item.organizer}}</view>
<view class="pp" style="display: flex;">承办单位:{{item.address}}</view>
<view class="pp" style="display: flex;">培训地点:{{item.address}}</view>
<button class="btn btn1">点击进入</button>
</view>
</view>
<view class="nodata" v-if="list.length==0">
</view>
<view class="nodata" v-if="showList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<text> 暂无活动</text>
</view>
<!-- 我的 -->
<view class="myEnter" @click="goMycenter"><image src="./img/user.png" mode="aspectFill"></image></view>
</template>
<script setup>
......@@ -29,11 +35,16 @@
const app = getApp();
const { proxy } = getCurrentInstance();
const data = reactive({
showList: [],
list: [],
queryParam: {},
autoplay:true
list0: [],
list1: [],
query: {},
autoplay:true,
items: ['全部', '进行中', '已过期'],
current: 1
});
const { list,queryParam,autoplay } = toRefs(data);
const { showList,list,list0,list1,query,autoplay,items,current } = toRefs(data);
onShow(option =>{
if (app.globalData.isLogin) {
......@@ -48,21 +59,45 @@
getList();
});
function getList(){
list0.value = []
list1.value = []
hotel.getTrainList().then(res => {
list.value = res.rows;
list.value = res.rows
for(var n of list.value){
if(n.status == 0){
list0.value.push(n)
}
if(n.status == 1){
list1.value.push(n)
}
}
getShowList(current.value)
});
}
function goDetail(item){
let path = `/pages_hotel/hotel/detail?id=${item.id}`;
let path = `/pages_hotel/hotel/detail?id=${item.trainId}`;
uni.navigateTo({
url: path
});
}
function goMycenter(){
let path = `/pages_hotel/hotel/mycenter`;
uni.navigateTo({
url: path
});
function onClickItem(e){
if(current.value != e.currentIndex){
current.value = e.currentIndex
}
getShowList(e.currentIndex)
}
function getShowList(n){
switch (n){
case 0:
showList.value = list.value
break;
case 1:
showList.value = list0.value
break;
case 2:
showList.value = list1.value
break;
}
}
</script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!