Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
陈轩
9 years ago
Commit
7fdb27883e780e5e9389ca12b41ba9b42ced54e0
2 parents
721b92ff
f304bfa4
Merge remote-tracking branch 'origin/develop' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
58 deletions
apps/me/controllers/exchange.js
apps/me/controllers/help.js
apps/me/controllers/index.js
apps/me/controllers/order.js
apps/me/controllers/refund.js
apps/me/models/index.js
public/scss/me/_order.css
public/vue/me/fav-brand-list.vue
public/vue/me/fav-product-list.vue
public/vue/me/order.vue
apps/me/controllers/exchange.js
View file @
7fdb278
...
...
@@ -57,8 +57,8 @@ const exchange = {
* @param next
*/
cancelApply
(
req
,
res
,
next
)
{
let
id
=
req
.
body
.
id
;
let
uid
=
req
.
user
.
uid
;
const
id
=
req
.
body
.
id
;
const
uid
=
req
.
user
.
uid
;
exchangeModel
.
cancelApply
(
uid
,
id
).
then
(
result
=>
{
return
res
.
json
(
result
);
...
...
apps/me/controllers/help.js
View file @
7fdb278
...
...
@@ -41,7 +41,7 @@ const component = {
},
helpDetail
:
(
req
,
res
)
=>
{
const
caption
=
req
.
query
.
caption
;
le
t
data
=
{
cons
t
data
=
{
module
:
'me'
,
page
:
'help'
,
noLocalJS
:
true
,
...
...
apps/me/controllers/index.js
View file @
7fdb278
...
...
@@ -58,7 +58,7 @@ const component = {
}).
catch
(
next
);
},
saveMydetails
:
(
req
,
res
,
next
)
=>
{
var
params
=
{
const
params
=
{
uid
:
req
.
user
.
uid
};
...
...
apps/me/controllers/order.js
View file @
7fdb278
...
...
@@ -10,7 +10,7 @@ const notLoginTip = '抱歉,您暂未登录!';
const
order
=
{
orders
:
(
req
,
res
)
=>
{
le
t
type
=
req
.
query
.
type
;
cons
t
type
=
req
.
query
.
type
;
res
.
render
(
'order'
,
{
module
:
'me'
,
...
...
@@ -19,8 +19,8 @@ const order = {
});
},
orderDetail
:
(
req
,
res
)
=>
{
let
orderCode
=
req
.
query
.
orderCode
;
let
uid
=
req
.
user
.
uid
;
const
orderCode
=
req
.
query
.
orderCode
;
const
uid
=
req
.
user
.
uid
;
if
(
!
uid
&&
req
.
xhr
)
{
return
res
.
json
({
...
...
@@ -56,8 +56,8 @@ const order = {
});
},
getOrderDetailData
:
(
req
,
res
)
=>
{
let
orderCode
=
req
.
query
.
orderCode
;
let
uid
=
req
.
user
.
uid
;
const
orderCode
=
req
.
query
.
orderCode
;
const
uid
=
req
.
user
.
uid
;
if
(
!
uid
&&
req
.
xhr
)
{
return
res
.
json
({
...
...
@@ -71,24 +71,24 @@ const order = {
});
},
cancelOrder
:
(
req
,
res
)
=>
{
let
orderCode
=
req
.
body
.
orderCode
;
let
reasonId
=
req
.
body
.
reasonId
;
let
reason
=
req
.
body
.
reason
;
const
orderCode
=
req
.
body
.
orderCode
;
const
reasonId
=
req
.
body
.
reasonId
;
const
reason
=
req
.
body
.
reason
;
orderModel
.
cancelOrder
(
orderCode
,
reasonId
,
reason
).
then
(
result
=>
{
return
res
.
json
(
result
);
});
},
confirmOrder
:
(
req
,
res
)
=>
{
le
t
orderode
=
req
.
body
.
orderCode
;
cons
t
orderode
=
req
.
body
.
orderCode
;
orderModel
.
confirmOrder
(
orderode
).
then
(
result
=>
{
return
res
.
json
(
result
);
});
},
deleteOrder
:
(
req
,
res
)
=>
{
let
orderCode
=
req
.
body
.
orderCode
;
let
uid
=
req
.
user
.
uid
;
const
orderCode
=
req
.
body
.
orderCode
;
const
uid
=
req
.
user
.
uid
;
if
(
!
uid
&&
req
.
xhr
)
{
return
res
.
json
({
...
...
@@ -102,7 +102,7 @@ const order = {
});
},
coin
:
(
req
,
res
,
next
)
=>
{
le
t
uid
=
req
.
user
.
uid
;
cons
t
uid
=
req
.
user
.
uid
;
orderModel
.
getCoins
(
uid
).
then
(
result
=>
{
res
.
render
(
'coin'
,
{
...
...
@@ -120,9 +120,9 @@ const order = {
* @returns {*|{read, write}}
*/
getCoinDetail
:
(
req
,
res
)
=>
{
let
uid
=
req
.
user
.
uid
;
let
page
=
req
.
query
.
page
;
let
limit
=
req
.
query
.
limit
;
const
uid
=
req
.
user
.
uid
;
const
page
=
req
.
query
.
page
;
const
limit
=
req
.
query
.
limit
;
if
(
!
uid
&&
req
.
xhr
)
{
return
res
.
json
({
...
...
apps/me/controllers/refund.js
View file @
7fdb278
...
...
@@ -105,9 +105,7 @@ const refund = {
* @returns {*|{read, write}}
*/
getRefundOrders
(
req
,
res
)
{
let
uid
=
req
.
user
.
uid
;
let
page
=
req
.
query
.
page
;
let
limit
=
req
.
query
.
limit
;
const
uid
=
req
.
user
.
uid
;
if
(
!
uid
&&
req
.
xhr
)
{
return
res
.
json
({
...
...
@@ -117,8 +115,8 @@ const refund = {
}
let
param
=
{
uid
:
uid
,
page
:
page
,
limit
:
limit
page
:
req
.
query
.
page
,
limit
:
req
.
query
.
limit
};
refundModel
.
getRefundOrders
(
param
).
then
(
result
=>
{
...
...
@@ -132,8 +130,8 @@ const refund = {
* @param res
*/
cancelApply
(
req
,
res
)
{
let
uid
=
req
.
user
.
uid
;
let
id
=
req
.
body
.
id
;
const
uid
=
req
.
user
.
uid
;
const
id
=
req
.
body
.
id
;
if
(
!
uid
&&
req
.
xhr
)
{
return
res
.
json
({
...
...
apps/me/models/index.js
View file @
7fdb278
...
...
@@ -47,7 +47,7 @@ const _getInfoNumData = (uid) => {
},
{
code
:
200
})]).
then
(
data
=>
{
le
t
res
=
{
cons
t
res
=
{
wait_pay_num
:
''
,
wait_cargo_num
:
''
,
send_cargo_num
:
''
,
...
...
@@ -90,7 +90,7 @@ exports.getUserHomeData = (uid) => {
*
*/
exports
.
getHelpInfo
=
(
data
)
=>
{
var
defaultParam
=
{
let
defaultParam
=
{
method
:
'app.help.li'
},
infoData
=
Object
.
assign
(
defaultParam
,
data
);
...
...
@@ -98,8 +98,8 @@ exports.getHelpInfo = (data) => {
return
api
.
get
(
''
,
infoData
,
{
code
:
200
}).
then
(
result
=>
{
var
helpData
=
result
.
data
;
var
formatData
=
[];
const
formatData
=
[];
let
helpData
=
result
.
data
;
helpData
=
helpData
||
[];
helpData
.
forEach
(
function
(
item
)
{
...
...
@@ -122,7 +122,7 @@ exports.getHelpInfo = (data) => {
* @param data
*/
exports
.
getHelpDetail
=
(
data
)
=>
{
var
defaultParam
=
{
let
defaultParam
=
{
method
:
'app.help.detail'
,
return_type
:
'html'
},
...
...
@@ -155,7 +155,7 @@ exports.saveFeedback = (data) => {
* @param data
*/
exports
.
saveMydetails
=
(
params
)
=>
{
var
defaultParam
=
{
let
defaultParam
=
{
method
:
'app.passport.modifyBase'
},
data
=
Object
.
assign
(
defaultParam
,
params
);
...
...
public/scss/me/_order.css
View file @
7fdb278
...
...
@@ -2,7 +2,8 @@ $black: #000;
$
white
:
#fff
;
.main-wrap
,
#home-order-list
{
#home-order-list
,
#refund-order-list
{
height
:
100%
;
}
...
...
public/vue/me/fav-brand-list.vue
View file @
7fdb278
...
...
@@ -40,6 +40,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
...
...
@@ -91,6 +92,11 @@
}
this.nullbox = this.brandData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
...
...
@@ -143,7 +149,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var
delBtn = $('#del-' + id);
let
delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
...
...
@@ -222,15 +228,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
}
};
</script>
...
...
public/vue/me/fav-product-list.vue
View file @
7fdb278
...
...
@@ -45,6 +45,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
...
...
@@ -72,11 +73,7 @@
if ($.isEmptyObject(data) || data.pageTotal === 0) {
this.busy = true;
} else {
if (this.page === data.pageTotal) {
this.busy = true;
} else {
this.busy = false;
}
this.busy = this.page === data.pageTotal;
const list = data.productList || [];
...
...
@@ -111,6 +108,11 @@
}
this.nullbox = this.productData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
...
...
@@ -162,7 +164,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var
delBtn = $('#del-' + id);
let
delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
...
...
@@ -241,15 +243,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
}
};
</script>
...
...
public/vue/me/order.vue
View file @
7fdb278
...
...
@@ -187,6 +187,9 @@
}).then(result => {
if (result.code === 200) {
_that.orderList.splice(index, 1);
if (_that.orderList.length === 0) {
_that.emptybox = '';
}
} else if (result.code !== 500) {
tip(result.message);
}
...
...
Please
register
or
login
to post a comment