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%;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<!-- @click="chosenAddress(ds.address.id)" --> <!-- @click="chosenAddress(ds.address.id)" -->
<view class="add-box"> <view class="add-box">
<!-- <view v-if="address.province && address.province != ''" class="add-info"> --> <!-- <view v-if="address.province && address.province != ''" class="add-info"> -->
<view v-if="namelist&&namelist.length>0" class="add-info"> <view v-if="namelist&&namelist.length>0" class="add-info">
<view class="area"> <view class="area">
<view class="name-top"> <view class="name-top">
<view class="mask-lit22" :style="{ 'background-color': mc }">{{Thename.substr(0,1)}} <view class="mask-lit22" :style="{ 'background-color': mc }">{{Thename.substr(0,1)}}
</view> </view>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="address"> <view class="address">
</view> </view>
</view> </view>
<view v-if="namelist.length<=0" class="add-info2" > <view v-if="namelist.length<=0" class="add-info2">
<view @click="chosenAddress()">请添加学员</view> <view @click="chosenAddress()">请添加学员</view>
</view> </view>
<view class="arrow" @click="chosenAddress()"> <view class="arrow" @click="chosenAddress()">
...@@ -241,7 +241,9 @@ ...@@ -241,7 +241,9 @@
<view class="notOption" v-if="submitOrder"></view> <view class="notOption" v-if="submitOrder"></view>
<good-list :list="goodData" v-if="showGoodList" @close="closeGoodListHandler"></good-list> <good-list :list="goodData" v-if="showGoodList" @close="closeGoodListHandler"></good-list>
<payCom v-if="payBtn" :payInfo="payInfo" :isAlipay="isAlipay" :StuId='JJSWStuId' :TeacherIds='mrk' @closePay="closePay"></payCom> <payCom v-if="payBtn" :payInfo="payInfo" :isAlipay="isAlipay" :StuId='JJSWStuId' :TeacherIds='mrk'
@closePay="closePay"></payCom>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<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">
...@@ -312,9 +314,9 @@ ...@@ -312,9 +314,9 @@
</view> </view>
</u-popup> </u-popup>
<!-- 支付宝弹窗 --> <!-- 支付宝弹窗 -->
<!-- <Alipay v-if="AlipayMask" :AlipayMask='AlipayMask' :payInfo="payInfo" :isAlipay="isAlipay" :StuId='JJSWStuId' :TeacherIds='mrk' @closePay="closePay"> <!-- <Alipay v-if="AlipayMask" :AlipayMask='AlipayMask' :payInfo="payInfo" :isAlipay="isAlipay" :StuId='JJSWStuId' :TeacherIds='mrk' @closePay="closePay">
</Alipay> --> </Alipay> -->
</view> </view>
</template> </template>
...@@ -325,7 +327,7 @@ ...@@ -325,7 +327,7 @@
import coupon from '@/components/coupon/index'; import coupon from '@/components/coupon/index';
import cashCard from '@/components/coupon/cashCard'; //储蓄卡 import cashCard from '@/components/coupon/cashCard'; //储蓄卡
import goodList from '@/components/goods/order-good-list'; import goodList from '@/components/goods/order-good-list';
export default { export default {
components: { components: {
payCom, payCom,
...@@ -337,10 +339,12 @@ ...@@ -337,10 +339,12 @@
}, },
data() { data() {
return { return {
AlipayMask:false, limits: false,
IsQZJC:0, AlipayMask: false,
mrk:'', IsQZJC: 0,
isAlipay: 2,//1微信 2微信支付宝 mrk: '',
mrk2: '',
isAlipay: 2, //1微信 2微信支付宝
JJSWStuId: "", JJSWStuId: "",
Thename2: '', Thename2: '',
u: {}, u: {},
...@@ -402,7 +406,7 @@ ...@@ -402,7 +406,7 @@
IsFormShoppingCart: 2, IsFormShoppingCart: 2,
adressInfo: {}, adressInfo: {},
payInfo: { payInfo: {
OpenId: '',//ow_7I5XC1-RGwwk8QANBmWKYKmOc OpenId: '', //ow_7I5XC1-RGwwk8QANBmWKYKmOc
OrderId: '', OrderId: '',
OrderPayType: 1, OrderPayType: 1,
GoodsName: '' GoodsName: ''
...@@ -440,6 +444,7 @@ ...@@ -440,6 +444,7 @@
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
}, },
onShow() { onShow() {
this.init(); this.init();
if (this.isLeave) { if (this.isLeave) {
...@@ -458,11 +463,11 @@ ...@@ -458,11 +463,11 @@
} }
this.requestJJSWAdmin(testCmd, postMsg, this.requestJJSWAdmin(testCmd, postMsg,
(res) => { (res) => {
console.log("111",res); // console.log("111",res);
if (res.data.Data.length > 0) { if (res.data.Data.length > 0) {
this.namelist = res.data.Data this.namelist = res.data.Data
this.Thename = res.data.Data[0].StuName this.Thename = res.data.Data[0].StuName
this.Thename2 = res.data.Data[0].StuName this.Thename2 = res.data.Data[0].StuName
this.JJSWStuId = res.data.Data[0].StuId this.JJSWStuId = res.data.Data[0].StuId
} }
} }
...@@ -500,7 +505,7 @@ ...@@ -500,7 +505,7 @@
closePay() { closePay() {
this.payBtn = false; this.payBtn = false;
this.payExit = true; this.payExit = true;
this.AlipayMask =false this.AlipayMask = false
}, },
closeGoodListHandler() { closeGoodListHandler() {
this.goodData = []; this.goodData = [];
...@@ -513,32 +518,43 @@ ...@@ -513,32 +518,43 @@
submitModel() { submitModel() {
this.showReviceModal = true; this.showReviceModal = true;
}, },
// 提交订单 // 报名限制
submitOrderHandler() { Registration() {
let that = this; let postMsg = {
// that.adressInfo.Consignee = '测试' StuId: this.JJSWStuId,
// that.adressInfo.ShoppingAddress = '四川成都龙泉驿1' ClassIds: this.mrk2
// that.JJSWStuId = '10724';
// that.Thename="HK";
// if (that.adressInfo.Consignee == '') {
// this.$refs.uToast.show({
// title: '请选择收货信息!',
// type: 'warning'
// });
// return;
// }
if (that.JJSWStuId == '' || that.Thename == '') {
this.$refs.uToast.show({
title: '请添加学员!',
type: 'warning'
});
return;
} }
if (!this.submitOrder) { let that = this
this.requestJJSWAdmin("/api/WeChatPublic/CheckStuSubmitOrder", postMsg,
(res) => {
if (res.data.Code != 1) {
that.limits = true
this.$refs.uToast.show({
title: '当前课程暂无法购买!',
type: 'warning'
});
} else {
that.limits = false
this.submitOrderHandler2()
}
console.log('llll',that.limits)
}
);
},
// 报名限制
// 提交订单
submitOrderHandler2() {
let that =this
// 报名限制
if (!this.submitOrder && !that.limits) {
this.submitOrder = true; this.submitOrder = true;
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: this.ds.template_message_list, tmplIds: this.ds.template_message_list,
complete(res) { complete(res) {
console.log('44444444444444444')
that.submitOrder = false; that.submitOrder = false;
let form = {}; let form = {};
// form.Consignee = that.adressInfo.Consignee; // form.Consignee = that.adressInfo.Consignee;
...@@ -558,12 +574,13 @@ ...@@ -558,12 +574,13 @@
form.CouponMoney = that.couponPrice; form.CouponMoney = that.couponPrice;
form.FreightMoney = that.expressPrice; form.FreightMoney = that.expressPrice;
form.Income = that.ds.total_price; form.Income = that.ds.total_price;
form.IsFormShoppingCart = that.IsFormShoppingCart; form.IsFormShoppingCart = that.IsFormShoppingCart;
form.Use_Integral = that.formdata.Use_Integral; form.Use_Integral = that.formdata.Use_Integral;
form.ShoppingCartIdList = that.ShoppingCartIdList; form.ShoppingCartIdList = that.ShoppingCartIdList;
form.JJSWStuId = that.JJSWStuId; form.JJSWStuId = that.JJSWStuId;
form.AnchorName = uni.getStorageSync("AnchorName") ? uni.getStorageSync("AnchorName") form.AnchorName = uni.getStorageSync("AnchorName") ? uni.getStorageSync(
"AnchorName")
.AnchorName : ''; //直播名称 .AnchorName : ''; //直播名称
if (that.mchs && that.mchs.length > 0) { if (that.mchs && that.mchs.length > 0) {
that.deduction_commission = that.mchs[0].deduction_commission; that.deduction_commission = that.mchs[0].deduction_commission;
...@@ -574,21 +591,22 @@ ...@@ -574,21 +591,22 @@
data: form data: form
}, },
res => { res => {
console.log('7777777777')
if (res.resultCode == 1) { if (res.resultCode == 1) {
that.payInfo.OrderId = res.data.OrderId; that.payInfo.OrderId = res.data.OrderId;
that.payInfo.total_price = that.ds.total_price; that.payInfo.total_price = that.ds.total_price;
if(res.data.OrderStatus==5){ if (res.data.OrderStatus == 5) {
let info = { let info = {
OrderId:that.payInfo.OrderId, OrderId: that.payInfo.OrderId,
total_price: that.ds.total_price, total_price: that.ds.total_price,
StuId:that.JJSWStuId, StuId: that.JJSWStuId,
TeacherIds:that.mrk, TeacherIds: that.mrk,
} }
uni.reLaunch({ uni.reLaunch({
url: '/pages/order-submit/pay-success2?payInfo=' + url: '/pages/order-submit/pay-success2?payInfo=' +
JSON.stringify(info) JSON.stringify(info)
}) })
}else { } else {
if (that.checked == true) { if (that.checked == true) {
that.zhaoren = true; that.zhaoren = true;
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
...@@ -597,30 +615,33 @@ ...@@ -597,30 +615,33 @@
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0; let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if (SmallShopId == 0) { if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id //如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0; SmallShopId = u.UserSmallShopId ? u.UserSmallShopId :
0;
} }
that.path = '/pages/index/index?OrderId=' + res.data.OrderId + that.path = '/pages/index/index?OrderId=' + res.data
.OrderId +
"&user_id=" + uid + "&Up=" + Up + "&user_id=" + uid + "&Up=" + Up +
"&SmallShopId=" + SmallShopId + '&JumpType=4'; "&SmallShopId=" + SmallShopId + '&JumpType=4';
} else { } else {
if (that.formdata.Use_Deposit_Id != 0 && that.ds.total_price == if (that.formdata.Use_Deposit_Id != 0 && that.ds
.total_price ==
0) { //如果使用了储蓄卡 就直接支付成功 跳入支付结果 0) { //如果使用了储蓄卡 就直接支付成功 跳入支付结果
uni.reLaunch({ uni.reLaunch({
url: '/pages/order-submit/pay-success?payInfo=' + url: '/pages/order-submit/pay-success?payInfo=' +
JSON.stringify(that.payInfo) JSON.stringify(that.payInfo)
}) })
} else { //没使用的话 就弹出支付页面 } else { //没使用的话 就弹出支付页面
if(that.IsQZJC==1) { if (that.IsQZJC == 1) {
that.AlipayMask =true that.AlipayMask = true
} else { } else {
that.payBtn = true; that.payBtn = true;
} }
} }
} }
} }
} else { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: res.data.message, title: res.data.message,
...@@ -633,6 +654,30 @@ ...@@ -633,6 +654,30 @@
} }
}); });
} }
},
submitOrderHandler() {
let that = this;
if (that.JJSWStuId == '' || that.Thename == '') {
this.$refs.uToast.show({
title: '请添加学员!',
type: 'warning'
});
return;
}
that.Registration()
// that.adressInfo.Consignee = '测试'
// that.adressInfo.ShoppingAddress = '四川成都龙泉驿1'
// that.JJSWStuId = '10724';
// that.Thename="HK";
// if (that.adressInfo.Consignee == '') {
// this.$refs.uToast.show({
// title: '请选择收货信息!',
// type: 'warning'
// });
// return;
// }
}, },
closeCouponHandler(e) { closeCouponHandler(e) {
if (e != -1) { if (e != -1) {
...@@ -754,7 +799,8 @@ ...@@ -754,7 +799,8 @@
}); });
}, },
init() { init() {
let list =[] let list = []
let list2 = []
this.loading = true; this.loading = true;
this.request2({ this.request2({
url: '/api/AppletOrder/GetAppletGoodsSettlementInfoForZY', url: '/api/AppletOrder/GetAppletGoodsSettlementInfoForZY',
...@@ -769,10 +815,12 @@ ...@@ -769,10 +815,12 @@
this.mchs.forEach(x => { this.mchs.forEach(x => {
x.goods_list.forEach(j => { x.goods_list.forEach(j => {
j.marketingLogo = JSON.parse(j.marketingLogo) j.marketingLogo = JSON.parse(j.marketingLogo)
list.push(j.EduTeacherId) list.push(j.EduTeacherId)
list2.push(j.EduData.ClassId)
}) })
}) })
this.mrk = list.toString() this.mrk = list.toString()
this.mrk2 = list2.toString()
this.payInfo.GoodsName = this.mchs[0].goods_list[0].name.slice(0, 10); this.payInfo.GoodsName = this.mchs[0].goods_list[0].name.slice(0, 10);
this.formdata.DeliveryMethod = this.mchs[0].delivery.send_type; this.formdata.DeliveryMethod = this.mchs[0].delivery.send_type;
this.ds = res.data; this.ds = res.data;
...@@ -868,16 +916,16 @@ ...@@ -868,16 +916,16 @@
</script> </script>
<style> <style>
.add-info2 {
.add-info2{
width: 1px; width: 1px;
flex: 1; flex: 1;
min-height: 60px; min-height: 60px;
display: block; display: block;
padding: 10px 0; padding: 10px 0;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.determine-box { .determine-box {
margin: auto; margin: auto;
height: 80rpx; height: 80rpx;
......
...@@ -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