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
faa8d6f9
Commit
faa8d6f9
authored
May 24, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
3f428277
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
182 additions
and
53 deletions
+182
-53
index.wxml
business/pages/pointsexchangerecord/index.wxml
+1
-1
index.js
business/pages/scoremgt/index.js
+73
-45
index.wxml
business/pages/scoremgt/index.wxml
+14
-2
index.wxss
business/pages/scoremgt/index.wxss
+62
-0
api.js
constants/api.js
+3
-1
integral.js
service/business/integral.js
+21
-1
index.wxml
src/pages/growthrecord/index.wxml
+2
-2
index.js
src/pages/pointsexchangerecord/index.js
+3
-0
index.json
src/pages/pointsexchangerecord/index.json
+1
-0
request.js
utilities/request.js
+2
-1
No files found.
business/pages/pointsexchangerecord/index.wxml
View file @
faa8d6f9
...
...
@@ -12,7 +12,7 @@
<view class="checkpeople">兑换人: {{item.nickname}}</view>
<view wx:if="{{item.verify_status==1}}" class="checkstatus">待核销</view>
</view>
<image class="checkstatus-icon" wx:if="{{item.verify_status==2}}" src="{{localImageRoot}}2
b/rulesrecord/record_checked
.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
<image class="checkstatus-icon" wx:if="{{item.verify_status==2}}" src="{{localImageRoot}}2
c/mall/hasexchange
.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
</view>
</view>
</view>
...
...
business/pages/scoremgt/index.js
View file @
faa8d6f9
...
...
@@ -17,6 +17,10 @@ import {
pointsGoodsGet
,
pointsGoodDelate
}
from
'../../../service/business/points.js'
;
import
{
getExchangeUser
,
exchangeOperate
}
from
'../../../service/business/integral.js'
;
var
app
=
getApp
();
Page
({
...
...
@@ -33,7 +37,12 @@ Page({
choiceBoxShow
:
false
,
pointsGoodsList
:
[],
//商品列表
pointsCardList
:
[],
//积分列表
pointsGoodsTotalList
:
[]
pointsGoodsTotalList
:
[],
exchangeInfo
:
{
},
exchangeDia
:
false
,
exchangeing
:
false
},
/**
...
...
@@ -47,6 +56,7 @@ Page({
sid
,
})
wx
.
hideShareMenu
();
// this.getExchangeUser();
},
/**
...
...
@@ -212,9 +222,7 @@ Page({
pointsCardList
:
data
.
list
.
filter
(
item
=>
item
.
type
==
2
),
})
}
else
{
}
}
})
},
...
...
@@ -246,54 +254,74 @@ Page({
}).
then
(()
=>
{
})
},
chooseImg
()
{
let
access
=
{};
let
filename
=
''
;
cOssAccess
().
then
((
acc
)
=>
{
access
=
acc
.
data
;
return
wxChooseImage
({})
getExchangeUser
(
verifyCode
)
{
wx
.
showLoading
({
title
:
'信息查询中...'
})
getExchangeUser
({
school_id
:
this
.
data
.
sid
,
verify_code
:
verifyCode
}).
then
((
res
)
=>
{
const
{
tempFiles
}
=
res
;
filename
=
`
${
access
.
dir
}${
getRandomFilename
(
tempFiles
[
0
].
path
)}
`
;
wx
.
showLoading
({
title
:
'图片上传中'
})
return
wxUploadFile
({
url
:
access
.
host
,
formData
:
{
key
:
filename
,
policy
:
access
.
policy
,
OSSAccessKeyId
:
access
.
accessid
,
signature
:
access
.
signature
,
callback
:
access
.
callback
,
success_action_status
:
'200'
},
filePath
:
tempFiles
[
0
].
path
,
name
:
'file'
,
})
const
{
code
,
data
}
=
res
;
wx
.
hideLoading
();
if
(
code
==
200
)
{
if
(
data
.
verify_status
==
2
)
{
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'该奖品已核销'
,
showCancel
:
false
})
return
;
}
this
.
setData
({
exchangeDia
:
true
,
exchangeInfo
:
data
})
}
}).
catch
((
res
)
=>
{
wx
.
hideLoading
();
})
},
sureExchange
()
{
if
(
this
.
data
.
exchangeing
)
{
return
;
}
this
.
data
.
exchangeing
=
true
;
wx
.
showLoading
({
title
:
'核销zhong...'
})
exchangeOperate
({
goods_id
:
this
.
data
.
exchangeInfo
.
good
.
id
,
verify_code
:
this
.
data
.
exchangeInfo
.
verify_code
,
school_id
:
this
.
data
.
sid
}).
then
((
res
)
=>
{
const
{
data
}
=
res
;
if
(
data
==
'{"status":"ok"}'
)
{
const
{
code
,
data
}
=
res
;
this
.
data
.
exchangeing
=
false
;
if
(
code
==
200
)
{
wx
.
showToast
({
title
:
'
上传
成功'
title
:
'
核销
成功'
})
this
.
setData
({
img
:
filename
})
}
else
{
wx
.
hideLoading
();
wx
.
showModal
({
title
:
'提示'
,
content
:
'上传失败'
,
showCancel
:
false
exchangeDia
:
false
,
})
}
}).
catch
((
err
)
=>
{
});
}).
catch
(()
=>
{
wx
.
hideLoading
();
this
.
data
.
exchangeing
=
false
;
})
},
hideDialog
()
{
this
.
setData
({
exchangeDia
:
false
,
})
},
quickExchange
()
{
const
that
=
this
;
wx
.
scanCode
({
success
(
res
)
{
const
{
result
}
=
res
;
that
.
getExchangeUser
(
result
);
}
})
}
})
\ No newline at end of file
business/pages/scoremgt/index.wxml
View file @
faa8d6f9
...
...
@@ -19,7 +19,7 @@
</view>
<view class="btnname" hover-class="none" hover-stop-propagation="false">兑换记录</view>
</view>
<view class="btnitem" hover-class="none" hover-stop-propagation="false">
<view class="btnitem" hover-class="none" hover-stop-propagation="false"
bindtap="quickExchange"
>
<view class="iconbox" hover-class="none" hover-stop-propagation="false">
<image class="icon scan" src="{{localImageRoot}}2b/scoremgt/scan.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
...
...
@@ -80,7 +80,6 @@
</view>
<view class="empty-text" hover-class="none" hover-stop-propagation="false">您还没有添加奖品~</view>
</view>
<view class="choice-boxWrap" wx:if="{{choiceBoxShow}}">
<view class="choice-boxMask" bindtap="closeChoiceBox"></view>
<view class="choice-box">
...
...
@@ -94,4 +93,17 @@
</view>
</view>
</view>
<view class="exchangeinfodialog" hover-class="none" hover-stop-propagation="false" wx:if="{{exchangeDia}}">
<view class="dialogcontent" hover-class="none" hover-stop-propagation="false">
<view class="exchange-name" hover-class="none" hover-stop-propagation="false">兑奖人:{{exchangeInfo.nickname}}</view>
<view class="goodinfo" hover-class="none" hover-stop-propagation="false">
<view class="lefttitle" hover-class="none" hover-stop-propagation="false">商品:</view>
<view class="goodtitle" hover-class="none" hover-stop-propagation="false">{{exchangeInfo.good.title}}</view>
</view>
<view class="bottombtn" hover-class="none" hover-stop-propagation="false">
<view class="btn cancel" hover-class="none" hover-stop-propagation="false" bindtap="hideDialog">取消</view>
<view class="btn sure" hover-class="none" hover-stop-propagation="false" bindtap="sureExchange">确认兑换</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
business/pages/scoremgt/index.wxss
View file @
faa8d6f9
...
...
@@ -291,3 +291,65 @@ page{
.choice-boxWrap .choice-box .choice-item .item-name{
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.exchangeinfodialog {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn 0.5s linear 1 forwards;
}
.dialogcontent {
width: 600rpx;
background-color: #fff;
border-radius: 20rpx;
}
.bottombtn {
display: flex;
align-items: center;
border-top: 2rpx solid rgba(0,0,0,0.05);
}
.bottombtn .btn{
flex: 1;
height: 100rpx;
text-align: center;
line-height: 100rpx;
}
.bottombtn .btn.cancel {
border-right: 2rpx solid rgba(0,0,0,0.05);
}
.exchange-name {
padding: 50rpx 0 75rpx 0;
text-align: center;
color: #000;
font-weight: 700;
font-size: 32rpx;
}
.goodinfo {
width: 380rpx;
margin: 0 auto 28rpx;
display: flex;
/* align-items: center */
}
.lefttitle {
width: 70rpx;
font-size: 26rpx;
}
.goodtitle {
font-size: 26rpx;
width: 310rpx;
word-break: break-all;
}
\ No newline at end of file
constants/api.js
View file @
faa8d6f9
...
...
@@ -159,7 +159,9 @@ const apis = {
integralRulesUpdate
:
`
${
api
}
member/integral_rules/update`
,
goodsAdd
:
`
${
api
}
member/integral_goods/store`
,
goodsUpdate
:
`
${
api
}
member/integral_goods/update`
,
goodsShow
:
`
${
api
}
member/integral_goods/show`
goodsShow
:
`
${
api
}
member/integral_goods/show`
,
getExchangeUser
:
`
${
api
}
member/integral_goods/code_exchange`
,
exchangeOperate
:
`
${
api
}
member/integral_goods/verify_status`
},
teachermgt
:
{
teachersList
:
`
${
api
}
member/teachers`
,
...
...
service/business/integral.js
View file @
faa8d6f9
...
...
@@ -59,11 +59,31 @@ function goodsShow (data) {
errorresolve
:
1
,
})
}
function
getExchangeUser
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
integral
.
getExchangeUser
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
exchangeOperate
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
integral
.
exchangeOperate
,
data
,
method
:
'POST'
,
errorresolve
:
1
,
})
}
export
{
integralRulesAdd
,
integralRulesShow
,
integralRulesUpdate
,
goodsAdd
,
goodsUpdate
,
goodsShow
goodsShow
,
getExchangeUser
,
exchangeOperate
}
\ No newline at end of file
src/pages/growthrecord/index.wxml
View file @
faa8d6f9
...
...
@@ -11,9 +11,9 @@
<view class="person-name-box" hover-class="none" hover-stop-propagation="false">
<!-- <view class="name" selectable="false" space="false" decode="false">{{userInfo.remark}}</view> -->
<view class="name" selectable="false" space="false" decode="false">{{userInfo.nickname}}</view>
<view class="editicon-box" hover-class="none" hover-stop-propagation="false" wx:if="{{selfCustomerId == consumerId}}">
<
!-- <
view class="editicon-box" hover-class="none" hover-stop-propagation="false" wx:if="{{selfCustomerId == consumerId}}">
<image class="editicon" src="{{imageRoot}}2c/common/bi.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" bindtap="remarkChange" lazy-load="false" binderror="" bindload="" ></image>
</view>
</view>
-->
</view>
</view>
</view>
...
...
src/pages/pointsexchangerecord/index.js
View file @
faa8d6f9
...
...
@@ -27,6 +27,9 @@ Page({
// tid: options.tid,
sid
:
options
.
sid
||
0
,
});
},
onShow
()
{
this
.
setData
({
page
:
1
,
hasmore
:
true
,
...
...
src/pages/pointsexchangerecord/index.json
View file @
faa8d6f9
{
"navigationBarTitleText"
:
"兑换记录"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"list-loading"
:
"../../../components/listloading"
}
...
...
utilities/request.js
View file @
faa8d6f9
...
...
@@ -75,7 +75,8 @@ function wxRequest ({url, data, header, method, dataType, responseType, errorres
}
wx
.
showModal
({
title
:
'提示'
,
content
:
messages
[
data
.
code
]
||
`
${
data
.
code
}
`
,
// content: messages[data.code] || `${data.code}`,
content
:
data
.
msg
,
showCancel
:
false
,
confirm
:
true
})
...
...
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