Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e6dbdb99
authored
Nov 02, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
LL - 兑换记录完成
parent
bbd2c7f1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
220 additions
and
61 deletions
pages/club/create/create.js
pages/club/create/create.wxss
pages/mall/exchange-record/exchange-record.js
pages/mall/exchange-record/exchange-record.wxml
pages/mall/exchange-record/exchange-record.wxss
pages/mall/home/home.js
pages/mall/home/home.wxml
pages/mine/home/home.js
pages/club/create/create.js
View file @
e6dbdb99
...
@@ -96,7 +96,10 @@ Page({
...
@@ -96,7 +96,10 @@ Page({
wx
.
setStorageSync
(
'tempBackInfo'
,
'winEstablish'
)
wx
.
setStorageSync
(
'tempBackInfo'
,
'winEstablish'
)
wx
.
navigateBack
()
wx
.
navigateBack
()
}).
catch
((
response
)
=>
{
}).
catch
((
response
)
=>
{
console
.
log
(
'resolve'
,
response
)
App
.
ui
.
showToast
({
iconType
:
'error'
,
title
:
response
.
message
,
})
})
})
}
}
})
})
\ No newline at end of file
pages/club/create/create.wxss
View file @
e6dbdb99
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
}
}
.form-item-input {
.form-item-input {
width: 670rpx;
height: 80rpx;
height: 80rpx;
margin: 16rpx 0 8rpx 0;
margin: 16rpx 0 8rpx 0;
padding: 0 24rpx;
padding: 0 24rpx;
...
...
pages/mall/exchange-record/exchange-record.js
View file @
e6dbdb99
// pages/mall/exchange-record/exchange-record.js
let
App
=
getApp
()
Page
({
Page
({
/**
* 页面的初始数据
*/
data
:
{
data
:
{
pageIndex
:
1
,
pageSize
:
5
,
recordList
:
[],
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
queryRecord
()
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 查询兑换记录
* @function
* @param
* @returns
*/
*/
onReady
:
function
()
{
queryRecord
:
function
()
{
App
.
request
({
url
:
'v3/integral/integralExchange'
,
params
:
{
'pageNo'
:
this
.
data
.
pageIndex
,
'pageSize'
:
this
.
data
.
pageSize
,
}
}).
then
((
response
)
=>
{
let
funcData
=
response
.
data
.
list
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcData
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcData
[
i
].
orderId
,
'name'
:
funcData
[
i
].
smOrderDetails
[
0
].
name
,
'cover'
:
funcData
[
i
].
smOrderDetails
[
0
].
imgUrl
,
'price'
:
funcData
[
i
].
smOrderDetails
[
0
].
unitPrice
,
'priceTotal'
:
funcData
[
i
].
smOrderDetails
[
0
].
totalPrices
,
'quantity'
:
funcData
[
i
].
smOrderDetails
[
0
].
number
,
'state'
:
Number
(
funcData
[
i
].
status
)
}
funcList
.
push
(
funcItem
)
}
this
.
setData
({
recordList
:
this
.
data
.
recordList
.
concat
(
funcList
)
})
}).
catch
((
response
)
=>
{
})
},
},
/**
/**
* 生命周期函数--监听页面显示
* 查看兑换详情
* @function
* @param
* @returns
*/
*/
onShow
:
function
()
{
onDetail
:
function
(
funcEvent
)
{
let
funcItem
=
funcEvent
.
currentTarget
.
dataset
.
item
console
.
log
(
funcItem
)
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 确认收货
* @function
* @param
* @returns
*/
*/
onHide
:
function
()
{
onConfirm
:
function
(
funcEvent
)
{
let
funcItem
=
funcEvent
.
currentTarget
.
dataset
.
item
App
.
ui
.
showDialog
({
type
:
'confirm'
,
title
:
'确认收到货物?'
,
content
:
'确认收货无法返回'
,
cancel
:
'取消'
,
confirm
:
'确定'
,
success
:
()
=>
{
App
.
ui
.
showToast
({
iconType
:
'loading'
,
title
:
'正在处理'
,
duration
:
30000
})
App
.
request
({
url
:
'v3/integral/doReceipt'
,
params
:
{
'orderId'
:
funcItem
.
id
}
}).
then
((
response
)
=>
{
let
funcData
=
response
.
data
App
.
ui
.
showToast
({
iconType
:
'success'
,
title
:
'收货成功'
,
})
this
.
setData
({
pageIndex
:
1
,
recordList
:
[],
})
this
.
queryRecord
()
}).
catch
((
response
)
=>
{})
},
fail
:
()
=>
{},
})
},
},
/**
/**
* 生命周期函数--监听页面卸载
* 删除记录
* @function
* @param
* @returns
*/
*/
onUnload
:
function
()
{
onDelete
:
function
(
funcEvent
)
{
let
funcItem
=
funcEvent
.
currentTarget
.
dataset
.
item
App
.
ui
.
showDialog
({
type
:
'confirm'
,
title
:
'确认删除记录?'
,
content
:
'删除无法恢复记录'
,
cancel
:
'取消'
,
confirm
:
'确定'
,
success
:
()
=>
{
App
.
ui
.
showToast
({
iconType
:
'loading'
,
title
:
'正在处理'
,
duration
:
30000
})
App
.
request
({
url
:
'v1/order/cancelOrder'
,
params
:
{
'orderId'
:
funcItem
.
id
,
'type'
:
1
,
}
}).
then
((
response
)
=>
{
let
funcData
=
response
.
data
App
.
ui
.
showToast
({
iconType
:
'success'
,
title
:
'删除成功'
,
})
this
.
setData
({
pageIndex
:
1
,
recordList
:
[],
})
this
.
queryRecord
()
}).
catch
((
response
)
=>
{})
},
fail
:
()
=>
{},
})
},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面触底事件
*/
* @function
onPullDownRefresh
:
function
()
{
* @param
* @returns
},
/**
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
this
.
setData
({
pageIndex
:
this
.
data
.
pageIndex
+
1
})
this
.
queryRecord
()
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
})
\ No newline at end of file
pages/mall/exchange-record/exchange-record.wxml
View file @
e6dbdb99
...
@@ -4,27 +4,75 @@
...
@@ -4,27 +4,75 @@
<view class="container bg-gradient">
<view class="container bg-gradient">
<view class="record_list">
<view class="record_list">
<view class="record_item column">
<block wx:for="{{recordList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="row cb ac">
<!-- 待发货 -->
<text class="font_main_26 color_tip">{{'订单编号:' + '1218712538775946059'}}</text>
<view class="record_item column" wx:if="{{item.state === 1}}">
<text class="font_main_26 color_warning">待发货</text>
<view class="row cb ac">
<text class="font_main_26 color_tip">{{'订单编号:'}}</text>
<text class="font_main_26 color_warning">待发货</text>
</view>
<view class="record_item_info row ac">
<view class="record_item_info_cover">
<image src="{{item.cover}}"></image>
</view>
<view class="record_item_info_name row ac">
<text class="font_strong_30 color_main">{{item.name}}</text>
</view>
<view class="record_item_info_price column ce ae">
<text class="font_strong_30 color_main">{{item.priceTotal + ' 积分'}}</text>
<text class="font_main_26 color_tip">x1</text>
</view>
</view>
<view class="record_item_operation row ce ac">
<button class="record_item_operation_logistics row cc ac" data-item="{{item}}" bindtap="onDetail">查看详情</button>
</view>
</view>
</view>
<view class="record_item_info row ac">
<view class="record_item_info_cover">
<!-- 待收货 -->
<image src=""></image>
<view class="record_item column" wx:if="{{item.state === 5}}">
<view class="row cb ac">
<text class="font_main_26 color_tip">{{'订单编号:'}}</text>
<text class="font_main_26 color_warning">待收货</text>
</view>
</view>
<view class="record_item_info_name row ac">
<view class="record_item_info row ac">
<text class="font_strong_30 color_main">新年限定故宫典藏款白鹤紫霄便签…</text>
<view class="record_item_info_cover">
<image src="{{item.cover}}"></image>
</view>
<view class="record_item_info_name row ac">
<text class="font_strong_30 color_main">{{item.name}}</text>
</view>
<view class="record_item_info_price column ce ae">
<text class="font_strong_30 color_main">{{item.priceTotal + ' 积分'}}</text>
<text class="font_main_26 color_tip">x1</text>
</view>
</view>
</view>
<view class="record_item_info_price column ce ae">
<view class="record_item_operation row ce ac">
<text class="font_strong_30 color_main">999 积分</text>
<button class="record_item_operation_confirm row cc ac" data-item="{{item}}" bindtap="onConfirm">确认收货</button>
<text class="font_main_26 color_tip">x1</text>
</view>
</view>
</view>
</view>
<view class="record_item_operation row ce ac">
<button class="record_item_operation_logistics row cc ac">查看物流</button>
<!-- 已完成 -->
<button class="record_item_operation_confirm row cc ac">确认收货</button>
<view class="record_item column" wx:if="{{item.state === 3}}">
<view class="row cb ac">
<text class="font_main_26 color_tip">{{'下单时间:'}}</text>
<text class="font_main_26 color_tip">已完成</text>
</view>
<view class="record_item_info row ac">
<view class="record_item_info_cover">
<image src="{{item.cover}}"></image>
</view>
<view class="record_item_info_name row ac">
<text class="font_strong_30 color_main">{{item.name}}</text>
</view>
<view class="record_item_info_price column ce ae">
<text class="font_strong_30 color_main">{{item.priceTotal + ' 积分'}}</text>
<text class="font_main_26 color_tip">x1</text>
</view>
</view>
<view class="record_item_operation row ce ac">
<button class="record_item_operation_logistics row cc ac" data-item="{{item}}" bindtap="onDelete">删除订单</button>
</view>
</view>
</view>
</
view
>
</
block
>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/mall/exchange-record/exchange-record.wxss
View file @
e6dbdb99
.container {
.container {
width: 750rpx;
width: 750rpx;
min-height: 100vh;
min-height: 100vh;
padding: 0 40rpx;
padding: 0 40rpx
120rpx 40rpx
;
}
}
.record_list {
.record_list {
margin:
6
0rpx 0 0 0;
margin:
4
0rpx 0 0 0;
}
}
.record_item {
.record_item {
width: 670rpx;
width: 670rpx;
height: 396rpx;
height: 396rpx;
margin: 48rpx 0 0 0;
padding: 32rpx 32rpx 40rpx 32rpx;
padding: 32rpx 32rpx 40rpx 32rpx;
border-radius: 4px;
border-radius: 4px;
background: #FFFFFF;
background: #FFFFFF;
...
@@ -20,7 +21,7 @@
...
@@ -20,7 +21,7 @@
margin: 48rpx 0 0 0;
margin: 48rpx 0 0 0;
}
}
.record_item_info_cover {
.record_item_info_cover
> image
{
width: 140rpx;
width: 140rpx;
height: 136rpx;
height: 136rpx;
margin: 0 32rpx 0 0;
margin: 0 32rpx 0 0;
...
@@ -43,7 +44,6 @@
...
@@ -43,7 +44,6 @@
.record_item_operation_logistics {
.record_item_operation_logistics {
width: 120rpx;
width: 120rpx;
height: 56rpx;
height: 56rpx;
margin: 0 20rpx 0 0;
border-radius: 4px;
border-radius: 4px;
border: 1px solid #C2C7CF;
border: 1px solid #C2C7CF;
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
.record_item_operation_confirm {
.record_item_operation_confirm {
width: 120rpx;
width: 120rpx;
height: 56rpx;
height: 56rpx;
margin: 0 0 0 20rpx;
border-radius: 4px;
border-radius: 4px;
border: 1px solid #86C5E1;
border: 1px solid #86C5E1;
background: #86C5E1;
background: #86C5E1;
...
...
pages/mall/home/home.js
View file @
e6dbdb99
...
@@ -200,6 +200,16 @@ Page({
...
@@ -200,6 +200,16 @@ Page({
},
},
/**
/**
* 兑换记录
* @function
* @param {object} - funcEvent
* @returns
*/
onExchangeRecord
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/mall/exchange-record/exchange-record'
})
},
/**
* 商品详情
* 商品详情
* @function
* @function
* @param {object} - funcEvent
* @param {object} - funcEvent
...
...
pages/mall/home/home.wxml
View file @
e6dbdb99
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<text>{{integral}}</text>
<text>{{integral}}</text>
<text>我的积分</text>
<text>我的积分</text>
</view>
</view>
<view class="integral_record column cc ac">
<view class="integral_record column cc ac"
bindtap="onExchangeRecord"
>
<image class="icon_48" src="{{imageBase + 'icon/exchange-3.png'}}"></image>
<image class="icon_48" src="{{imageBase + 'icon/exchange-3.png'}}"></image>
<text>兑换记录</text>
<text>兑换记录</text>
</view>
</view>
...
...
pages/mine/home/home.js
View file @
e6dbdb99
...
@@ -89,6 +89,8 @@ Page({
...
@@ -89,6 +89,8 @@ Page({
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
setUserInfo
()
let
funcOptions
=
wx
.
getStorageSync
(
'tempOptions'
)
let
funcOptions
=
wx
.
getStorageSync
(
'tempOptions'
)
switch
(
funcOptions
)
{
switch
(
funcOptions
)
{
case
'exchange'
:
case
'exchange'
:
...
...
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