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
Hide 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 @@
...
@@ -26,6 +26,15 @@
.Order_Number
{
.Order_Number
{
color
:
#111111
;
color
:
#111111
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
}
.Order_Name
{
font-size
:
28
rpx
;
margin-bottom
:
20
rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
.Order_Complete
{
.Order_Complete
{
...
@@ -44,9 +53,8 @@
...
@@ -44,9 +53,8 @@
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-top
:
32
rpx
;
margin-top
:
32
rpx
;
}
}
.text_tree
{
.text_tree
{
white-space
:
normal
;
white-space
:
normal
;
color
:
#111111
;
color
:
#111111
;
...
@@ -59,49 +67,54 @@
...
@@ -59,49 +67,54 @@
margin-bottom
:
17
rpx
;
margin-bottom
:
17
rpx
;
color
:
#111111
;
color
:
#111111
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
}
}
.Order_tips
{
.Order_tips
{
margin-right
:
30
rpx
;
display
:
inline-block
;
display
:
inline-block
;
width
:
120
rpx
;
width
:
120
rpx
;
text-align-last
:
justify
;
text-align-last
:
justify
;
color
:
#999999
;
color
:
#999999
;
}
}
.Order_Status
{
.Order_Status
{
font-size
:
36
rpx
;
font-size
:
36
rpx
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<view
class=
"orderList"
>
<view
class=
"orderList"
>
<view
class=
"Order_List"
v-for=
"(item,index) in orderList"
:key=
"index"
>
<van-empty
description=
"暂无数据"
v-if=
"orderList.length === 0"
/>
<view
class=
"Order_Top"
>
<view
v-if=
"orderList.length > 0"
>
<view
class=
"Order_Number"
>
订单号:
{{
item
.
OrderId
}}
</view>
<view
class=
"Order_List"
v-for=
"(item,index) in orderList"
:key=
"index"
>
<view
class=
"Order_Status"
>
<view
class=
"Order_Top"
>
<text
class=
"Order_Complete"
v-if=
"item.OrderState==1"
>
正常
</text>
<view
class=
"Order_Number"
>
订单号:
{{
item
.
OrderId
}}
</view>
<text
class=
"Order_Cancel"
v-if=
"item.OrderState==2"
>
退学
</text>
<view
class=
"Order_Status"
>
<text
class=
"Order_Cancel"
v-if=
"item.OrderState==3"
>
取消
</text>
<text
class=
"Order_Complete"
v-if=
"item.OrderState==1"
>
正常
</text>
<text
class=
"Order_noPay"
v-if=
"item.OrderState==4"
>
待付款
</text>
<text
class=
"Order_Cancel"
v-if=
"item.OrderState==2"
>
退学
</text>
</view>
<text
class=
"Order_Cancel"
v-if=
"item.OrderState==3"
>
取消
</text>
</view>
<text
class=
"Order_noPay"
v-if=
"item.OrderState==4"
>
待付款
</text>
<view
class=
"Order_Bottom"
>
<view
style=
"width:100%;"
>
<view
class=
"Order_Name"
>
{{
item
.
CourseName
}}
</view>
<view
class=
"text_tree"
>
{{
item
.
ClassName
}}
</view>
<view
class=
"Order_TipList"
>
<view
class=
"Order_tips"
>
下单客户:
</view>
<text>
{{
item
.
GuestName
}}
</text>
</view>
</view>
<view
class=
"Order_TipList"
>
</view>
<view
class=
"Order_tips"
>
完成课时:
</view>
<view
class=
"Order_Bottom"
>
<text>
{{
item
.
CompleteHours
}}
</text>
<view
style=
"width:100%;"
>
</view>
<view
class=
"Order_Name"
>
{{
item
.
CourseName
}}
</view>
<view
class=
"Order_TipList"
>
<view
class=
"text_tree"
>
{{
item
.
ClassName
}}
</view>
<view
class=
"Order_tips"
>
总课时:
</view>
<view
class=
"Order_TipList"
>
<text>
{{
item
.
TotalHours
}}
</text>
<view
class=
"Order_tips"
>
客户
</view>
<text>
{{
item
.
GuestName
}}
</text>
</view>
<view
class=
"Order_TipList"
>
<view
class=
"Order_tips"
>
完成课时
</view>
<text>
{{
item
.
CompleteHours
}}
</text>
</view>
<view
class=
"Order_TipList"
>
<view
class=
"Order_tips"
>
总课时
</view>
<text>
{{
item
.
TotalHours
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<Loadmore
:state=
"pageState"
/>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -118,24 +131,28 @@
...
@@ -118,24 +131,28 @@
onMounted
,
onMounted
,
inject
,
inject
,
}
from
"vue"
;
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
bottom
from
"../../components/bottom"
;
import
bottom
from
"../../components/bottom"
;
export
default
{
export
default
{
components
:
{
components
:
{
bottom
,
bottom
,
Loadmore
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
let
{
proxy
proxy
}
=
getCurrentInstance
();
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
pageTitle
:
"合同列表"
,
pageTitle
:
"合同列表"
,
msg
:
{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
10
,
pageSize
:
10
,
OrderType
:
1
OrderType
:
1
},
},
pageCount
:
0
,
pageCount
:
0
,
orderList
:
[]
orderList
:
[],
pageState
:
"more"
,
timer
:
null
,
//防抖
});
});
const
methods
=
{
const
methods
=
{
jumpPage
(
url
)
{
jumpPage
(
url
)
{
...
@@ -145,8 +162,18 @@
...
@@ -145,8 +162,18 @@
},
},
getData
()
{
getData
()
{
proxy
.
$request
(
"/AppletIndex/GetOrderPage"
,
data
.
msg
).
then
((
res
)
=>
{
proxy
.
$request
(
"/AppletIndex/GetOrderPage"
,
data
.
msg
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
data
.
timer
)
data
.
timer
=
null
;
data
.
orderList
=
res
.
Data
.
PageData
;
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 @@
...
@@ -158,20 +185,28 @@
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
msg
.
OrderType
=
options
.
type
this
.
msg
.
OrderType
=
options
.
type
this
.
getData
();
this
.
getData
();
if
(
options
.
type
==
1
)
{
if
(
options
.
type
==
1
)
{
this
.
pageTitle
=
'语培订单'
this
.
pageTitle
=
'语培订单'
}
else
if
(
options
.
type
==
2
)
{
}
else
if
(
options
.
type
==
2
)
{
this
.
pageTitle
=
'留学订单'
this
.
pageTitle
=
'留学订单'
}
}
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
title
:
this
.
pageTitle
});
});
},
},
onReachBottom
()
{
onReachBottom
()
{
if
(
this
.
msg
.
pageIndex
<
this
.
pageCount
)
{
console
.
log
(
this
.
msg
)
data
.
pageState
=
"loading"
;
if
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
this
.
timer
=
setTimeout
(()
=>
{
this
.
msg
.
pageIndex
++
;
that
.
getList
();
},
1000
);
}
else
{
this
.
pageState
=
"none"
;
}
}
}
};
};
</
script
>
</
script
>
src/pages/learningGarden/learningGardenList.vue
View file @
bd23b168
...
@@ -29,9 +29,6 @@
...
@@ -29,9 +29,6 @@
import
{
import
{
getLearningGardenList
getLearningGardenList
}
from
"../../api/index"
;
}
from
"../../api/index"
;
import
{
debounce
}
from
"../../utils/index"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
...
src/utils/request.js
View file @
bd23b168
...
@@ -32,6 +32,7 @@ let request = (param) => {
...
@@ -32,6 +32,7 @@ let request = (param) => {
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
,
icon
:
"none"
,
});
});
uni
.
clearStorageSync
();
reject
()
reject
()
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
...
src/utils/requestMall.js
View file @
bd23b168
//请求电商接口
//请求电商接口
let
host
=
''
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
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
{
}
else
{
host
=
"https://mallapi.oytour.com/api"
host
=
"https://mallapi.oytour.com/api"
}
}
import
Toast
from
'../wxcomponents/vant/toast/toast'
;
let
request
=
(
param
)
=>
{
let
request
=
(
param
)
=>
{
//网络请求
//网络请求
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -29,27 +29,18 @@ let request = (param) => {
...
@@ -29,27 +29,18 @@ let request = (param) => {
token
:
JHdata
.
MallToken
token
:
JHdata
.
MallToken
},
},
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
resolve
(
res
.
data
)
resolve
(
res
.
data
)
}
else
{
}
else
{
Toast
({
if
(
res
.
data
.
Message
.
indexOf
(
'用户凭证为空'
)
!=
-
1
||
res
.
data
type
:
'fail'
,
.
Message
.
indexOf
(
'用户凭证失效'
)
!=
-
1
)
{
message
:
res
.
data
.
message
,
uni
.
showToast
({
onClose
:
()
=>
{
title
:
"用户凭证失效,请重新授权"
,
// if (res.data.resultCode === 10001 || res.data.resultCode === 10000 || res.data.resultCode === 10002 || res.data.resultCode === 10003) {
duration
:
2000
,
// uni.reLaunch({
icon
:
"none"
,
// url: '/pages/login/login'
});
// });
uni
.
clearStorageSync
();
// } else {
}
// if (res.data.message.indexOf('用户凭证为空') != -1 || res.data.message.indexOf('用户凭证失效') != -1) {
// uni.reLaunch({
// url: '/pages/login/login'
// });
// }
// }
},
});
}
}
},
},
fail
:
(
err
)
=>
{
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