Commit de5ec49e authored by Mac's avatar Mac

甲鹤活动列表和详情

parent c50c1b6d
......@@ -71,7 +71,7 @@
wx.getUserProfile({
desc: '用于完善资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: info => {
console.log(info.userInfo)
console.log(info)
this.msg = {
Id: 0,
AliasName: info.userInfo.nickName,
......
......@@ -443,6 +443,12 @@
"path": "personal/payment-order"//课程代付
},{
"path":"investigation"
},{
"path":"Jiaheactivity"//甲鹤活动
},{
"path":"JIaheactivitydetails"//活动详情
},{
"path":"jieheactivityBM"//甲鹤活动报名
}]
},
//线下服务
......
......@@ -18,7 +18,7 @@
<u-icon name="arrow-left" size="44"></u-icon>
</view>
</view>
<!-- <view @click='yj' style="width: 200px;height: 50px;">活动</view> -->
<view @click='yj' style="width: 200px;height: 50px;">活动</view>
<u-tabs v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1" name="name" :list="myPageData.home_pages.navs"
:is-scroll="true" :active-color="mainColor" :current="active" :bar-width="80" :font-size="32" :bold="false" @change="changeHandler"></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
......@@ -1220,7 +1220,7 @@
yj(){
uni.navigateTo({
url: '/pages/blindDate/personal/peoplescreen'
url: '/pages/school/Jiaheactivity'
})
}
......
<style lang="scss" scoped>
.Jiaheactivitydetails{
width: 100%;
height: 100vh;
background: #FFF;
font-family: aa;
.box{
width: 100%;
position: relative;
}
.details-box-top-z{
width: 100%;
height: 3px;
}
.details-box-top-f{
width: 100%;
height: 3px;
background: #40766E;
}
.details-box-t-positions{
height: 40rpx;
font-size: 20rpx;
color: #FFF;
background: #B7A264;
display: flex;
align-items: center;
padding: 0 26rpx;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
position: absolute;
right: 0;
top: 0;
}
.details-b-center{
width: 100%;
display: flex;
margin-top: 40rpx;
}
.details-b-center-l{
width: 120rpx;
height: 120rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.details-b-center-r{
width: 1px;
flex:1;
padding: 0 15px;
}
.details-b-title{
width: 100%;
font-size: 28rpx;
color: #111111;
font-weight: bold;
font-family: PingFang SC;
}
.details-b-time{
font-size: 22rpx;
color: #999999;
margin-top: 18rpx;
}
.addressStyle{
width: 690rpx;
height: 45px;
background: #FFFFFF;
box-shadow: 0px 3px 6px 0px rgba(139, 115, 64, 0.16);
border-radius: 6px;
font-size: 12px;
color: #999999;
display: flex;
padding: 0 15px;
align-items: center;
margin-top: 20px;
margin-left: 30rpx;
}
.addressStyle-r{
width: 1px;
flex:1;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.positionb{
width: 100%;
height: 120rpx;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
background: #FFF;
}
.btnc{
width: 220rpx;
height: 80rpx;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #FFFFFF;
background: #CCCCCC;
}
}
</style>
<template>
<view class="Jiaheactivitydetails">
<view style="width: 100%;height: 450rpx;">
<image :src="detial.CoverImg" style="width: 100%;height: 100%;"></image>
</view>
<view class="box">
<view class="details-box-top-z" v-if="(detial.TotalMan- detial.JoinNum)>0" :style="{background:mainColor}"></view>
<view class="details-box-top-f" v-if="(detial.TotalMan- detial.JoinNum)==0" ></view>
<view class="details-box-t-positions" v-if="(detial.TotalMan- detial.JoinNum)>0" :style="{background:mainColor}">
<text>{{(detial.TotalMan- detial.JoinNum)>=6?'可预约':(detial.TotalMan- detial.JoinNum)<6?'剩余'+(detial.TotalMan- detial.JoinNum)+'个空位':''}}</text>
</view>
<view class="details-box-t-positions" v-if="(detial.TotalMan- detial.JoinNum)==0" :style="{background:'#40766E'}">
爆满
</view>
<view class="details-b-center">
<view class="details-b-center-l">
<view style="font-size: 28rpx;color: #999999;font-weight: 500;font-family: PingFang SC;">
{{detial.MonthStr}}
</view>
<view style="font-size: 50rpx;color: #1B1D1E;font-weight: 800;font-family: PingFang SC;">
{{detial.DayStr}}
</view>
<view style="font-size: 28rpx;color: #999999;font-weight: 500;font-family: PingFang SC;">
{{detial.WeekStr}}
</view>
</view>
<view style="width: 1px;background: #E2E2E2;height: 86px;"></view>
<view class="details-b-center-r">
<view class="details-b-title">
{{detial.ActivityName}}
</view>
<view class="details-b-time">
报名时间:{{detial.BMStart}}-{{detial.BMEnd}}
</view>
<view class="details-b-time">
活动时间:{{detial.HDStart}}-{{detial.HDEnd}}
</view>
<view class="details-b-time" >
<text v-if="detial.Distinguish==1">报名人数:{{detial.TotalMan}}</text>
<text v-if="detial.Distinguish==0">报名人数:男性{{detial.ManNum}}<text style="margin-left: 10px;">男性{{detial.WoManNum}}</text> </text>
</view>
<view class="details-b-time" v-if="detial.AgeLimit==0">
<text >年龄范围:{{detial.StartAge}}岁 ~ {{detial.EndAge}}</text>
</view>
</view>
</view>
<view class="addressStyle" @click="goopenlocation(detial)">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/jiaheaddress.png" style="width: 12px;height: 15px;margin-right: 15px;"></image>
<view class="addressStyle-r">
{{detial.LocationName}}
</view>
</view>
<view style="width: 100%;padding: 15px;margin-bottom: 120rpx;">
<view class="acdetail_Intro" v-html="richtext"></view>
</view>
<view class="positionb">
<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>
<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>
<view v-if="detial.IsFree==2 && detial.Price==0" style="display: flex;align-items: flex-end;" >
<text>{{detial.PointNum}}</text>
<text style="font-size: 22rpx;"></text>
</view>
</view>
<view v-if="detial.IsJoinActivity==0">
<view class="btnc" v-if="detial.IsSignUp==1" :style="{background:mainColor}" @click="gosignUp()">立即预约</view>
<view class="btnc" v-if="detial.IsSignUp==0">不可预约</view>
</view>
<view v-if="detial.IsJoinActivity==1">
<view class="btnc" v-if="detial.IsSignUp==1">已报名</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
pageTitle: "活动详情",
mainColor:'',
pricecolor:'',
Id:0,
detial:{},
richtext:""
}
},
onLoad(options) {
if(options && options.Id){
this.Id = options.Id
}
this.GetActivityDetial()
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.pricecolor = this.$uiConfig.pricecolor;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods:{
GetActivityDetial(){
this.request2({
url: '/api/AppletEducation/GetActivityDetial',
data: {Id:this.Id}
},
res => {
this.detial = res.data;
let tempRichtext=""
tempRichtext = this.detial.ActivityInfo.replace(/<img[^>]*>/gi, function(match, capture) {
var match = match.replace(/style=\"(.*)\"/gi,
'style="width:100% !important"');
return match;
});
this.richtext=tempRichtext
}
);
},
goopenlocation(x){
uni.openLocation({
address:x.LocationName,
latitude: Number(x.LonLat.split(',')[0]) ,
longitude: Number(x.LonLat.split(',')[1]),
success: function () {
console.log('success');
},
fail:function(err){
console.log(err)
}
});
},
gosignUp(){
let dataList = encodeURIComponent(JSON.stringify(this.detial))
uni.navigateTo({
url: '/pages/school/jieheactivityBM?details=' + dataList
})
}
}
}
</script>
This diff is collapsed.
This diff is collapsed.
<style>
.stickSignUp {
width: 100%;
height: 100vh;
background: #FFF;
}
.stickSignUp .box{
padding: 15px;
border-bottom: 1px solid #E2E2E2;
}
.stickSignUp .box-top{
width: 100%;
height: 67px;
display: flex;
align-items: center;
}
.stickSignUp .box-title{
width: calc(100vw - 30px - 110px - 10px);
height: 67px;
font-size: 15px;
color: #000000;font-weight: 500;
line-height: 22px;
margin-left: 10px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.stickSignUp .box-c{
padding: 15px;
}
.stickSignUp .box-c-i{
width: 100%;
height: 52px;
display:flex;
align-items: center;
border-bottom: 1px solid #E2E2E2;
}
.stickSignUp .box-c-i input{
font-size: 12px;
width: calc(100vw - 30px - 70px);
}
.stickSignUp .box-c-l{
width: 70px;
font-size: 12px;
color: #666666;
}
.btn{
width: 100%;
height: 45px;
border-radius: 22px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: #FFFFFF;
margin: 30px 0;
}
</style>
<template>
<view class="stickSignUp" >
<view class="box">
<view class="box-top">
<image :src="details.CoverImg" mode="aspectFill" style="width: 110px;height: 67px;border-radius: 8px;"></image>
<view class="box-title">{{details.ActivityName}}</view>
</view>
</view>
<view class="box-c">
<view style="font-size: 16px;color: #111111;">请填写报名资料</view>
<view class="box-c-i">
<view class="box-c-l">姓名</view>
<input type="text" v-model="addMsg.LinkMan" placeholder="请填写姓名">
</view>
<view class="box-c-i">
<view class="box-c-l">联系电话</view>
<input type="number" v-model="addMsg.LinkTel" placeholder="请填写联系电话">
</view>
<view class="box-c-i">
<view class="box-c-l">报名人数</view>
<u-number-box v-model="addMsg.PeopleNum" :min='1' :disabled='true' @change="valChange"></u-number-box>
</view>
<view class="box-c-i">
<view class="box-c-l">备注</view>
<input type="text" v-model="addMsg.Remark" placeholder="请填写备注内容">
</view>
<view class="box-c-i">
<view class="box-c-l">支付方式</view>
<u-radio-group v-model="addMsg.PaymentWay" >
<u-radio
shape="circle"
:active-color='mainColor'
@change="radioChange"
v-for="(item, index) in list" :key="index"
:name="item.Id"
>
{{item.name}}
</u-radio>
</u-radio-group>
</view>
<view class="box-c-i" v-if="details.IsFree==2" style="justify-content: flex-end;border-bottom: none;height: 35px;margin-top: 10px;">
<view><text class="box-c-l">{{addMsg.PaymentWay==1?'现金单价:':'点数单价:'}} </text>{{addMsg.UnitPrice}}{{addMsg.PaymentWay==1?'元':'点'}}</view>
</view>
<view class="box-c-i" v-if="details.IsFree==2" style="justify-content: flex-end;border-bottom: none;height: 35px;">
<view><text class="box-c-l">{{addMsg.PaymentWay==1?'现金总价:':'点数总价:'}}</text>{{addMsg.Money}}{{addMsg.PaymentWay==1?'元':'点'}}</view>
</view>
<view class="box-c-i" v-if="details.IsFree==1" style="justify-content: flex-end;border-bottom: none;height: 35px;">
<view class="box-c-l" style="text-align: right;">免费</view>
</view>
<view class="btn" @click="signup" :style="{background:mainColor}">
报名
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
pageTitle: "报名订单",
mainColor:'',
details:{},
addMsg:{
ActivityId:0,
LinkMan:'',
LinkTel:'',
Remark:'',
PeopleNum:1,
UnitPrice:0,
Money:0,
PaymentWay:1,
PayWay:1,
UnitPoint:0,
TotalPoint:0,
},
list: [{name: '在线支付',Id: 1},{name: '点数支付',Id: 6}],
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad: function (option) {
this.details = JSON.parse(decodeURIComponent(option.details))
this.addMsg.ActivityId = this.details.Id
if(this.details.IsFree==1){
this.addMsg.PaymentWay = 6;
}else{
this.addMsg.UnitPrice = this.details.Price;
this.addMsg.UnitPoint = this.details.PointNum;
this.addMsg.Money = this.addMsg.UnitPrice * this.addMsg.PeopleNum;
this.addMsg.TotalPoint = this.addMsg.UnitPoint * this.addMsg.PeopleNum;
}
},
methods: {
valChange(e){
this.addMsg.PeopleNum = e.value
this.addMsg.Money = this.addMsg.UnitPrice * this.addMsg.PeopleNum;
},
radioChange(){
// console.log(this.addMsg.PaymentWay)
},
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: '请填写姓名',
icon: 'none',
})
return
}
if(this.addMsg.LinkTel == ''){
uni.showToast({
title: '请填写联系电话',
icon: 'none',
})
return
}
uni.showLoading({
title: '报名中'
});
this.request2({
url: '/api/WeChatPay/SetActivityEnrollInfo',
data: this.addMsg
},
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); // 执行前一个页面的方法
}
});
},1000)
}
},
error=>{
console.log('进入错误')
uni.hideLoading()
}
);
}
},
};
</script>
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