Commit 110c3612 authored by 黄奎's avatar 黄奎

报名限制

parent bdb012bc
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</image> </image>
</div> </div>
<div class="good-info"> <div class="good-info">
<div class="good-name"> <div class="good-name" :class="[cx.edudata.ClassCondition.length>0?'good-namee2':'']">
<view <view
v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''" v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class="Logo" :style="{color: cx.marketingLogo.wordsColor, class="Logo" :style="{color: cx.marketingLogo.wordsColor,
...@@ -91,6 +91,12 @@ ...@@ -91,6 +91,12 @@
{{cx.freeShippingFullMoneyPinkage==0 && cx.freeShippingFullNumPinkage>0?cx.freeShippingFullNumPinkage+'件包邮':''}} {{cx.freeShippingFullMoneyPinkage==0 && cx.freeShippingFullNumPinkage>0?cx.freeShippingFullNumPinkage+'件包邮':''}}
</view> </view>
{{ cx.name }} {{ cx.name }}
<view v-if="cx.edudata.ClassCondition.length>0" class="limit" @touchstart="mouseover()" @touchend="mouseLeave()">
<u-icon name="lock" size="44" :color="mainColor" />
<view class="limit-box" v-show="limitShow">
此课程有报名限制,请点击详情查看
</view>
</view>
</div> </div>
<div class="goodprice"> <div class="goodprice">
<div class="left"> <div class="left">
...@@ -222,6 +228,7 @@ ...@@ -222,6 +228,7 @@
props: ["d", "h"], props: ["d", "h"],
data() { data() {
return { return {
limitShow:false,
ind: 1, ind: 1,
show: false, show: false,
Theclass: [{ Theclass: [{
...@@ -294,6 +301,14 @@ ...@@ -294,6 +301,14 @@
// this.u = uni.getStorageSync('mall_UserInfo5') // this.u = uni.getStorageSync('mall_UserInfo5')
}, },
methods: { methods: {
// 鼠标移进时间
mouseover(){
console.log('44444')
this.limitShow = true
},
mouseLeave() {
this.limitShow = false
},
remaining(i) { remaining(i) {
this.$nextTick(function() { this.$nextTick(function() {
i.show = !i.show i.show = !i.show
...@@ -534,6 +549,20 @@ ...@@ -534,6 +549,20 @@
</script> </script>
<style> <style>
.limit{
/* position: relative; */
}
.limit-box{
position: absolute;
right: 0px;
font-size: 12px;
color: #fff;
background-color: rgba(0, 0, 0, 0.6);
}
.good-namee2{
display: flex !important;
position: relative;
}
.rema3{ .rema3{
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
<img style="width:50rpx;height:50rpx;margin-right:10px" :src="item.src" alt="" /> <img style="width:50rpx;height:50rpx;margin-right:10px" :src="item.src" alt="" />
<span style="position:relative;top:-7px">{{item.Name}}</span> <span style="position:relative;top:-7px">{{item.Name}}</span>
</p> --> </p> -->
<u-radio-group v-model="payment" :size="36" :active-color='mc' @change="radioChange" :wrap="true"> <u-radio-group v-model="payment" :size="36" :active-color='mc' @change="radioChange"
:wrap="true">
<u-radio shape="circle" :name="0" :wrap="true"> <u-radio shape="circle" :name="0" :wrap="true">
<img style="width:50rpx;height:50rpx;margin-right:10px" <img style="width:50rpx;height:50rpx;margin-right:10px"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/wx.png" alt="" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/wx.png" alt="" />
...@@ -53,12 +54,14 @@ ...@@ -53,12 +54,14 @@
<view class="Alipay-box33"> <view class="Alipay-box33">
<image class="Alipay-image" src="../../static/images/zhifu.png"></image> <image class="Alipay-image" src="../../static/images/zhifu.png"></image>
</view> </view>
<view class="Alipay-text4" @click="send()" style="margin-bottom: 86rpx;"> <view class="Alipay-text4" @click="send()" style="margin-bottom: 86rpx;">
去发送 去发送
<button open-type="contact" send-message-title="支付" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity: 0;" :show-message-card="true">0</button> <button open-type="contact" send-message-title="支付"
</view> style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity: 0;"
:show-message-card="true">0</button>
</view>
<view> <view>
<view class="Alipay-box3"> <view class="Alipay-box3">
<view class="fangs"> <view class="fangs">
...@@ -84,7 +87,8 @@ ...@@ -84,7 +87,8 @@
props: ['payInfo', 'isAlipay', 'StuId', 'TeacherIds'], props: ['payInfo', 'isAlipay', 'StuId', 'TeacherIds'],
data() { data() {
return { return {
url:'', times: null,
url: '',
AlipayMask: false, AlipayMask: false,
mc: {}, mc: {},
payment: 0, payment: 0,
...@@ -112,6 +116,17 @@ ...@@ -112,6 +116,17 @@
console.log(wx) console.log(wx)
this.u = uni.getStorageSync('mall_UserInfo') this.u = uni.getStorageSync('mall_UserInfo')
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
this.TimingState();
this.times = setInterval(() => {
this.TimingState();
}, 30000);
},
onShow (){
this.TimingState();
this.times = setInterval(() => {
this.TimingState();
}, 30000);
}, },
wacth: { wacth: {
payInfo: { payInfo: {
...@@ -122,145 +137,169 @@ ...@@ -122,145 +137,169 @@
} }
}, },
methods: { methods: {
radioChange(e) { // 定时查询状态
if (e == 0) { TimingState() {
this.payType = 'wx_lite' let that =this
} else { this.request2({
this.payType = 'alipay_qr' url: '/api/AppletOrder/GetAppletMyOrderInfo',
} data: {
}, OrderId: this.payInfo.OrderId,
cloGood() { NewUserId: 0
this.AlipayMask = false }
this.pay = true
},
// 支付宝发送发送
send() {
},
copy() {
uniCopy({
content: this.url,
success: (res) => {
uni.showToast({
title: res,
icon: 'none'
})
}, },
error: (e) => { (res) => {
uni.showToast({ if(res.data.OrderStatus==5){
title: e, clearInterval(this.times);
icon: 'none', uni.navigateTo({
duration: 3000, url: `/pages/order-submit/pay-success2?payInfo=${JSON.stringify(that.payInfo)}&StuId=${that.StuId}&TeacherIds=${that.TeacherIds}`
}) // url: '/pages/order-submit/pay-success2?payInfo='+JSON.stringify(that.payInfo)
});
that.pay = false
}
console.log('状态',res.data.OrderStatus)
} }
}) );
},
closePay() { },
this.$emit('closePay'); radioChange(e) {
}, if (e == 0) {
Pay() { this.payType = 'wx_lite'
// if (this.payment == 0) { } else {
let msg = { this.payType = 'alipay_qr'
'pay_channel': this }
.payType, //网页打开支付宝支付:alipay_wap 支付宝正扫:alipay_qr 支付宝app:alipay 微信小程序:wx_lite 微信公众号:wx_pub },
'open_id': this.payType == 'wx_lite' ? this.payInfo.OpenId : '', cloGood() {
'hb_fq_num': '', this.AlipayMask = false
'orderId': this.payInfo.OrderId, this.pay = true
}; },
this.loading = true // 支付宝发送发送
uni.showLoading({ send() {
title: '正在调起支付'
},
copy() {
uniCopy({
content: this.url,
success: (res) => {
uni.showToast({
title: res,
icon: 'none'
}) })
this.request2({
url: '/api/Adapay/GetAdapayInfo',
data: msg
},
res => {
this.loading = false
uni.hideLoading()
if (res.data != '') {
if (this.payType != 'wx_lite') {
this.aliPay(res.data)
this.AlipayMask =true
this.pay = false
} else {
this.wxPay(JSON.parse(res.data))
}
} else {
uni.showToast({
title: "调起支付失败,请重试",
icon: 'error'
})
}
// uni.hideNavigationBarLoading();
}
);
// }
// else {
// this.AlipayMask = true
// this.pay = false
// }
}, },
// 支付宝支付 error: (e) => {
aliPay(url) { uni.showToast({
// window.location.href = url title: e,
this.url = `http://jj.kookaku.com/pages/pay/transition?aliuri=${encodeURIComponent(url)}` icon: 'none',
duration: 3000,
}, })
// 微信支付 }
wxPay(payData) { })
let that = this },
uni.showLoading({ closePay() {
title: '支付中...' this.$emit('closePay');
}) },
wx.requestPayment({ Pay() {
"timeStamp": payData.timeStamp, //时间戳,自1970年以来的秒数 // if (this.payment == 0) {
"nonceStr": payData.nonceStr, //随机串 let msg = {
"package": payData.package, 'pay_channel': this
"signType": payData.signType, //微信签名方式: .payType, //网页打开支付宝支付:alipay_wap 支付宝正扫:alipay_qr 支付宝app:alipay 微信小程序:wx_lite 微信公众号:wx_pub
"paySign": payData.paySign, //微信签名 'open_id': this.payType == 'wx_lite' ? this.payInfo.OpenId : '',
'success': function(res) { 'hb_fq_num': '',
uni.hideLoading() 'orderId': this.payInfo.OrderId,
if (that.u && that.u.TenantId == 27) { };
uni.navigateTo({ this.loading = true
url: `/pages/order-submit/pay-success2?payInfo=${JSON.stringify(that.payInfo)}&StuId=${that.StuId}&TeacherIds=${that.TeacherIds}` uni.showLoading({
// url: '/pages/order-submit/pay-success2?payInfo='+JSON.stringify(that.payInfo) title: '正在调起支付'
}); })
that.pay = false this.request2({
url: '/api/Adapay/GetAdapayInfo',
data: msg
},
res => {
this.loading = false
uni.hideLoading()
if (res.data != '') {
if (this.payType != 'wx_lite') {
this.aliPay(res.data)
this.AlipayMask = true
this.pay = false
} else { } else {
uni.navigateTo({ this.wxPay(JSON.parse(res.data))
url: '/pages/order-submit/pay-success?payInfo=' + JSON.stringify(that
.payInfo)
});
that.pay = false
} }
// uni.showToast({ } else {
// title:'支付成功' uni.showToast({
// }) title: "调起支付失败,请重试",
}, icon: 'error'
'fail': function(res) { })
uni.hideLoading() }
// uni.hideNavigationBarLoading();
}
);
// }
// else {
// this.AlipayMask = true
// this.pay = false
// }
},
// 支付宝支付
aliPay(url) {
// window.location.href = url
this.url = `http://jj.kookaku.com/pages/pay/transition?aliuri=${encodeURIComponent(url)}`
},
// 微信支付
wxPay(payData) {
let that = this
uni.showLoading({
title: '支付中...'
})
wx.requestPayment({
"timeStamp": payData.timeStamp, //时间戳,自1970年以来的秒数
"nonceStr": payData.nonceStr, //随机串
"package": payData.package,
"signType": payData.signType, //微信签名方式:
"paySign": payData.paySign, //微信签名
'success': function(res) {
uni.hideLoading()
if (that.u && that.u.TenantId == 27) {
uni.navigateTo({ uni.navigateTo({
// url: `/pages/order-submit/pay-success2?payInfo=${JSON.stringify(that.payInfo)}&StuId=${that.StuId}&TeacherIds=${that.TeacherIds}` url: `/pages/order-submit/pay-success2?payInfo=${JSON.stringify(that.payInfo)}&StuId=${that.StuId}&TeacherIds=${that.TeacherIds}`
url: '/pages/order/index/index?status=1' // url: '/pages/order-submit/pay-success2?payInfo='+JSON.stringify(that.payInfo)
});
that.pay = false
} else {
uni.navigateTo({
url: '/pages/order-submit/pay-success?payInfo=' + JSON.stringify(that
.payInfo)
}); });
that.pay = false that.pay = false
},
'complete': function(res) {
// uni.showToast({
// title:res.errMsg
// })
} }
}) // uni.showToast({
}, // title:'支付成功'
} // })
},
'fail': function(res) {
uni.hideLoading()
uni.navigateTo({
// url: `/pages/order-submit/pay-success2?payInfo=${JSON.stringify(that.payInfo)}&StuId=${that.StuId}&TeacherIds=${that.TeacherIds}`
url: '/pages/order/index/index?status=1'
});
that.pay = false
},
'complete': function(res) {
// uni.showToast({
// title:res.errMsg
// })
}
})
},
}
}; };
</script> </script>
<style> <style>
.fangs{ .fangs {
font-size: 26rpx; font-size: 26rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
...@@ -268,9 +307,11 @@ ...@@ -268,9 +307,11 @@
margin-right: 10rpx; margin-right: 10rpx;
width: 60rpx; width: 60rpx;
} }
.item-box{
.item-box {
position: relative; position: relative;
} }
.Alipay-box { .Alipay-box {
/* height: 930rpx; */ /* height: 930rpx; */
background: #FFFFFF; background: #FFFFFF;
......
...@@ -214,11 +214,6 @@ ...@@ -214,11 +214,6 @@
that.requestJJSWAdmin(testCmd, postMsg, that.requestJJSWAdmin(testCmd, postMsg,
(res) => { (res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
// uni.showToast({
// title: '提交成功',
// icon: 'exception',
// duration: 2000
// });
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:enable-progress-gesture="true" :controls="true" :show-progress="true" :enable-progress-gesture="true" :controls="true" :show-progress="true"
:show-mute-btn="true" objectFit="cover"></video> :show-mute-btn="true" objectFit="cover"></video>
<image @click="previewImage(index)" style="width:100%;height:100%;" v-else <image @click="previewImage(index)" style="width:100%;height:100%;" v-else
:src="item.pic_url" :mode="u.TenantId==27 ? 'scaleToFill' : 'aspectFill'"></image> :src="item.pic_url" :mode="u.TenantId==27 ? 'scaleToFill' : 'aspectFill'"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -142,6 +142,41 @@ ...@@ -142,6 +142,41 @@
<text v-if="g.edu_data.EndOrderTime" class="sign-dian"></text> <text v-if="g.edu_data.EndOrderTime" class="sign-dian"></text>
<text v-if="g.edu_data.ClassNum">{{g.edu_data.ClassNum}}次</text> <text v-if="g.edu_data.ClassNum">{{g.edu_data.ClassNum}}次</text>
</view> </view>
<!-- 报名限制 -->
<view v-if='g.edu_data.ClassCondition.length>0'>
<view class="limit">
<view v-if="ItemType1 && ItemType1.length > 0" class="box-title">
只允许以下学员报名
</view>
<text v-for="(item, index) in ItemType1" class="box-name">
{{ index + 1 }}:{{ item.ItemName }}。
</text>
<view v-if="ItemType2 && ItemType2.length > 0" class="box-title">
只允许以下年级学员报名
</view>
<text v-for="(item, index) in ItemType2" class="box-name">
{{ index + 1 }}:{{ item.ItemName }}。
</text>
<view v-if="ItemType3 && ItemType3.length > 0" class="box-title">
只允许曾报以下课程学员报名
</view>
<text v-for="(item, index) in ItemType3" class="box-name">
{{ index + 1 }}:{{ item.ItemName }}。
</text>
<view v-if="ItemType4 && ItemType4.length > 0" class="box-title">
只允许曾报以下班级学员报名
</view>
<text v-for="(item, index) in ItemType4" class="box-name">
{{ index + 1 }}:{{ item.ItemName }}。
</text>
<view v-if="ItemType5 && ItemType5.length > 0" class="box-title">
考试成绩:
</view>
<text v-for="(item, index) in ItemType5" class="box-name">
{{ index + 1 }}:{{ item.ItemName }}。
</text>
</view>
</view>
<!-- 价格 --> <!-- 价格 -->
<view :style="{ color: mc }" class="the-price"> <view :style="{ color: mc }" class="the-price">
<text class="small22"></text> <text class="small22"></text>
...@@ -462,6 +497,11 @@ ...@@ -462,6 +497,11 @@
export default { export default {
data() { data() {
return { return {
ItemType1: [],
ItemType2: [],
ItemType3: [],
ItemType4: [],
ItemType5: [],
barStyle: { barStyle: {
height: 'mc ', height: 'mc ',
}, },
...@@ -541,12 +581,17 @@ ...@@ -541,12 +581,17 @@
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
}, },
onLoad(option) { onLoad(option) {
this.opTionObj = option; this.ItemType1 = [],
this.ItemType2 = [],
this.ItemType3 = [],
this.ItemType4 = [],
this.ItemType5 = [],
this.opTionObj = option;
console.log(option, "option"); console.log(option, "option");
if (option && option.id) { if (option && option.id) {
this.id = option.id ? option.id : 29; //40887 59512 46942 this.id = option.id ? option.id : 29; //40887 59512 46942
} else { } else {
this.id = option.GoodsId ? option.GoodsId : 29; //40887 59512 46942 this.id = option.GoodsId ? option.GoodsId : 774192; //774192
} }
if (option && option.custom_params) { if (option && option.custom_params) {
let custom_params = JSON.parse(decodeURIComponent(option.custom_params)); let custom_params = JSON.parse(decodeURIComponent(option.custom_params));
...@@ -602,7 +647,7 @@ ...@@ -602,7 +647,7 @@
// this.init(); // this.init();
// this.initPage(); // this.initPage();
// } // }
this.init();
this.initPage(); this.initPage();
this.getVipId(); this.getVipId();
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
...@@ -677,6 +722,7 @@ ...@@ -677,6 +722,7 @@
setTimeout(() => { setTimeout(() => {
this.initImages(); this.initImages();
}, 3000); }, 3000);
this.init();
}, },
methods: { methods: {
// counter() { // counter() {
...@@ -772,6 +818,21 @@ ...@@ -772,6 +818,21 @@
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.g = res.data.goods; this.g = res.data.goods;
// 报名限制数组
res.data.goods.edu_data.ClassCondition.forEach(item2 => {
if (item2.ItemType == 1) {
this.ItemType1.push(item2)
} else if (item2.ItemType == 2) {
this.ItemType2.push(item2)
} else if (item2.ItemType == 3) {
this.ItemType3.push(item2)
} else if (item2.ItemType == 4) {
this.ItemType4.push(item2)
} else if (item2.ItemType == 5) {
this.ItemType5.push(item2)
}
})
// 报名限制数组结束
this.g.totalStock = 0; this.g.totalStock = 0;
this.g.attr.forEach((x) => { this.g.attr.forEach((x) => {
this.g.totalStock += x.stock; this.g.totalStock += x.stock;
...@@ -1087,6 +1148,16 @@ ...@@ -1087,6 +1148,16 @@
</script> </script>
<style> <style>
.limit{
margin-top: 20rpx;
}
.box-title {
font-weight: bold;
}
.box-name {
font-size: 22rpx;
}
.the-top { .the-top {
position: absolute; position: absolute;
top: 82%; top: 82%;
......
This diff is collapsed.
...@@ -96,7 +96,8 @@ ...@@ -96,7 +96,8 @@
<good-list :list="goodData" v-if="showGoodList" @close="closeGoodListHandler"></good-list> <good-list :list="goodData" v-if="showGoodList" @close="closeGoodListHandler"></good-list>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
<payCom v-if="payBtn&&u.TenantId!=27" :payInfo="payInfo" @closePay="closePay"></payCom> <payCom v-if="payBtn&&u.TenantId!=27" :payInfo="payInfo" @closePay="closePay"></payCom>
<submit2PayCom v-if="payBtn&&u.TenantId==27" :payInfo="payInfo" :isAlipay="isAlipay" :StuId='StuId' :TeacherIds='TeacherIds' @closePay="closePay"></submit2PayCom> <submit2PayCom v-if="payBtn&&u.TenantId==27" :payInfo="payInfo" :isAlipay="isAlipay" :StuId='StuId' :TeacherIds='TeacherIds' @closePay="closePay"></submit2PayCom>
<u-popup v-model="payExit" mode="center" :mask-close-able="false"> <u-popup v-model="payExit" mode="center" :mask-close-able="false">
<view style="background:#fff;width:500rpx"> <view style="background:#fff;width:500rpx">
<view style="padding:10px 0 0 10px">提交失败</view> <view style="padding:10px 0 0 10px">提交失败</view>
......
...@@ -2,9 +2,8 @@ export default { ...@@ -2,9 +2,8 @@ export default {
install(Vue, options) { install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285" Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue.prototype.host2 = "http://192.168.10.128:8200"//本地 // Vue.prototype.host2 = "http://192.168.10.128:8200"//本地
Vue.prototype.host2 = "http://192.168.10.128:8200"
// Vue.prototype.host2 = "http://192.168.10.46:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"//测试 // Vue.prototype.host2 = "https://mallApi.oytour.com"//测试
//进阶思维后台地址 //进阶思维后台地址
Vue.prototype.host3 = "http://192.168.10.128:8900"//本地 Vue.prototype.host3 = "http://192.168.10.128:8900"//本地
...@@ -140,13 +139,14 @@ export default { ...@@ -140,13 +139,14 @@ export default {
msg: postMsg msg: postMsg
}, },
success: res => { success: res => {
typeof success == "function" && success(res);
if (res.data.Code == 10000) { if (res.data.Code == 10000) {
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
if (u) { if (u) {
this.getLogin_t(u) this.getLogin_t(u)
} }
} else if (res.Code == 1) { } else if (res.data.Code == 0) {
} else if (res.data.Code != 1) { } else if (res.data.Code != 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment