Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
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
游洁
thinkApp
Commits
aaad6eaa
Commit
aaad6eaa
authored
Sep 26, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
16f20264
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
334 additions
and
45 deletions
+334
-45
pages.json
src/pages.json
+11
-1
addChild.vue
src/pages/MyChild/addChild.vue
+240
-0
index.vue
src/pages/MyChild/index.vue
+83
-44
No files found.
src/pages.json
View file @
aaad6eaa
...
...
@@ -135,7 +135,17 @@
{
"root"
:
"pages/MyChild"
,
//我的小孩
"pages"
:
[{
"path"
:
"index"
//电子合同
"path"
:
"index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的小孩"
,
"backgroundColor"
:
"#F6F6F6"
}
},{
"path"
:
"addChild"
,
"style"
:
{
"navigationBarTitleText"
:
"添加小孩信息"
,
"backgroundColor"
:
"#F6F6F6"
}
}]
}
],
...
...
src/pages/MyChild/addChild.vue
0 → 100644
View file @
aaad6eaa
<
style
scoped
>
.addChild-header
{
flex-direction
:
column
;
align-items
:
center
;
}
.addChild-header
image
{
padding
:
74
rpx
0
31
rpx
0
;
}
.addChild-header
text
{
font-size
:
34
rpx
;
font-weight
:
800
;
color
:
#111111
;
}
.header-text
{
padding
:
22
rpx
0
37
rpx
0
;
font-size
:
26
rpx
;
font-weight
:
500
;
color
:
#BEBEBE
;
}
.header-input
{
width
:
100%
;
box-sizing
:
border-box
;
vertical-align
:
middle
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
padding
:
0
51
rpx
;
margin-bottom
:
51
rpx
;
}
/
deep
/
.van-cell
{
line-height
:
120
rpx
;
border-radius
:
40
rpx
;
border
:
4
rpx
solid
red
;
}
.addChild-buttom
{
background
:
#C91727
;
border-radius
:
44px
;
position
:
fixed
;
left
:
50
rpx
;
right
:
50
rpx
;
bottom
:
34
rpx
;
line-height
:
88
rpx
;
color
:
#ffffff
;
font-weight
:
500
;
font-size
:
30
rpx
;
z-index
:
999
;
text-align
:
center
;
}
.addChild-buttom.active
{
background
:
rgba
(
201
,
23
,
39
,
.5
);
}
.addChild
.user-item
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
margin-bottom
:
36
rpx
;
background
:
#FFFFFF
;
border-radius
:
40px
;
margin
:
0
50
rpx
;
}
.addChild
.user-item
.avatar
{
width
:
100
rpx
;
height
:
100
rpx
;
background
:
rgba
(
252
,
238
,
239
,
1
);
border-radius
:
40
rpx
;
font-size
:
46
rpx
;
font-weight
:
500
;
color
:
rgba
(
206
,
128
,
134
,
1
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-weight
:
bold
;
}
.addChild
.user-item
.uname
{
font-size
:
28
rpx
;
margin-left
:
32
rpx
;
font-weight
:
500
;
color
:
#000000
;
width
:
1px
;
flex
:
1
;
}
.addChild
.user-item
.check
{
color
:
#000000
;
font-size
:
36
rpx
;
}
</
style
>
<
template
>
<view
class=
"addChild"
>
<scroll-view
scroll-y=
"true"
style=
"width:100%;height: 100%;margin-bottom: 70rpx;"
>
<view
class=
"addChild-header flex"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1664160541000_21.png"
style=
"width: 352rpx;height: 218rpx;"
></image>
<text>
请输入手机号
</text>
<view
class=
"header-text"
>
输入该账号注册的手机号
</view>
<view
class=
"header-input"
>
<van-cell-group>
<van-field
:value=
"Account"
placeholder=
"输入手机号"
clearable
input-align=
"center"
@
input=
"usernameInput"
>
</van-field>
</van-cell-group>
</view>
</view>
<view>
<view
class=
"user-item"
>
<view
class=
"avatar"
>
黎
</view>
<view
class=
"uname"
>
黎明
</view>
<view
class=
"check"
>
<van-icon
name=
"success"
/>
</view>
</view>
<van-empty
description=
"暂无小孩"
v-if=
"dataList.length === 0"
/>
<view
v-if=
"dataList.length > 0"
>
<Loadmore
:state=
"pageState"
/>
</view>
</view>
</scroll-view>
<view
v-if=
"loading"
class=
"addChild-buttom"
@
click=
"addChild"
>
已选2个,确认添加
</view>
<view
v-else
class=
"addChild-buttom active"
>
已选2个,确认添加
</view>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
inject
,
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
bottom
from
"../../components/bottom"
;
import
{
GetOrderPage
}
from
"../../api/erp"
;
export
default
{
components
:
{
bottom
,
Loadmore
,
},
setup
(
props
,
context
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
loading
:
true
,
Account
:
''
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
OrderType
:
1
},
pageCount
:
0
,
dataList
:
[],
pageState
:
"more"
,
timer
:
null
,
//防抖
imgUrlG
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663930765000_891.png'
,
imgUrlR
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663930765000_218.png'
,
imgBoy
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663932008000_116.png'
,
imgGirl
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663931928000_154.png'
});
const
methods
=
{
usernameInput
(
val
)
{
data
.
Account
=
val
.
detail
;
},
addChild
(){
data
.
loading
=
false
setTimeout
(()
=>
{
data
.
loading
=
true
uni
.
navigateBack
({
delta
:
1
});
},
2000
)
},
onClose
(
event
)
{
const
{
position
,
instance
}
=
event
.
detail
;
switch
(
position
)
{
case
'left'
:
case
'cell'
:
case
'right'
:
instance
.
close
();
break
;
}
},
jumpPage
(
url
)
{
uni
.
navigateTo
({
url
:
url
,
});
},
async
getData
()
{
let
res
=
await
GetOrderPage
(
data
.
msg
);
if
(
res
)
{
if
(
data
.
timer
)
data
.
timer
=
null
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
dataList
=
res
.
Data
.
PageData
;
}
else
{
data
.
dataList
=
[...
data
.
dataList
,
...
res
.
Data
.
PageData
];
}
data
.
pageCount
=
res
.
Data
.
PageCount
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
},
};
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
};
},
onLoad
(
options
)
{
this
.
msg
.
OrderType
=
options
.
type
this
.
getData
();
},
onReachBottom
()
{
if
(
this
.
msg
.
pageIndex
<
this
.
pageCount
)
{
data
.
pageState
=
"loading"
;
if
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
this
.
timer
=
setTimeout
(()
=>
{
this
.
msg
.
pageIndex
++
;
that
.
getList
();
},
1000
);
}
else
{
this
.
pageState
=
"none"
;
}
}
};
</
script
>
src/pages/MyChild/index.vue
View file @
aaad6eaa
...
...
@@ -36,35 +36,81 @@
color
:
#BEBEBE
;
}
.dataList-box
{
border-radius
:
50
rpx
;
overflow
:
hidden
;
box-shadow
:
0px
6px
29px
0px
rgba
(
76
,
76
,
76
,
0.09
);
margin-bottom
:
40
rpx
;
}
.dataList-form
{
height
:
204
rpx
;
flex-grow
:
1
;
position
:
relative
;
padding
:
31
rpx
40
rpx
0
22
rpx
;
}
.left-image
{
position
:
relative
;
}
.image-bj
{
.dataList-image
{
width
:
177
rpx
;
height
:
204
rpx
;
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663932626000_693.png')
;
background-size
:
100%
100%
;
position
:
absolute
;
bottom
:
0
;
left
:
0
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.image-bjB
{
width
:
177
rpx
;
height
:
204
rpx
;
.dataList-form.active
.dataList-image
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663932626000_675.png')
;
background-size
:
100%
100%
;
}
.dataList-image
text
{
margin-top
:
17
rpx
;
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#ffffff
;
}
.dataList-center
{
background-color
:
#ffffff
;
position
:
absolute
;
left
:
177
rpx
;
bottom
:
0
;
right
:
0
;
border-radius
:
0
50
rpx
50
rpx
0
;
padding
:
33
rpx
48
rpx
;
box-shadow
:
0px
6px
29px
0px
rgba
(
76
,
76
,
76
,
0.09
);
}
.dataList-left
{
flex-direction
:
column
;
}
.left-text
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
margin-bottom
:
32
rpx
;
}
.left-phone
{
font-size
:
24
rpx
;
color
:
#919191
;
}
.left-phone
text
{
margin-left
:
10
rpx
;
}
.dataList-right
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.dataList-right
text
{
font-size
:
22
rpx
;
font-weight
:
500
;
color
:
#50D487
;
margin-top
:
15
rpx
;
}
.van-swipe-cell__left
,
.van-swipe-cell__right
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
height
:
100%
;
right
:
-
111
rpx
;
width
:
232
px
;
right
:
-
0
rpx
;
width
:
199
r
px
;
-webkit-transform
:
translate3d
(
100%
,
0
,
0
);
transform
:
translate3d
(
100%
,
0
,
0
);
}
...
...
@@ -72,7 +118,7 @@
<
template
>
<view
class=
"dataList"
>
<view
class=
"dataList-header"
>
<view>
<view
@
click=
"addChild"
>
<van-icon
name=
"plus"
/>
<text>
添加小孩信息
</text>
</view>
...
...
@@ -80,47 +126,41 @@
<view
class=
"dataList-content"
>
<view
class=
"title"
>
在读小孩列表
</view>
<view
class=
"text"
>
左滑可删除小孩信息
</view>
<view
class=
"dataList-box"
>
<view
class=
"dataList-box"
style=
"overflow: hidden;"
>
<van-swipe-cell
id=
"swipe-cell"
:right-width=
"116"
async-close
:disabled=
"true"
@
close=
"onClose"
>
<view
class=
"dataList-form"
>
<view
class=
"dataList-center active flex_between_center"
>
<view
class=
"dataList-left"
>
<view
class=
"left-image"
>
<view
class=
"image-bj"
></view>
<image
:src=
"imgBoy"
mode=
"aspectFill"
style=
"width:50rpx;height:50rpx;"
>
<view
class=
"dataList-form active"
>
<view
class=
"dataList-image flex"
>
<image
:src=
"imgBoy?imgBoy:imgGirl"
mode=
"aspectFill"
style=
"width:101rpx;height:101rpx;"
>
</image>
<text>
周启明
</text>
</view>
<view
class=
"left-image"
>
<text>
武侯校区
</text>
<view>
<van-icon
name=
"phone"
></van-icon>
<view
class=
"dataList-center active flex_between_center"
>
<view
class=
"dataList-left flex"
>
<text
class=
"left-text"
>
武侯校区
</text>
<view
class=
"left-phone"
>
<van-icon
name=
"phone"
color=
"#919191"
></van-icon>
<text>
18226665548
</text>
</view>
</view>
</view>
<view>
<image
:src=
"imgUrlG"
style=
"width: 24rpx;height: 24rpx;"
></image>
<text>
学习中
</text>
<view
class=
"dataList-right flex"
>
<image
:src=
"imgUrlG?imgUrlG:imgUrlR"
style=
"width: 24rpx;height: 24rpx;"
></image>
<text>
学习中/休学
</text>
</view>
</view>
<view
slot=
"right"
class=
"van-swipe-cell__right"
>
<van-
button
square
type=
"danger"
custom-style=
"height:100%;"
>
删除
</van-butt
on>
<van-
icon
name=
"cross"
color=
"#BCBCBC"
></van-ic
on>
</view>
</view>
</van-swipe-cell>
</view>
<van-empty
description=
"暂无数据"
v-if=
"dataList.length === 0"
/>
<van-empty
description=
"暂无小孩"
v-if=
"dataList.length === 0"
/>
<view
v-if=
"dataList.length > 0"
>
<Loadmore
:state=
"pageState"
/>
</view>
</view>
...
...
@@ -155,7 +195,6 @@
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
pageTitle
:
"我的小孩"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
...
...
@@ -171,6 +210,11 @@
imgGirl
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1663931928000_154.png'
});
const
methods
=
{
addChild
(){
uni
.
navigateTo
({
url
:
'/pages/MyChild/addChild'
,
});
},
onClose
(
event
)
{
const
{
position
,
instance
}
=
event
.
detail
;
switch
(
position
)
{
...
...
@@ -213,11 +257,6 @@
onLoad
(
options
)
{
this
.
msg
.
OrderType
=
options
.
type
this
.
getData
();
if
(
options
.
type
==
1
)
{
this
.
pageTitle
=
'语培订单'
}
else
if
(
options
.
type
==
2
)
{
this
.
pageTitle
=
'留学订单'
}
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
});
...
...
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