123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <template>
- <div class="registrationDetails">
- <div class="appFirstBox">
- <img :src="url" class="firstImg"/>
- <div class="appTitle">
- <span class="titleName">{{ form.activityName }}</span>
- <span class="titleType">{{ form.statusName }}</span>
- </div>
- <div @tap.stop="clickColl()" class="joinBox">
- <span class="joinName">{{ form.registrationNumbers }}人参加</span>
- <!-- <span class="shoucang"><img :src="isColl ? heartSel : heart" class="scImg" /> 收藏</span>-->
- <span class="shoucang"><img :src="form.collectorsStatus==='2' ? heartSel : heart" class="scImg"/> 收藏</span>
- </div>
- <div class="contactBox">
- <span class="contackLeft">
- <span style="color: #666666;font-size: 28rpx">联系电话:</span>
- <span style="color: #18172A;font-size: 36rpx;font-weight: 600">{{ form.activityPhone }}</span>
- </span>
- <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon">
- </div>
- </div>
- <div class="appSecondBox">
- <div class="secondBoxItem">
- <span class="secondBoxTitle">活动举办</span>
- <span class="secondBoxInfo">{{ form.activitiesNotice }}</span>
- </div>
- <div class="secondBoxItem">
- <span class="secondBoxTitle">活动内容</span>
- <span class="secondBoxInfo">{{ form.activityContent }}</span>
- </div>
- <div class="secondBoxItem">
- <span class="secondBoxTitle">活动时间</span>
- <span class="secondBoxInfo">{{ form.activityStartTime }} ~ {{ form.activityEndTime }}</span>
- </div>
- <div class="secondBoxItem">
- <span class="secondBoxTitle">活动地址</span>
- <span class="secondBoxInfo dhInfo">
- <span>{{ form.activityAddress }} - {{ form.activityAddressDetail }}</span>
- <img src="../parkActivity/image/dhIcon.png" class="dhIcon">
- </span>
- </div>
- <div class="secondBoxItem">
- <span class="secondBoxTitle">报名条件</span>
- <span class="secondBoxInfo">
- {{ form.registrationConditions }}
- </span>
- </div>
- <div class="secondBoxItem">
- <span class="secondBoxTitle">报名时间</span>
- <span class="secondBoxInfo">
- {{ form.registrationStartTime }} ~ {{ form.registrationEndTime }}
- </span>
- </div>
- <div class="secondBoxItem">
- <span class="secondBoxTitle">活动参与</span>
- <span class="secondBoxInfo">
- {{ form.activityQuota }}
- </span>
- </div>
- </div>
- <button class="bmBtn" @tap="toApplication">已报名</button>
- </div>
- </template>
- <script>
- import {getHomeCommunityActivityById, getByCodes, isRegistration, getUserLocalStorageInfo, homeActivityClickCollect} from "../../../js_sdk/http";
- export default {
- name: "activeApplication",
- created() {
- this.getByCodes()
- },
- onLoad(options) {
- this.activityId = options.activityId
- this.url = options.url
- this.getById()
- },
- data(){
- return{
- dc_key: ['activity_stat'],
- heartSel: "https://www.idea-co-sf.com/gardenProduct/image/heartSel.png",
- heart: "https://www.idea-co-sf.com/gardenProduct/image/heart.png",
- isColl: true,
- form: {},
- dic_SelectList: [],
- statusList: [],
- activityId: '',
- registrationFlag: false,
- url:''
- }
- },
- methods: {
- getById(){
- const data = {
- id : this.activityId,
- createdBy: getUserLocalStorageInfo().userId,
- }
- getHomeCommunityActivityById(data).then(res => {
- if (res.errno === 0) {
- this.form = res.data
- this.statusList.forEach(item => {
- if (this.form.status == item.value) {
- this.form.statusName = item.label
- }
- })
- const data = {
- activityId: this.activityId,
- companyId: getUserLocalStorageInfo().userId
- }
- isRegistration(data).then(res => {
- if (res.errno === 0) {
- this.registrationFlag = res.data
- }
- })
- }
- })
- },
- async getByCodes() {
- let data = await getByCodes(JSON.stringify(this.dc_key));
- this.dic_SelectList = this.$common.handleDicList(data);
- this.statusList = this.dic_SelectList.activity_stat
- console.log('this.statusList', this.statusList)
- },
- clickColl() {
- if (this.form.collectorsStatus==='2'){
- this.form.collectorsStatus='1'
- }else{
- this.form.collectorsStatus='2'
- }
- homeActivityClickCollect({
- id: this.activityId,
- createdBy: getUserLocalStorageInfo().userId,
- collectorsStatus: this.form.collectorsStatus
- }).then(res => {
- });
- },
- toApplication() {
- // uni.navigateTo({
- // url: '/pages/subPackages/parkActivity/applicationInfo?activityId=' + this.form.id + "®istrationFlag=" + this.registrationFlag
- // })
- }
- }
- }
- </script>
- <style lang="scss">
- .registrationDetails{
- padding-bottom: 120rpx;
- .appFirstBox{
- margin: 24rpx 0;
- padding: 24rpx 32rpx;
- background: white;
- display: flex;
- flex-direction: column;
- .firstImg{
- width: 686rpx;
- height: 300rpx;
- }
- .appTitle{
- display: flex;
- align-items: center;
- margin: 24rpx 0;
- .titleName{
- font-size: 32rpx;
- color: rgba(24, 23, 42, 1);
- }
- .titleType{
- background: rgba(3, 101, 249, 0.20);
- font-size: 28rpx;
- color: rgba(3, 101, 249, 1);
- width: 112rpx;
- height: 48rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 2px 2px 2px 2px;
- }
- }
- .joinBox{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-bottom: 24rpx;
- .joinName{
- font-size: 28rpx;
- color: rgba(136, 136, 136, 1);
- }
- .shoucang {
- display: flex;
- align-items: center;
- font-size: 28 rpx;
- color: rgba(24, 23, 42, 1);
- .scImg {
- width: 32rpx;
- height: 28rpx;
- margin-right: 8rpx;
- }
- }
- }
- .contactBox{
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding:24rpx 0;
- border-top: 1px solid #E6E6E6;
- .contackLeft{
- display: flex;
- align-items: center;
- }
- .phoneIcon{
- width: 64rpx;
- height: 64rpx;
- }
- }
- }
- .appSecondBox{
- padding: 32rpx;
- background: white;
- .secondBoxItem{
- display: flex;
- flex-direction: column;
- margin-bottom: 48rpx;
- .secondBoxTitle{
- color: #222222;
- font-size: 32rpx;
- font-weight: 600;
- margin-bottom: 16rpx;
- }
- .secondBoxInfo{
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
- }
- .dhInfo{
- display: flex;
- justify-content: space-between;
- .dhIcon{
- width: 36rpx;
- height: 36rpx;
- padding-left: 20rpx;
- border-left: 1px solid #E6E6E6;
- }
- }
- }
- }
- .bmBtn{
- width: 654rpx;
- height: 96rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: white;
- background: rgba(192, 192, 192, 1);
- border-radius: 8rpx;
- margin: 48rpx 48rpx 0rpx 48rpx;
- }
- }
- </style>
|