Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lihuizhen
ec-report-refactor
Commits
f3f00306
Commit
f3f00306
authored
Jan 09, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: page add share
parent
17888a7c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
152 additions
and
158 deletions
+152
-158
details.vue
pages/details/details.vue
+4
-1
index.vue
pages/index/index.vue
+5
-1
login.vue
pages/login/login.vue
+139
-156
reports.vue
pages/reports/reports.vue
+4
-0
No files found.
pages/details/details.vue
View file @
f3f00306
...
...
@@ -125,6 +125,9 @@
this
.
getReportIdList
()
}
this
.
getReportCharts
()
},
onShareAppMessage
()
{
},
onShow
()
{
const
that
=
this
...
...
pages/index/index.vue
View file @
f3f00306
...
...
@@ -116,6 +116,10 @@
this
.
userAuthCheck
()
},
onShareAppMessage
()
{
},
// detail页面也会监听这两个事件,所有index页面需要在onShow里面增加监听,在onHide里面移除监听
onShow
()
{
const
that
=
this
...
...
pages/login/login.vue
View file @
f3f00306
<
template
>
<view
class=
"wrap"
>
<view
class=
"content"
>
<u-form
ref=
"uForm"
:model=
"params"
:error-type=
"['toast']"
:label-width=
"200"
>
<u-form
ref=
"uForm"
:model=
"params"
:error-type=
"['toast']"
:label-width=
"200"
>
<u-form-item
label=
"用户名"
prop=
"userName"
>
<u-input
v-model=
"params.userName"
placeholder=
"请输入用户名"
type=
"text"
/>
<u-input
v-model=
"params.userName"
placeholder=
"请输入用户名"
type=
"text"
/>
</u-form-item>
<u-form-item
label=
"密码"
prop=
"password"
>
<u-input
v-model=
"params.password"
placeholder=
"请输入密码"
type=
"password"
:password-icon=
"true"
/>
<u-input
v-model=
"params.password"
placeholder=
"请输入密码"
type=
"password"
:password-icon=
"true"
/>
</u-form-item>
<u-form-item
label=
"员工号(选填)"
prop=
"staffNo"
>
<u-input
v-model=
"params.staffNo"
placeholder=
"填写员工号可以更精确的获取权限"
type=
"number"
/>
<u-input
v-model=
"params.staffNo"
placeholder=
"填写员工号可以更精确的获取权限"
type=
"number"
/>
</u-form-item>
</u-form>
<u-button
class=
"my-u-block u-m-t-80"
type=
"warning"
shape=
"square"
:ripple=
"true"
@
click=
"submit('login')"
:disabled=
"!submitDisabled"
>
登入
</u-button>
<u-button
class=
"my-u-block u-m-t-80"
type=
"warning"
shape=
"square"
:ripple=
"true"
@
click=
"submit('register')"
:disabled=
"!submitDisabled"
>
注册
</u-button>
<u-button
class=
"my-u-block u-m-t-80"
type=
"warning"
shape=
"square"
:ripple=
"true"
@
click=
"submit('login')"
:disabled=
"!submitDisabled"
>
登入
</u-button>
<u-button
class=
"my-u-block u-m-t-80"
type=
"warning"
shape=
"square"
:ripple=
"true"
@
click=
"submit('register')"
:disabled=
"!submitDisabled"
>
注册
</u-button>
<text
class=
"tips-text"
>
使用须知:仅限企业内部人员使用,使用前需要认证用户
</text>
</view>
...
...
@@ -53,25 +23,31 @@
</
template
>
<
script
>
export
default
{
export
default
{
data
()
{
return
{
params
:
{
appId
:
wx
.
getAccountInfoSync
().
miniProgram
.
appId
,
userName
:
''
,
password
:
''
,
staffNo
:
''
staffNo
:
''
},
rules
:
{
userName
:
[
{
required
:
true
,
message
:
'请输入用户名'
,
trigger
:
'blur'
}
],
password
:
[
{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
}
],
staffNumber
:[
{
required
:
true
,
message
:
'员工号(选填)'
,
trigger
:
'blur'
}
]
userName
:
[{
required
:
true
,
message
:
'请输入用户名'
,
trigger
:
'blur'
}],
password
:
[{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
}],
staffNumber
:
[{
required
:
true
,
message
:
'员工号(选填)'
,
trigger
:
'blur'
}]
}
}
},
...
...
@@ -96,7 +72,10 @@ export default {
}
}
let
res
=
await
info
.
url
const
{
Status
,
Result
}
=
res
.
data
const
{
Status
,
Result
}
=
res
.
data
if
(
Status
===
'true'
)
{
this
.
$u
.
vuex
(
'vuex_token'
,
`
${
res
.
token_type
}
${
res
.
access_token
}
`
)
this
.
$u
.
toast
(
info
.
msg
)
...
...
@@ -143,8 +122,12 @@ export default {
},
onReady
()
{
this
.
$refs
.
uForm
.
setRules
(
this
.
rules
)
},
onShareAppMessage
()
{
}
};
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
pages/reports/reports.vue
View file @
f3f00306
...
...
@@ -46,6 +46,10 @@
onLoad
()
{
this
.
getReportList
()
},
onShareAppMessage
()
{
},
methods
:
{
/**
* 获取页面报表配置
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment