12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <template>
- <view class="">
- <view class="image" v-for="(item,index) in wonderful_list" :key='index'>
- <image :src="item.path" mode="aspectFill"></image>
- </view>
- <view class="empty" v-if="wonderful_list.length==0">
- <u-empty text="暂无精彩瞬间" mode="data"></u-empty>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- action: '',
- imageDate: {
- file_type: 'img',
- type: 'activity_scenes'
- }, //上传图片携带参数
- fileList: [],
- wonderful_list: [], //精彩瞬间列表
- activity_id: '', //活动id
- }
- },
- onLoad(options) {
- let id = options.id
- this.activity_id = id
- this.getWonderful(id)
-
- },
- methods: {
-
- //获取精彩瞬间
- getWonderful(id) {
- this.$u.get('/page/activities-scenes/' + id).then(res => {
- let data = res.data.data
- this.wonderful_list = data
- })
- },
- //添加精彩瞬间
- add() {
- if (this.vuex_user.role == 1 || (this.vuex_user.role == 2 && this.vuex_user.organization_id == this.content.organization.id)) {
- uni.navigateTo({
- url: './wonderful?activity_id=' + this.activity_id
- })
- } else {
- uni.showToast({
- icon: 'none',
- title: '暂无当前权限哦!'
- })
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- // padding: 0 15px;
- }
- .empty {
- margin-top: 45%;
- }
- .image {
- // height: 300px;
- padding: 0 15px;
- text-align: center;
- image {
- margin-top: 5px;
- display: inline-block;
- height: 200px;
- width: 100%;
- margin: 0 auto;
- }
- }
- .buttom {
- position: fixed;
- bottom: 50px;
- right: 30px;
- z-index: 6666;
- background-color: #79573D;
- color: #FFFFFF;
- height: 50px;
- width: 50px;
- line-height: 45px;
- font-weight: 50;
- border-radius: 50%;
- text-align: center;
- font-size: 40px;
- }
- </style>
|