修改token
parent
b83976b5d1
commit
6e741f941b
|
|
@ -1,4 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
|
// import { useUserStoreWithOut } from "@/store/modules/user";
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "业绩数据"
|
"navigationBarTitleText": "业绩数据"
|
||||||
}
|
}
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
"path": "upload/index",
|
"path": "upload/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "上传数据"
|
"navigationBarTitleText": "上传数据"
|
||||||
|
|
@ -127,6 +128,12 @@
|
||||||
"navigationBarTitleText": "清洁任务提交"
|
"navigationBarTitleText": "清洁任务提交"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "task_ledgers_submit",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "数据上报"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "detail",
|
"path": "detail",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -134,7 +141,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
"root": "pages/expense-account",
|
"root": "pages/expense-account",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
|
|
@ -142,14 +150,16 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "报销管理"
|
"navigationBarTitleText": "报销管理"
|
||||||
}
|
}
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
"path": "submit",
|
"path": "submit",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "报销提交"
|
"navigationBarTitleText": "报销提交"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
"root": "pages/work",
|
"root": "pages/work",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
|
|
@ -167,7 +177,7 @@
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
"backgroundColor": "#FFFFFF",
|
"backgroundColor": "#FFFFFF",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"backgroundColorTop":"#FFFFFF",
|
"backgroundColorTop": "#FFFFFF",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"bounce": "none",
|
"bounce": "none",
|
||||||
"scrollIndicator": "none"
|
"scrollIndicator": "none"
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,17 @@ import { useUserStore } from '@/store/modules/user'
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
username: 'admin',
|
username: '',
|
||||||
password: 'admin',
|
password: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleClick = async () => {
|
const handleClick = async () => {
|
||||||
try {
|
try {
|
||||||
const { username, password } = form.value
|
// const { username, password } = form.value
|
||||||
await userStore.login({
|
// await userStore.login({
|
||||||
username,
|
// username,
|
||||||
password,
|
// password,
|
||||||
})
|
// })
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/home/index',
|
url: '/pages/home/index',
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<CuNavbar title="上报"></CuNavbar>
|
<CuNavbar :isBack="isBack" title="上报"></CuNavbar>
|
||||||
<uv-sticky>
|
<uv-sticky>
|
||||||
<view class="bg-white h-80rpx flex items-center px-base">
|
<view class="bg-white h-80rpx flex items-center px-base">
|
||||||
<view>2024-03-21</view>
|
<view>2024-03-21</view>
|
||||||
<uv-icon class="ml-10rpx" size="20rpx" name="arrow-down-fill"></uv-icon>
|
<uv-icon class="ml-10rpx" size="20rpx" name="arrow-down-fill"></uv-icon>
|
||||||
</view>
|
</view>
|
||||||
</uv-sticky>
|
</uv-sticky>
|
||||||
|
{{ store.is_lottery_store }}
|
||||||
<uv-form
|
<uv-form
|
||||||
class="mt-30rpx"
|
class="mt-30rpx"
|
||||||
labelPosition="left"
|
labelPosition="left"
|
||||||
|
|
@ -14,6 +15,22 @@
|
||||||
labelWidth="130rpx"
|
labelWidth="130rpx"
|
||||||
>
|
>
|
||||||
<view class="px-base space-y-20rpx">
|
<view class="px-base space-y-20rpx">
|
||||||
|
<view class="card">
|
||||||
|
<view class="pl-20rpx">
|
||||||
|
<uv-form-item label="日期" prop="userInfo.sex">
|
||||||
|
<uv-input
|
||||||
|
disabled
|
||||||
|
disabledColor="#ffffff"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
:border="`none`"
|
||||||
|
>
|
||||||
|
</uv-input>
|
||||||
|
<template v-slot:right>
|
||||||
|
<uv-icon name="arrow-right"></uv-icon>
|
||||||
|
</template>
|
||||||
|
</uv-form-item>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<TitleComp title="电彩"></TitleComp>
|
<TitleComp title="电彩"></TitleComp>
|
||||||
<view class="pl-20rpx">
|
<view class="pl-20rpx">
|
||||||
|
|
@ -101,13 +118,55 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { http } from '@/utils/request'
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import TitleComp from '@/components/title-comp/index'
|
import TitleComp from '@/components/title-comp/index'
|
||||||
import { addUnit, sys } from '@climblee/uv-ui/libs/function/index'
|
import { addUnit, sys } from '@climblee/uv-ui/libs/function/index'
|
||||||
import { computed } from 'vue'
|
import { computed, ref, onBeforeMount, reactive } from 'vue'
|
||||||
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
const userInfo = computed(() => userStore.userInfo || {})
|
||||||
|
const store = computed(() => userInfo.value.store)
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
dateTime: Number(new Date()),
|
||||||
|
items: [],
|
||||||
|
new_customers: '',
|
||||||
|
sales: '',
|
||||||
|
expenditure: '',
|
||||||
|
handover_amount: '',
|
||||||
|
photos: [],
|
||||||
|
})
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
isBack: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
})
|
||||||
const style = computed(() => {
|
const style = computed(() => {
|
||||||
const style = {}
|
const style = {}
|
||||||
style.bottom = addUnit(sys().windowBottom, 'px')
|
style.bottom = addUnit(sys().windowBottom, 'px')
|
||||||
return style
|
return style
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
if (!store.value.is_lottery_store) {
|
||||||
|
getTypeList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const getTypeList = () => {
|
||||||
|
http
|
||||||
|
.get('/keywords', {
|
||||||
|
params: {
|
||||||
|
parent_key: 'lottery_type',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,9 @@ const tabList = ref([
|
||||||
{
|
{
|
||||||
name: '任务审核',
|
name: '任务审核',
|
||||||
apiUrl: '/workflow',
|
apiUrl: '/workflow',
|
||||||
params: {},
|
params: {
|
||||||
|
// aaa:111
|
||||||
|
},
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,19 +87,28 @@ const onSubmit = async () => {
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const resData = await http.post(`/tasks/${id.value}/submit`, {
|
await http.request({
|
||||||
id: id.value,
|
url: `/tasks/${id.value}/submit`,
|
||||||
description: form.description,
|
method: 'POST',
|
||||||
photos: form.photos.map((item) => item.url),
|
header: {
|
||||||
|
Accept: 'application/json',
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
task_hygiene: {
|
||||||
|
description: form.description,
|
||||||
|
photos: form.photos.map((item) => item.url),
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
uni.$emit('ex:submit', resData)
|
uni.$emit('task:submit', resData)
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<RevertPage :isBack="true"></RevertPage>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import RevertPage from "@/pages/revert/index";
|
||||||
|
</script>
|
||||||
|
|
@ -6,7 +6,8 @@ export const useUserStore = defineStore({
|
||||||
id: 'app-user',
|
id: 'app-user',
|
||||||
state: () => ({
|
state: () => ({
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
token: null,
|
token: '22|ua3STGluZFzDeV1nOs4I3S9s2UCDtQp9AtVLT2jN0535e0a5',
|
||||||
|
roles: []
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
getUserInfo(state) {
|
getUserInfo(state) {
|
||||||
|
|
@ -35,6 +36,7 @@ export const useUserStore = defineStore({
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
http.get('/auth/profile').then(async (res) => {
|
http.get('/auth/profile').then(async (res) => {
|
||||||
this.userInfo = res
|
this.userInfo = res
|
||||||
|
this.roles = res.role
|
||||||
resolve(res);
|
resolve(res);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ http.interceptors.response.use(async (response) => {
|
||||||
|
|
||||||
// 处理响应结果
|
// 处理响应结果
|
||||||
const { statusCode, data } = response
|
const { statusCode, data } = response
|
||||||
if (statusCode !== 200 && statusCode !== 201) {
|
if (statusCode >= 400) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: data.message || '服务器错误',
|
title: data.message || '服务器错误',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue