Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-09-28 11:14:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6a8ad831ca600d686e66b1bd0bf9f0b5993278f3
6a8ad831
1 parent
c5a1283c
✨ feat: 活动详情页控制按钮逻辑修改
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
src/components/activity-bar.vue
src/pages/activityDetail/index.vue
src/components/activity-bar.vue
View file @
6a8ad83
<!--
* @Date: 2022-09-26 16:10:35
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-2
6 17:14:29
* @LastEditTime: 2022-09-2
7 17:22:03
* @FilePath: /swx/src/components/activity-bar.vue
* @Description: 文件描述
-->
...
...
@@ -9,7 +9,7 @@
<view class="activity-bar-page">
<van-row>
<van-col span="5">
<view @tap="goTo()" class="home">
<view @tap="goTo(
'home'
)" class="home">
<view style="height: 1.75rem;">
<van-icon :name="icon_home1" size="1.75rem" color="" />
</view>
...
...
@@ -17,21 +17,21 @@
</view>
</van-col>
<van-col span="19">
<view v-if="
status
=== '1'" class="user-not-reg">
<view v-if="
userType
=== '1'" class="user-not-reg">
<view class="button">义工报名</view>
<view class="button">活动报名</view>
<view class="button"
@tap="goTo('join')"
>活动报名</view>
</view>
<view v-if="
status
=== '2'" class="user-reg">
<view v-if="
userType
=== '2'" class="user-reg">
<view class="button">报名信息</view>
</view>
<view v-if="
status
=== '3'" class="admin-control">
<view v-if="
userType
=== '3'" class="admin-control">
<view class="edit">修改活动</view>
<view class="list">报名列表</view>
</view>
<view v-if="
status
=== '4'" class="staff-join">
<view v-if="
userType
=== '4'" class="staff-join">
<view class="button">报名活动</view>
</view>
<view v-if="
status
=== '5'" class="staff-not-join">
<view v-if="
userType
=== '5'" class="staff-not-join">
<view class="button">义工报名</view>
</view>
</van-col>
...
...
@@ -40,20 +40,27 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref
, defineProps
} from 'vue'
import icon_home1 from '@/images/icon/home01@2x.png'
import Taro from '@tarojs/taro'
const goTo = () => {
const props = defineProps({
userType: String
})
const goTo = (type) => {
if (type === 'home') { // 返回首页
Taro.redirectTo({
url: '../index/index'
})
} else if (type === 'join') { // 活动报名
Taro.navigateTo({
url: '../joinActivity/index'
})
}
}
// TODO: 状态待定-后期根据实际状态判断
const status = '5';
</script>
<style lang="less">
...
...
src/pages/activityDetail/index.vue
View file @
6a8ad83
<!--
* @Date: 2022-09-26 14:36:57
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-27 1
6:38:57
* @LastEditTime: 2022-09-27 1
7:55:02
* @FilePath: /swx/src/pages/activityDetail/index.vue
* @Description: 文件描述
-->
...
...
@@ -119,7 +119,7 @@
</view>
</view>
<view style="height: 6rem;"></view>
<activity-bar />
<activity-bar
:user-type="userType"
/>
<van-action-sheet
:z-index="10"
...
...
@@ -160,6 +160,10 @@ import PosterBuilder from '@/components/PosterBuilder/index.vue';
import { ref } from "vue";
// TEMP: 等待真实数据类型
// 根据用户类型显示对应操作栏
const userType = ref('1')
const show_share = ref(false);
const actions_share = ref([{
name: '分享朋友'
...
...
Please
register
or
login
to post a comment