Commit bc5391eb authored by Mac's avatar Mac

1

parent de5ec49e
......@@ -449,6 +449,8 @@
"path":"JIaheactivitydetails"//活动详情
},{
"path":"jieheactivityBM"//甲鹤活动报名
},{
"path":"personal/JhphoneRz"//电话认证
}]
},
//线下服务
......
......@@ -169,17 +169,22 @@
<view :style="{color:pricecolor,'font-size':'40rpx'}">
<text v-if="detial.IsFree==1">免费</text>
<view v-if="detial.IsFree==2 && (detial.Price>0 || detial.PointNum>0)" style="display: flex;align-items: flex-end;" >
<text v-if="detial.Price>0" style="font-size: 22rpx;"></text>
<text v-if="detial.Price>0">{{detial.Price}}</text>
<view v-if="detial.IsFree==2 && (detial.Price>0 || detial.PointNum>0)" style="display: flex;align-items: center;" >
<view style="display: flex;align-items: flex-end;">
<text v-if="detial.Price>0" style="font-size: 22rpx;margin-bottom: 6rpx;"></text>
<text v-if="detial.Price>0">{{detial.Price}}</text>
</view>
<text v-if="detial.Price>0 && detial.PointNum>0" style="font-size: 12px;margin: 0 5px;"></text>
<text v-if="detial.PointNum>0">{{detial.PointNum}}</text>
<text v-if="detial.PointNum>0" style="font-size: 22rpx;"></text>
<view style="display: flex;align-items: flex-end;">
<text v-if="detial.PointNum>0">{{detial.PointNum}}</text>
<text v-if="detial.PointNum>0" style="font-size: 22rpx;margin-bottom: 6rpx;"></text>
</view>
</view>
<view v-if="detial.IsFree==2 && detial.Price==0" style="display: flex;align-items: flex-end;" >
<!-- <view v-if="detial.IsFree==2 && detial.Price==0 && detial.PointNum>0" style="display: flex;align-items: flex-end;" >
<text>{{detial.PointNum}}</text>
<text style="font-size: 22rpx;"></text>
</view>
</view> -->
</view>
<view v-if="detial.IsJoinActivity==0">
<view class="btnc" v-if="detial.IsSignUp==1" :style="{background:mainColor}" @click="gosignUp()">立即预约</view>
......
......@@ -373,6 +373,9 @@
},
getorder(){//报名成功处理
this.current = 2;//让他直接跳入我报名
if (Object.keys(this.$refs).length > 0 && this.$refs.children) { //判断
this.$refs.children.getfzuj()
}
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
......
<template>
<view class="mysignupList" >
<u-tabs
:show-bar= 'false'
:list="list"
:is-scroll="false"
:current="current"
......@@ -199,7 +200,9 @@ export default {
this.init();
},
getfzuj(){
this.current = 0
this.current = 0;
this.msg.pageIndex = 1;
this.g = [];
this.init();
},
init() {
......@@ -218,7 +221,10 @@ export default {
this.status = "nomore";
}
}
}
},
error=>{
this.loading = false;
}
);
},
lower(e) {
......
......@@ -145,6 +145,7 @@ export default {
TotalPoint:0,
},
list: [{name: '在线支付',Id: 1},{name: '点数支付',Id: 6}],
orderInfo:{},
};
},
created() {
......@@ -185,12 +186,7 @@ export default {
signup(){
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 3]; // 前2个页面
uni.navigateBack({
delta: 2,
success: function() {
beforePage.$vm.getorder(); // 执行前一个页面的方法
}
});
if(this.addMsg.LinkMan == ''){
uni.showToast({
title: '请填写姓名',
......@@ -208,7 +204,14 @@ export default {
uni.showLoading({
title: '报名中'
});
if(this.addMsg.PaymentWay==6){
this.addMsg.UnitPrice = 0;
this.addMsg.Money = 0;
}
if(this.addMsg.PaymentWay==1){
this.addMsg.UnitPoint = 0;
this.addMsg.TotalPoint = 0;
}
this.request2({
url: '/api/WeChatPay/SetActivityEnrollInfo',
data: this.addMsg
......@@ -216,22 +219,19 @@ export default {
res => {
uni.hideLoading()
if (res.resultCode == 1) {
uni.showToast({
title:'报名成功',
icon: 'none',
duration: 2000
});
setTimeout(()=>{
uni.navigateBack({
delta: 2,
success: function() {
beforePage.$vm.getSmallShopsGoodsPricePageList(2); // 执行前一个页面的方法
}
if(this.addMsg.PaymentWay==6){
uni.showToast({
title:'报名成功',
icon: 'none',
duration: 2000
});
this.getbackurl()//返回列表
}else{
},1000)
this.orderInfo = JSON.parse(res.data);
console.log(this.orderInfo)
this.Pay()
}
}
},
error=>{
......@@ -239,6 +239,44 @@ export default {
uni.hideLoading()
}
);
},
Pay(){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
this.getbackurl()
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
}
});
},
getbackurl(){
setTimeout(()=>{
uni.navigateBack({
delta: 2,
success: function() {
beforePage.$vm.getorder(); // 执行前一个页面的方法
}
});
},1000)
}
......
<style lang="scss" scoped>
.JhphoneRz {
width: 100%;
// height: 100vh;
background: #FFF;
.box{
width: 100%;
padding: 0 15px;
}
.box-item{
width: 100%;
margin-top: 40rpx;
}
.box-item-top{
display: flex;
align-items: center;
font-size: 24rpx;
color: #111111;
}
.imgstb{
width: 11px;
height: 15px;
margin-right: 5px;
}
.box-item-b{
width:100%;
height:55px;
border-bottom:1px solid #E2E2E2;
display: flex;
align-items: center;
justify-content: space-between;
input{
margin-left: 15px;
}
}
.yanbtn{
width: 170rpx;
height: 60rpx;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #E2E2E2;
font-size: 24rpx;
color: #40766E;
}
.tijiao{
width: 100%;
height: 40px;
background: #40766E;
border-radius: 4px;
margin-top: 100px;
font-size: 14px;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
<template>
<div class='JhphoneRz'>
<view class="box">
<view style="font-size: 40rpx;color: #111111;margin-top: 40rpx;">请完成手机绑定验证</view>
<view style="font-size: 24rpx;color: #999999;margin-top: 20rpx;">请完成手机绑定验证</view>
<view class="box-item" style="margin-top: 70rpx;">
<view class="box-item-top">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Jhdianhua.png" class="imgstb"></image>
<text>手机</text>
</view>
<view class="box-item-b">
<input type="number" v-model="addMsg.StuTel" placeholder="请输入你的手机号">
</view>
</view>
<view class="box-item">
<view class="box-item-top">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Jhyanzm.png" class="imgstb"></image>
<text>验证码</text>
</view>
<view class="box-item-b" >
<input type="number" v-model="addMsg.Sendcode" placeholder="请输入你收到的验证码">
<view class="yanbtn" @click="getCode">{{show == true?btntext:daojis}}</view>
</view>
</view>
<view class="tijiao" @click="tj()">
提交绑定
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</div>
</template>
<script>
import auth from "@/components/auth/index.vue";
export default {
components: {
auth
},
data() {
return {
showAuth:false,
u:{},
mainColor: '',
addMsg:{
StuTel:'',
Sendcode:'',
},
btntext:'获取验证码',
show: true,
count: '',
timer: null,
daojis:'60s'
};
},
onLoad(options) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let pageTitle = '学员认证'
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ?
wx.getStorageSync("basedata").bar_title : [];
pages.forEach((x) => {
if (x.value == u) {
pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: pageTitle,
});
},
methods: {
getCode(){
const TIME_COUNT = 60;
if(this.addMsg.StuTel==''){
uni.showToast({
title:'请输入手机号码',
icon:'none'
})
return
}
if(this.show==true){
if (!this.timer) {
this.getcodedata()//获取验证码
this.count = TIME_COUNT;
this.show = false;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--;
this.daojis = this.count+'s'
} else {
this.show = true;
clearInterval(this.timer);
this.timer = null;
this.btntext = '重新获取'
this.daojis = '60s'
}
}, 1000)
}
}else{
console.log('不能操作')
}
},
getcodedata(){
this.request2({
url: '/api/AppletEducation/SendCodeByStudentInfo',
data: {StuTel:this.addMsg.StuTel}
},
res => {
if (res.resultCode == 1) {
uni.showToast({
title:'短信已发送,注意查收!',
icon:'none'
})
}
},
error=>{
this.show = true;
clearInterval(this.timer);
this.timer = null;
this.btntext = '重新获取'
this.daojis = '60s'
}
);
},
tj(){
if(this.addMsg.StuTel==''){
uni.showToast({
title:'请输入手机号码',
icon:'none'
})
return
}
if(this.addMsg.Sendcode==''){
uni.showToast({
title:'请输入验证码',
icon:'none'
})
return
}
uni.showLoading({
title: '认证中'
});
this.request2({
url: '/api/AppletEducation/CheckSendCode',
data: this.addMsg
},
res => {
uni.hideLoading()
if (res.resultCode == 1) {
}
},
error=>{
uni.hideLoading()
}
);
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
},
//关闭登录窗口
gbAuth(){
uni.navigateBack()
},
}
};
</script>
<style>
</style>
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