Blame view

lvdao-miniapp/pages/activityDetail/activityDetail.vue 2.48 KB
e5b57447   杨鑫   '分包问卷'
1
2
3
4
5
6
7
  <template>
    <view class="page">
  	<view class="page-info">
  	  	<view class="banner">
  	  		<view class="title">{{tableData.activityName}}</view>
  			<view class="banner-info-top">
  				<view>{{tableData.startTime}}</view>
844aa73a   杨鑫   '最新'
8
  				<view><u-icon name="eye"></u-icon>{{tableData.viewsNumber}}人</view>
e5b57447   杨鑫   '分包问卷'
9
10
11
12
13
  			</view>
  	  		<view class="banner-info-item">
  	  			<text>
  					{{tableData.content}}
  				</text>
b1fef010   杨鑫   '最新代码'
14
  				<!-- <image :src="tableData.coverImage" style="width: 100%; height: 100vw; border-radius: 10rpx; margin-top: 30rpx;"></image> -->
f692f3a5   wesley88   1
15
  				<u-image  width="100%" :src="imgurl+tableData.coverImage" border-radius="10" mode="widthFix" style="margin-top:8px;margin-right:8px;" ></u-image>
e5b57447   杨鑫   '分包问卷'
16
17
18
19
20
21
22
23
24
  	  		</view>
  	  	</view>
  		<view class="info-box">
  			<view class="title">活动信息</view>
  			<view class="info-item">举办区域:{{tableData.region}}</view>
  			<view class="info-item">起止时间:{{tableData.startTime}} 至 {{tableData.endTime}}</view>
  			<view class="info-item">活动类型:{{tableData.activityType}}</view>
  		</view>
  	</view>
e5b57447   杨鑫   '分包问卷'
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    </view>
  </template>
  
  <script>
  
  export default {
    data() {
      return {
  		tableData:{},
  		swiperList: [
  			{
  				id: 0,
  				type: 'image',
  				url: this.$imgUrl('/img/1.jpg')
  			}
  		],
  		joinShow: false,
  		form: {
  			name: '',
  			pahone: '',
  		},
  		pagesize: {
e5b57447   杨鑫   '分包问卷'
47
  			id:'',
f692f3a5   wesley88   1
48
49
  		},
  		imgurl:''
e5b57447   杨鑫   '分包问卷'
50
51
52
      };
    },
    onLoad(option){
f692f3a5   wesley88   1
53
  	    this.imgurl = this.$img
e5b57447   杨鑫   '分包问卷'
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  	  		let str = unescape(option.scene);
  	  
  	  if(option.scene){
  	  		let str = unescape(option.scene)
  	  		// 使用 split() 方法按等号分割字符串,并获取第二个元素(索引为1),即带单引号的值
  	  		let valueWithQuotes = str.split('=')[1];
  	  		
  	  		// 使用 slice() 或 substring() 去除两端的单引号
  	  		let value = valueWithQuotes.slice(1, -1); 
  	  		this.pagesize.id = value
  	  	  console.log('olo',value)
  	  }else{
  	  	this.pagesize.id = option.item
  	  	
  	  }
844aa73a   杨鑫   '最新'
69
  	  
e5b57447   杨鑫   '分包问卷'
70
71
  	  	this.$http.sendRequest('/cereActivityApplication/queryById', 'POST',this.pagesize,1).then(res => {
  	  		this.tableData =res.data.data
844aa73a   杨鑫   '最新'
72
73
74
75
76
77
78
  			let obj ={
  				id:option.item,
  				viewsNumber:Number(this.tableData.viewsNumber)+1
  			}
  			this.$http.sendRequest('/cereActivityApplication/edit', 'POST',obj,1).then(res => {
  				
  			})
e5b57447   杨鑫   '分包问卷'
79
80
  	  	})
  	  
e5b57447   杨鑫   '分包问卷'
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  	
  	  
    },
    mounted() {
        
    },
    methods: {
  		submit() {
  			this.joinShow = false;
  			uni.switchTab({
  				url: '/pages/home/home'
  			})
  		},
  		leaseAdd(){
  			uni.navigateTo({
  				url: '/pages/leaseAdd/leaseAdd'
  			})
  		},
    }
  };
  </script>
  
  <style scoped lang="scss">
  @import 'activityDetail.scss';
  </style>