Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
bd23b168
Commit
bd23b168
authored
Jan 14, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
775a7691
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
65 deletions
+89
-65
orderList.vue
src/pages/contract/orderList.vue
+77
-42
learningGardenList.vue
src/pages/learningGarden/learningGardenList.vue
+0
-3
request.js
src/utils/request.js
+1
-0
requestMall.js
src/utils/requestMall.js
+11
-20
No files found.
src/pages/contract/orderList.vue
View file @
bd23b168
...
...
@@ -26,6 +26,15 @@
.Order_Number
{
color
:
#111111
;
font-size
:
26
rpx
;
}
.Order_Name
{
font-size
:
28
rpx
;
margin-bottom
:
20
rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.Order_Complete
{
...
...
@@ -44,7 +53,6 @@
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
32
rpx
;
}
.text_tree
{
...
...
@@ -59,22 +67,25 @@
margin-bottom
:
17
rpx
;
color
:
#111111
;
font-size
:
24
rpx
;
}
.Order_tips
{
margin-right
:
30
rpx
;
display
:
inline-block
;
width
:
120
rpx
;
text-align-last
:
justify
;
color
:
#999999
;
}
.Order_Status
{
.Order_Status
{
font-size
:
36
rpx
;
}
</
style
>
<
template
>
<view
class=
"orderList"
>
<view
class=
"Order_List"
v-for=
"(item,index) in orderList"
:key=
"index"
>
<van-empty
description=
"暂无数据"
v-if=
"orderList.length === 0"
/>
<view
v-if=
"orderList.length > 0"
>
<view
class=
"Order_List"
v-for=
"(item,index) in orderList"
:key=
"index"
>
<view
class=
"Order_Top"
>
<view
class=
"Order_Number"
>
订单号:
{{
item
.
OrderId
}}
</view>
<view
class=
"Order_Status"
>
...
...
@@ -89,20 +100,22 @@
<view
class=
"Order_Name"
>
{{
item
.
CourseName
}}
</view>
<view
class=
"text_tree"
>
{{
item
.
ClassName
}}
</view>
<view
class=
"Order_TipList"
>
<view
class=
"Order_tips"
>
下单客户:
</view>
<view
class=
"Order_tips"
>
客户
</view>
<text>
{{
item
.
GuestName
}}
</text>
</view>
<view
class=
"Order_TipList"
>
<view
class=
"Order_tips"
>
完成课时:
</view>
<view
class=
"Order_tips"
>
完成课时
</view>
<text>
{{
item
.
CompleteHours
}}
</text>
</view>
<view
class=
"Order_TipList"
>
<view
class=
"Order_tips"
>
总课时:
</view>
<view
class=
"Order_tips"
>
总课时
</view>
<text>
{{
item
.
TotalHours
}}
</text>
</view>
</view>
</view>
</view>
<Loadmore
:state=
"pageState"
/>
</view>
</view>
</
template
>
...
...
@@ -118,24 +131,28 @@
onMounted
,
inject
,
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
bottom
from
"../../components/bottom"
;
export
default
{
components
:
{
bottom
,
Loadmore
,
},
setup
(
props
,
context
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
pageTitle
:
"合同列表"
,
pageTitle
:
"合同列表"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
OrderType
:
1
OrderType
:
1
},
pageCount
:
0
,
orderList
:
[]
pageCount
:
0
,
orderList
:
[],
pageState
:
"more"
,
timer
:
null
,
//防抖
});
const
methods
=
{
jumpPage
(
url
)
{
...
...
@@ -145,8 +162,18 @@
},
getData
()
{
proxy
.
$request
(
"/AppletIndex/GetOrderPage"
,
data
.
msg
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
data
.
timer
)
data
.
timer
=
null
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
orderList
=
res
.
Data
.
PageData
;
}
else
{
data
.
orderList
=
[...
data
.
orderList
,
...
res
.
Data
.
PageData
];
}
data
.
pageCount
=
res
.
Data
.
PageCount
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
});
},
...
...
@@ -158,20 +185,28 @@
};
},
onLoad
(
options
)
{
this
.
msg
.
OrderType
=
options
.
type
this
.
msg
.
OrderType
=
options
.
type
this
.
getData
();
if
(
options
.
type
==
1
)
{
this
.
pageTitle
=
'语培订单'
}
else
if
(
options
.
type
==
2
)
{
this
.
pageTitle
=
'留学订单'
if
(
options
.
type
==
1
)
{
this
.
pageTitle
=
'语培订单'
}
else
if
(
options
.
type
==
2
)
{
this
.
pageTitle
=
'留学订单'
}
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
});
},
onReachBottom
()
{
console
.
log
(
this
.
msg
)
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/learningGarden/learningGardenList.vue
View file @
bd23b168
...
...
@@ -29,9 +29,6 @@
import
{
getLearningGardenList
}
from
"../../api/index"
;
import
{
debounce
}
from
"../../utils/index"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
export
default
{
components
:
{
...
...
src/utils/request.js
View file @
bd23b168
...
...
@@ -32,6 +32,7 @@ let request = (param) => {
duration
:
2000
,
icon
:
"none"
,
});
uni
.
clearStorageSync
();
reject
()
}
else
{
uni
.
showToast
({
...
...
src/utils/requestMall.js
View file @
bd23b168
//请求电商接口
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
host
=
'http://192.168.10.65:8088/api'
// host = 'http://192.168.10.65:8088/api'
host
=
"https://mallapi.oytour.com/api"
}
else
{
host
=
"https://mallapi.oytour.com/api"
}
import
Toast
from
'../wxcomponents/vant/toast/toast'
;
let
request
=
(
param
)
=>
{
//网络请求
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -29,27 +29,18 @@ let request = (param) => {
token
:
JHdata
.
MallToken
},
success
:
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
resolve
(
res
.
data
)
}
else
{
Toast
({
type
:
'fail'
,
message
:
res
.
data
.
message
,
onClose
:
()
=>
{
// if (res.data.resultCode === 10001 || res.data.resultCode === 10000 || res.data.resultCode === 10002 || res.data.resultCode === 10003) {
// uni.reLaunch({
// url: '/pages/login/login'
// });
// } else {
// if (res.data.message.indexOf('用户凭证为空') != -1 || res.data.message.indexOf('用户凭证失效') != -1) {
// uni.reLaunch({
// url: '/pages/login/login'
// });
// }
// }
},
if
(
res
.
data
.
Message
.
indexOf
(
'用户凭证为空'
)
!=
-
1
||
res
.
data
.
Message
.
indexOf
(
'用户凭证失效'
)
!=
-
1
)
{
uni
.
showToast
({
title
:
"用户凭证失效,请重新授权"
,
duration
:
2000
,
icon
:
"none"
,
});
uni
.
clearStorageSync
();
}
}
},
fail
:
(
err
)
=>
{
...
...
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