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
45979dd3
Commit
45979dd3
authored
Sep 27, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
4cff9d3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
192 additions
and
0 deletions
+192
-0
pages.json
src/pages.json
+7
-0
addFriendsAndRelatives.vue
src/pages/FriendsAndRelatives/addFriendsAndRelatives.vue
+185
-0
No files found.
src/pages.json
View file @
45979dd3
...
...
@@ -164,6 +164,13 @@
"backgroundColor"
:
"#F6F6F6"
,
"navigationBarBackgroundColor"
:
"#F6F6F6"
}
},{
"path"
:
"addFriendsAndRelatives"
,
"style"
:
{
"navigationBarTitleText"
:
"加入亲友团"
,
"backgroundColor"
:
"#F6F6F6"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
}
}]
}
],
...
...
src/pages/FriendsAndRelatives/addFriendsAndRelatives.vue
0 → 100644
View file @
45979dd3
<
style
scoped
>
.pages
{
min-height
:
100vh
;
background-color
:
#f6f6f6
;
}
.addChild-header
{
flex-direction
:
column
;
align-items
:
center
;
background
:
#ffffff
;
}
.addChild-header
image
{
padding
:
54
rpx
0
31
rpx
0
;
}
.addChild-header
text
{
font-size
:
34
rpx
;
font-weight
:
800
;
color
:
#111111
;
padding
:
0
0
69
rpx
0
;
}
.title
{
font-size
:
34
rpx
;
font-weight
:
500
;
color
:
#282828
;
text-align
:
center
;
padding
:
123
rpx
0
50
rpx
0
;
}
.addChild-buttom
{
width
:
450
rpx
;
margin
:
auto
;
background
:
#C91727
;
border-radius
:
44px
;
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
);
}
</
style
>
<
template
>
<view
class=
"addChild pages"
>
<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>
<view
class=
"title"
>
Ranjunjun邀请您加入亲友团
</view>
<view
v-if=
"loading"
class=
"addChild-buttom"
@
click=
"addFriend"
>
立即加入
</view>
<view
v-else
class=
"addChild-buttom active"
>
立即加入
</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
{
GetStudentPageList
,
SetMyChild
}
from
"../../api/erp"
;
export
default
{
components
:
{
bottom
,
Loadmore
,
},
setup
(
props
,
context
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
loading
:
true
,
Account
:
''
,
form
:{
Id
:
''
,
AccountId
:
''
,
StuId
:
''
,
OpenId
:
''
,
WeChatName
:
''
,
WeChatImg
:
''
,
UnionId
:
''
},
msg
:
{
pageIndex
:
1
,
pageSize
:
1000
,
KeyWords
:
''
,
//关键词
},
pageCount
:
0
,
dataList
:
[],
list
:[],
pageState
:
"more"
,
timer
:
null
,
//防抖
});
const
methods
=
{
clickChecked
(
item
){
data
.
dataList
.
forEach
(
i
=>
{
i
.
checked
=
false
if
(
item
.
StuId
==
i
.
StuId
){
data
.
list
.
push
(
i
)
}
})
item
.
checked
=
true
data
.
form
=
{
Id
:
item
.
Id
,
AccountId
:
item
.
AccountId
,
StuId
:
item
.
StuId
,
OpenId
:
item
.
OpenId
,
WeChatName
:
item
.
WeChatName
,
WeChatImg
:
item
.
WeChatImg
,
UnionId
:
item
.
UnionId
}
},
clickIcon
(){
that
.
getData
()
},
usernameInput
(
val
)
{
data
.
msg
.
KeyWords
=
val
.
detail
.
value
that
.
getData
()
},
async
addFriend
(){
return
data
.
loading
=
false
uni
.
showLoading
()
let
res
=
await
SetMyChild
(
data
.
form
);
if
(
res
)
{
uni
.
hideLoading
()
data
.
loading
=
true
uni
.
navigateTo
({
url
:
''
,
});
}
},
async
getData
()
{
uni
.
showLoading
()
let
res
=
await
GetStudentPageList
(
data
.
msg
);
if
(
res
)
{
uni
.
hideLoading
()
}
},
};
let
that
=
methods
;
onMounted
(()
=>
{
// that.getData()
});
return
{
...
toRefs
(
data
),
...
methods
};
},
onLoad
(
options
)
{
},
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
>
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