no message
Showing
6 changed files
with
40 additions
and
34 deletions
| ... | @@ -17,7 +17,7 @@ function getComanyList(params) { | ... | @@ -17,7 +17,7 @@ function getComanyList(params) { |
| 17 | } | 17 | } |
| 18 | function getTrainDetail(id) { | 18 | function getTrainDetail(id) { |
| 19 | return request({ | 19 | return request({ |
| 20 | url: `/train/info/${id}`, | 20 | url: `/train/info/getTrainByUser/${id}`, |
| 21 | method: 'get', | 21 | method: 'get', |
| 22 | params: id | 22 | params: id |
| 23 | }) | 23 | }) |
| ... | @@ -168,10 +168,10 @@ function cancelOrder2(orderId) { | ... | @@ -168,10 +168,10 @@ function cancelOrder2(orderId) { |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | function payForOrder(orderId) { | 170 | function payForOrder(orderId) { |
| 171 | const nowOpenId = uni.getStorageSync('nowOpenId'); | 171 | // const nowOpenId = uni.getStorageSync('nowOpenId'); |
| 172 | return request({ | 172 | return request({ |
| 173 | // url: `/logex/order/payForOrder?orderId=${orderId}&openId=${nowOpenId}`, | 173 | // url: `/logex/order/payForOrder?orderId=${orderId}&openId=${nowOpenId}`, |
| 174 | url: `/logex/norder/payForOrder?orderId=${orderId}&openId=${nowOpenId}`, | 174 | url: `/train/order/payForOrder?orderId=${orderId}`, |
| 175 | method: 'post', | 175 | method: 'post', |
| 176 | params: orderId | 176 | params: orderId |
| 177 | }) | 177 | }) | ... | ... |
| ... | @@ -53,7 +53,7 @@ | ... | @@ -53,7 +53,7 @@ |
| 53 | </view> | 53 | </view> |
| 54 | <view class="contentbox" style="padding: 0;"> | 54 | <view class="contentbox" style="padding: 0;"> |
| 55 | <view class="content"> | 55 | <view class="content"> |
| 56 | <uni-grid :column="4" :highlight="true" :showBorder="false"> | 56 | <uni-grid :column="3" :highlight="true" :showBorder="false"> |
| 57 | <uni-grid-item v-for="(item, index) in list" :index="index" :key="index"> | 57 | <uni-grid-item v-for="(item, index) in list" :index="index" :key="index"> |
| 58 | <view class="grid-item-box" @click="goItem(item)"> | 58 | <view class="grid-item-box" @click="goItem(item)"> |
| 59 | <image :src="item.partLogo" class="image" mode="aspectFill" /> | 59 | <image :src="item.partLogo" class="image" mode="aspectFill" /> |
| ... | @@ -127,13 +127,8 @@ | ... | @@ -127,13 +127,8 @@ |
| 127 | partLogo:'/static/btn01.png', | 127 | partLogo:'/static/btn01.png', |
| 128 | path: '/pages_hotel/hotel/index' | 128 | path: '/pages_hotel/hotel/index' |
| 129 | }, { | 129 | }, { |
| 130 | id: 1, | ||
| 131 | name: '预订', | ||
| 132 | partLogo:'/static/btn02.png', | ||
| 133 | path: '/pages_hotel/hotel/index' | ||
| 134 | }, { | ||
| 135 | id: 2, | 130 | id: 2, |
| 136 | name: '在线学习', | 131 | name: '校园风采', |
| 137 | partLogo:'/static/btn03.png', | 132 | partLogo:'/static/btn03.png', |
| 138 | path: '' | 133 | path: '' |
| 139 | }, { | 134 | }, { | ... | ... |
| ... | @@ -91,7 +91,8 @@ | ... | @@ -91,7 +91,8 @@ |
| 91 | onShow, | 91 | onShow, |
| 92 | onPullDownRefresh | 92 | onPullDownRefresh |
| 93 | } from '@dcloudio/uni-app'; | 93 | } from '@dcloudio/uni-app'; |
| 94 | import config from '@/config'; | 94 | import config from '@/config'; |
| 95 | import dayjs from 'dayjs' | ||
| 95 | const app = getApp(); | 96 | const app = getApp(); |
| 96 | const popYanZheng = ref(null); | 97 | const popYanZheng = ref(null); |
| 97 | const loading = ref(false); | 98 | const loading = ref(false); |
| ... | @@ -128,14 +129,14 @@ | ... | @@ -128,14 +129,14 @@ |
| 128 | }; | 129 | }; |
| 129 | } | 130 | } |
| 130 | }) | 131 | }) |
| 131 | onShow(() => { | ||
| 132 | getData() | ||
| 133 | }) | ||
| 134 | let goPath | 132 | let goPath |
| 135 | 133 | ||
| 136 | function getData() { | 134 | function getData() { |
| 137 | hotel.getTrainDetail(id.value).then(res => { | 135 | hotel.getTrainDetail(id.value).then(res => { |
| 138 | form.value = res.data | 136 | form.value = res.data |
| 137 | if(form.value.isApply){ | ||
| 138 | isApply.value = form.value.isApply | ||
| 139 | } | ||
| 139 | }) | 140 | }) |
| 140 | } | 141 | } |
| 141 | 142 | ||
| ... | @@ -154,6 +155,16 @@ | ... | @@ -154,6 +155,16 @@ |
| 154 | } | 155 | } |
| 155 | }) | 156 | }) |
| 156 | return | 157 | return |
| 158 | } | ||
| 159 | const today = dayjs().valueOf() | ||
| 160 | const start = dayjs(form.value.trainStart).valueOf() | ||
| 161 | // console.log(today,start) | ||
| 162 | if(start<today){ | ||
| 163 | uni.showToast({ | ||
| 164 | title:'培训已过期,不能报名', | ||
| 165 | icon:'none' | ||
| 166 | }) | ||
| 167 | return | ||
| 157 | } | 168 | } |
| 158 | let path = `/pages/form/index?id=${form.value.id}`; | 169 | let path = `/pages/form/index?id=${form.value.id}`; |
| 159 | uni.navigateTo({ | 170 | uni.navigateTo({ | ... | ... |
| ... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | ||
| 39 | <view class="fixedBottom" v-if="type == 0"> | 39 | <view class="fixedBottom" v-if="type == 0"> |
| 40 | <view>总金额:<text class="price">¥{{totalMoney}}</text></view> | 40 | <view>总金额:<text class="price">¥{{totalMoney}}</text></view> |
| 41 | <button class="subBtn btn" @click="submit">费用缴纳</button> | 41 | <!-- <button class="subBtn btn" @click="submit">费用缴纳</button> --> |
| 42 | </view> | 42 | </view> |
| 43 | </view> | 43 | </view> |
| 44 | 44 | ... | ... |
| ... | @@ -25,17 +25,17 @@ | ... | @@ -25,17 +25,17 @@ |
| 25 | <view class="pp" v-if="s.orderType==2">就餐次数:{{s.repastNum}}次</view> | 25 | <view class="pp" v-if="s.orderType==2">就餐次数:{{s.repastNum}}次</view> |
| 26 | <!-- 0:代付款 1:已付款 2:取消支付 --> | 26 | <!-- 0:代付款 1:已付款 2:取消支付 --> |
| 27 | <view class="status"> | 27 | <view class="status"> |
| 28 | <text class="gary" v-if="b.status == '0'&&b.surplus!='0,0'&&b.surplus!='0'" | 28 | <text class="gary" v-if="s.status == '0'&&s.surplus!='0,0'&&s.surplus!='0'" |
| 29 | style="margin-right: 48rpx;"> 待支付 | 29 | style="margin-right: 48rpx;"> 待支付 |
| 30 | </text> | 30 | </text> |
| 31 | <text class="success" v-if="b.status == '1'">已付款</text> | 31 | <text class="success" v-if="s.status == '1'">已付款</text> |
| 32 | <text class="warning" v-if="b.status == '2'">取消支付</text> | 32 | <text class="warning" v-if="s.status == '2'">取消支付</text> |
| 33 | </view> | 33 | </view> |
| 34 | <view class="time" v-if="b.status == '0'&&(b.surplus&&b.surplus!='0,0'&&b.surplus!='0')"> | 34 | <view class="time" v-if="s.status == '0'&&(s.surplus&&s.surplus!='0,0'&&s.surplus!='0')"> |
| 35 | (<uni-countdown style="display: inline-block;" :font-size="12" color="#999" | 35 | (<uni-countdown style="display: inline-block;" :font-size="12" color="#999" |
| 36 | splitorColor="#999" @timeup="timeup" :show-day="false" :show-hour="false" :start="true" | 36 | splitorColor="#999" @timeup="timeup" :show-day="false" :show-hour="false" :start="true" |
| 37 | :minute="Number(b.surplus?.split(',')[0])" | 37 | :minute="Number(s.surplus?.split(',')[0])" |
| 38 | :second="Number(b.surplus?.split(',')[1])"></uni-countdown>) | 38 | :second="Number(s.surplus?.split(',')[1])"></uni-countdown>) |
| 39 | </view> | 39 | </view> |
| 40 | 40 | ||
| 41 | <view class="billFoot"> | 41 | <view class="billFoot"> |
| ... | @@ -44,8 +44,8 @@ | ... | @@ -44,8 +44,8 @@ |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | <view style="display: flex;"> | 46 | <view style="display: flex;"> |
| 47 | <button class="billbtn" @click.stop="showDetail(b,s.orderType)">详情</button> | 47 | <button class="billbtn" @click.stop="showDetail(s,s.orderType)">详情</button> |
| 48 | <button class="billbtn sxbtn" v-if="b.status == '0'" @click="goPay(b)"> | 48 | <button class="billbtn sxbtn" v-if="s.status == '0'" @click="goPay(b)"> |
| 49 | 支付</button> | 49 | 支付</button> |
| 50 | </view> | 50 | </view> |
| 51 | </view> | 51 | </view> |
| ... | @@ -183,7 +183,7 @@ | ... | @@ -183,7 +183,7 @@ |
| 183 | padding: 0 25rpx 70rpx; | 183 | padding: 0 25rpx 70rpx; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | .sonArea {min-height: 500px; | 186 | .sonArea {min-height: 560px; |
| 187 | .billItem { | 187 | .billItem { |
| 188 | padding: 40rpx 0 10rpx; | 188 | padding: 40rpx 0 10rpx; |
| 189 | 189 | ... | ... |
| ... | @@ -116,16 +116,16 @@ function submit(){ | ... | @@ -116,16 +116,16 @@ function submit(){ |
| 116 | } | 116 | } |
| 117 | } | 117 | } |
| 118 | function goPayForOrder(){ | 118 | function goPayForOrder(){ |
| 119 | // hotel.payForOrder(orderId.value).then(res=>{ | 119 | hotel.payForOrder(orderId.value).then(res=>{ |
| 120 | // isClick.value = false | 120 | isClick.value = false |
| 121 | // if (res.data.weixinData) { | 121 | if (res.data.weixinData) { |
| 122 | // wePay(res.data.weixinData) | 122 | wePay(res.data.weixinData) |
| 123 | // } else { | 123 | } else { |
| 124 | uni.hideLoading() | 124 | uni.hideLoading() |
| 125 | uni.showModal({ | 125 | uni.showModal({ |
| 126 | title: '提示', | 126 | title: '提示', |
| 127 | // content: '暂时无法支付,请稍后重试', | 127 | content: '暂时无法支付,请稍后重试', |
| 128 | content: '支付成功', | 128 | // content: '支付成功', |
| 129 | showCancel: false, | 129 | showCancel: false, |
| 130 | success: function (res) { | 130 | success: function (res) { |
| 131 | // uni.navigateBack() | 131 | // uni.navigateBack() |
| ... | @@ -135,8 +135,8 @@ function submit(){ | ... | @@ -135,8 +135,8 @@ function submit(){ |
| 135 | }); | 135 | }); |
| 136 | } | 136 | } |
| 137 | }); | 137 | }); |
| 138 | // } | 138 | } |
| 139 | // }) | 139 | }) |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | function wePay(configdata){ | 142 | function wePay(configdata){ | ... | ... |
-
Please register or sign in to post a comment