no message
Showing
218 changed files
with
279 additions
and
186 deletions
| 1 | import request from './request.js' | 1 | import request from './request.js' |
| 2 | import config from '@/config.js' | 2 | import config from '@/config.js' |
| 3 | import * as loginServer from '@/common/login.js'; | 3 | import * as loginServer from '@/common/login.js'; |
| 4 | 4 | ||
| 5 | function checkReport() { | 5 | function checkReport() { |
| 6 | return request({ | 6 | return request({ |
| 7 | url: `/train/apply/getUserApplyInfo`, | 7 | url: `/train/apply/getUserApplyInfo`, |
| 8 | method: 'get' | 8 | method: 'get' |
| 9 | }) | 9 | }) |
| 10 | } | 10 | } |
| 11 | |||
| 11 | 12 | ||
| 12 | |||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | function getVenue() { | 13 | function getVenue() { |
| 17 | return request({ | 14 | return request({ |
| 18 | url: `/systemj/venue/appId`, | 15 | url: `/systemj/venue/appId`, |
| 19 | method: 'get' | 16 | method: 'get' |
| 20 | }) | 17 | }) |
| 21 | } | 18 | } |
| 22 | |||
| 23 | |||
| 24 | 19 | ||
| 25 | 20 | ||
| 26 | function getSiteList(projectId) { | 21 | function getSiteList(projectId) { |
| ... | @@ -38,7 +33,7 @@ function getDateOrderInfo(params) { | ... | @@ -38,7 +33,7 @@ function getDateOrderInfo(params) { |
| 38 | }) | 33 | }) |
| 39 | } | 34 | } |
| 40 | 35 | ||
| 41 | function maGetPrice(params) { | 36 | function maGetPrice(params) { |
| 42 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 37 | const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 43 | return request({ | 38 | return request({ |
| 44 | url: `/systemj/reserve/maGetPrice?openId=${nowOpenId}`, | 39 | url: `/systemj/reserve/maGetPrice?openId=${nowOpenId}`, |
| ... | @@ -65,7 +60,7 @@ function userOrder(data) { | ... | @@ -65,7 +60,7 @@ function userOrder(data) { |
| 65 | * 确定返订单信息 | 60 | * 确定返订单信息 |
| 66 | * @param {Object} data | 61 | * @param {Object} data |
| 67 | */ | 62 | */ |
| 68 | function maReserveVenueWithInfoList(data) { | 63 | function maReserveVenueWithInfoList(data) { |
| 69 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 64 | const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 70 | return request({ | 65 | return request({ |
| 71 | url: `/systemj/reserve/maReserveVenueWithInfoList?openId=${nowOpenId}`, | 66 | url: `/systemj/reserve/maReserveVenueWithInfoList?openId=${nowOpenId}`, |
| ... | @@ -79,7 +74,7 @@ function maReserveVenueWithInfoList(data) { | ... | @@ -79,7 +74,7 @@ function maReserveVenueWithInfoList(data) { |
| 79 | * @param {Object} id | 74 | * @param {Object} id |
| 80 | * @param {Object} data | 75 | * @param {Object} data |
| 81 | */ | 76 | */ |
| 82 | function payForOrder(id, data) { | 77 | function payForOrder(id, data) { |
| 83 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 78 | const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 84 | return request({ | 79 | return request({ |
| 85 | url: `/systemj/reserve/maPay/${id}?openId=${nowOpenId}`, | 80 | url: `/systemj/reserve/maPay/${id}?openId=${nowOpenId}`, |
| ... | @@ -92,13 +87,14 @@ function payForOrder(id, data) { | ... | @@ -92,13 +87,14 @@ function payForOrder(id, data) { |
| 92 | /** | 87 | /** |
| 93 | * 获取余额 | 88 | * 获取余额 |
| 94 | */ | 89 | */ |
| 95 | function getMyBalance() { | 90 | function getMyBalance() { |
| 96 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 91 | const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 97 | return request({ | 92 | return request({ |
| 98 | url: `/systemj/member/getMyBalance?openId=${nowOpenId}`, | 93 | url: `/systemj/member/getMyBalance?openId=${nowOpenId}`, |
| 99 | method: 'get' | 94 | method: 'get' |
| 100 | }) | 95 | }) |
| 101 | } | 96 | } |
| 97 | |||
| 102 | function listCanUse() { | 98 | function listCanUse() { |
| 103 | return request({ | 99 | return request({ |
| 104 | url: `/systemj/projectConfig/listCanUse`, | 100 | url: `/systemj/projectConfig/listCanUse`, |
| ... | @@ -122,7 +118,7 @@ function getMaItemById(id) { | ... | @@ -122,7 +118,7 @@ function getMaItemById(id) { |
| 122 | } | 118 | } |
| 123 | 119 | ||
| 124 | // 订单取消 id是orderId | 120 | // 订单取消 id是orderId |
| 125 | function cancelOrder(id) { | 121 | function cancelOrder(id) { |
| 126 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 122 | const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 127 | return request({ | 123 | return request({ |
| 128 | url: `/systemj/reserve/unSubscribeOrderMa/${id}?openId=${nowOpenId}`, | 124 | url: `/systemj/reserve/unSubscribeOrderMa/${id}?openId=${nowOpenId}`, |
| ... | @@ -144,6 +140,7 @@ function xfList(params) { | ... | @@ -144,6 +140,7 @@ function xfList(params) { |
| 144 | params: params | 140 | params: params |
| 145 | }) | 141 | }) |
| 146 | } | 142 | } |
| 143 | |||
| 147 | function czList(params) { | 144 | function czList(params) { |
| 148 | return request({ | 145 | return request({ |
| 149 | url: `/systemj/memberOrder/maList/recharge`, | 146 | url: `/systemj/memberOrder/maList/recharge`, |
| ... | @@ -167,7 +164,8 @@ function getCaptchaSms(params) { | ... | @@ -167,7 +164,8 @@ function getCaptchaSms(params) { |
| 167 | params: params | 164 | params: params |
| 168 | }) | 165 | }) |
| 169 | } | 166 | } |
| 170 | function maRebindMemberCard(phonenumber,code) { | 167 | |
| 168 | function maRebindMemberCard(phonenumber, code) { | ||
| 171 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 169 | const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 172 | return request({ | 170 | return request({ |
| 173 | url: `/systemj/member/maRebindMemberCard/${phonenumber}/${code}?openId=${nowOpenId}`, | 171 | url: `/systemj/member/maRebindMemberCard/${phonenumber}/${code}?openId=${nowOpenId}`, |
| ... | @@ -182,7 +180,7 @@ function getCancelHint(orderId) { | ... | @@ -182,7 +180,7 @@ function getCancelHint(orderId) { |
| 182 | }) | 180 | }) |
| 183 | } | 181 | } |
| 184 | //充值提示 | 182 | //充值提示 |
| 185 | function getMemberLevelTip(phonenumber,amount) { | 183 | function getMemberLevelTip(phonenumber, amount) { |
| 186 | return request({ | 184 | return request({ |
| 187 | url: `/systemj/member/generateMyMemberLevelRemian/${phonenumber}/${amount}`, | 185 | url: `/systemj/member/generateMyMemberLevelRemian/${phonenumber}/${amount}`, |
| 188 | method: 'get' | 186 | method: 'get' |
| ... | @@ -215,6 +213,7 @@ function miniappData(params) { | ... | @@ -215,6 +213,7 @@ function miniappData(params) { |
| 215 | 213 | ||
| 216 | 214 | ||
| 217 | 215 | ||
| 218 | export {checkReport, | 216 | export { |
| 217 | checkReport, | ||
| 219 | getVenue | 218 | getVenue |
| 220 | } | 219 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -49,7 +49,7 @@ function pcLoginByOpenId(openId) { | ... | @@ -49,7 +49,7 @@ function pcLoginByOpenId(openId) { |
| 49 | let user = res.data; | 49 | let user = res.data; |
| 50 | // console.log("openId " + openId, user) | 50 | // console.log("openId " + openId, user) |
| 51 | 51 | ||
| 52 | uni.setStorageSync('token', 'Bearer ' + user.token); | 52 | uni.setStorageSync('token', user.token); |
| 53 | uni.setStorageSync('currUser', user); | 53 | uni.setStorageSync('currUser', user); |
| 54 | return user; | 54 | return user; |
| 55 | }).catch(() => { | 55 | }).catch(() => { |
| ... | @@ -70,7 +70,7 @@ function pcLoginByCode(code) { | ... | @@ -70,7 +70,7 @@ function pcLoginByCode(code) { |
| 70 | let user = res.data | 70 | let user = res.data |
| 71 | // console.log("code: " + code, user) | 71 | // console.log("code: " + code, user) |
| 72 | // getNowOpenId() | 72 | // getNowOpenId() |
| 73 | uni.setStorageSync('token', 'Bearer ' + user.token); | 73 | uni.setStorageSync('token', user.token); |
| 74 | uni.setStorageSync('currUser', user); | 74 | uni.setStorageSync('currUser', user); |
| 75 | return user; | 75 | return user; |
| 76 | }).catch((err) => { | 76 | }).catch((err) => { |
| ... | @@ -188,7 +188,7 @@ function h5Login(userName) { | ... | @@ -188,7 +188,7 @@ function h5Login(userName) { |
| 188 | username: userName | 188 | username: userName |
| 189 | } | 189 | } |
| 190 | }).then((res) => { | 190 | }).then((res) => { |
| 191 | uni.setStorageSync('token', 'Bearer ' + res.data.token); | 191 | uni.setStorageSync('token', res.data.token); |
| 192 | }) | 192 | }) |
| 193 | } | 193 | } |
| 194 | 194 | ... | ... |
| ... | @@ -25,21 +25,19 @@ function getToken() { | ... | @@ -25,21 +25,19 @@ function getToken() { |
| 25 | 25 | ||
| 26 | // 获取请求头 | 26 | // 获取请求头 |
| 27 | function getHeaders() { | 27 | function getHeaders() { |
| 28 | const token = getToken() | 28 | let header |
| 29 | const header = { | 29 | if (config.localPort) { |
| 30 | "Authorization": token, | 30 | header = { |
| 31 | "Content-Type": "application/json", | 31 | "isToken": false, |
| 32 | 'content-type': 'application/x-www-form-urlencoded' | ||
| 33 | } | ||
| 34 | } else { | ||
| 35 | header = { | ||
| 36 | "Authorization": getToken(), | ||
| 37 | "Content-Type": "application/json", | ||
| 38 | } | ||
| 32 | } | 39 | } |
| 33 | return header | ||
| 34 | } | ||
| 35 | 40 | ||
| 36 | function getHeaders2() { | ||
| 37 | const token = getToken() | ||
| 38 | const header = { | ||
| 39 | "isToken": false, | ||
| 40 | "Authorization": token, | ||
| 41 | 'content-type': 'application/x-www-form-urlencoded' | ||
| 42 | } | ||
| 43 | return header | 41 | return header |
| 44 | } | 42 | } |
| 45 | 43 | ||
| ... | @@ -60,40 +58,68 @@ let request = function(req) { | ... | @@ -60,40 +58,68 @@ let request = function(req) { |
| 60 | // }) | 58 | // }) |
| 61 | // } | 59 | // } |
| 62 | 60 | ||
| 63 | const baseUrl = config.localPort + '/jsintszxd/request' | 61 | |
| 62 | const token = getToken() | ||
| 63 | let tempUrl = req.url | ||
| 64 | // if (token) { | ||
| 65 | if (tempUrl.indexOf('?') > -1) { | ||
| 66 | tempUrl += '&userNo=' + token | ||
| 67 | } else { | ||
| 68 | tempUrl += '?userNo=' + token | ||
| 69 | } | ||
| 70 | // } | ||
| 71 | |||
| 64 | let url, data | 72 | let url, data |
| 65 | if (req.method === 'POST') { | 73 | if (config.localPort) { |
| 66 | url = baseUrl | 74 | const baseUrl = config.localPort + '/jsintszxd/request' |
| 67 | data = { | 75 | if (req.method === 'POST') { |
| 68 | appSecretId: config.appSecretId, | 76 | url = baseUrl |
| 69 | restApi: req.url, | 77 | data = { |
| 70 | params: 'jsonBody=' + JSON.stringify(req.params) | 78 | appSecretId: config.appSecretId, |
| 79 | restApi: encodeURIComponent(tempUrl), | ||
| 80 | params: 'jsonBody=' + JSON.stringify(req.params) | ||
| 81 | } | ||
| 82 | } else { | ||
| 83 | if (req.params) { | ||
| 84 | for (const key of Object.keys(req.params)) { | ||
| 85 | if (tempUrl.indexOf('?') > -1) { | ||
| 86 | tempUrl += `&${key}=${req.params[key]}` | ||
| 87 | } else { | ||
| 88 | tempUrl += `?${key}=${req.params[key]}` | ||
| 89 | } | ||
| 90 | } | ||
| 91 | } | ||
| 92 | url = `${baseUrl}?appSecretId=${config.appSecretId}&restApi=${encodeURIComponent(tempUrl)}` | ||
| 71 | } | 93 | } |
| 72 | } else { | 94 | } else { |
| 73 | url = `${baseUrl}?appSecretId=${config.appSecretId}&restApi=${encodeURIComponent(req.url)}` | 95 | url = config.baseUrl_api + tempUrl |
| 96 | data = req.params | ||
| 74 | } | 97 | } |
| 75 | 98 | ||
| 76 | return new Promise((resolve, reject) => { | 99 | return new Promise((resolve, reject) => { |
| 77 | uni.request({ | 100 | uni.request({ |
| 78 | // url: config.baseUrl_api + req.url, | ||
| 79 | url: url, | 101 | url: url, |
| 80 | method: req.method, | 102 | method: req.method, |
| 81 | // data: req.params, | ||
| 82 | // header: getHeaders(), | ||
| 83 | data: data, | 103 | data: data, |
| 84 | header: getHeaders2() | 104 | header: getHeaders() |
| 85 | }).then(res => { | 105 | }).then(res => { |
| 86 | switch (res.statusCode) { | 106 | switch (res.statusCode) { |
| 87 | case 200: | 107 | case 200: |
| 88 | // const data = res.data || {}; | 108 | let tempRes |
| 89 | const data = res.data.data || {}; | 109 | if (config.localPort) { |
| 90 | if (data.code == 200) { | 110 | tempRes = res.data |
| 91 | resolve(data) | 111 | } else { |
| 112 | tempRes = res | ||
| 113 | } | ||
| 114 | |||
| 115 | const resData = tempRes.data || {}; | ||
| 116 | if (resData.code == 200) { | ||
| 117 | resolve(resData) | ||
| 92 | } else { | 118 | } else { |
| 93 | //登录超时 | 119 | //登录超时 |
| 94 | if (data.code == 60002 || data.code == 60001) { | 120 | if (resData.code == 60002 || resData.code == 60001) { |
| 95 | showLogin() | 121 | showLogin() |
| 96 | } else if (data.code == 401) { | 122 | } else if (resData.code == 401) { |
| 97 | h5LoginAuto() | 123 | h5LoginAuto() |
| 98 | .then(() => { | 124 | .then(() => { |
| 99 | uni.hideLoading(); | 125 | uni.hideLoading(); |
| ... | @@ -105,17 +131,17 @@ let request = function(req) { | ... | @@ -105,17 +131,17 @@ let request = function(req) { |
| 105 | } else { | 131 | } else { |
| 106 | if (!excludeUrls.includes(req.url)) { | 132 | if (!excludeUrls.includes(req.url)) { |
| 107 | uni.showToast({ | 133 | uni.showToast({ |
| 108 | title: data.msg, | 134 | title: resData.msg, |
| 109 | icon: 'none', | 135 | icon: 'none', |
| 110 | duration: 3000 | 136 | duration: 3000 |
| 111 | }) | 137 | }) |
| 112 | } | 138 | } |
| 113 | } | 139 | } |
| 114 | reject(res) | 140 | reject(tempRes) |
| 115 | } | 141 | } |
| 116 | break | 142 | break |
| 117 | default: | 143 | default: |
| 118 | reject(res) | 144 | reject(tempRes) |
| 119 | } | 145 | } |
| 120 | }).catch(res => { | 146 | }).catch(res => { |
| 121 | reject(res) | 147 | reject(res) |
| ... | @@ -134,7 +160,7 @@ function reLogin() { | ... | @@ -134,7 +160,7 @@ function reLogin() { |
| 134 | pcLoginByOpenId(accountInfo.miniProgram.appId, currUser.openId) | 160 | pcLoginByOpenId(accountInfo.miniProgram.appId, currUser.openId) |
| 135 | .then((res) => { | 161 | .then((res) => { |
| 136 | let user = res.data; | 162 | let user = res.data; |
| 137 | uni.setStorageSync('token', 'Bearer ' + user.token); | 163 | uni.setStorageSync('token', user.token); |
| 138 | uni.setStorageSync('currUser', user); | 164 | uni.setStorageSync('currUser', user); |
| 139 | 165 | ||
| 140 | uni.showToast({ | 166 | uni.showToast({ | ... | ... |
| 1 | // prod | 1 | const baseUrl_api = "/dev-api"; |
| 2 | // const baseUrl_api = 'https://research.wtwuxicenter.com/'; | ||
| 3 | |||
| 4 | |||
| 5 | // staging | ||
| 6 | const baseUrl_api = "http://192.168.1.118:6688"; | ||
| 7 | // const baseUrl_api = "http://123.60.96.243:6688"; | ||
| 8 | // const baseUrl_api = "http://121.4.115.48:27001/jsintszxd/request"; | ||
| 9 | const appSecretId = 'af14ef3f-ebec-446c-8d1f-c4afa60dd095'; | 2 | const appSecretId = 'af14ef3f-ebec-446c-8d1f-c4afa60dd095'; |
| 10 | const localPort = localStorage.getItem('localPort') | 3 | const localPort = localStorage.getItem('localPort') |
| 11 | 4 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="pb50"> | 2 | <view class="pb50"> |
| 3 | <view style="padding:0 30rpx;"> | 3 | <view style="padding:0 30rpx;"> |
| 4 | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#15CFAB"></uni-segmented-control> | 4 | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" |
| 5 | </view> | 5 | activeColor="#15CFAB"></uni-segmented-control> |
| 6 | <view> | 6 | </view> |
| 7 | <view class="active" v-for="(item, index) in showList" :key="index" @click="goDetail(item)"> | 7 | <view> |
| 8 | <swiper class="activeSwiper" circular :autoplay="autoplay"> | 8 | <view class="active" v-for="(item, index) in showList" :key="index" @click="goDetail(item)"> |
| 9 | <swiper-item v-for="(pic,index) in item.photos?.split(',')" :key="index"> | 9 | <swiper class="activeSwiper" circular :autoplay="autoplay"> |
| 10 | <image class="cover" mode="aspectFill" :src="config.baseUrl_api+pic"></image> | 10 | <swiper-item v-for="(pic,index) in item.photos?.split(',')" :key="index"> |
| 11 | </swiper-item> | 11 | <image class="cover" mode="aspectFill" :src="config.baseUrl_api+pic"></image> |
| 12 | </swiper> | 12 | </swiper-item> |
| 13 | 13 | </swiper> | |
| 14 | <view class="name">{{item.name}}</view> | 14 | |
| 15 | <view class="pp" style="display: flex;">报到时间:{{item.reportDate.substring(0, 10)}}</view> | 15 | <view class="name">{{item.name}}</view> |
| 16 | <view class="pp" style="display: flex;">培训时间:{{item.trainStart.substring(0, 10)}} — {{item.trainEnd.substring(0, 10)}}</view> | 16 | <view class="pp" style="display: flex;">报到时间:{{item.reportDate.substring(0, 10)}}</view> |
| 17 | <!-- <view class="pp" style="display: flex;">主办单位:{{item.organizer}}</view> --> | 17 | <view class="pp" style="display: flex;">培训时间:{{item.trainStart.substring(0, 10)}} — |
| 18 | <!-- <view class="pp" style="display: flex;">承办单位:{{item.manager}}</view> --> | 18 | {{item.trainEnd.substring(0, 10)}} |
| 19 | <!-- <view class="pp" style="display: flex;">培训地点:{{item.address}}</view> --> | 19 | </view> |
| 20 | <button class="btn btn1" v-if="item.status == 0">点击进入</button> | 20 | <!-- <view class="pp" style="display: flex;">主办单位:{{item.organizer}}</view> --> |
| 21 | </view> | 21 | <!-- <view class="pp" style="display: flex;">承办单位:{{item.manager}}</view> --> |
| 22 | </view> | 22 | <!-- <view class="pp" style="display: flex;">培训地点:{{item.address}}</view> --> |
| 23 | </view> | 23 | <button class="btn btn1" v-if="item.status == 0">点击进入</button> |
| 24 | <view class="nodata" v-if="showList.length==0"> | 24 | </view> |
| 25 | <image mode="aspectFit" src="/static/nodata.png"></image> | 25 | </view> |
| 26 | <text> 暂无活动</text> | 26 | </view> |
| 27 | </view> | 27 | <view class="nodata" v-if="showList.length==0"> |
| 28 | </template> | 28 | <image mode="aspectFit" src="/static/nodata.png"></image> |
| 29 | 29 | <text> 暂无活动</text> | |
| 30 | <script setup> | 30 | </view> |
| 31 | import { reactive, toRefs, getCurrentInstance } from 'vue'; | 31 | </template> |
| 32 | import * as hotel from '@/common/hotel.js'; | 32 | |
| 33 | import {onShow,onPullDownRefresh} from '@dcloudio/uni-app'; | 33 | <script setup> |
| 34 | const app = getApp(); | 34 | import { |
| 35 | import config from '@/config'; | 35 | reactive, |
| 36 | const { proxy } = getCurrentInstance(); | 36 | toRefs, |
| 37 | const data = reactive({ | 37 | getCurrentInstance |
| 38 | showList: [], | 38 | } from 'vue'; |
| 39 | list: [], | 39 | import * as hotel from '@/common/hotel.js'; |
| 40 | list0: [], | 40 | import { |
| 41 | list1: [], | 41 | onShow, |
| 42 | query: {}, | 42 | onPullDownRefresh |
| 43 | autoplay:true, | 43 | } from '@dcloudio/uni-app'; |
| 44 | items: ['全部', '进行中', '已过期'], | 44 | const app = getApp(); |
| 45 | current: 1 | 45 | import config from '@/config'; |
| 46 | }); | 46 | const { |
| 47 | const { showList,list,list0,list1,query,autoplay,items,current } = toRefs(data); | 47 | proxy |
| 48 | 48 | } = getCurrentInstance(); | |
| 49 | onShow(option =>{ | 49 | const data = reactive({ |
| 50 | if (app.globalData.isLogin) { | 50 | showList: [], |
| 51 | getList(); | 51 | list: [], |
| 52 | } else { | 52 | list0: [], |
| 53 | app.firstLoadCallback = () => { | 53 | list1: [], |
| 54 | getList(); | 54 | query: {}, |
| 55 | }; | 55 | autoplay: true, |
| 56 | } | 56 | items: ['全部', '进行中', '已过期'], |
| 57 | }) | 57 | current: 1 |
| 58 | onPullDownRefresh(() => { | 58 | }); |
| 59 | getList(); | 59 | const { |
| 60 | }); | 60 | showList, |
| 61 | function getList(){ | 61 | list, |
| 62 | list0.value = [] | 62 | list0, |
| 63 | list1.value = [] | 63 | list1, |
| 64 | hotel.getTrainList().then(res => { | 64 | query, |
| 65 | list.value = res.rows | 65 | autoplay, |
| 66 | for(var n of list.value){ | 66 | items, |
| 67 | if(n.status == 0){ | 67 | current |
| 68 | list0.value.push(n) | 68 | } = toRefs(data); |
| 69 | } | 69 | |
| 70 | if(n.status == 1){ | 70 | onShow(option => { |
| 71 | list1.value.push(n) | 71 | if (app.globalData.isLogin) { |
| 72 | } | 72 | getList(); |
| 73 | } | 73 | } else { |
| 74 | getShowList(current.value) | 74 | app.firstLoadCallback = () => { |
| 75 | }); | 75 | getList(); |
| 76 | } | 76 | }; |
| 77 | function goDetail(item){ | 77 | } |
| 78 | let path = `/pages_hotel/hotel/detail?id=${item.trainId}&isApply=${item.isApply}`; | 78 | }) |
| 79 | uni.navigateTo({ | 79 | onPullDownRefresh(() => { |
| 80 | url: path | 80 | getList(); |
| 81 | }); | 81 | }); |
| 82 | } | 82 | |
| 83 | function onClickItem(e){ | 83 | function getList() { |
| 84 | if(current.value != e.currentIndex){ | 84 | list0.value = [] |
| 85 | current.value = e.currentIndex | 85 | list1.value = [] |
| 86 | } | 86 | hotel.getTrainList().then(res => { |
| 87 | getShowList(e.currentIndex) | 87 | list.value = res.rows |
| 88 | } | 88 | for (var n of list.value) { |
| 89 | function getShowList(n){ | 89 | if (n.status == 0) { |
| 90 | switch (n){ | 90 | list0.value.push(n) |
| 91 | case 0: | 91 | } |
| 92 | showList.value = list.value | 92 | if (n.status == 1) { |
| 93 | break; | 93 | list1.value.push(n) |
| 94 | case 1: | 94 | } |
| 95 | showList.value = list0.value | 95 | } |
| 96 | break; | 96 | getShowList(current.value) |
| 97 | case 2: | 97 | }); |
| 98 | showList.value = list1.value | 98 | } |
| 99 | break; | 99 | |
| 100 | } | 100 | function goDetail(item) { |
| 101 | } | 101 | let path = `/pages_hotel/hotel/detail?id=${item.trainId}&isApply=${item.isApply}`; |
| 102 | </script> | 102 | uni.navigateTo({ |
| 103 | 103 | url: path | |
| 104 | <style lang="scss" scoped> | 104 | }); |
| 105 | .iconSquera{width: 40rpx;height: 40rpx;} | 105 | } |
| 106 | .topSearch{ display: flex; align-items: center;background: #fff;} | 106 | |
| 107 | .active{background:#fff;width: 700rpx;margin:30rpx auto 30rpx;box-shadow: 0rpx 0rpx 27rpx 0rpx #DEDEDE; | 107 | function onClickItem(e) { |
| 108 | border-radius:20rpx 20rpx;position: relative;padding: 0 0 30rpx; | 108 | if (current.value != e.currentIndex) { |
| 109 | .cover{width: 700rpx;height: 320rpx;} | 109 | current.value = e.currentIndex |
| 110 | .name{font-size: 32rpx;padding:10rpx 15rpx 0; | 110 | } |
| 111 | color: #000000;} | 111 | getShowList(e.currentIndex) |
| 112 | .pp{padding:0 15rpx;margin: 6rpx 0; | 112 | } |
| 113 | color: #595959; | 113 | |
| 114 | font-size: 28rpx;} | 114 | function getShowList(n) { |
| 115 | .btn1{position: absolute; right: 0rpx; bottom: 30rpx; width: 150rpx; | 115 | switch (n) { |
| 116 | line-height: 30px; height: 60rpx; font-size: 28rpx;padding: 0;} | 116 | case 0: |
| 117 | } | 117 | showList.value = list.value |
| 118 | .activeSwiper{height: 320rpx;} | 118 | break; |
| 119 | .myEnter{position: fixed;right: 0;bottom: 10%; | 119 | case 1: |
| 120 | image{width: 150rpx;height: 150rpx;} | 120 | showList.value = list0.value |
| 121 | } | 121 | break; |
| 122 | .pb50{padding-bottom: 50rpx;} | 122 | case 2: |
| 123 | showList.value = list1.value | ||
| 124 | break; | ||
| 125 | } | ||
| 126 | } | ||
| 127 | </script> | ||
| 128 | |||
| 129 | <style lang="scss" scoped> | ||
| 130 | .iconSquera { | ||
| 131 | width: 40rpx; | ||
| 132 | height: 40rpx; | ||
| 133 | } | ||
| 134 | |||
| 135 | .topSearch { | ||
| 136 | display: flex; | ||
| 137 | align-items: center; | ||
| 138 | background: #fff; | ||
| 139 | } | ||
| 140 | |||
| 141 | .active { | ||
| 142 | background: #fff; | ||
| 143 | width: 700rpx; | ||
| 144 | margin: 30rpx auto 30rpx; | ||
| 145 | box-shadow: 0rpx 0rpx 27rpx 0rpx #DEDEDE; | ||
| 146 | border-radius: 20rpx 20rpx; | ||
| 147 | position: relative; | ||
| 148 | padding: 0 0 30rpx; | ||
| 149 | |||
| 150 | .cover { | ||
| 151 | width: 700rpx; | ||
| 152 | height: 320rpx; | ||
| 153 | } | ||
| 154 | |||
| 155 | .name { | ||
| 156 | font-size: 32rpx; | ||
| 157 | padding: 10rpx 15rpx 0; | ||
| 158 | color: #000000; | ||
| 159 | } | ||
| 160 | |||
| 161 | .pp { | ||
| 162 | padding: 0 15rpx; | ||
| 163 | margin: 6rpx 0; | ||
| 164 | color: #595959; | ||
| 165 | font-size: 28rpx; | ||
| 166 | } | ||
| 167 | |||
| 168 | .btn1 { | ||
| 169 | position: absolute; | ||
| 170 | right: 0rpx; | ||
| 171 | bottom: 30rpx; | ||
| 172 | width: 150rpx; | ||
| 173 | line-height: 30px; | ||
| 174 | height: 60rpx; | ||
| 175 | font-size: 28rpx; | ||
| 176 | padding: 0; | ||
| 177 | } | ||
| 178 | } | ||
| 179 | |||
| 180 | .activeSwiper { | ||
| 181 | height: 320rpx; | ||
| 182 | } | ||
| 183 | |||
| 184 | .myEnter { | ||
| 185 | position: fixed; | ||
| 186 | right: 0; | ||
| 187 | bottom: 10%; | ||
| 188 | |||
| 189 | image { | ||
| 190 | width: 150rpx; | ||
| 191 | height: 150rpx; | ||
| 192 | } | ||
| 193 | } | ||
| 194 | |||
| 195 | .pb50 { | ||
| 196 | padding-bottom: 50rpx; | ||
| 197 | } | ||
| 123 | </style> | 198 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
File moved
File moved
File moved
File moved
File moved
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment