|
@@ -1,55 +1,33 @@
|
|
<template>
|
|
<template>
|
|
<view style="padding-top: 50rpx;">
|
|
<view style="padding-top: 50rpx;">
|
|
- <view v-if="!showSignup">
|
|
|
|
- <view class="top">
|
|
|
|
- <image src="https://qnys.chuliu.cc/daweiboshi_szy/1_1615541900_nrG1vctYn8.jpg"
|
|
|
|
- mode="widthFix" style="width: 750rpx;margin-bottom: 60rpx;"></image>
|
|
|
|
- <view class="title">
|
|
|
|
- 第{{ data.season }}届大卫博士创业实战营(线上)
|
|
|
|
- </view>
|
|
|
|
- <view class="time">
|
|
|
|
- 举办时间:{{ data.start + '-' + data.end }}
|
|
|
|
- </view>
|
|
|
|
- <view v-if="data.status == 1" class="btnSig gray">已获取名额</view>
|
|
|
|
- <view v-else class="btnSig" :class="status ? 'red' : 'gray'" v-throttle="2000" @click="singup">点击获取名额</view>
|
|
|
|
|
|
+ <view class="top" v-if="!showSignup">
|
|
|
|
+ <image src="https://qnys.chuliu.cc/daweiboshi_szy/1_1615541900_nrG1vctYn8.jpg"
|
|
|
|
+ mode="widthFix" style="width: 750rpx;margin-bottom: 60rpx;"></image>
|
|
|
|
+ <view class="title">
|
|
|
|
+ 第{{ data.season }}届大卫博士创业实战营
|
|
|
|
+ </view>
|
|
|
|
+ <view class="time">
|
|
|
|
+ 举办时间:{{ data.start + '-' + data.end }}
|
|
</view>
|
|
</view>
|
|
|
|
+ <view v-if="data.status == 1" class="btnSig gray">已获取名额</view>
|
|
|
|
+ <view v-else class="btnSig" :class="status ? 'red' : 'gray'" v-throttle="2000" @click="singup">点击获取名额</view>
|
|
</view>
|
|
</view>
|
|
<view class="voucher" v-else>
|
|
<view class="voucher" v-else>
|
|
<image src="../../static/new_my/bg.png" class="bgImg" mode="widthFix" style="width: 750rpx;"></image>
|
|
<image src="../../static/new_my/bg.png" class="bgImg" mode="widthFix" style="width: 750rpx;"></image>
|
|
<view class="bgImg">
|
|
<view class="bgImg">
|
|
- <text style="margin-top: 30rpx;">第{{ data.season }}届大卫博士创业实战营(线上)</text>
|
|
|
|
|
|
+ <text style="margin-top: 30rpx;">第{{ data.season }}届大卫博士创业实战营</text>
|
|
</view>
|
|
</view>
|
|
<view class="voucher_con">
|
|
<view class="voucher_con">
|
|
<view class="voucher_icon">
|
|
<view class="voucher_icon">
|
|
<image src="../../static/icon/success.png" mode="widthFix" style="width: 300rpx;margin-top: 78rpx;">
|
|
<image src="../../static/icon/success.png" mode="widthFix" style="width: 300rpx;margin-top: 78rpx;">
|
|
- <!-- <image :src="`../../static/icon/${data.pay_status ? 'success' : 'show'}.png`" mode="widthFix" style="width: 300rpx;margin-top: 78rpx;"> -->
|
|
|
|
</image>
|
|
</image>
|
|
- <view class="success">{{ data.pay_status ? '报名成功' : '报名成功,请把钱转给老大' }}</view>
|
|
|
|
|
|
+ <view class="success">获取名额成功,请联系批发商</view>
|
|
<view class="timed">
|
|
<view class="timed">
|
|
举办时间:{{ data.start+ '-' +data.end }}
|
|
举办时间:{{ data.start+ '-' +data.end }}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="info" v-show="data.pay_status">
|
|
|
|
- <view>
|
|
|
|
- <text>收货人:</text>
|
|
|
|
- <text>{{ info.username }}</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>手机号:</text>
|
|
|
|
- <text>{{ info.mobile }}</text>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <text>收货地址:</text>
|
|
|
|
- <text>{{ info.local }}</text>
|
|
|
|
- </view>
|
|
|
|
- <navigator url="./information" class="info_btn">编辑地址</navigator>
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- <view class="bottom" v-if="showSignup">
|
|
|
|
- <view class="bottom-btn" @click="goBack">返回首页</view>
|
|
|
|
- <view v-else class="bottom-btn" v-throttle="2000" @click="singup">立即支付</view>
|
|
|
|
- </view> -->
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -58,20 +36,16 @@
|
|
_API_payment,
|
|
_API_payment,
|
|
_API_SearchStatus,
|
|
_API_SearchStatus,
|
|
GetEnrollInfo,
|
|
GetEnrollInfo,
|
|
- GetEnrollUserAddress,
|
|
|
|
- GetSzyGiftInfo
|
|
|
|
} from '@/apis/order.js';
|
|
} from '@/apis/order.js';
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- showTip: false,
|
|
|
|
status: false,
|
|
status: false,
|
|
- info: {},
|
|
|
|
data: {
|
|
data: {
|
|
season: '',
|
|
season: '',
|
|
start: '',
|
|
start: '',
|
|
end: '',
|
|
end: '',
|
|
- username: '',
|
|
|
|
|
|
+ name: '',
|
|
mobile: '',
|
|
mobile: '',
|
|
cost: '',
|
|
cost: '',
|
|
local: ''
|
|
local: ''
|
|
@@ -80,7 +54,7 @@
|
|
showSignup: false,
|
|
showSignup: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onShow() {
|
|
|
|
|
|
+ onLoad() {
|
|
this.getInfo()
|
|
this.getInfo()
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -92,12 +66,6 @@
|
|
this.getInfo()
|
|
this.getInfo()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 查看物流信息
|
|
|
|
- toLogistics() {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/szy-logistics/szy-logistics?info=" + JSON.stringify(this.logInfo)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 返回首页
|
|
// 返回首页
|
|
goBack() {
|
|
goBack() {
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
@@ -108,13 +76,25 @@
|
|
getInfo() {
|
|
getInfo() {
|
|
GetEnrollInfo().then(res => {
|
|
GetEnrollInfo().then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- console.log(res.data)
|
|
|
|
- // res.data.status = 1
|
|
|
|
- // res.data.pay_status = 1
|
|
|
|
|
|
+ // res.data = {
|
|
|
|
+ // cost: 199,
|
|
|
|
+ // end: "2023.11.25",
|
|
|
|
+ // end_time: "2023-11-25 18:00:00",
|
|
|
|
+ // enroll_end_time: "2023-11-21 16:00:00",
|
|
|
|
+ // enroll_start_time: "2023-11-14 10:30:00", // 报名时间
|
|
|
|
+ // limit_num: 100000,
|
|
|
|
+ // num: 0,
|
|
|
|
+ // pay_status: 1, // 是否支付
|
|
|
|
+ // season: 63,
|
|
|
|
+ // start: "2023.10.24",
|
|
|
|
+ // start_time: "2023-11-24 08:00:00", // 举办时间
|
|
|
|
+ // status: 0 // 是否报名
|
|
|
|
+ // }
|
|
|
|
+ // res.data.enroll_start_time = "2023-11-14 10:30:00" // 报名时间
|
|
this.data = res.data
|
|
this.data = res.data
|
|
this.data.start = this.getTimes(res.data.start_time)
|
|
this.data.start = this.getTimes(res.data.start_time)
|
|
this.data.end = this.getTimes(res.data.end_time)
|
|
this.data.end = this.getTimes(res.data.end_time)
|
|
- // res.data.enroll_start_time = '2023-10-15 10:30:00'
|
|
|
|
|
|
+
|
|
const a = new Date(res.data.enroll_start_time.replace(/-/g,'/')).getTime()
|
|
const a = new Date(res.data.enroll_start_time.replace(/-/g,'/')).getTime()
|
|
const b = new Date(res.data.enroll_end_time.replace(/-/g,'/')).getTime()
|
|
const b = new Date(res.data.enroll_end_time.replace(/-/g,'/')).getTime()
|
|
const now = Date.parse(new Date())
|
|
const now = Date.parse(new Date())
|
|
@@ -126,23 +106,6 @@
|
|
} else {
|
|
} else {
|
|
this.showSignup = false
|
|
this.showSignup = false
|
|
}
|
|
}
|
|
- if (res.data.pay_status) {
|
|
|
|
- this.getAddress()
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- uni.showModal({
|
|
|
|
- content: res.message || '获取失败',
|
|
|
|
- showCancel: false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- getAddress() {
|
|
|
|
- GetEnrollUserAddress().then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.info = res.data
|
|
|
|
- const data = res.data
|
|
|
|
- this.info.local = data.province + data.city + data.area + data.address
|
|
|
|
} else {
|
|
} else {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
content: res.message || '获取失败',
|
|
content: res.message || '获取失败',
|
|
@@ -152,7 +115,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getTimes(data) {
|
|
getTimes(data) {
|
|
- var time = new Date(data.replace(/-/g,'/'))
|
|
|
|
|
|
+ var time = new Date(data)
|
|
var year = time.getFullYear()
|
|
var year = time.getFullYear()
|
|
var month = time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
|
|
var month = time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
|
|
var day = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
|
|
var day = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
|
|
@@ -176,58 +139,6 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- //WeixinJSBridge判断
|
|
|
|
- wxJsPay(data, callback_succ_func, callback_error_func) {
|
|
|
|
- if (typeof WeixinJSBridge == 'undefined') {
|
|
|
|
- if (document.addEventListener) {
|
|
|
|
- document.addEventListener('WeixinJSBridgeReady', this.jsApiCall, false);
|
|
|
|
- } else if (document.attachEvent) {
|
|
|
|
- document.attachEvent('WeixinJSBridgeReady', this.jsApiCall);
|
|
|
|
- document.attachEvent('onWeixinJSBridgeReady', this.jsApiCall);
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.jsApiCall(data, callback_succ_func, callback_error_func);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- //调起支付
|
|
|
|
- jsApiCall(data, callback_succ_func, callback_error_func) {
|
|
|
|
- let that = this
|
|
|
|
- //使用原生的,避免初始化appid问题
|
|
|
|
- WeixinJSBridge.invoke(
|
|
|
|
- 'getBrandWCPayRequest', {
|
|
|
|
- appId: data.appId,
|
|
|
|
- timeStamp: data.timestamp,
|
|
|
|
- nonceStr: data.nonceStr,
|
|
|
|
- package: data.package,
|
|
|
|
- signType: data.signType,
|
|
|
|
- paySign: data.paySign
|
|
|
|
- },
|
|
|
|
- function(res) {
|
|
|
|
- var msg = res.err_msg ? res.err_msg : res.errMsg;
|
|
|
|
- switch (msg) {
|
|
|
|
- //支付成功时
|
|
|
|
- case 'get_brand_wcpay_request:ok':
|
|
|
|
- if (callback_succ_func) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '支付成功',
|
|
|
|
- showCancel: false
|
|
|
|
- })
|
|
|
|
- callback_succ_func(res);
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- //支付失败时
|
|
|
|
- WeixinJSBridge.log('支付失败!' + msg + ',请返回重试.');
|
|
|
|
- if (callback_error_func) {
|
|
|
|
- callback_error_func({
|
|
|
|
- msg: msg
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
singup() {
|
|
singup() {
|
|
if (!this.status && !this.data.status) {
|
|
if (!this.status && !this.data.status) {
|
|
return
|
|
return
|
|
@@ -258,27 +169,18 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
-<style>
|
|
|
|
-</style>
|
|
|
|
|
|
+
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.top {
|
|
.top {
|
|
margin: 0 30rpx 0 30rpx;
|
|
margin: 0 30rpx 0 30rpx;
|
|
border-radius: 16rpx;
|
|
border-radius: 16rpx;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
padding: 40rpx 20rpx 40rpx 20rpx;
|
|
padding: 40rpx 20rpx 40rpx 20rpx;
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .tip {
|
|
|
|
- font-size: 36rpx;
|
|
|
|
- text-align: center;
|
|
|
|
- font-weight: bold;
|
|
|
|
- margin-top: 30rpx;
|
|
|
|
- color: #FB231F;
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
.title {
|
|
.title {
|
|
font-size: 34rpx;
|
|
font-size: 34rpx;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
@@ -400,19 +302,6 @@
|
|
>view {
|
|
>view {
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
}
|
|
}
|
|
- &_btn {
|
|
|
|
- margin: 30rpx auto 0 !important;
|
|
|
|
- width: 388rpx;
|
|
|
|
- line-height: 80rpx;
|
|
|
|
- text-align: center;
|
|
|
|
- background: #FFF4F3;
|
|
|
|
- border: 2rpx solid #FB231F;
|
|
|
|
- opacity: 1;
|
|
|
|
- border-radius: 44rpx;
|
|
|
|
- font-size: 30rpx;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #FB231F;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|