hookehuyr

默认数据常量获取

<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-22 00:26:20
* @LastEditTime: 2022-10-24 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: '跟踪',
checked: 1,
nop: true
}, {
key: 'guide',
label: '引导',
checked: 1,
nop: true
}]);
// 生成默认数据
DEFAULT_HOST_TYPE.forEach(item => {
userType.value.push({
key: randomId(5),
label: item,
checked: 1,
nop: true
})
});
DEFAULT_HOST_STATUS.forEach(item => {
userStatus.value.push({
key: randomId(5),
label: item,
checked: 1,
nop: true
})
});
// 用户类型弹框操作
const onTapType = (item) => {
......
/**
* 系统参数
*/
const DEFAULT_HOST_TYPE = ['首次参与', '老用户']; // 主办方默认用户类型
const DEFAULT_HOST_STATUS = ['跟踪', '引导']; // 主办方默认用户状态
export { DEFAULT_HOST_TYPE, DEFAULT_HOST_STATUS }