Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
wangxuelai
wechatapp.shangjiadao.com
Commits
15148d14
Commit
15148d14
authored
May 24, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
31c4bdb4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
149 additions
and
44 deletions
+149
-44
api.js
constants/api.js
+2
-2
hasexchange.png
images/2c/mall/hasexchange.png
+0
-0
integral.js
service/customer/integral.js
+12
-2
index.json
src/pages/mynotice/index.json
+4
-4
index.js
src/pages/pointsexchangerecord/index.js
+12
-23
index.json
src/pages/pointsexchangerecord/index.json
+3
-1
index.wxml
src/pages/pointsexchangerecord/index.wxml
+15
-6
index.wxss
src/pages/pointsexchangerecord/index.wxss
+23
-1
index.js
src/pages/scoreprodetail/index.js
+34
-1
index.json
src/pages/scoreprodetail/index.json
+3
-1
index.wxml
src/pages/scoreprodetail/index.wxml
+12
-1
index.wxss
src/pages/scoreprodetail/index.wxss
+29
-2
No files found.
constants/api.js
View file @
15148d14
...
...
@@ -11,8 +11,8 @@ const apis = {
goodsList
:
`
${
api
}
student/integral/goods`
,
goodsDetail
:
`
${
api
}
student/integral/goods`
,
goodsDetail
:
`
${
api
}
student/integral/goods`
,
exchangesGoods
Detail
:
`
${
api
}
student/integral/exchanges`
,
integralExchange
:
`
${
api
}
student/integral/exchange`
exchangesGoods
:
`
${
api
}
student/integral/exchanges`
,
integralExchange
:
`
${
api
}
student/integral/exchange`
,
},
common
:
{
consumerSession
:
`
${
api
}
common/login`
,
...
...
images/2c/mall/hasexchange.png
0 → 100644
View file @
15148d14
23.4 KB
service/customer/integral.js
View file @
15148d14
...
...
@@ -35,7 +35,16 @@ function goodsDetail (data) {
function
exchangesGoodsDetail
(
data
)
{
return
wxRequest
({
role
:
'2c'
,
url
:
apis
.
customer
.
integral
.
exchangesGoodsDetail
+
'/'
+
data
.
id
,
url
:
apis
.
customer
.
integral
.
exchangesGoods
+
'/'
+
data
.
id
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
exchangesGoods
(
data
)
{
return
wxRequest
({
role
:
'2c'
,
url
:
apis
.
customer
.
integral
.
exchangesGoods
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
...
...
@@ -55,5 +64,6 @@ export {
goodsList
,
exchangesGoodsDetail
,
goodsDetail
,
integralExchange
integralExchange
,
exchangesGoods
}
\ No newline at end of file
src/pages/mynotice/index.json
View file @
15148d14
{
"usingComponents"
:
{
"list-loading"
:
"../../../components/listloading"
,
"activity-bar"
:
"../../../components/activitybar"
},
"usingComponents"
:
{
"list-loading"
:
"../../../components/listloading"
,
"activity-bar"
:
"../../../components/activitybar"
},
"navigationBarTitleText"
:
"点赞、评论通知"
,
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
src/pages/pointsexchangerecord/index.js
View file @
15148d14
import
{
unlockClockRank
}
from
'../../../service/common.js'
;
import
{
constants
}
from
'../../../constants/index.js'
;
unlockClockRank
,
exchangesGoods
}
from
'../../../service/customer/integral.js'
;
// import {
// constants
// } from '../../../constants/index.js';
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -19,9 +20,6 @@ Page({
listLoading
:
false
,
sid
:
0
,
recordList
:
[
{
id
:
'1'
,
imgurl
:
'2b/rulesrecord/record_checked.png'
,
title
:
'狐狸玩偶'
,
status
:
1
,
point_num
:
2200
},
{
id
:
'2'
,
imgurl
:
'2b/rulesrecord/record_checked.png'
,
title
:
'小象啊花瓣,你值得拥有,速来兑换!我擦点鞍山西安市'
,
status
:
0
,
point_num
:
2200
},
{
id
:
'3'
,
imgurl
:
'2b/rulesrecord/record_checked.png'
,
title
:
'小象啊花瓣,你值得拥有,速来兑换!'
,
status
:
1
,
point_num
:
2200
},
]
},
onLoad
:
function
(
options
)
{
...
...
@@ -33,7 +31,7 @@ Page({
page
:
1
,
hasmore
:
true
,
})
//
this.pointsExchangeRecordGet('init')
this
.
pointsExchangeRecordGet
(
'init'
)
},
onPullDownRefresh
:
function
()
{
this
.
setData
({
...
...
@@ -55,8 +53,8 @@ Page({
this
.
setData
({
listLoading
:
true
})
unlockClockRank
({
sid
:
this
.
data
.
sid
,
exchangesGoods
({
s
chool_
id
:
this
.
data
.
sid
,
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
}).
then
((
res
)
=>
{
...
...
@@ -146,17 +144,8 @@ Page({
// 核销 没有操作
toCheckRecord
(
e
)
{
let
that
=
this
;
// const {id,status} = e.currentTarget.dataset.info;
// if(status==0){//已核销,不做其他操作
// return
// }
// wx.showModal({
// })
// this.data.recordList.find(item => item.id == id).status = !status;
// that.setData({
// recordList: this.data.recordList
// })
wx
.
navigateTo
({
url
:
`/src/pages/scoreprodetail/index?sid=
${
this
.
data
.
sid
}
&gid=
${
e
.
currentTarget
.
dataset
.
info
.
id
}
&pagefrom=exchange`
,
})
}
})
\ No newline at end of file
src/pages/pointsexchangerecord/index.json
View file @
15148d14
{
"navigationBarTitleText"
:
"兑换记录"
,
"usingComponents"
:
{}
"usingComponents"
:
{
"list-loading"
:
"../../../components/listloading"
}
}
\ No newline at end of file
src/pages/pointsexchangerecord/index.wxml
View file @
15148d14
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container points-exchange-record">
<view class="record-list">
<view class="record-item" wx:for="{{recordList}}" wx:key="" data-info="{{item}}" bindtap="toCheckRecord">
<image class="item-points-pic" src="{{
localImageRoot}}{{item.imgurl}}?{{imageVersion
}}" mode="aspectFit|aspectFill|widthFix"></image>
<image class="item-points-pic" src="{{
filter.imagify(item.good.cover)
}}" mode="aspectFit|aspectFill|widthFix"></image>
<view class="item-content-box">
<view class="item-top">
<view class="item-title">{{item.title}}</view>
<view class="item-points">
{{item.point_num
}}积分</view>
<view class="item-title">{{item.
good.
title}}</view>
<view class="item-points">
-{{item.good.price
}}积分</view>
</view>
<view class="item-checkperson">
<view class="checkpeople">
兑换人: 历史
</view>
<view wx:if="{{item.
status==0
}}" class="checkstatus">待核销</view>
<view class="checkpeople"></view>
<view wx:if="{{item.
verify_status==1
}}" class="checkstatus">待核销</view>
</view>
<image class="checkstatus-icon" wx:if="{{item.
status==1}}" src="{{localImageRoot}}2b/rulesrecord/record_checked
.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
<image class="checkstatus-icon" wx:if="{{item.
verify_status==2}}" src="{{localImageRoot}}2c/mall/hasexchange
.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
</view>
</view>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="empty-content" hover-class="none" hover-stop-propagation="false" wx:if="{{emptyPage}}">
<view class="empty-img-box" hover-class="none" hover-stop-propagation="false">
<image class="empty-icon" src="{{imageRoot}}2b/organizationalmgt/empty-icon.png?{{imageVersion}}"
lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="empty-text" hover-class="none" hover-stop-propagation="false">您还没有已经兑换的奖品哦~</view>
</view>
</view>
src/pages/pointsexchangerecord/index.wxss
View file @
15148d14
...
...
@@ -39,6 +39,7 @@ page{
.record-item .item-content-box .item-title{
font-size: 26rpx;
color: #000;
word-break: break-all;
}
.record-item .item-content-box .item-points{
font-size: 22rpx;
...
...
@@ -59,7 +60,7 @@ page{
}
.record-item .item-content-box .item-checkperson .checkstatus{
font-size: 26rpx;
color: #
65B8F4
;
color: #
FF5E15
;
}
.record-item .item-content-box .checkstatus-icon{
position: absolute;
...
...
@@ -68,4 +69,25 @@ page{
width: 90rpx;
height: 90rpx;
}
.empty-content {
padding-top: 152rpx;
}
.empty-content .empty-img-box {
width: 263rpx;
height: 219rpx;
margin: 0 auto;
}
.empty-content .empty-img-box .empty-icon {
width: 263rpx;
height: 219rpx;
}
.empty-content .empty-text {
padding-top: 47rpx;
text-align: center;
font-size: 26rpx;
color: rgba(0, 0, 0, 0.5);
padding-bottom: 217rpx;
}
src/pages/scoreprodetail/index.js
View file @
15148d14
...
...
@@ -18,7 +18,9 @@ Page({
gid
:
0
,
params
:
{},
balance
:
0
,
submitting
:
false
submitting
:
false
,
verifyCode
:
''
,
// 核销码
verifyStatus
:
1
,
// 是否核销 1 未核销 2 已核销
},
/**
...
...
@@ -99,6 +101,37 @@ Page({
})
},
getGoodsDetail
()
{
if
(
this
.
data
.
pagefrom
==
'exchange'
)
{
exchangesGoodsDetail
({
id
:
this
.
data
.
gid
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
setData
({
params
:
{
banner
:
JSON
.
parse
(
data
.
good
.
banner
),
consumption
:
data
.
good
.
consumption
,
cover
:
data
.
good
.
cover
,
created_at
:
data
.
good
.
created_at
,
deleted_at
:
data
.
good
.
deleted_at
,
id
:
data
.
good
.
id
,
inventory
:
data
.
good
.
inventory
,
price
:
data
.
good
.
price
,
remark
:
data
.
good
.
remark
,
school_id
:
data
.
good
.
school_id
,
status
:
data
.
good
.
status
,
title
:
data
.
good
.
title
,
type
:
data
.
good
.
type
,
updated_at
:
data
.
good
.
updated_at
,
},
verifyCode
:
data
.
verify_code
,
verifyStatus
:
data
.
verify_status
,
})
}
})
return
;
}
goodsDetail
({
id
:
this
.
data
.
gid
}).
then
((
res
)
=>
{
...
...
src/pages/scoreprodetail/index.json
View file @
15148d14
{
"navigationBarTitleText"
:
"商品详情"
,
"usingComponents"
:
{},
"usingComponents"
:
{
"w-qr-code"
:
"../../../dist/w-qr-code/index"
},
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
src/pages/scoreprodetail/index.wxml
View file @
15148d14
...
...
@@ -30,6 +30,16 @@
<text class="prostock" selectable="false" space="false" decode="false">仅剩{{params.inventory - params.consumption}}份</text>
</view>
</view>
<view class="qrcodebox" hover-class="none" hover-stop-propagation="false" wx:if="{{pagefrom == 'exchange'}}">
<text class="qrcodetitle" selectable="false" space="false" decode="false">核销码</text>
<view class="qrcode" hover-class="none" hover-stop-propagation="false">
<w-qr-code
text="{{verifyCode}}"
size="{{125}}"
/>
</view>
<text class="exchangestatus" selectable="false" space="false" decode="false">{{verifyStatus == 1 ? '未核销' : '已核销'}}</text>
</view>
<view class="procontent" hover-class="none" hover-stop-propagation="false">
<view class="contenttitle" hover-class="none" hover-stop-propagation="false">其他说明</view>
<text class="contenttext" selectable="false" space="false" decode="false">{{params.remark}}</text>
...
...
@@ -45,6 +55,7 @@
<text class="linecost" selectable="false" space="false" decode="false">{{balance}}积分</text>
</view>
</view>
<view class="buyboxright" hover-class="none" hover-stop-propagation="false" bindtap="buy">{{params.status == 1? '立即兑换' : '已下架'}}</view>
<view class="buyboxright" wx:if="{{pagefrom == 'exchange'}}" hover-class="none" hover-stop-propagation="false" bindtap="buy">{{params.status == 1? '再次兑换' : '已下架'}}</view>
<view class="buyboxright" wx:if="{{pagefrom == ''}}" hover-class="none" hover-stop-propagation="false" bindtap="buy">{{params.status == 1? '立即兑换' : '已下架'}}</view>
</view>
</view>
src/pages/scoreprodetail/index.wxss
View file @
15148d14
...
...
@@ -93,7 +93,7 @@
line-height: 1;
}
.procontent {
padding: 48rpx 24rpx
1
00rpx;
padding: 48rpx 24rpx
2
00rpx;
}
.procontent .contenttitle {
font-size: 26rpx;
...
...
@@ -110,7 +110,7 @@
.buybox {
display: flex;
height: 100rpx;
position:
absolute
;
position:
fixed
;
left: 0;
bottom: 0;
background-color: #fff;
...
...
@@ -160,4 +160,31 @@
}
.swiperbox {
margin-bottom: 30rpx;
}
.qrcodebox {
width: 430rpx;
margin: 0 auto;
text-align: center;
border: 2rpx solid rgba(247,247,249,1);
border-radius: 10rpx;
padding: 42rpx 0;
margin-top: 48rpx;
}
.qrcode {
width: 254rpx;
height: 254rpx;
display: block;
margin: 0 auto;
margin-bottom: 30rpx;
margin-top: 30rpx;
}
.qrcodetitle {
font-size: 48rpx;
letter-spacing: 2rpx;
line-height: 1;
}
.exchangestatus {
font-size: 48rpx;
letter-spacing: 2rpx;
line-height: 1
}
\ No newline at end of file
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