diff --git a/.env.development b/.env.development
index bee9f00..da6b919 100644
--- a/.env.development
+++ b/.env.development
@@ -6,7 +6,7 @@
# @FilePath: \chargingpile-uniapp\.env.development
###
# 请求域名
-# VITE_APP_BASE_URL= 'http://120.77.216.5:8084'
-VITE_APP_BASE_URL="http://192.168.111.98:8084"
-# VITE_APP_BASE_URL="https://wechat.szcxj2024.com"
+# VITE_APP_BASE_URL= 'http://192.168.111.5:8086'
+VITE_APP_BASE_URL="http://192.168.111.98:8086"
+# VITE_APP_BASE_URL="https://124.220.209.120:8086"
# VITE_APP_SOCKET_URL = 'wss://front.yuegoodlife.com'
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 2965e0f..f08af9b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -13,7 +13,7 @@ import { getAllDict } from '@/hooks/useDictOptions'
const appStore = useAppStore()
const userStore = useUserStore()
-// getAllDict()
+getAllDict()
onLaunch(async () => {
appStore.getSystemInfoFn()
@@ -24,28 +24,9 @@ onLaunch(async () => {
onShow(async () => {
const token = userStore.token
if (token) {
- await appStore.getConfig()
+ // await appStore.getConfig()
appStore.updateLocation()
} else appStore.closeTimer()
})
-
-// function genDates() {
-// const weekdays = ['日', '一', '二', '三', '四', '五', '六']
-// const currentDate = new Date()
-// const currentDayOfWeek = currentDate.getDay()
-// let preDateOfWeek = currentDate.getDate() - 1
-// const daysInRange = []
-// for (let i = currentDayOfWeek; i <= weekdays.length - 1; i++) {
-// preDateOfWeek = preDateOfWeek + 1
-// daysInRange.push(preDateOfWeek)
-// }
-// let currentDateOfWeek = currentDate.getDate()
-// for (let i = 0; i <= weekdays.length - daysInRange.length; i++) {
-// currentDateOfWeek = currentDateOfWeek - 1
-// daysInRange.unshift(currentDateOfWeek)
-// }
-// console.log(daysInRange)
-// }
-// genDates()
diff --git a/src/api/clue.ts b/src/api/clue.ts
new file mode 100644
index 0000000..a9b388f
--- /dev/null
+++ b/src/api/clue.ts
@@ -0,0 +1,34 @@
+import request from '@/utils/request'
+
+// 新增线索
+export function apiAddCluse(params: any) {
+ return request.post({ url: '/clue/add', data: params })
+}
+// 线索列表
+export function apiCluseList(params: any) {
+ return request.get({ url: '/clue/list', data: params })
+}
+// 领取线索
+export function apiGetCluse(params: any) {
+ return request.post({ url: '/clue/grabTheOrder', data: params })
+}
+// 线索详情
+export function apiCluseDetail(params: any) {
+ return request.get({ url: '/clue/detail', data: params })
+}
+// 添加进展
+export function apiAddCluseProgress(params: any) {
+ return request.post({ url: '/clue/addProgress', data: params })
+}
+// 转化完成
+export function apiCompleteCluse(params: any) {
+ return request.post({ url: '/clue/conversionCompleted', data: params })
+}
+// 修改备注
+export function apiEditRemark(params: any) {
+ return request.post({ url: '/clue/modifyRemarks', data: params })
+}
+// 修改跟进
+export function apiEditClue(params: any) {
+ return request.post({ url: '/clue/edit', data: params })
+}
diff --git a/src/api/dict.ts b/src/api/dict.ts
index 9d8bad7..10af5a5 100644
--- a/src/api/dict.ts
+++ b/src/api/dict.ts
@@ -2,10 +2,13 @@ import request from '@/utils/request'
// 所有字典以及字典下的所有数据
export function dictAllDataList() {
- return request.get({
- url: '/setting/dict/type/allDataList',
- data: {
- pageSize: 60
- }
- })
+ return request.get(
+ {
+ url: '/setting/dict/type/allDataList',
+ data: {
+ pageSize: 60
+ }
+ },
+ { isAuth: true }
+ )
}
diff --git a/src/bundle/pages/login/login.vue b/src/bundle/pages/login/login.vue
index 344627d..86e0a4f 100644
--- a/src/bundle/pages/login/login.vue
+++ b/src/bundle/pages/login/login.vue
@@ -193,7 +193,7 @@ async function handleLogin(e) {
scene: LoginTypeEnum.MNP,
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
- channel: ChannelEnum.STAFF_PLATFORM
+ channel: ChannelEnum.USER_PLATFORM
})
// 保存登录数据
loginData.value = data
@@ -228,14 +228,14 @@ async function loginHandle(data: any) {
// 获取用户信息
await userStore.getUser()
// 获取系统配置
- await appStore.getConfig()
+ // await appStore.getConfig()
// 显示登录成功提示
uni.$u.toast('登录成功')
// 隐藏登录加载框
uni.hideLoading()
- appStore.setFirstLogin(true)
+ // appStore.setFirstLogin(true)
const { userInfo } = userStore
if (userInfo.roles?.length > 1) {
uni.redirectTo({
diff --git a/src/bundle/pages/progress_add/index.vue b/src/bundle/pages/progress_add/index.vue
index 932b5fb..12d9650 100644
--- a/src/bundle/pages/progress_add/index.vue
+++ b/src/bundle/pages/progress_add/index.vue
@@ -2,9 +2,9 @@
-
+
-
+
-
+
-
+
-
+
-
- 提交
+
+ 提交{{ form.state }}
diff --git a/src/components/design-container.vue b/src/components/design-container.vue
index 97feffa..11bfa72 100644
--- a/src/components/design-container.vue
+++ b/src/components/design-container.vue
@@ -17,7 +17,6 @@
flex-direction: column;
.wrapper {
flex: 1;
- background-color: #fafafe;
@apply flex flex-col;
}
}
diff --git a/src/components/design-form.vue b/src/components/design-form.vue
index a326659..d29d593 100644
--- a/src/components/design-form.vue
+++ b/src/components/design-form.vue
@@ -120,6 +120,13 @@ export default defineComponent({
})
})
}
+ const resetFields = () => {
+ instance.proxy.children.map(child => {
+ const prop = child.prop
+ const value = uni.$u.getProperty(originalModel.value, prop)
+ uni.$u.setProperty(props.model, prop, value)
+ })
+ }
watch(
() => props.rules,
newVal => {
@@ -139,7 +146,8 @@ export default defineComponent({
)
return {
children: [],
- validate
+ validate,
+ resetFields
}
}
})
diff --git a/src/components/design-input-field.vue b/src/components/design-input-field.vue
index b2b088e..bf1784e 100644
--- a/src/components/design-input-field.vue
+++ b/src/components/design-input-field.vue
@@ -21,6 +21,7 @@
:inputAlign="inputAlign"
:readonly="readonly"
:maxlength="maxlength"
+ placeholderStyle="color: '#7c7e82'"
>
diff --git a/src/components/design-multiselect-field.vue b/src/components/design-multiselect-field.vue
index a8c2e02..fe85c94 100644
--- a/src/components/design-multiselect-field.vue
+++ b/src/components/design-multiselect-field.vue
@@ -58,7 +58,6 @@ const innerValue = ref(props.modelValue)
const handleSelectedItem = (val: number) => {
emit('update:modelValue', val)
innerValue.value = val
- console.log(val)
}
diff --git a/src/components/design-search.vue b/src/components/design-search.vue
index 9cd9f2d..46b55fd 100644
--- a/src/components/design-search.vue
+++ b/src/components/design-search.vue
@@ -58,7 +58,7 @@ const props = defineProps({
default: false
}
})
-const emit = defineEmits(['update:modelValue'])
+const emit = defineEmits(['update:modelValue', 'onInput'])
const innerValue = ref('')
@@ -96,6 +96,7 @@ const isShowClear = computed(() => {
const onInput = e => {
innerValue.value = e.detail.value
emit('update:modelValue', innerValue.value)
+ emit('onInput')
}
const onClear = () => {
innerValue.value = ''
diff --git a/src/components/roles-popup.vue b/src/components/roles-popup.vue
index ffc7a7d..cc2b2fa 100644
--- a/src/components/roles-popup.vue
+++ b/src/components/roles-popup.vue
@@ -47,8 +47,8 @@ const { roles } = useRoleData()
const emit = defineEmits(['update:modelValue', 'close'])
const activeRole = ref(props.modelValue)
const visible = ref(false)
-let currentRoutes = getCurrentPages() // 获取当前打开过的页面路由数组
-let currentRoute = currentRoutes[currentRoutes.length - 1].route //获取当前页面路由
+const currentRoutes = getCurrentPages() // 获取当前打开过的页面路由数组
+const currentRoute = currentRoutes[currentRoutes.length - 1].route //获取当前页面路由
const handleActiveRole = (val: number) => {
activeRole.value = val
}
diff --git a/src/components/tabbar/tabbar.vue b/src/components/tabbar/tabbar.vue
index ef44ece..50b56ef 100644
--- a/src/components/tabbar/tabbar.vue
+++ b/src/components/tabbar/tabbar.vue
@@ -39,6 +39,7 @@ const props = withDefaults(defineProps(), {
const tabBarStore = useTabBarStore()
const { tabBarList, activeTabBar } = storeToRefs(tabBarStore)
+
const handleTabbar = (index: number) => {
tabBarStore.setActiveTabBar(index)
navigateTo(unref(tabBarList)[index], 'reLaunch')
diff --git a/src/components/widgets/card/card.vue b/src/components/widgets/card/card.vue
index 8bbb9b1..2a510dc 100644
--- a/src/components/widgets/card/card.vue
+++ b/src/components/widgets/card/card.vue
@@ -8,12 +8,7 @@
-
-
-
+
diff --git a/src/components/widgets/date-more/date-more.vue b/src/components/widgets/date-more/date-more.vue
index 1dcaf46..a03c64a 100644
--- a/src/components/widgets/date-more/date-more.vue
+++ b/src/components/widgets/date-more/date-more.vue
@@ -14,7 +14,7 @@ import { computed } from 'vue'
const props = defineProps({
curDate: {
- type: String,
+ type: Number,
default: new Date().getTime()
},
type: {
diff --git a/src/components/widgets/recruitsale/clue-card.vue b/src/components/widgets/recruitsale/clue-card.vue
index 31b7044..96724a0 100644
--- a/src/components/widgets/recruitsale/clue-card.vue
+++ b/src/components/widgets/recruitsale/clue-card.vue
@@ -3,9 +3,9 @@
- 韩梅梅
+ {{ item.studentName }}
- 18138952909
+ {{ item.phone }}
@@ -15,7 +15,10 @@
-
+
待电销老师重新跟进
@@ -23,22 +26,33 @@
基本情况
- 学生爸爸接电话,学生高三毕业,300多分,家长不清楚学生收到录取通知,家长说学生不读书了,我让家长先问问学生对未来的规划先和学生沟通一下,家长同意我们加他微信发专业资料给他看看,可以在微信上问问学生具体情况。推荐3+2,给家长发一下学校简介和专业资料。
+ {{ item.basicInformation }}
-
+
电销老师
- 王五
+ {{ item.telemarketingTeacherName }}
-
+
状态
- 账号不存在
+ {{ parseStateText }}
-
+
备注
已交一部分定位金
@@ -51,19 +65,42 @@
-
+
成交时间
2025-02-10 16:04:00
-
- 领取
-
- 添加进展
-
- 转化完成
+
+
+
+ 领取
+
+
+ 添加进展
+
+
+ 转化完成
+
+
@@ -71,18 +108,36 @@
diff --git a/src/enums/appEnums.ts b/src/enums/appEnums.ts
index 70b3e94..fa8ab1e 100644
--- a/src/enums/appEnums.ts
+++ b/src/enums/appEnums.ts
@@ -6,8 +6,8 @@ export enum ThemeEnum {
DARK = 'dark'
}
export enum ChannelEnum {
- USER_PLATFORM = 0,
- STAFF_PLATFORM = 1
+ USER_PLATFORM = 0, // 用户端
+ STAFF_PLATFORM = 1 //师傅端
}
// 客户端
export enum ClientEnum {
diff --git a/src/enums/index.ts b/src/enums/index.ts
new file mode 100644
index 0000000..9efcfa2
--- /dev/null
+++ b/src/enums/index.ts
@@ -0,0 +1,19 @@
+export enum teleSaleEnum {
+ ADD_FOLLOW = 0,
+ FOLLOW_RECORD = 1
+}
+
+export enum converStatusEnum {
+ INTENTION = 0, //有意向
+ UN_RECEIVED = 1, //待领取
+ CONVERTED_PROCESS = 2, //转化中
+ ADD_RELATION = 3, //已添加
+ EXCEPTION = 4, //异常待处理
+ CONVERTED = 5, //已成交
+ FAILED = 6 //已战败
+}
+export enum stateEnum {
+ ADD_RELATION = 0, //账号已添加
+ NO_EXIST = 1, //账号不存在
+ UN_PASS = 2 //账号未通过
+}
diff --git a/src/hooks/useCommon.ts b/src/hooks/useCommon.ts
new file mode 100644
index 0000000..0b84540
--- /dev/null
+++ b/src/hooks/useCommon.ts
@@ -0,0 +1,21 @@
+import { apiCluseDetail } from '@/api/clue'
+import { ref } from 'vue'
+
+// 获取线索详情
+export function useClueDetail() {
+ const clueDetailInfo = ref()
+ const fetchClueDetail = async (id: number | string) => {
+ uni.showLoading({
+ title: '加载中'
+ })
+ try {
+ const result = await apiCluseDetail({ id })
+ clueDetailInfo.value = result
+ } catch (error) {}
+ uni.hideLoading()
+ }
+ return {
+ clueDetailInfo,
+ fetchClueDetail
+ }
+}
diff --git a/src/hooks/useRoleData.ts b/src/hooks/useRoleData.ts
index 15322d0..83a5a77 100644
--- a/src/hooks/useRoleData.ts
+++ b/src/hooks/useRoleData.ts
@@ -23,110 +23,50 @@ export interface RoleItem {
export function useRoleData() {
const roles: RoleItem[] = [
{
- name: '业务员',
- ids: [8, 9],
+ name: '电销老师',
+ ids: [5],
tabBarList: [
{
- text: '客户库',
+ text: '首页',
+ path: '/pages/telesale/home/index',
inactiveIcon: clientInActive,
- activeIcon: clientActive,
- path: '/pages/salesman/client/index'
+ activeIcon: clientActive
},
{
- text: '合同管理',
- path: '/pages/salesman/contract/index',
+ text: '总结模板',
+ path: '/pages/telesale/summary/index',
inactiveIcon: contractInActive,
activeIcon: contractActive
},
{
text: '个人中心',
- path: '/pages/salesman/profile/index',
+ path: '/pages/telesale/my/index',
inactiveIcon: profileInActive,
activeIcon: profileActive
}
]
},
{
- name: '检修员',
+ name: '招生老师',
ids: [6],
tabBarList: [
{
- text: '工单池',
+ text: '首页',
inactiveIcon: order,
activeIcon: orderActive,
- path: '/pages/overhaul/pool/index'
+ path: '/pages/recruitsale/home/index'
},
{
- text: '我的任务',
+ text: '总结模板',
+ path: '/pages/recruitsale/summary/index',
inactiveIcon: task,
- activeIcon: taskActive,
- path: '/pages/overhaul/task/index'
+ activeIcon: taskActive
},
{
text: '个人中心',
+ path: '/pages/recruitsale/my/index',
inactiveIcon: profileInActive,
- activeIcon: profileActive,
- path: '/pages/overhaul/my/index'
- }
- ]
- },
- {
- name: '客户',
- ids: [1, 2, 11],
- tabBarList: [
- {
- text: '工单记录',
- inactiveIcon: order,
- activeIcon: orderActive,
- path: '/pages/client/workOrder/index'
- },
- {
- text: '个人中心',
- inactiveIcon: profileInActive,
- activeIcon: profileActive,
- path: '/pages/client/my/index'
- }
- ]
- },
- {
- name: '维修员',
- ids: [7],
- tabBarList: [
- // {
- // text: '工单池',
- // inactiveIcon: order,
- // activeIcon: orderActive,
- // path: '/pages/repair/pool/index'
- // },
- {
- text: '工单列表',
- inactiveIcon: task,
- activeIcon: taskActive,
- path: '/pages/repair/task/index'
- },
- {
- text: '个人中心',
- inactiveIcon: profileInActive,
- activeIcon: profileActive,
- path: '/pages/repair/my/index'
- }
- ]
- },
- {
- name: '维修主管',
- ids: [10],
- tabBarList: [
- {
- text: '工单列表',
- inactiveIcon: task,
- activeIcon: taskActive,
- path: '/pages/charge/order/index'
- },
- {
- text: '个人中心',
- inactiveIcon: profileInActive,
- activeIcon: profileActive,
- path: '/pages/charge/my/index'
+ activeIcon: profileActive
}
]
}
diff --git a/src/pages.json b/src/pages.json
index 39cd5fb..3b61e73 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1,29 +1,56 @@
{
"pages": [
{
- "path": "pages/recruitsale/home/index",
+ "path": "pages/index/index",
"style": {
- "navigationBarTitleText": ""
- }
- },
- {
- "path": "pages/recruitsale/summary/index",
- "style": {
- "navigationBarTitleText": ""
- }
- },
- {
- "path": "pages/telesale/summary/index",
- "style": {
- "navigationBarTitleText": ""
+ "navigationBarTitleText": "首页",
+ "navigationStyle": "custom"
}
},
{
"path": "pages/telesale/home/index",
"style": {
"navigationBarTitleText": ""
+ },
+ "auth": true
+ },
+ {
+ "path": "pages/recruitsale/home/index",
+ "style": {
+ "navigationBarTitleText": ""
+ },
+ "auth": true
+ },
+ {
+ "path": "pages/telesale/summary/index",
+ "style": {
+ "navigationBarTitleText": ""
+ },
+ "auth": true
+ },
+ {
+ "path": "pages/recruitsale/summary/index",
+ "style": {
+ "navigationBarTitleText": ""
+ },
+ "auth": true
+ },
+ {
+ "path": "pages/recruitsale/my/index",
+ "style": {
+ "navigationBarTitleText": "个人中心",
+ "navigationStyle": "custom"
+ },
+ "auth": true
+ },
+ {
+ "path": "pages/telesale/my/index",
+ "style": {
+ "navigationBarTitleText": "个人中心",
+ "navigationStyle": "custom"
}
},
+
{
"path": "pages/salesman/contract/index",
"style": {
@@ -44,21 +71,6 @@
},
"auth": true
},
- {
- "path": "pages/client/my/index",
- "style": {
- "navigationBarTitleText": "个人中心",
- "navigationStyle": "custom"
- },
- "auth": true
- },
- {
- "path": "pages/salesman/profile/index",
- "style": {
- "navigationBarTitleText": "个人中心",
- "navigationStyle": "custom"
- }
- },
{
"path": "pages/overhaul/pool/index",
"style": {
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 95f0357..cd77dd4 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,86 +1,19 @@
-
-
-
-
-
- {{ item.title }}
- {{ item.desc }}
-
-
-
-
-
-
-
-
- 立即登录
-
-
+
-
-
+
diff --git a/src/pages/recruitsale/home/index.vue b/src/pages/recruitsale/home/index.vue
index 9590e9c..82584b8 100644
--- a/src/pages/recruitsale/home/index.vue
+++ b/src/pages/recruitsale/home/index.vue
@@ -1,7 +1,7 @@
-
+
-
-
-
-
+ >
+
+
-
+
@@ -48,40 +47,33 @@ import { ref } from 'vue'
import clueCard from '@/components/widgets/recruitsale/clue-card.vue'
import { shallowRef } from 'vue'
import { computed } from 'vue'
+import { apiCluseList } from '@/api/clue'
+import { converStatusEnum } from '@/enums'
+import { onLoad } from '@dcloudio/uni-app'
const tabs = shallowRef([
- { name: '待领取', value: 0 },
- { name: '转化中', value: 1 },
- { name: '已成交', value: 2 },
- { name: '已战败', value: 3 }
+ { name: '待领取', value: converStatusEnum.UN_RECEIVED },
+ { name: '转化中', value: converStatusEnum.CONVERTED_PROCESS },
+ { name: '已成交', value: converStatusEnum.CONVERTED },
+ { name: '已战败', value: converStatusEnum.FAILED }
])
-const activeTab = ref(0)
+const activeTab = ref(converStatusEnum.UN_RECEIVED)
const queryParams = computed(() => {
const payload = {
- status: activeTab.value,
- searchValue: ''
+ situation: activeTab.value,
+ likeWork: ''
}
return payload
})
-const dataList = ref([
- {
- id: 1
- },
- {
- id: 2
- },
- {
- id: 3
- }
-])
+const dataList = ref([])
const { paging, queryList, refresh, changeApi, setParams } = useZPaging(
queryParams.value,
- apiOverhaulPagelist,
+ apiCluseList,
() => {}
)
const handleChangeTab = item => {
activeTab.value = item.value
- // refresh(queryParams.value)
+ refresh(queryParams.value)
}
const popupShow = ref(false)
const contentText = ref('')
@@ -91,5 +83,10 @@ const handleUpdateRemark = item => {
contentText.value = remark
}
const handleConfirm = () => {}
+onLoad(() => {
+ uni.$on('refreshPage', () => {
+ refresh(queryParams.value)
+ })
+})
diff --git a/src/pages/recruitsale/my/index.vue b/src/pages/recruitsale/my/index.vue
new file mode 100644
index 0000000..e57819e
--- /dev/null
+++ b/src/pages/recruitsale/my/index.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/src/pages/recruitsale/summary/index.vue b/src/pages/recruitsale/summary/index.vue
index 06f1143..e151c9b 100644
--- a/src/pages/recruitsale/summary/index.vue
+++ b/src/pages/recruitsale/summary/index.vue
@@ -1,9 +1,15 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/telesale/summary/index.vue b/src/pages/telesale/summary/index.vue
index 1dd203c..c8a7c87 100644
--- a/src/pages/telesale/summary/index.vue
+++ b/src/pages/telesale/summary/index.vue
@@ -3,6 +3,7 @@
+
diff --git a/src/static/iconfont/iconfont.css b/src/static/iconfont/iconfont.css
index 33ceab6..6d2bbb5 100644
--- a/src/static/iconfont/iconfont.css
+++ b/src/static/iconfont/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: 'iconfont'; /* Project id 4837700 */
- src: url('//at.alicdn.com/t/c/font_4837700_wjnzp8mer6o.woff2?t=1740542409608') format('woff2'),
- url('//at.alicdn.com/t/c/font_4837700_wjnzp8mer6o.woff?t=1740542409608') format('woff'),
- url('//at.alicdn.com/t/c/font_4837700_wjnzp8mer6o.ttf?t=1740542409608') format('truetype');
+ src: url('//at.alicdn.com/t/c/font_4837700_mvrnof6x61s.woff2?t=1740644911077') format('woff2'),
+ url('//at.alicdn.com/t/c/font_4837700_mvrnof6x61s.woff?t=1740644911077') format('woff'),
+ url('//at.alicdn.com/t/c/font_4837700_mvrnof6x61s.ttf?t=1740644911077') format('truetype');
}
.iconfont {
@@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-clear:before {
+ content: '\e601';
+}
+
+.icon-search:before {
+ content: '\e67d';
+}
+
.icon-left:before {
content: '\e83d';
}
diff --git a/src/stores/app.ts b/src/stores/app.ts
index 1e71873..40bfb40 100644
--- a/src/stores/app.ts
+++ b/src/stores/app.ts
@@ -60,11 +60,11 @@ export const useAppStore = defineStore({
return url ? `${this.config.domain}${url}` : ''
// return url || ''
},
- async getConfig() {
- const data = await apiConfig()
- this.config = data
- cache.set(CONFIG, data)
- },
+ // async getConfig() {
+ // const data = await apiConfig()
+ // this.config = data
+ // cache.set(CONFIG, data)
+ // },
// setCityInfo(city: City) {
// this.cityInfo = city
diff --git a/src/stores/user.ts b/src/stores/user.ts
index e4e11ae..c37600b 100644
--- a/src/stores/user.ts
+++ b/src/stores/user.ts
@@ -5,7 +5,7 @@
* @LastEditTime: 2024-10-27 18:19:43
* @FilePath: \chargingpile-uniapp\src\stores\user.ts
*/
-import { apiUserInfo, getUserCenter } from '@/api/user'
+import { apiUserInfo } from '@/api/user'
import { TOKEN_KEY, USER_INFO, CONFIG, ROLEINDEX } from '@/enums/cacheEnums'
import cache from '@/utils/cache'
import { defineStore } from 'pinia'
@@ -48,14 +48,6 @@ export const useUserStore = defineStore({
const data = await apiUserInfo({
token: this.token || this.temToken
})
- let roleArr = []
- for (const key in data.roleMap) {
- roleArr.push({
- name: data.roleMap[key],
- id: Number(key)
- })
- }
- data.roles = roleArr
this.userInfo = data
cache.set(USER_INFO, data)
}
diff --git a/src/styles/public.scss b/src/styles/public.scss
index 62a9adb..a62801b 100644
--- a/src/styles/public.scss
+++ b/src/styles/public.scss
@@ -288,3 +288,8 @@ page {
}
}
}
+.u-tabbar {
+ .u-tabbar__content {
+ z-index: 99999 !important;
+ }
+}
diff --git a/src/utils/validate.ts b/src/utils/validate.ts
new file mode 100644
index 0000000..319b0e6
--- /dev/null
+++ b/src/utils/validate.ts
@@ -0,0 +1,15 @@
+const mobileReg =
+ /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/
+
+/**手机号码 */
+export function validateContact(rule: any, value: any, callback: any) {
+ if (value) {
+ if (!mobileReg.test(value)) {
+ callback(new Error('请输入正确的电话'))
+ } else {
+ callback()
+ }
+ } else {
+ callback()
+ }
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index d137fc0..55a81d3 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -31,7 +31,8 @@ module.exports = {
lightblack: '#3D3D3D',
border: '#F1F1F1',
border2: '#F3F3F3',
- blue2: '#EEF6FF'
+ blue2: '#EEF6FF',
+ orage: '#ED6D41'
},
fontSize: {
xs: '24rpx',