Browse Source

perf: 解决error

develop
song 4 years ago
parent
commit
cacbe7fdd8
  1. 3
      CHANGELOG.md
  2. 2
      src/apis/yanyuan.js
  3. 60
      src/components/ChooseElder/ChooseElder.vue
  4. 60
      src/components/ChooseUser/ChooseUser.vue
  5. 110
      src/components/ConfigInfo/components/ApplyFamily.vue
  6. 78
      src/components/ConfigInfo/components/config.js
  7. 163
      src/mixins/tool.js
  8. 4
      src/pages.json
  9. 30
      src/pagesYanyuan/add-info/add-info.vue
  10. 18
      src/pagesYanyuan/be-family/be-family.vue
  11. 75
      src/pagesYanyuan/family-info/family-info.vue
  12. 29
      src/pagesYanyuan/input-code/input-code.vue
  13. 36
      src/pagesYanyuan/scan-code/scan-code.vue
  14. 13
      src/pagesYanyuan/transfer-page/transfer-page.vue
  15. 17
      src/store/yanyuan/actions.js
  16. 63
      src/store/yanyuan/mutations.js
  17. 9
      src/store/yanyuan/state.js

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 0.1.0 (2021-11-11)
# 0.1.0 (2021-11-12)
### 🌟 新功能
范围|描述|commitId
@ -32,6 +32,7 @@
- | 删除项目 | [00b886c](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/00b886c)
- | 升级版本v3.1.0;tailwindcss添加class | [9ef05e1](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/9ef05e1)
- | 向右箭头图标变化 | [8e9ca55](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/8e9ca55)
- | 填写用户信息调接口 | [a8f8267](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/a8f8267)
- | 字体大小更改 | [82cfdd4](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/82cfdd4)
- | 存token | [b8a178d](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/b8a178d)
- | 定期任务面板骨架屏添加 | [b2698c0](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/b2698c0)

2
src/apis/yanyuan.js

@ -18,7 +18,7 @@ const install = (Vue, vm) => {
// 申请成为家属
vm.$u.api.applyFamily = param => vm.$u.post(`${yanyuan}/family/apply`, param);
// 查询个人信息
vm.$u.api.getPersonalInfo = param => vm.$u.post(`${yanyuan}/family/personal`, param);
vm.$u.api.getPersonalInfo = () => vm.$u.post(`${yanyuan}/family/personal`);
// 绑定工具箱
vm.$u.api.bindTool = param => vm.$u.post(`${yanyuan}/tool/bind`, param);

60
src/components/ChooseElder/ChooseElder.vue

@ -0,0 +1,60 @@
<template>
<view v-if="list.length" class="m-4 flex flex-col">
<view
v-for="(item, index) in list"
:key="index"
class="flex flex-nowrap text-center p-2"
:class="item.checked ? 'bg-blue-500 text-white' : 'bg-gray-100'"
@click="changeChecked(index)"
>
<view v-if="item.checked"><u-icon name="checkbox-mark"></u-icon></view>
<view class="flex-1">{{ item.userName }} </view>
<view class="flex-1" v-if="item.sex">{{ item.sex === 1 ? '' : item.sex === 2 ? '' : '' }}</view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
export default {
name: 'BeFamily',
data() {
return { list: [], ids: [] };
},
watch: {
elderlyInfo(val) {
if (val && val.length) {
val.forEach(item => {
item.checked = false;
});
this.list = val;
}
},
},
computed: mapState('yanyuan', ['elderlyInfo', 'keyUserIds']),
methods: {
...mapMutations('yanyuan', ['setKeyUserIds']),
// checkbox
changeChecked(index) {
let arr = [...this.list];
if (!arr[index].checked) {
this.ids.push(arr[index].keyUserId);
arr[index].checked = true;
} else {
const newIds = this.ids.filter(item => item !== arr[index].keyUserId);
this.ids = newIds;
arr[index].checked = false;
}
this.list = [...arr];
this.setKeyUserIds(this.ids);
},
},
};
</script>
<style lang="scss" scoped></style>

60
src/components/ChooseUser/ChooseUser.vue

@ -0,0 +1,60 @@
<template>
<view v-if="list.length" class="m-4 flex flex-col">
<view
v-for="(item, index) in list"
:key="index"
class="flex flex-nowrap text-center p-2"
:class="item.checked ? 'bg-blue-500 text-white' : 'bg-gray-100'"
@click="changeChecked(index)"
>
<view v-if="item.checked"><u-icon name="checkbox-mark"></u-icon></view>
<view class="flex-1">{{ item.userName }} </view>
<view class="flex-1" v-if="item.sex">{{ item.sex === 1 ? '' : item.sex === 2 ? '' : '' }}</view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
export default {
name: 'BeFamily',
data() {
return { list: [], ids: [] };
},
watch: {
elderlyInfo(val) {
if (val && val.length) {
val.forEach(item => {
item.checked = false;
});
this.list = val;
}
},
},
computed: mapState('yanyuan', ['elderlyInfo', 'keyUserIds']),
methods: {
...mapMutations('yanyuan', ['setKeyUserIds']),
// checkbox
changeChecked(index) {
let arr = [...this.list];
if (!arr[index].checked) {
this.ids.push(arr[index].keyId);
arr[index].checked = true;
} else {
const newIds = this.ids.filter(item => item !== arr[index].keyId);
this.ids = newIds;
arr[index].checked = false;
}
this.list = [...arr];
this.setKeyUserIds(this.ids);
},
},
};
</script>
<style lang="scss" scoped></style>

110
src/components/ConfigInfo/components/ApplyFamily.vue

@ -0,0 +1,110 @@
<template>
<view>
<view class="flex flex-col text-sm border-b pb-2" v-for="(family, index) in beFamily" :key="index">
<view class="flex flex-col" v-if="family.type === 4">
<view class="my-3">
{{ family.name }}
</view>
<u-radio-group v-model="family.value">
<u-radio
class="mb-2"
@change="change($event, index, family.type)"
v-for="(radioItem, radioIndex) in family.radioList"
:key="radioIndex"
:name="radioItem"
>
{{ radioItem }}
</u-radio>
</u-radio-group>
<u-input
v-if="family.showOther"
:placeholder="`请输入其他${family.name}`"
v-model="family.otherValue"
:clearable="false"
@blur="change(family.otherValue, index, 99)"
/>
</view>
<view class="flex justify-between items-center" v-else>
<view class="my-3 flex justify-between items-center">
{{ family.name }}
</view>
<view v-if="family.type === 1">
<u-input
placeholder="请输入"
v-model="family.value"
:clearable="false"
input-align="right"
@blur="change(family.value, index, family.type)"
/>
</view>
<view v-if="family.type === 2">
<u-input
placeholder="请输入"
v-model="family.value"
:clearable="false"
type="number"
input-align="right"
@blur="change(family.value, index, family.type)"
/>
</view>
<view v-if="family.type === 3">
<u-radio-group v-model="family.value">
<u-radio
class="mb-2"
@change="change($event, index, family.type)"
v-for="(radioItem, radioIndex) in family.radioList"
:key="radioIndex"
:name="radioItem"
>
{{ radioItem }}
</u-radio>
</u-radio-group>
</view>
</view>
</view>
</view>
</template>
<script>
import { beFamily } from './config';
export default {
data() {
return { beFamily };
},
mounted() {},
methods: {
change(e, index, type) {
const info = this.beFamily[index];
switch (type) {
case 99: {
//
info.otherValue = e;
break;
}
default:
{
info.value = e;
if (e === '男') {
info.value = 1;
}
if (e === '女') {
info.value = 2;
}
if (e === '其他') {
info.showOther = true;
} else {
info.showOther = false;
}
}
break;
}
this.$emit('saveInfo', info);
},
},
};
</script>
<style lang="scss" scoped></style>

78
src/components/ConfigInfo/components/config.js

@ -543,43 +543,47 @@ export const familyInfo = [
/**
* 是否成为家属
* 展示类型: showType: 1 标题+折叠, 2 直接展示
* 试题类型, type:1 单选,2 日期(年月日),3 数字输入框,4 单列下拉框,5 多选,6 日期(年月日时),7 多列下拉选框, 8 文本输入框 9 多列地区选择 11 吸烟 12 饮酒 13 饮茶
* 试题类型, type:1 文本输入框,2 数字输入框,3 性别 4 单选, 99 其他
*/
export const beFamily = [
[
{
name: '姓名',
showType: 2,
type: 8,
value: null,
},
{
name: '性别',
showType: 1,
type: 1,
radioList: ['男', '女'],
value: null,
},
{
name: '年龄',
showType: 2,
type: 3,
value: null,
},
{
name: '职业',
showType: 1,
type: 1,
radioList: ['干部', '军人', '技术人员', '农民', '工人', '运动员', '个体商业人员', '其他'],
value: null,
},
{
name: '文化程度',
showType: 1,
type: 1,
radioList: ['文盲', '小学', '初中', '高中或中专', '大学或大专', '大学以上', '其他'],
value: null,
},
],
{
name: '姓名',
label: 'name',
type: 1,
value: null,
},
{
name: '性别',
label: 'sex',
type: 3,
radioList: ['男', '女'],
value: null,
show: false,
},
{
name: '年龄',
label: 'age',
type: 2,
value: null,
},
{
name: '职业',
label: 'jobTitle',
type: 4,
radioList: ['干部', '军人', '技术人员', '农民', '工人', '运动员', '个体商业人员', '其他'],
value: null,
show: false,
showOther: false,
otherValue: '',
},
{
name: '文化程度',
label: 'educateLevel',
type: 4,
radioList: ['文盲', '小学', '初中', '高中或中专', '大学或大专', '大学以上', '其他'],
value: null,
show: false,
showOther: false,
otherValue: '',
},
];

163
src/mixins/tool.js

@ -1,15 +1,33 @@
// 工具箱相关处理
import { mapState, mapActions } from 'vuex';
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
computed: mapState('yanyuan', ['toolInfo']),
data() {
return {
transferContent: '',
showElder: false,
showUser: false,
};
},
watch: {
showChooseElder(val) {
this.showElder = val;
},
showSetUser(val) {
this.showUser = val;
},
},
computed: mapState('yanyuan', ['toolInfo', 'showChooseElder', 'keyUserIds', 'applyFamilyInfo', 'showSetUser']),
methods: {
...mapActions('yanyuan', ['getCreateTrainee']),
...mapMutations('yanyuan', ['setShowChooseElder', 'setIsApplying', 'setShowSetUser', 'setElderlyInfo']),
...mapActions('yanyuan', ['getCreateTrainee', 'getPersonalInfo']),
initTool() {
const { toolInfo } = this;
console.log('toolInfo: ', toolInfo);
// 工具箱是否被绑定
if (!toolInfo || !toolInfo.bindUserId || toolInfo.isBind !== 1) {
console.log('工具箱没有被绑定');
@ -35,8 +53,6 @@ export default {
// 是公司用户 填写用户信息
console.log('是公司用户');
this.$t.page.openPage('/pagesYanyuan/add-info/add-info');
// TODO this测试
},
// 不是公司用户
@ -53,6 +69,7 @@ export default {
// 有体验用户 判断体验用户数量
console.log('有体验用户');
this.becomeUser(this.toolInfo.uxUserInfo);
return;
}
// 满员 已绑定
@ -64,11 +81,9 @@ export default {
becomeFamily(bindUserId) {
console.log('判断是否成为家属');
this.$t.ui
.showModal('提示', '是否成为家属?')
.showModal('提示', '是否申请成为家属?')
.then(async () => {
console.log('是');
const params = { bindUserId };
console.log('params: ', params);
const res = await this.getCreateTrainee(params);
if (!res.length) {
this.$t.ui.showToast('提醒工具箱拥有者添加使用者信息');
@ -76,7 +91,7 @@ export default {
uni.redirectTo({ url: '/pages/index/index' });
}, 2000);
} else {
this.$t.page.openPage('/pagesYanyuan/be-family/be-family');
this.setShowChooseElder(true);
}
})
.catch(() => {
@ -86,23 +101,121 @@ export default {
// 判断是否设置为使用者
becomeUser(uxUserInfo) {
// 1个弹框 询问是否将XXX设置为使用者 多个 弹框选择使用者
if (uxUserInfo && uxUserInfo.length === 1) {
const content = uxUserInfo[0].userName;
console.log('判断是否设置为使用者');
this.$t.ui
.showModal('提示', `是否将${content}设置为使用者?`)
.then(() => {
console.log('是');
})
.catch(() => {
console.log('否');
});
this.$t.ui
.showModal('提示', '是否设置使用者?')
.then(async () => {
this.setElderlyInfo(uxUserInfo);
this.setShowSetUser(true);
})
.catch(() => {
uni.redirectTo({ url: '/pages/index/index' });
});
},
// 确定选择老人
confirmModel() {
if (!this.keyUserIds.length) {
this.setShowChooseElder(true);
this.$t.ui.showToast('请先选择老人!');
this.$refs.uModal.clearLoading();
return;
}
if (uxUserInfo && uxUserInfo.length > 1) {
console.log('判断是否设置为使用者');
this.setShowChooseElder(false);
this.handlePersonalInfo();
},
/**
* 查询个人信息
*/
async handlePersonalInfo() {
try {
const data = await this.getPersonalInfo();
this.$refs.uModal.clearLoading();
if (!data || !data.familyId) {
// 填写用户信息
this.setIsApplying(true);
this.$t.page.openPage('/pagesYanyuan/family-info/family-info');
return;
}
// 申请成为家属
this.$t.page.openPage('/pagesYanyuan/transfer-page/transfer-page?type=jiashu');
} catch (error) {
this.$refs.uModal.clearLoading();
console.error('error: ', error);
}
},
/**
* 申请成为家属
* @param { array } keyUserIds 老人id
*/
async applyFamily() {
try {
let params = {};
if (this.applyFamilyInfo && this.applyFamilyInfo.name) {
params = this.applyFamilyInfo;
} else {
params = { keyUserIds: this.keyUserIds };
}
await this.$u.api.applyFamily(params);
this.transferContent = '申请已提交';
} catch (error) {
console.error('error: ', error);
const msg = error.msg || '申请失败,稍后请重新申请';
this.transferContent = msg;
}
},
// 取消选择老人
cancelModel() {
this.setShowChooseElder(false);
},
// 确定设置使用者
confirmSetUserModel() {
if (!this.keyUserIds.length) {
this.$t.ui.showToast('请先选择使用者!');
this.$refs.uModal.clearLoading();
return;
}
this.setShowSetUser(false);
// 体验账号升级
this.handleUpgrade();
},
/**
* 体验账号升级
* @param {array} keyUserIds
*/
async handleUpgrade() {
try {
const params = { keyUserIds: this.keyUserIds };
console.log('params: ', params);
await this.$u.api.upgradeTrainee(params);
this.$refs.uModal.clearLoading();
this.setAlert('使用者设置成功', 'success');
} catch (error) {
this.$refs.uModal.clearLoading();
const msg = error.msg || '使用者设置失败,请稍后重试';
this.setAlert(msg, 'error');
}
},
// 取消设置使用者
cancelSetUserModel() {
this.setShowSetUser(false);
},
// 跳转首页弹框
setAlert(title, type) {
this.$refs.uTips.show({
title: `${title},即将跳转首页`,
type,
duration: '3000',
});
setTimeout(() => {
uni.redirectTo({ url: '/pages/index/index' });
}, 2000);
},
},
};

4
src/pages.json

@ -81,9 +81,9 @@
}
},
{
"path": "be-family/be-family",
"path": "family-info/family-info",
"style": {
"navigationBarTitleText": "申请成为家属",
"navigationBarTitleText": "家属信息",
"navigationStyle": "default"
}
}

30
src/pagesYanyuan/add-info/add-info.vue

@ -10,6 +10,7 @@
</template>
<script>
import { mapState } from 'vuex';
import Info from 'components/ConfigInfo/components/Info';
import { infoList } from 'components/ConfigInfo/components/config';
@ -20,6 +21,8 @@ export default {
return { params: {}, infoList };
},
computed: mapState('yanyuan', ['isApplying']),
methods: {
//
saveInfo(info) {
@ -88,15 +91,24 @@ export default {
const params = this.params;
if (!this.validationRequired(params)) return;
await this.$u.api.addTrainee(params);
this.$refs.uTips.show({
title: '用户信息添加成功, 即将跳转日历页',
type: 'success',
duration: '2000',
});
setTimeout(() => {
uni.redirectTo({ url: '/pages/index/index' });
this.setEmptyInfo();
}, 2000);
if (this.isApplying) {
this.$refs.uTips.show({
title: '用户信息添加成功, 即将申请成为家属',
type: 'success',
duration: '2000',
});
this.$t.page.openPage('/pagesYanyuan/transfer-page/transfer-page?type=jiashu');
} else {
this.$refs.uTips.show({
title: '用户信息添加成功, 即将跳转日历页',
type: 'success',
duration: '2000',
});
setTimeout(() => {
uni.redirectTo({ url: '/pages/index/index' });
this.setEmptyInfo();
}, 2000);
}
} catch (error) {
console.error('error: ', error);
}

18
src/pagesYanyuan/be-family/be-family.vue

@ -1,18 +0,0 @@
<template>
<view> 老人列表 </view>
</template>
<script>
export default {
name: 'BeFamily',
data() {
return {};
},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

75
src/pagesYanyuan/family-info/family-info.vue

@ -0,0 +1,75 @@
<template>
<view class="px-3">
<u-top-tips ref="uTips" type="success"></u-top-tips>
<ApplyFamily @saveInfo="saveInfo"></ApplyFamily>
<u-button type="primary" class="m-4" @click="submit">提交</u-button>
</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import ApplyFamily from 'components/ConfigInfo/components/ApplyFamily';
import { beFamily } from 'components/ConfigInfo/components/config';
import toolMixin from '@/mixins/tool';
export default {
components: { ApplyFamily },
mixins: [toolMixin],
data() {
return { beFamily, params: {} };
},
computed: mapState('yanyuan', ['keyUserIds']),
mounted() {},
methods: {
...mapMutations('yanyuan', ['setApplyFamilyInfo']),
//
saveInfo(info) {
this.params[info.label] = info.value;
//
if (info.value === '其他' && info.showOther && info.otherValue) {
this.params[info.label] = info.otherValue;
}
},
/**
* 申请成为家属
*/
submit() {
if (!this.validationRequired()) return;
this.params.keyUserIds = this.keyUserIds;
this.setApplyFamilyInfo(this.params);
this.$refs.uTips.show({
title: '用户信息添加成功, 即将申请成为家属',
type: 'success',
duration: '2000',
});
this.$t.page.openPage('/pagesYanyuan/transfer-page/transfer-page?type=jiashu');
},
//
validationRequired() {
let isComplete = true;
for (let i = 0; i < this.beFamily.length; i++) {
const item = this.beFamily[i];
if (!item.value) {
this.$t.ui.showToast(`请填写${item.name}`);
isComplete = false;
break;
}
if (item.showOther && !item.otherValue) {
this.$t.ui.showToast(`请填写其他${item.name}`);
isComplete = false;
break;
}
}
if (isComplete) return true;
},
},
};
</script>
<style lang="scss" scoped></style>

29
src/pagesYanyuan/input-code/input-code.vue

@ -9,6 +9,35 @@
<view class="px-2 mt-2 w-full">
<u-button type="primary" class="w-full" @click="submit">确认</u-button>
</view>
<!-- 选择老人 -->
<u-modal
v-model="showElder"
title="选择老人"
@confirm="confirmModel"
@cancel="cancelModel"
:async-close="true"
ref="uModal"
:show-cancel-button="true"
>
<ChooseElder></ChooseElder>
</u-modal>
<!-- 设置使用者 -->
<u-modal
v-model="showUser"
title="设置使用者"
@confirm="confirmSetUserModel"
@cancel="cancelSetUserModel"
:async-close="true"
ref="uModal"
:show-cancel-button="true"
>
<ChooseUser></ChooseUser>
</u-modal>
<!-- 全局提示框 -->
<u-top-tips ref="uTips"></u-top-tips>
</view>
</template>

36
src/pagesYanyuan/scan-code/scan-code.vue

@ -1,9 +1,5 @@
<template>
<view>
<!-- <view>
<Info class="bg-white" />
<EndLine />
</view> -->
<!--scan.wxml-->
<view class="scan-view">
<camera class="scan-camera" mode="scanCode" binderror="cameraError" bindscancode="scancode" frame-size="large" :flash="flash">
@ -32,14 +28,46 @@
<text class="mt-2 text-xs">关闭手电筒</text>
</view>
</view>
<!-- 选择老人 -->
<u-modal
v-model="showElder"
title="选择老人"
@confirm="confirmModel"
@cancel="cancelModel"
:async-close="true"
ref="uModal"
:show-cancel-button="true"
>
<ChooseElder></ChooseElder>
</u-modal>
<!-- 设置使用者 -->
<u-modal
v-model="showUser"
title="设置使用者"
@confirm="confirmSetUserModel"
@cancel="cancelSetUserModel"
:async-close="true"
ref="uModal"
:show-cancel-button="true"
>
<ChooseUser></ChooseUser>
</u-modal>
<!-- 全局提示框 -->
<u-top-tips ref="uTips"></u-top-tips>
</view>
</template>
<script>
import toolMixin from '@/mixins/tool';
//
let animation = wx.createAnimation({});
export default {
mixins: [toolMixin],
data() {
return { animation, open: false, flash: 'auto' };
},

13
src/pagesYanyuan/transfer-page/transfer-page.vue

@ -9,7 +9,9 @@
</template>
<script>
import toolMixin from '@/mixins/tool';
export default {
mixins: [toolMixin],
data() {
return { content: '' };
},
@ -18,6 +20,9 @@ export default {
if (options.type === 'manyuan') {
this.content = '工具已绑定';
}
if (options.type === 'jiashu') {
this.openApplyModal();
}
},
mounted() {
@ -27,6 +32,14 @@ export default {
}, 5000);
});
},
methods: {
//
async openApplyModal() {
await this.applyFamily();
this.content = this.transferContent;
},
},
};
</script>

17
src/store/yanyuan/actions.js

@ -25,7 +25,22 @@ const actions = {
commit('setElderlyInfo', data);
return data;
} catch (error) {
uni.$t.ui.showToast(error.msg || '查询失败');
uni.$t.ui.showToast(error.msg || '老人信息查询失败');
}
},
/**
* 查询个人信息
* @param {*} commit
*/
async getPersonalInfo({ commit }) {
try {
const data = await uni.$u.api.getPersonalInfo();
commit('setPersonalInfo', data);
console.log('查询个人信息: ', data);
return data;
} catch (error) {
uni.$t.ui.showToast(error.msg || '个人信息查询失败');
}
},
};

63
src/store/yanyuan/mutations.js

@ -1,13 +1,4 @@
const mutations = {
/**
* 设置是否绑定工具箱
* @param {object} state
* @param {array} show 项目列表
*/
setIsBinding(state, show) {
state.isBinding = show;
},
/**
* 设置工具箱信息
* @param {object} state
@ -25,6 +16,60 @@ const mutations = {
setElderlyInfo(state, data) {
state.elderlyInfo = data;
},
/**
* 设置是否显示选择老人弹框
* @param {object} state
* @param {array} show
*/
setShowChooseElder(state, show) {
state.showChooseElder = show;
},
/**
* 设置查询到的个人信息
* @param {object} state
* @param {array} data
*/
setPersonalInfo(state, data) {
state.personalInfo = data;
},
/**
* 设置是否正在申请成为家属
* @param {object} state
* @param {array} show
*/
setIsApplying(state, show) {
state.isApplying = show;
},
/**
* 设置所选老人的id
* @param {object} state
* @param {array} data
*/
setKeyUserIds(state, data) {
state.keyUserIds = data;
},
/**
* 设置申请家属信息
* @param {object} state
* @param {array} data
*/
setApplyFamilyInfo(state, data) {
state.applyFamilyInfo = data;
},
/**
* 设置是否设置使用者弹框
* @param {object} state
* @param {array} show
*/
setShowSetUser(state, show) {
state.showSetUser = show;
},
};
export default mutations;

9
src/store/yanyuan/state.js

@ -1,8 +1,13 @@
/* eslint-disable */
const state = {
isBinding: false, // 工具箱是否被绑定
toolInfo: {}, // 绑定过的工具箱信息
elderlyInfo: {}, // 用户创建的老人信息
elderlyInfo: [], // 用户创建的老人信息
showChooseElder: false, // 显示选择老人弹框
personalInfo: {}, // 个人信息
isApplying: false, // 是否正在申请成为家属
keyUserIds: [], // 所选老人的id
applyFamilyInfo: {}, // 申请家属信息
showSetUser: false, // 显示设置使用者弹框
};
export default state;

Loading…
Cancel
Save