web-base-h5/pages/makerspaceView/index.vue

146 lines
3.2 KiB
Vue

<!--
* @Descripttion:
* @version:
* @Author: 王三华
* @Date: 2023-05-18 14:42:53
-->
<template>
<view class="main">
<view class="content">
<view class="list-s"
@click="viewtap('/pages/superStudio/index')">
<view class="text">{{'超级工作室备案'}}</view>
<view class="images">
<image class="image1"
src="../../static/images/makerspaceicon1.png"></image>
</view>
</view>
<view class="list-s"
v-if="!existMakerSpace"
@click="viewtap('/pages/makerspace/index')">
<view class="text" v-if="userInfo.makerSpaceShow == 1||userInfo.makerSpaceShow ==undefined">{{'创客发起人认证'}}</view>
<view class="text" v-if="userInfo.makerSpaceShow == 2">{{'体验中心发起人认证'}}</view>
<view class="images">
<image class="image3"
src="../../static/images/makerspaceicon3.png"></image>
</view>
</view>
<view class="list-s"
@click="viewtap('/pages/makerspaceView/energySilo')">
<view class="text">{{'抗衰能量舱'}}</view>
<view class="images">
<image class="image4"
src="../../static/images/makerspaceicon4.png"></image>
</view>
</view>
<view class="list-s"
@click="goGoodsList">
<view class="text">{{'助力乡村振兴礼包'}}</view>
<view class="images">
<image class="image2"
src="../../static/images/makerspaceicon2.png"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import * as sel from '@/config/selfService.js'
export default {
data() {
return {
userInfo:'',
existMakerSpace:0,
specialList: [
{
label: '创客礼包',
value: 18,
isShow: true,
},
{
label: '赋能礼包',
value: 19,
isShow: true,
},
],
}
},
onLoad(option) {
this.userInfo = uni.getStorageSync("User");
this.checkIfShow()
},
onReady() {},
methods: {
checkIfShow() {
sel.checkIfShow().then((res) => {
this.existMakerSpace = res.data.existMakerSpace
})
},
viewtap(url) {
uni.navigateTo({
url: url,
})
},
goGoodsList() {
uni.navigateTo({
url:
'/pages/specialArea/list?specialArea=' +
18 +
'&label='+'助力乡村振兴礼包' +
'&children=' +
JSON.stringify(this.specialList) +'&diff=2',
})
},
},
}
</script>
<style lang="scss" scoped>
page {
background-color: #f2f2f2;
}
.text {
font-size: 24rpx;
color: #333;
margin-left: 20rpx;
line-height: 55rpx;
}
.images {
// padding-left:50rpx;
.image1 {
width: 65rpx;
height: 60rpx;
}
.image2 {
width: 64rpx;
height: 64rpx;
}
.image3 {
width: 60rpx;
height: 54rpx;
}
.image4 {
width: 54rpx;
height: 54rpx;
}
}
.main {
padding: 30rpx 20rpx;
}
.content {
display: flex;
flex-wrap: wrap;
}
.list-s {
margin-left: 20rpx;
width: 300rpx;
padding: 45rpx 30rpx 45rpx 0;
background-color: #fff;
border-radius: 20rpx;
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
}
</style>