hookehuyr

✨ feat: 主办方管理细节调整

1 <!-- 1 <!--
2 * @Date: 2022-09-21 14:51:44 2 * @Date: 2022-09-21 14:51:44
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-10-08 16:04:59 4 + * @LastEditTime: 2022-10-24 18:07:28
5 * @FilePath: /swx/src/pages/my/index.vue 5 * @FilePath: /swx/src/pages/my/index.vue
6 - * @Description: 文件描述 6 + * @Description: 我的页面
7 --> 7 -->
8 <template> 8 <template>
9 <view class="my-page"> 9 <view class="my-page">
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
12 <van-row> 12 <van-row>
13 <van-col span="18"> 13 <van-col span="18">
14 <view style="position: relative;"> 14 <view style="position: relative;">
15 - <AtAvatar circle size="large" image='https://jdc.jd.com/img/200' style="display: inline-block;"></AtAvatar> 15 + <van-image :round="true" width="4rem" height="4rem" :src="avatar" />
16 <view style="display: inline-block; position: absolute; top: 30%; left: 30%;"> 16 <view style="display: inline-block; position: absolute; top: 30%; left: 30%;">
17 - <text style="font-size: 1.15rem;">微信昵称</text> 17 + <text style="font-size: 1.15rem;">{{ nickname }}</text>
18 - <van-icon :name="icon_vip" size="1rem" color="" class="vip-icon" /> 18 + <!-- <van-icon :name="icon_vip" size="1rem" color="" class="vip-icon" /> -->
19 </view> 19 </view>
20 </view> 20 </view>
21 </van-col> 21 </van-col>
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
68 68
69 <script setup> 69 <script setup>
70 import { ref } from "vue"; 70 import { ref } from "vue";
71 -import icon_vip from '@/images/icon/vip@2x.png' 71 +// import icon_vip from '@/images/icon/vip@2x.png'
72 import Taro from '@tarojs/taro' 72 import Taro from '@tarojs/taro'
73 -import { AtAvatar } from 'taro-ui-vue3' 73 +// import { AtAvatar } from 'taro-ui-vue3'
74 import "taro-ui-vue3/dist/style/components/avatar.scss" 74 import "taro-ui-vue3/dist/style/components/avatar.scss"
75 import icon_join from '@/images/icon/canjia@2x.png' 75 import icon_join from '@/images/icon/canjia@2x.png'
76 import icon_create from '@/images/icon/chuangjian@2x.png' 76 import icon_create from '@/images/icon/chuangjian@2x.png'
...@@ -79,26 +79,6 @@ import icon_company from '@/images/icon/zhubanfang@2x.png' ...@@ -79,26 +79,6 @@ import icon_company from '@/images/icon/zhubanfang@2x.png'
79 import navbar from '@/components/navbar.vue' 79 import navbar from '@/components/navbar.vue'
80 import activityCard from '@/components/activity-card.vue' 80 import activityCard from '@/components/activity-card.vue'
81 81
82 -const activity_list = ref([{
83 - title: '智慧没有烦恼',
84 - address: '上海市杨浦区军工路100号A座05室',
85 -}, {
86 - title: '万人共乘浪漫热气球',
87 - address: '',
88 -}, {
89 - title: '八段锦',
90 - address: '',
91 -}, {
92 - title: '智慧没有烦恼',
93 - address: '上海市杨浦区军工路100号A座05室',
94 -}, {
95 - title: '万人共乘浪漫热气球',
96 - address: '',
97 -}, {
98 - title: '八段锦',
99 - address: '',
100 -}]);
101 -
102 // 参加的活动 82 // 参加的活动
103 const joinActivity = () => { 83 const joinActivity = () => {
104 Taro.navigateTo({ 84 Taro.navigateTo({
...@@ -127,8 +107,28 @@ const myProject = () => { ...@@ -127,8 +107,28 @@ const myProject = () => {
127 107
128 <script> 108 <script>
129 import "./index.less"; 109 import "./index.less";
110 +import { $ } from '@tarojs/extend'
111 +import mixin from '@/utils/mixin';
112 +import { infoUserAPI } from '@/api/User/index';
130 113
131 export default { 114 export default {
132 name: "myPage", 115 name: "myPage",
116 + mixins: [mixin.init],
117 + data () {
118 + return {
119 + nickname: '',
120 + avatar: '',
121 + activity_list: [],
122 + }
123 + },
124 + async onShow () {
125 + // 获取用户信息和列表
126 + const { code, data } = await infoUserAPI({ is_activity: 1 });
127 + if (code) {
128 + this.activity_list = data.activity_list;
129 + this.nickname = data.user.nickname;
130 + this.avatar = data.user.avatar ? data.user.avatar : 'https://jdc.jd.com/img/200';
131 + }
132 + },
133 }; 133 };
134 </script> 134 </script>
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-10-24 16:56:16 4 + * @LastEditTime: 2022-10-25 13:36:09
5 * @FilePath: /swx/src/pages/projectManage/index.vue 5 * @FilePath: /swx/src/pages/projectManage/index.vue
6 * @Description: 主办方管理页面 6 * @Description: 主办方管理页面
7 --> 7 -->
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
47 </van-col> 47 </van-col>
48 </van-row> 48 </van-row>
49 </view> 49 </view>
50 + <view style="height: 7rem;"></view>
50 </view> 51 </view>
51 </view> 52 </view>
52 <bottom-button @on-submit="onSubmit">新建主办方</bottom-button> 53 <bottom-button @on-submit="onSubmit">新建主办方</bottom-button>
...@@ -66,7 +67,7 @@ const create_list = ref([]); ...@@ -66,7 +67,7 @@ const create_list = ref([]);
66 const join_list = ref([]); 67 const join_list = ref([]);
67 68
68 onMounted(async () => { 69 onMounted(async () => {
69 - const { code, data } = await hostListAPI(); 70 + const { code, data } = await hostListAPI({ is_join: 1 });
70 if (code) { 71 if (code) {
71 create_list.value = data.my_hosts; 72 create_list.value = data.my_hosts;
72 join_list.value = data.join_hosts; 73 join_list.value = data.join_hosts;
...@@ -81,7 +82,7 @@ const onSubmit = () => { ...@@ -81,7 +82,7 @@ const onSubmit = () => {
81 82
82 const onManage = (item) => { 83 const onManage = (item) => {
83 Taro.navigateTo({ 84 Taro.navigateTo({
84 - url: '../userManage/index?id=' + item.id + '&name=' + decodeURIComponent(item.name) 85 + url: '../userManage/index?host_id=' + item.id + '&name=' + decodeURIComponent(item.name)
85 }) 86 })
86 } 87 }
87 const onDelete = (item) => { 88 const onDelete = (item) => {
...@@ -113,7 +114,6 @@ const onDelete = (item) => { ...@@ -113,7 +114,6 @@ const onDelete = (item) => {
113 114
114 <script> 115 <script>
115 import "./index.less"; 116 import "./index.less";
116 -// import request from '../../utils/request';
117 import mixin from '@/utils/mixin'; 117 import mixin from '@/utils/mixin';
118 118
119 export default { 119 export default {
...@@ -121,24 +121,9 @@ export default { ...@@ -121,24 +121,9 @@ export default {
121 mixins: [mixin.init], 121 mixins: [mixin.init],
122 data () { 122 data () {
123 return { 123 return {
124 - // create_list: [],
125 - // join_list: [],
126 } 124 }
127 }, 125 },
128 onShow() { 126 onShow() {
129 - // 保存主办方信息
130 - // request.get('/srv/?a=host_list')
131 - // .then(res => {
132 - // if (res.data.code) {
133 - // this.create_list = res.data.data.my_hosts;
134 - // this.join_list = res.data.data.join_hosts;
135 - // } else {
136 - // console.warn(res.data.msg);
137 - // }
138 - // })
139 - // .catch(err => {
140 - // console.error(err);
141 - // });
142 }, 127 },
143 }; 128 };
144 </script> 129 </script>
......