Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
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
高淑倩
7-Eleven
Commits
0601a3e6
Commit
0601a3e6
authored
May 24, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zyw' into 'dev'
Feature zyw See merge request
!6
parents
2ec7b8e0
2a1c24ae
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
37 deletions
+62
-37
authorization-modal.js
src/component/authorization-modal/authorization-modal.js
+1
-0
index.js
src/config/index.js
+1
-1
mySpend.js
src/pages/mySpend/mySpend.js
+45
-29
mySpend.json
src/pages/mySpend/mySpend.json
+5
-1
mySpend.wxml
src/pages/mySpend/mySpend.wxml
+3
-2
mySpend.wxss
src/pages/mySpend/mySpend.wxss
+3
-0
util.js
src/utils/util.js
+1
-1
wxService.js
src/utils/wxService.js
+3
-3
No files found.
src/component/authorization-modal/authorization-modal.js
View file @
0601a3e6
...
...
@@ -42,6 +42,7 @@ Component({
if
(
res
.
detail
.
userInfo
)
{
console
.
log
(
'点击了同意'
)
this
.
setUserInfo
()
let
token
=
buyer
-
token
;
utils
.
getUserInfoByBtn
(
userInfo
).
then
(({
token
=
''
,
data
=
{}
})
=>
{
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
wx
.
hideNavigationBarLoading
()
...
...
src/config/index.js
View file @
0601a3e6
...
...
@@ -4,7 +4,7 @@ const needMock = '' //
// appid_dev wxc3b64b09b1d3dfc2
// appid_prod
const
devCtx
=
'http://111.231.86.64
/member
'
const
devCtx
=
'http://111.231.86.64'
const
prodCtx
=
''
// 发生产时解开此注释
const
config
=
{
...
...
src/pages/mySpend/mySpend.js
View file @
0601a3e6
...
...
@@ -9,7 +9,11 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
params
:{
pageNo
:
'1'
,
pageSize
:
'10'
},
totalPages
:
''
},
/**
...
...
@@ -20,51 +24,62 @@ wxService.page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
//获取消费列表
initOrderList
(
type
){
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
'/sale/order/list'
,
this
.
data
.
params
).
then
(
res
=>
{
let
orderList
=
[];
orderList
=
this
.
data
.
params
.
pageNo
==
1
?
res
.
data
.
data
:
this
.
data
.
orderList
.
concat
(
res
.
data
.
data
);
this
.
setData
({
orderList
,
totalPages
:
res
.
data
.
data
.
totalPages
,
})
wx
.
hideLoading
();
if
(
type
&&
type
.
pullDown
)
wx
.
stopPullDownRefresh
();
}).
finally
(()
=>
{
wx
.
hideLoading
();
this
.
setData
({
orderList
:
''
})
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
setData
({
params
:
{
pageNo
:
1
,
pageSize
:
10
,
},
})
this
.
initOrderList
({
pullDown
:
true
});
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
bindDownLoad
:
function
()
{
if
(
this
.
data
.
params
.
pageNo
<
this
.
data
.
totalPages
)
{
this
.
setData
({
params
:
{
pageNo
:
this
.
data
.
params
.
pageNo
+
1
,
pageSize
:
10
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
loadDataDone
:
true
})
this
.
initOrderList
()
}
},
})
\ No newline at end of file
src/pages/mySpend/mySpend.json
View file @
0601a3e6
{
"navigationBarTitleText"
:
"我的消费"
,
"usingComponents"
:
{}
"usingComponents"
:
{},
"enablePullDownRefresh"
:
true
,
"onPullDownRefresh"
:
true
,
"onReachBottom"
:
true
}
\ No newline at end of file
src/pages/mySpend/mySpend.wxml
View file @
0601a3e6
<!--pages/userCenter.wxml-->
<view class='page-mySpend'>
<scroll-view>
<scroll-view
scroll-y bindscrolltolower="bindDownLoad"
>
<view class='spend-wrap'>
<navigator url='/pages/consumptionDetails/consumptionDetails'
></navigator
>
<navigator url='/pages/consumptionDetails/consumptionDetails'
hover-class='none'
>
<view class='spend-list'>
<view class='spend-id fs-22'>订单编号:8327878435</view>
<view class='spend-time fs-25'>消费时间:</view>
<view class='spend-shop fs-25'>消费门店:张江高科店</view>
<view class="spend-status fs-22 {{true ? 'fail-status' : ''}}">交易成功</view>
</view>
</navigator>
</view>
<view class='spend-wrap'>
<view class='spend-list'>
...
...
src/pages/mySpend/mySpend.wxss
View file @
0601a3e6
/* pages/userCenter.wxss */
@import './../../base/base.wxss';
page{
background-color: #ffffff;
}
.page-mySpend{
padding: 0 32rpx;
}
...
...
src/utils/util.js
View file @
0601a3e6
...
...
@@ -158,7 +158,7 @@ function getUserInfoByBtn(userInfo) {
icon
:
'none'
,
mask
:
true
})
return
wxService
.
post
(
`/minaLogin`
,
{
return
wxService
.
post
(
`/m
ember/m
inaLogin`
,
{
code
:
res
[
1
].
code
,
wechatInfo
:
res
[
0
]
})
...
...
src/utils/wxService.js
View file @
0601a3e6
...
...
@@ -65,7 +65,7 @@ class WXService extends Http {
url
,
data
,
header
:
{
token
:
this
.
getToken
()
'buyer-token'
:
this
.
getToken
()
},
method
,
dataType
,
...
...
@@ -155,7 +155,7 @@ class WXService extends Http {
let
newBaseUserInfo
=
{
...
baseUserInfo
,
...
res
.
data
.
data
}
this
.
baseUserInfo
=
newBaseUserInfo
wx
.
setStorageSync
(
'_baseUserInfo'
,
newBaseUserInfo
)
wx
.
setStorageSync
(
'token'
,
res
.
data
.
data
.
token
)
wx
.
setStorageSync
(
'
buyer-
token'
,
res
.
data
.
data
.
token
)
this
.
startReport
()
return
Promise
.
resolve
({
state
:
1
,
info
:
res
.
data
.
data
})
}
else
{
...
...
@@ -290,7 +290,7 @@ class WXService extends Http {
app
.
globalData
.
baseUserInfo
=
baseUserInfo
}
if
(
!
app
.
globalData
.
userNo
)
{
const
token
=
wx
.
getStorageSync
(
'token'
)
const
token
=
wx
.
getStorageSync
(
'
buyer-
token'
)
app
.
globalData
.
userNo
=
token
.
split
(
'###'
)[
0
]
}
}
...
...
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