|
@@ -1,28 +1,27 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<u-navbar title="活动详情"></u-navbar>
|
|
<u-navbar title="活动详情"></u-navbar>
|
|
|
|
+
|
|
<view class="main" v-html="info.content">
|
|
<view class="main" v-html="info.content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="bottom2" v-if="!userInfo" >
|
|
|
|
-
|
|
|
|
- <u-button type="info" @click="issueMethod()">未登录</u-button>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom2" v-else-if="info.status=='eaab19ae-893f-40e7-b730-85a13af00137'" >
|
|
|
|
|
|
+ <view class="bottom" v-if="!userInfo" >
|
|
|
|
|
|
- <u-button type="info">活动未开始</u-button>
|
|
|
|
|
|
+ <u-button @click="issueMethod()">未登录</u-button>
|
|
</view>
|
|
</view>
|
|
- <view class="bottom2" v-else-if="info.status=='77d93870-e1e1-4369-b2b6-629e8645e8d9'" >
|
|
|
|
-
|
|
|
|
- <u-button type="info">活动已过期</u-button>
|
|
|
|
|
|
+
|
|
|
|
+ <view class="bottom" v-else-if="info.status=='77d93870-e1e1-4369-b2b6-629e8645e8d9'" >
|
|
|
|
+ <u-button >活动已结束</u-button>
|
|
</view>
|
|
</view>
|
|
- <view class="bottom" v-else @click="gotoUrl('pages/mine/issue?id='+info.id)" >
|
|
|
|
- <button>发布作品</button>
|
|
|
|
|
|
+ <view class="bottom" v-else >
|
|
|
|
+ <u-button type="primary" v-if="!info.isJoin"
|
|
|
|
+ @click="enrollMethod()" >线上报名</u-button>
|
|
|
|
+
|
|
|
|
+ <u-button v-else >已报名</u-button>
|
|
<!-- <u-button type="info">发布作品</u-button> -->
|
|
<!-- <u-button type="info">发布作品</u-button> -->
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -48,6 +47,41 @@
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ joinActivity(){
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ API.joinActivity(this.id).then((res) => {
|
|
|
|
+ //this.list=response.data.data
|
|
|
|
+ this.info.isJoin=true;
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:"报名成功!"
|
|
|
|
+ })
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ enrollMethod(){
|
|
|
|
+ var _this=this;
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title:_this.info.title,
|
|
|
|
+ content:"确认是否参与本活动报名?",
|
|
|
|
+ confirmText:"报名",
|
|
|
|
+ showCancel:true,
|
|
|
|
+ success: (res)=> {
|
|
|
|
+ if(res.confirm){
|
|
|
|
+ _this.joinActivity()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
issueMethod(){
|
|
issueMethod(){
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title:"提示",
|
|
title:"提示",
|
|
@@ -178,31 +212,7 @@
|
|
left: 0;
|
|
left: 0;
|
|
right: 0;
|
|
right: 0;
|
|
font-family: Arial;
|
|
font-family: Arial;
|
|
- uni-button{
|
|
|
|
- border-radius: 8px;
|
|
|
|
- background-color: rgba(31, 74, 153, 1);
|
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
|
- font-size: 16px;
|
|
|
|
- line-height: 40px;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- .bottom2{
|
|
|
|
- padding: 16rpx 32rpx;
|
|
|
|
- background-color: rgba(243, 244, 244, 1);
|
|
|
|
- position: fixed;
|
|
|
|
- bottom: 0;
|
|
|
|
- left: 0;
|
|
|
|
- right: 0;
|
|
|
|
- uni-button{
|
|
|
|
- border-radius: 8px;
|
|
|
|
- background-color: rgba(255, 255, 255, 1);
|
|
|
|
- color: #303133;
|
|
|
|
- font-size: 16px;
|
|
|
|
- line-height: 40px;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
</style>
|
|
</style>
|