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-10-24 16:54:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ff4e67b85c0b8b0043a40bdef3f74d4dc47459aa
ff4e67b8
1 parent
cc7a7b02
默认数据常量获取
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
src/pages/createProject/index.vue
src/utils/sysData.js
src/pages/createProject/index.vue
View file @
ff4e67b
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-2
2 00:26:20
* @LastEditTime: 2022-10-2
4 10:53:26
* @FilePath: /swx/src/pages/createProject/index.vue
* @Description: 新建主办方页面
-->
...
...
@@ -106,37 +106,33 @@ import bottomButton from "@/components/bottom-button";
import Toast from '@/components/vant-weapp/toast/toast';
import { addHostAPI } from '@/api/Host/index';
import { randomId } from '@/utils/tools'
import { DEFAULT_HOST_TYPE, DEFAULT_HOST_STATUS } from '@/utils/sysData'
const name = ref('');
const user_type = ref([]);
const user_status = ref([]);
const add_user_type= ref({});
const add_user_status = ref({});
const userType = ref([]);
const userStatus = ref([]);
const userType = ref([{
key: 'first',
label: '首次参与',
checked: 1,
nop: true
}, {
key: 'old',
label: '老用户',
checked: 1,
nop: true
}]);
const userStatus = ref([{
key: 'follow',
label: '跟踪',
// 生成默认数据
DEFAULT_HOST_TYPE.forEach(item => {
userType.value.push({
key: randomId(5),
label: item,
checked: 1,
nop: true
}, {
key: 'guide',
label: '引导',
})
});
DEFAULT_HOST_STATUS.forEach(item => {
userStatus.value.push({
key: randomId(5),
label: item,
checked: 1,
nop: true
}]);
})
});
// 用户类型弹框操作
const onTapType = (item) => {
...
...
src/utils/sysData.js
0 → 100644
View file @
ff4e67b
/**
* 系统参数
*/
const
DEFAULT_HOST_TYPE
=
[
'首次参与'
,
'老用户'
];
// 主办方默认用户类型
const
DEFAULT_HOST_STATUS
=
[
'跟踪'
,
'引导'
];
// 主办方默认用户状态
export
{
DEFAULT_HOST_TYPE
,
DEFAULT_HOST_STATUS
}
Please
register
or
login
to post a comment