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

报名限制

parent bdb012bc
......@@ -75,7 +75,7 @@
</image>
</div>
<div class="good-info">
<div class="good-name">
<div class="good-name" :class="[cx.edudata.ClassCondition.length>0?'good-namee2':'']">
<view
v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class="Logo" :style="{color: cx.marketingLogo.wordsColor,
......@@ -91,6 +91,12 @@
{{cx.freeShippingFullMoneyPinkage==0 && cx.freeShippingFullNumPinkage>0?cx.freeShippingFullNumPinkage+'件包邮':''}}
</view>
{{ 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 class="goodprice">
<div class="left">
......@@ -222,6 +228,7 @@
props: ["d", "h"],
data() {
return {
limitShow:false,
ind: 1,
show: false,
Theclass: [{
......@@ -294,6 +301,14 @@
// this.u = uni.getStorageSync('mall_UserInfo5')
},
methods: {
// 鼠标移进时间
mouseover(){
console.log('44444')
this.limitShow = true
},
mouseLeave() {
this.limitShow = false
},
remaining(i) {
this.$nextTick(function() {
i.show = !i.show
......@@ -534,6 +549,20 @@
</script>
<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{
margin-bottom: 8rpx;
}
......
......@@ -14,7 +14,8 @@
<img style="width:50rpx;height:50rpx;margin-right:10px" :src="item.src" alt="" />
<span style="position:relative;top:-7px">{{item.Name}}</span>
</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">
<img style="width:50rpx;height:50rpx;margin-right:10px"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/wx.png" alt="" />
......@@ -53,12 +54,14 @@
<view class="Alipay-box33">
<image class="Alipay-image" src="../../static/images/zhifu.png"></image>
</view>
<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>
</view>
<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>
</view>
<view>
<view class="Alipay-box3">
<view class="fangs">
......@@ -84,7 +87,8 @@
props: ['payInfo', 'isAlipay', 'StuId', 'TeacherIds'],
data() {
return {
url:'',
times: null,
url: '',
AlipayMask: false,
mc: {},
payment: 0,
......@@ -112,6 +116,17 @@
console.log(wx)
this.u = uni.getStorageSync('mall_UserInfo')
this.mc = this.$uiConfig.mainColor;
this.TimingState();
this.times = setInterval(() => {
this.TimingState();
}, 30000);
},
onShow (){
this.TimingState();
this.times = setInterval(() => {
this.TimingState();
}, 30000);
},
wacth: {
payInfo: {
......@@ -122,145 +137,169 @@
}
},
methods: {
radioChange(e) {
if (e == 0) {
this.payType = 'wx_lite'
} else {
this.payType = 'alipay_qr'
}
},
cloGood() {
this.AlipayMask = false
this.pay = true
},
// 支付宝发送发送
send() {
},
copy() {
uniCopy({
content: this.url,
success: (res) => {
uni.showToast({
title: res,
icon: 'none'
})
// 定时查询状态
TimingState() {
let that =this
this.request2({
url: '/api/AppletOrder/GetAppletMyOrderInfo',
data: {
OrderId: this.payInfo.OrderId,
NewUserId: 0
}
},
error: (e) => {
uni.showToast({
title: e,
icon: 'none',
duration: 3000,
})
(res) => {
if(res.data.OrderStatus==5){
clearInterval(this.times);
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)
});
that.pay = false
}
console.log('状态',res.data.OrderStatus)
}
})
},
closePay() {
this.$emit('closePay');
},
Pay() {
// if (this.payment == 0) {
let msg = {
'pay_channel': this
.payType, //网页打开支付宝支付:alipay_wap 支付宝正扫:alipay_qr 支付宝app:alipay 微信小程序:wx_lite 微信公众号:wx_pub
'open_id': this.payType == 'wx_lite' ? this.payInfo.OpenId : '',
'hb_fq_num': '',
'orderId': this.payInfo.OrderId,
};
this.loading = true
uni.showLoading({
title: '正在调起支付'
);
},
radioChange(e) {
if (e == 0) {
this.payType = 'wx_lite'
} else {
this.payType = 'alipay_qr'
}
},
cloGood() {
this.AlipayMask = false
this.pay = true
},
// 支付宝发送发送
send() {
},
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
// }
},
// 支付宝支付
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({
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
},
error: (e) => {
uni.showToast({
title: e,
icon: 'none',
duration: 3000,
})
}
})
},
closePay() {
this.$emit('closePay');
},
Pay() {
// if (this.payment == 0) {
let msg = {
'pay_channel': this
.payType, //网页打开支付宝支付:alipay_wap 支付宝正扫:alipay_qr 支付宝app:alipay 微信小程序:wx_lite 微信公众号:wx_pub
'open_id': this.payType == 'wx_lite' ? this.payInfo.OpenId : '',
'hb_fq_num': '',
'orderId': this.payInfo.OrderId,
};
this.loading = true
uni.showLoading({
title: '正在调起支付'
})
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 {
uni.navigateTo({
url: '/pages/order-submit/pay-success?payInfo=' + JSON.stringify(that
.payInfo)
});
that.pay = false
this.wxPay(JSON.parse(res.data))
}
// uni.showToast({
// title:'支付成功'
// })
},
'fail': function(res) {
uni.hideLoading()
} else {
uni.showToast({
title: "调起支付失败,请重试",
icon: 'error'
})
}
// 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({
// 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)}&StuId=${that.StuId}&TeacherIds=${that.TeacherIds}`
// 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
},
'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>
<style>
.fangs{
.fangs {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
......@@ -268,9 +307,11 @@
margin-right: 10rpx;
width: 60rpx;
}
.item-box{
.item-box {
position: relative;
}
.Alipay-box {
/* height: 930rpx; */
background: #FFFFFF;
......
......@@ -214,11 +214,6 @@
that.requestJJSWAdmin(testCmd, postMsg,
(res) => {
if (res.data.Code == 1) {
// uni.showToast({
// title: '提交成功',
// icon: 'exception',
// duration: 2000
// });
uni.navigateBack({
delta: 1
});
......
......@@ -19,7 +19,7 @@
:enable-progress-gesture="true" :controls="true" :show-progress="true"
:show-mute-btn="true" objectFit="cover"></video>
<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>
</block>
</swiper>
......@@ -142,6 +142,41 @@
<text v-if="g.edu_data.EndOrderTime" class="sign-dian"></text>
<text v-if="g.edu_data.ClassNum">{{g.edu_data.ClassNum}}次</text>
</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">
<text class="small22"></text>
......@@ -462,6 +497,11 @@
export default {
data() {
return {
ItemType1: [],
ItemType2: [],
ItemType3: [],
ItemType4: [],
ItemType5: [],
barStyle: {
height: 'mc ',
},
......@@ -541,12 +581,17 @@
this.scrollTop = e.scrollTop;
},
onLoad(option) {
this.opTionObj = option;
this.ItemType1 = [],
this.ItemType2 = [],
this.ItemType3 = [],
this.ItemType4 = [],
this.ItemType5 = [],
this.opTionObj = option;
console.log(option, "option");
if (option && option.id) {
this.id = option.id ? option.id : 29; //40887 59512 46942
} else {
this.id = option.GoodsId ? option.GoodsId : 29; //40887 59512 46942
this.id = option.GoodsId ? option.GoodsId : 774192; //774192
}
if (option && option.custom_params) {
let custom_params = JSON.parse(decodeURIComponent(option.custom_params));
......@@ -602,7 +647,7 @@
// this.init();
// this.initPage();
// }
this.init();
this.initPage();
this.getVipId();
this.mc = this.$uiConfig.mainColor;
......@@ -677,6 +722,7 @@
setTimeout(() => {
this.initImages();
}, 3000);
this.init();
},
methods: {
// counter() {
......@@ -772,6 +818,21 @@
(res) => {
if (res.resultCode == 1) {
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.attr.forEach((x) => {
this.g.totalStock += x.stock;
......@@ -1087,6 +1148,16 @@
</script>
<style>
.limit{
margin-top: 20rpx;
}
.box-title {
font-weight: bold;
}
.box-name {
font-size: 22rpx;
}
.the-top {
position: absolute;
top: 82%;
......
This diff is collapsed.
......@@ -96,7 +96,8 @@
<good-list :list="goodData" v-if="showGoodList" @close="closeGoodListHandler"></good-list>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
<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">
<view style="background:#fff;width:500rpx">
<view style="padding:10px 0 0 10px">提交失败</view>
......
......@@ -2,9 +2,8 @@ export default {
install(Vue, options) {
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.46:8200"
// Vue.prototype.host2 = "http://192.168.10.128:8200"//本地
Vue.prototype.host2 = "http://192.168.10.128:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"//测试
//进阶思维后台地址
Vue.prototype.host3 = "http://192.168.10.128:8900"//本地
......@@ -140,13 +139,14 @@ export default {
msg: postMsg
},
success: res => {
typeof success == "function" && success(res);
if (res.data.Code == 10000) {
let u = uni.getStorageSync("mall_UserInfo");
if (u) {
this.getLogin_t(u)
}
} else if (res.Code == 1) {
} else if (res.data.Code == 0) {
} 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