Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cxerpapp
Project
Project
Details
Activity
Releases
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
李苏
cxerpapp
Commits
04d4a2f2
Commit
04d4a2f2
authored
Jan 30, 2023
by
王向前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
057a258a
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
312 additions
and
97 deletions
+312
-97
App.vue
App.vue
+115
-30
index.js
common/router/index.js
+4
-5
routes.js
common/router/modules/routes.js
+14
-0
config.service.js
common/service/config.service.js
+7
-7
appUpdate.js
common/util/appUpdate.js
+6
-0
manifest.json
manifest.json
+2
-2
pages.json
pages.json
+4
-0
home.vue
pages/home/home.vue
+2
-2
cusmerLogin.vue
pages/login/cusmerLogin.vue
+9
-2
index.vue
pages/mxcxcgdd/index.vue
+11
-3
index.vue
pages/mxcxsfhz/index.vue
+10
-3
index.vue
pages/mxcxxsdd/index.vue
+12
-4
process.vue
pages/process/process.vue
+1
-1
people.vue
pages/user/people.vue
+4
-4
cu-custom.vue
plugin/colorui/components/cu-custom.vue
+13
-10
index.js
store/index.js
+98
-24
No files found.
App.vue
View file @
04d4a2f2
<
script
>
<
script
>
import
Vue
from
'vue'
import
Vue
from
'vue'
import
appUpdate
from
'common/util/appUpdate.js'
// import appUpdate from 'common/util/appUpdate.js'
import
{
mapActions
}
from
"vuex"
import
md5
from
'common/util/md5.js'
export
default
{
export
default
{
onLaunch
:
function
()
{
onLaunch
:
function
()
{
uni
.
getSystemInfo
({
uni
.
getSystemInfo
({
success
:
function
(
e
)
{
success
:
function
(
e
)
{
// #ifdef APP-PLUS
// 检测升级
appUpdate
()
// #endif
// #ifndef MP
// #ifndef MP
Vue
.
prototype
.
StatusBar
=
e
.
statusBarHeight
;
Vue
.
prototype
.
StatusBar
=
e
.
statusBarHeight
;
if
(
e
.
platform
==
'android'
)
{
if
(
e
.
platform
==
'android'
)
{
...
@@ -18,40 +16,22 @@
...
@@ -18,40 +16,22 @@
Vue
.
prototype
.
CustomBar
=
e
.
statusBarHeight
+
45
;
Vue
.
prototype
.
CustomBar
=
e
.
statusBarHeight
+
45
;
};
};
// #endif
// #endif
// #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN
Vue
.
prototype
.
StatusBar
=
e
.
statusBarHeight
;
Vue
.
prototype
.
StatusBar
=
e
.
statusBarHeight
;
let
custom
=
wx
.
getMenuButtonBoundingClientRect
();
let
custom
=
wx
.
getMenuButtonBoundingClientRect
();
Vue
.
prototype
.
Custom
=
custom
;
Vue
.
prototype
.
Custom
=
custom
;
Vue
.
prototype
.
CustomBar
=
custom
.
bottom
+
custom
.
top
-
e
.
statusBarHeight
;
Vue
.
prototype
.
CustomBar
=
custom
.
bottom
+
custom
.
top
-
e
.
statusBarHeight
;
// #endif
// #endif
// #ifdef MP-ALIPAY
// #ifdef MP-ALIPAY
Vue
.
prototype
.
StatusBar
=
e
.
statusBarHeight
;
Vue
.
prototype
.
StatusBar
=
e
.
statusBarHeight
;
Vue
.
prototype
.
CustomBar
=
e
.
statusBarHeight
+
e
.
titleBarHeight
;
Vue
.
prototype
.
CustomBar
=
e
.
statusBarHeight
+
e
.
titleBarHeight
;
// #endif
// #endif
// #ifdef APP-PLUS
// #ifdef APP-PLUS
//Vue.prototype.$api.listenTranMsg()
// var info = plus.push.getClientInfo();
// /* 5+ push 消息推送 ps:使用:H5+的方式监听,实现推送*/
// plus.push.addEventListener("click", function(msg) {
// console.log("click:" + JSON.stringify(msg));
// console.log(msg.payload);
// console.log(JSON.stringify(msg));
// //这里可以写跳转业务代码
// }, false);
// // 监听在线消息事件
// plus.push.addEventListener("receive", function(msg) {
// // plus.ui.alert(2);
// //这里可以写跳转业务代码
// console.log("recevice:" + JSON.stringify(msg))
// }, false);
// #endif
// #endif
//Vue.prototype.$api.initLogin()
}
}
})
})
Vue
.
prototype
.
NavBarColor
=
'bg-gradual-blue'
Vue
.
prototype
.
NavBarColor
=
'bg-gradual-blue'
...
@@ -138,13 +118,46 @@
...
@@ -138,13 +118,46 @@
color
:
'#ffffff'
color
:
'#ffffff'
},
},
]
]
let
_this
=
this
;
uni
.
getStorage
({
//获得保存在本地的用户信息
key
:
'userinfo'
,
success
:(
res
)
=>
{
let
userinfo
=
res
.
data
.
userinfo
this
.
mLogin
(
userinfo
).
then
((
res
)
=>
{
if
(
res
.
data
.
success
){
// _this.$tip.success('登录成功!')
uni
.
setStorage
({
key
:
'ACCESS_TOKEN'
,
data
:
res
.
data
.
data
.
token
,
success
:
function
()
{
_this
.
$Router
.
replace
({
name
:
'index'
})
},
fail
:
function
()
{
// this.$tip.alert("未获取token,请重新登录");
}
});
}
else
{
// this.$tip.alert(res.data.message);
}
}).
catch
((
err
)
=>
{
// this.$tip.alert("自动登录失败");
this
.
$Router
.
replaceAll
({
name
:
"cusmerLogin"
})
}).
finally
(()
=>
{
})
}})
},
},
methods
:
{
...
mapActions
([
"mLogin"
,
"SetPressmisson"
]),
},
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'App Show'
)
},
},
onHide
:
function
()
{
onHide
:
function
()
{
console
.
log
(
'App Hide'
)
}
}
}
}
...
@@ -154,6 +167,61 @@
...
@@ -154,6 +167,61 @@
@import
"plugin/colorui/main.css"
;
@import
"plugin/colorui/main.css"
;
@import
"plugin/colorui/icon.css"
;
@import
"plugin/colorui/icon.css"
;
@import
"plugin/colorui/animation.css"
;
@import
"plugin/colorui/animation.css"
;
/* 解决checkbox失效
*/
page
{
background-color
:
white
;
}
uni-picker
{
height
:
36px
;
}
.cu-item
:after
{
border
:
0
;
}
.textRed
{
color
:
red
;
}
.textGreen
{
color
:
green
;
}
.uni-forms-item__label
.label-text
{
color
:
#333
!important
;
}
.uni-form-content
{
padding-left
:
20px
;
margin-top
:
0px
;
}
/
deep
/
.uni-collapse-item-border
{
border-bottom
:
solid
#EEEEEE
0px
!important
;
}
/
deep
/
.uni-collapse-item__wrap
{
border-bottom
:
solid
#EEEEEE
10px
!important
;
}
.wbgeee
{
padding
:
10px
;
background-color
:
#f8f8f8
;
}
.wbgw
{
height
:
100%
;
width
:
100%
;
border-radius
:
5%
;
}
.border-bot
{
border-bottom
:
#F8F8F8
solid
5px
;
}
.textarea-ls
{
width
:
70vw
;
padding
:
10px
;
border
:
1px
#eee
solid
;
border-radius
:
5px
;
margin
:
10px
;
}
uni-checkbox
.uni-checkbox-input
{
border-radius
:
3
upx
!important
;
color
:
#ffffff
!important
;
}
uni-checkbox
.uni-checkbox-input.uni-checkbox-input-checked
{
color
:
#fff
;
border-color
:
rgb
(
0
,
122
,
255
);
background
:
rgb
(
0
,
122
,
255
);
}
uni-checkbox
.uni-checkbox-input.uni-checkbox-input-checked
:after
{
font-size
:
18px
;
}
.lccontent
{
.lccontent
{
padding
:
60
rpx
;
padding
:
60
rpx
;
...
@@ -163,7 +231,6 @@
...
@@ -163,7 +231,6 @@
}
}
}
}
.bg-blue
{
.bg-blue
{
background-color
:
#0081FF
!important
;
color
:
#FFFFFF
!important
;
color
:
#FFFFFF
!important
;
}
}
.newts
{
.newts
{
...
@@ -269,7 +336,14 @@
...
@@ -269,7 +336,14 @@
font-size
:
36
upx
;
font-size
:
36
upx
;
margin-right
:
1px
;
margin-right
:
1px
;
}
}
.flexRight
{
display
:
flex
;
justify-content
:
flex-end
;
}
.absoluteRight
{
position
:
absolute
;
z-index
:
99
;
right
:
10px
;
}
.nav-li
text
{
.nav-li
text
{
position
:
absolute
;
position
:
absolute
;
right
:
30
upx
;
right
:
30
upx
;
...
@@ -284,7 +358,18 @@
...
@@ -284,7 +358,18 @@
.text-light
{
.text-light
{
font-weight
:
300
;
font-weight
:
300
;
}
}
.fixed-bottom
{
position
:
fixed
;
left
:
0
;
width
:
100%
;
right
:
100%
;
bottom
:
0
;
z-index
:
99999
;
}
.border-top
{
border-top
:
1px
solid
#f8f8f8
;
}
@keyframes
show
{
@keyframes
show
{
0
%
{
0
%
{
transform
:
translateY
(
-50px
);
transform
:
translateY
(
-50px
);
...
...
common/router/index.js
View file @
04d4a2f2
...
@@ -10,23 +10,22 @@ const router = new Router({
...
@@ -10,23 +10,22 @@ const router = new Router({
routes
:
[...
modules
]
//路由表
routes
:
[...
modules
]
//路由表
});
});
console
.
log
(
router
)
console
.
log
(
router
)
const
whiteList
=
[
'/pages/login/login'
,
'/pages/login/cusmerLogin'
]
const
whiteList
=
[
'/pages/login/login'
,
'/pages/login/cusmerLogin'
,
'/pages/login/update'
]
//全局路由前置守卫
//全局路由前置守卫
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
from
)
console
.
log
(
to
,
'to'
)
let
token
=
uni
.
getStorageSync
(
"ACCESS_TOKEN"
);
let
token
=
uni
.
getStorageSync
(
"ACCESS_TOKEN"
);
if
(
token
){
if
(
token
){
next
()
next
()
}
else
if
(
to
.
name
==
"fwqsz"
){
}
else
if
(
to
.
name
==
"fwqsz"
||
to
.
name
==
"register"
||
to
.
name
==
"update"
||
to
.
name
==
"login"
){
next
()
next
()
}
else
{
}
else
{
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
next
()
next
()
}
else
{
}
else
{
next
({
path
:
'/pages/login/
l
ogin'
})
next
({
path
:
'/pages/login/
cusmerL
ogin'
})
}
}
}
}
next
()
})
})
// 全局路由后置守卫
// 全局路由后置守卫
router
.
afterEach
((
to
,
from
)
=>
{
router
.
afterEach
((
to
,
from
)
=>
{
...
...
common/router/modules/routes.js
View file @
04d4a2f2
...
@@ -6,6 +6,20 @@ const routes = [
...
@@ -6,6 +6,20 @@ const routes = [
title
:
'登录'
,
title
:
'登录'
,
},
},
},
},
{
path
:
"/pages/login/cusmerLogin"
,
name
:
'cusmerLogin'
,
meta
:
{
title
:
'云登录'
,
},
},
{
path
:
"/pages/login/update"
,
name
:
'update'
,
meta
:
{
title
:
'更新'
,
},
},
{
{
path
:
"/pages/login/fwqsz"
,
path
:
"/pages/login/fwqsz"
,
name
:
'fwqsz'
,
name
:
'fwqsz'
,
...
...
common/service/config.service.js
View file @
04d4a2f2
let
BASE_URL
=
''
let
BASE_URL
=
''
let
fwq
=
""
let
fwq
=
"
clouderp.gavelinfo.com/erp
"
// 修改
// 修改
try
{
//
try {
fwq
=
uni
.
getStorageSync
(
'fwq'
);
//
fwq = uni.getStorageSync('fwq');
}
catch
(
e
)
{
//
} catch (e) {
// error
//
// error
}
//
}
let
newUrl
=
'http://'
+
fwq
let
newUrl
=
'http
s
://'
+
fwq
console
.
log
(
BASE_URL
)
console
.
log
(
BASE_URL
)
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
BASE_URL
=
newUrl
BASE_URL
=
newUrl
...
...
common/util/appUpdate.js
View file @
04d4a2f2
...
@@ -64,6 +64,12 @@ export default function appUpdate(loginApp) {
...
@@ -64,6 +64,12 @@ export default function appUpdate(loginApp) {
}
}
}
}
if
(
verC
<
0
)
{
if
(
verC
<
0
)
{
var
downUrl
=
res
.
data
.
url
;
if
(
downUrl
&&
downUrl
.
includes
(
".wgt"
)){
flag_hot
=
true
;
}
else
{
flag_hot
=
false
}
loginApp
.
showProcess
(
'检测到最新版本'
,
90
)
loginApp
.
showProcess
(
'检测到最新版本'
,
90
)
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
flag_hot
)
{
if
(
flag_hot
)
{
...
...
manifest.json
View file @
04d4a2f2
{
{
"name"
:
"格物ERP"
,
"name"
:
"格物
云
ERP"
,
"appid"
:
"__UNI__
C98E701
"
,
"appid"
:
"__UNI__
4557C88
"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"4"
,
"versionName"
:
"4"
,
"versionCode"
:
4
,
"versionCode"
:
4
,
...
...
pages.json
View file @
04d4a2f2
{
{
"pages"
:
[
"pages"
:
[
//
云erp
//
云erp
{
"path"
:
"pages/login/update"
,
"style"
:
{}
},
{
{
"path"
:
"pages/login/cusmerLogin"
,
"path"
:
"pages/login/cusmerLogin"
,
"style"
:
{}
"style"
:
{}
...
...
pages/home/home.vue
View file @
04d4a2f2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"home-page"
>
<view
class=
"home-page"
>
<cu-custom
bgColor=
"bg-white"
>
<cu-custom
bgColor=
"bg-white"
>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"right"
><image
@
tap=
"goindex()"
src=
"../../static/icon/application.png"
></image></block
>
<!--
<block
slot=
"right"
><image
@
tap=
"goindex()"
src=
"../../static/icon/application.png"
></image></block>
--
>
</cu-custom>
</cu-custom>
<scroll-view
:style=
"[
{top:CustomBar + 'px'}]" class="">
<scroll-view
:style=
"[
{top:CustomBar + 'px'}]" class="">
<view
class=
"cu-bar bg-white search"
style=
"position: relative;"
>
<view
class=
"cu-bar bg-white search"
style=
"position: relative;"
>
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
showlist
:[],
showlist
:[],
searchKey
:
""
,
searchKey
:
""
,
CustomBar
:
this
.
CustomBar
,
CustomBar
:
this
.
CustomBar
,
title
:
"格物ERP"
,
title
:
"格物
云
ERP"
,
swiperList
:
[
swiperList
:
[
{
id
:
1
,
type
:
'image'
,
url
:
'/static/banner/banner1.png'
,
link
:
''
},
{
id
:
1
,
type
:
'image'
,
url
:
'/static/banner/banner1.png'
,
link
:
''
},
],
],
...
...
pages/login/cusmerLogin.vue
View file @
04d4a2f2
...
@@ -57,9 +57,9 @@
...
@@ -57,9 +57,9 @@
<!-- #ifdef APP-PLUS -->
<!-- #ifdef APP-PLUS -->
<view
class=
"padding flex flex-direction text-center"
>
<!--
<view
class=
"padding flex flex-direction text-center"
>
当前版本:
{{
version
}}
当前版本:
{{
version
}}
</view>
</view>
-->
<!-- #endif -->
<!-- #endif -->
</view>
</view>
...
@@ -290,6 +290,13 @@
...
@@ -290,6 +290,13 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
loginurl
=
resp
.
data
.
data
.
records
+
"&&tp='1'"
;
this
.
loginurl
=
resp
.
data
.
data
.
records
+
"&&tp='1'"
;
/* this.loginT() */
/* this.loginT() */
uni
.
setStorage
({
key
:
'userinfo'
,
data
:{...{
'userinfo'
:
params
},...
resp
.
data
.
data
},
success
:
function
(
r
)
{
console
.
log
(
r
);
}
});
uni
.
setStorage
({
uni
.
setStorage
({
key
:
'userid'
,
key
:
'userid'
,
data
:
resp
.
data
.
data
.
userid
,
data
:
resp
.
data
.
data
.
userid
,
...
...
pages/mxcxcgdd/index.vue
View file @
04d4a2f2
<
template
>
<
template
>
<view
class=
"bg-white"
>
<view
class=
"bg-white"
>
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
cx=
true
modal=
"bottomModal"
@
open=
"cuopen"
:modalName=
"modalName"
>
<
!--
<
cu-custom
bgColor=
"bg-white"
isBack=
"true"
cx=
true
modal=
"bottomModal"
@
open=
"cuopen"
:modalName=
"modalName"
>
<slot
slot=
"backText"
>
返回
</slot>
<slot
slot=
"backText"
>
返回
</slot>
</cu-custom>
-->
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
@
tapBind=
"cuopen"
>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"right"
><text
class=
"cuIcon-search"
>
查询
</text></block>
</cu-custom>
</cu-custom>
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"flex text-center flex-wrap"
>
<view
class=
"flex text-center flex-wrap"
>
...
@@ -11,7 +15,6 @@
...
@@ -11,7 +15,6 @@
</view>
</view>
<view
class=
""
style=
"height: 30px;line-height: 30px;padding-left: 30px;padding-right: 30px;text-align: right;"
>
当前共查询到
{{
total
}}
个结果
</view>
<view
class=
""
style=
"height: 30px;line-height: 30px;padding-left: 30px;padding-right: 30px;text-align: right;"
>
当前共查询到
{{
total
}}
个结果
</view>
</view>
</view>
<view
class=
"container"
>
<view
class=
"container"
>
<view
class=
"index"
>
<view
class=
"index"
>
<view
v-if=
"!showlist[0]"
style=
"margin-top: 140px;background-image: url(/static/sswnr.png);height: calc( 100vh - 185px);background-size:100% 70%;background-repeat:no-repeat;"
></view>
<view
v-if=
"!showlist[0]"
style=
"margin-top: 140px;background-image: url(/static/sswnr.png);height: calc( 100vh - 185px);background-size:100% 70%;background-repeat:no-repeat;"
></view>
...
@@ -235,6 +238,7 @@
...
@@ -235,6 +238,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
title
:
"采购订单明细"
,
poid
:
""
,
poid
:
""
,
cgyinfo
:
""
,
cgyinfo
:
""
,
wlxxinfo
:
""
,
wlxxinfo
:
""
,
...
@@ -277,7 +281,7 @@
...
@@ -277,7 +281,7 @@
},
},
methods
:
{
methods
:
{
cuopen
(
e
){
cuopen
(
e
){
this
.
modalName
=
e
this
.
modalName
=
"bottomModal"
},
},
// 获取上个月日期
// 获取上个月日期
// 获取上一个月时间,返回yyyy-MM-dd字符串
// 获取上一个月时间,返回yyyy-MM-dd字符串
...
@@ -624,5 +628,9 @@
...
@@ -624,5 +628,9 @@
/* .list-da view text {
/* .list-da view text {
color: red;
color: red;
} */
} */
/
deep
/
.cu-custom
.cu-bar
.action
:last-child
{
width
:
140
rpx
;
}
</
style
>
</
style
>
pages/mxcxsfhz/index.vue
View file @
04d4a2f2
<
template
>
<
template
>
<view
class=
"bg-white"
>
<view
class=
"bg-white"
>
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
cx=
true
modal=
"bottomModal"
@
open=
"cuopen"
:modalName=
"modalName"
>
<
!--
<
cu-custom
bgColor=
"bg-white"
isBack=
"true"
cx=
true
modal=
"bottomModal"
@
open=
"cuopen"
:modalName=
"modalName"
>
<slot
slot=
"backText"
>
返回
</slot>
<slot
slot=
"backText"
>
返回
</slot>
</cu-custom>
-->
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
@
tapBind=
"cuopen"
>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"right"
><text
class=
"cuIcon-search"
>
查询
</text></block>
</cu-custom>
</cu-custom>
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"flex text-center flex-wrap"
>
<view
class=
"flex text-center flex-wrap"
>
...
@@ -233,6 +237,7 @@
...
@@ -233,6 +237,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
title
:
"收发汇总"
,
sum
:{
bqcksl
:
0
,
bqrksl
:
0
,
qcjcsl
:
0
,
qmjcsl
:
0
},
sum
:{
bqcksl
:
0
,
bqrksl
:
0
,
qcjcsl
:
0
,
qmjcsl
:
0
},
wlph
:
""
,
wlph
:
""
,
kwid
:
""
,
kwid
:
""
,
...
@@ -273,7 +278,7 @@
...
@@ -273,7 +278,7 @@
},
},
methods
:
{
methods
:
{
cuopen
(
e
){
cuopen
(
e
){
this
.
modalName
=
e
this
.
modalName
=
"bottomModal"
},
},
// 获取上个月日期
// 获取上个月日期
// 获取上一个月时间,返回yyyy-MM-dd字符串
// 获取上一个月时间,返回yyyy-MM-dd字符串
...
@@ -608,5 +613,7 @@
...
@@ -608,5 +613,7 @@
/* .list-da view text {
/* .list-da view text {
color: red;
color: red;
} */
} */
/
deep
/
.cu-custom
.cu-bar
.action
:last-child
{
width
:
140
rpx
;
}
</
style
>
</
style
>
pages/mxcxxsdd/index.vue
View file @
04d4a2f2
<
template
>
<
template
>
<view
class=
"bg-white"
>
<view
class=
"bg-white"
>
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
cx=
true
modal=
"bottomModal"
@
open=
"cuopen"
:modalName=
"modalName"
>
<!--
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
cx=
true
modal=
"bottomModal"
@
open=
"cuopen"
:modalName=
"modalName"
>
<slot
v-slot=
""
></slot>
<slot
slot=
"backText"
>
返回
</slot>
<slot
slot=
"backText"
>
返回
</slot>
</cu-custom>
-->
<cu-custom
bgColor=
"bg-white"
isBack=
"true"
@
tapBind=
"cuopen"
>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"right"
><text
class=
"cuIcon-search"
>
查询
</text></block>
</cu-custom>
</cu-custom>
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"flex text-center flex-wrap"
>
<view
class=
"flex text-center flex-wrap"
>
...
@@ -216,6 +221,7 @@
...
@@ -216,6 +221,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
title
:
"销售订单明细"
,
soid
:
""
,
soid
:
""
,
wlxxinfo
:
""
,
wlxxinfo
:
""
,
startdate
:
'2021-01-01'
,
startdate
:
'2021-01-01'
,
...
@@ -257,7 +263,7 @@
...
@@ -257,7 +263,7 @@
},
},
methods
:
{
methods
:
{
cuopen
(
e
){
cuopen
(
e
){
this
.
modalName
=
e
this
.
modalName
=
"bottomModal"
},
},
// 获取上个月日期
// 获取上个月日期
// 获取上一个月时间,返回yyyy-MM-dd字符串
// 获取上一个月时间,返回yyyy-MM-dd字符串
...
@@ -424,7 +430,7 @@
...
@@ -424,7 +430,7 @@
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
lang=
"scss"
>
.tjys
{
.tjys
{
margin-left
:
20%
;
margin-left
:
20%
;
}
}
...
@@ -603,5 +609,7 @@
...
@@ -603,5 +609,7 @@
/* .list-da view text {
/* .list-da view text {
color: red;
color: red;
} */
} */
/
deep
/
.cu-custom
.cu-bar
.action
:last-child
{
width
:
140rpx
;
}
</
style
>
</
style
>
pages/process/process.vue
View file @
04d4a2f2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"process-page"
>
<view
class=
"process-page"
>
<cu-custom
bgColor=
"bg-white"
>
<cu-custom
bgColor=
"bg-white"
>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"content"
>
{{
title
}}
</block>
<block
slot=
"right"
><image
src=
"../../static/icon/application.png"
></image></block
>
<!--
<block
slot=
"right"
><image
src=
"../../static/icon/application.png"
></image></block>
--
>
</cu-custom>
</cu-custom>
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"bg-white nav fixed"
:style=
"[
{top:CustomBar + 'px'}]">
<view
class=
"flex text-center"
>
<view
class=
"flex text-center"
>
...
...
pages/user/people.vue
View file @
04d4a2f2
...
@@ -11,12 +11,12 @@
...
@@ -11,12 +11,12 @@
</view>
</view>
</view>
</view>
<view
class=
" flex bg-white cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius"
>
<view
class=
" flex bg-white cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius"
>
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.1s'}]">
<!--
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.1s'}]">
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"cuIcon-favorfill text-yellow"
></text>
<text
class=
"cuIcon-favorfill text-yellow"
></text>
<text
class=
"text-grey"
>
收藏
</text>
<text
class=
"text-grey"
>
收藏
</text>
</view>
</view>
</view>
</view>
-->
<!--
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.2s'}]">
<!--
<view
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.2s'}]">
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"cuIcon-redpacket_fill text-red"
></text>
<text
class=
"cuIcon-redpacket_fill text-red"
></text>
...
@@ -35,13 +35,13 @@
...
@@ -35,13 +35,13 @@
<text
class=
"text-grey"
>
定位
</text>
<text
class=
"text-grey"
>
定位
</text>
</view>
</view>
</navigator>
-->
</navigator>
-->
<navigator
class=
"cu-item arrow animation-slide-bottom"
url=
"/pages/user/setting"
:style=
"[
{animationDelay: '0.6s'}]"
>
<navigator
class=
"cu-item arrow animation-slide-bottom"
url=
"/pages/user/setting"
>
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"cuIcon-settingsfill text-cyan"
></text>
<text
class=
"cuIcon-settingsfill text-cyan"
></text>
<text
class=
"text-grey"
>
设置
</text>
<text
class=
"text-grey"
>
设置
</text>
</view>
</view>
</navigator>
</navigator>
<navigator
style=
""
class=
"cu-item arrow animation-slide-bottom"
:style=
"[
{animationDelay: '0.7s'}]"
:url="isCloud?'/pages/login/cusmerLogin':'/pages/login/login'" hover-class="none">
<navigator
style=
""
class=
"cu-item arrow animation-slide-bottom"
:url=
"isCloud?'/pages/login/cusmerLogin':'/pages/login/login'"
hover-class=
"none"
>
<view
class=
"content"
@
click=
"clearToken()"
>
<view
class=
"content"
@
click=
"clearToken()"
>
<text
class=
"cuIcon-exit text-cyan"
></text>
<text
class=
"cuIcon-exit text-cyan"
></text>
<text
class=
"text-grey"
>
退出
</text>
<text
class=
"text-grey"
>
退出
</text>
...
...
plugin/colorui/components/cu-custom.vue
View file @
04d4a2f2
<
template
>
<
template
>
<view>
<view>
<view
class=
"cu-custom"
:style=
"[
{height:CustomBar + 'px'}]">
<view
class=
"cu-custom"
:style=
"[
{height:CustomBar + 'px'}]">
<view
class=
"cu-bar fixed"
:style=
"style"
:class=
"[bgImage!=''?'none-bg text-white bg-img':'',bgColor]"
>
<view
class=
"cu-bar fixed"
:style=
"style"
:class=
"[bgImage!=''?'none-bg text-white bg-img':'',bgColor]"
>
<view
class=
"action"
@
tap=
"BackPage"
v-if=
"isBack"
>
<view
class=
"action"
@
tap=
"BackPage"
v-if=
"isBack"
>
<text
class=
"cuIcon-back"
></text>
<text
class=
"cuIcon-back"
></text>
<slot
name=
"backText"
></slot>
<slot
name=
"backText"
></slot>
</view>
</view>
<view
class=
"content"
:style=
"[
{top:StatusBar + 'px'}]"
>
<view
class=
"content"
@
click=
"ClickChange"
:style=
"[
{top:StatusBar + 'px'}]"
>
<slot
name=
"content"
></slot>
<slot
name=
"content"
></slot>
</view>
</view>
<view
style=
"margin-right: 15px;"
@
click=
"openmodal()"
v-if=
"cx"
>
<view
style=
"margin-right: 15px;"
@
click=
"openmodal()"
v-if=
"cx"
>
<text
class=
"lg grey"
:class=
"'cuIcon-' + 'search'"
>
查询
</text>
<text
class=
"lg grey"
:class=
"'cuIcon-' + 'search'"
>
查询
</text>
</view>
</view>
<!--
<view
class=
"action"
>
<view
class=
"action"
@
tap=
"tapBind"
>
<view
style=
""
>
<slot
name=
"right"
></slot>
</view>
</view>
</view>
-->
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -84,14 +82,19 @@
...
@@ -84,14 +82,19 @@
// }else{
// }else{
// this.$emit('open','bottomModal')
// this.$emit('open','bottomModal')
// }
// }
},
ClickChange
(){
this
.
$emit
(
"clickChange"
)
},
tapBind
(){
this
.
$emit
(
"tapBind"
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.
process-page
.
cu-custom
.cu-bar
.content
{
.cu-custom
.cu-bar
.content
{
width
:
calc
(
100%
-
440
upx
);
width
:
calc
(
100%
);
}
}
</
style
>
</
style
>
store/index.js
View file @
04d4a2f2
...
@@ -3,7 +3,6 @@ import Vuex from 'vuex'
...
@@ -3,7 +3,6 @@ import Vuex from 'vuex'
import
api
from
"@/api/api"
import
api
from
"@/api/api"
import
MinCache
from
'@/common/util/MinCache.js'
import
MinCache
from
'@/common/util/MinCache.js'
import
{
ACCESS_TOKEN
,
USER_NAME
,
USER_INFO
}
from
"@/common/util/constants"
import
{
ACCESS_TOKEN
,
USER_NAME
,
USER_INFO
}
from
"@/common/util/constants"
console
.
log
(
"Vuex"
)
Vue
.
use
(
Vuex
)
Vue
.
use
(
Vuex
)
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
state
:
{
state
:
{
...
@@ -12,7 +11,8 @@ export default new Vuex.Store({
...
@@ -12,7 +11,8 @@ export default new Vuex.Store({
username
:
''
,
username
:
''
,
realname
:
''
,
realname
:
''
,
welcome
:
''
,
welcome
:
''
,
avatar
:
''
avatar
:
''
,
hasLogin
:
false
},
},
mutations
:
{
mutations
:
{
SET_TOKEN
:
(
state
,
token
)
=>
{
SET_TOKEN
:
(
state
,
token
)
=>
{
...
@@ -25,31 +25,105 @@ export default new Vuex.Store({
...
@@ -25,31 +25,105 @@ export default new Vuex.Store({
},
},
SET_AVATAR
:
(
state
,
avatar
)
=>
{
SET_AVATAR
:
(
state
,
avatar
)
=>
{
state
.
avatar
=
avatar
state
.
avatar
=
avatar
}
},
SET_HASLOGIN
:(
state
,
status
)
=>
{
state
.
hasLogin
=
status
}
},
},
actions
:
{
actions
:
{
// 登录
// 登录
mLogin
({
commit
},
userInfo
)
{
mLogin
({
commit
},
userInfo
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
api
.
login
(
userInfo
).
then
(
response
=>
{
api
.
login
(
userInfo
).
then
(
res
=>
{
if
(
response
.
data
.
code
==
200
){
if
(
res
.
data
.
success
){
const
result
=
response
.
data
.
result
const
result
=
res
.
data
.
data
const
userInfo
=
result
.
userInfo
// uni.setStorageSync(ACCESS_TOKEN,result.token);
uni
.
setStorageSync
(
ACCESS_TOKEN
,
result
.
token
);
// uni.setStorageSync(USER_INFO,userInfo);
uni
.
setStorageSync
(
USER_INFO
,
userInfo
);
commit
(
'SET_HASLOGIN'
,
true
)
commit
(
'SET_TOKEN'
,
result
.
token
)
// commit('setHasLogin',true)
commit
(
'SET_AVATAR'
,
userInfo
.
avatar
)
// commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname})
commit
(
'SET_NAME'
,
{
username
:
userInfo
.
username
,
realname
:
userInfo
.
realname
})
/* uni.setStorage({
resolve
(
response
)
key: 'userid',
}
else
{
data: res.data.data.userid,
resolve
(
response
)
success: function () {
}
console.log(res.data.data.userid);
}).
catch
(
error
=>
{
}
// console.log("catch===>response",response)
});
reject
(
error
)
uni.setStorage({
})
key: 'userkey',
})
data: res.data.data.userkey,
},
success: function () {
console.log(res.data.data.userkey);
}
});
uni.setStorage({
key: 'bmid',
data: res.data.data.orgname,
success: function () {
console.log(res.data.data.orgname);
}
});
uni.setStorage({
key: 'username',
data: res.data.data.username,
success: function () {
console.log(res.data.data.username);
}
});
uni.setStorage({
key: 'userName',
data: userInfo.userid,
success: function () {
console.log("用户名获取成功")
}
});
uni.setStorage({
key: 'password',
data: userInfo.password,
success: function () {
console.log("密码存储成功")
}
});
*/
uni
.
setStorageSync
(
'ACCESS_TOKEN'
,
res
.
data
.
data
.
token
)
uni
.
setStorage
({
key
:
'ACCESS_TOKEN'
,
data
:
res
.
data
.
data
.
token
,
success
:
function
()
{
},
fail
:
function
()
{
// this.$tip.alert("未获取token,请重新登录");
}
});
uni
.
setStorage
({
key
:
'userinfo'
,
data
:{...{
'userinfo'
:
userInfo
},...
res
.
data
.
data
},
success
:
function
(
r
)
{
}
});
uni
.
setStorage
({
key
:
'systemid'
,
data
:
res
.
data
.
data
.
systemid
,
success
:
function
()
{
console
.
log
(
res
.
data
.
data
.
systemid
);
}
});
resolve
(
res
)
}
else
{
resolve
(
res
)
}
}).
catch
(
error
=>
{
// console.log("catch===>response",response)
reject
(
error
)
})
})
},
//手机号登录
//手机号登录
PhoneLogin
({
commit
},
userInfo
)
{
PhoneLogin
({
commit
},
userInfo
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
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