Commit 15148d14 authored by wangxuelai's avatar wangxuelai

''

parent 31c4bdb4
......@@ -11,8 +11,8 @@ const apis = {
goodsList: `${api}student/integral/goods`,
goodsDetail: `${api}student/integral/goods`,
goodsDetail: `${api}student/integral/goods`,
exchangesGoodsDetail: `${api}student/integral/exchanges`,
integralExchange: `${api}student/integral/exchange`
exchangesGoods: `${api}student/integral/exchanges`,
integralExchange: `${api}student/integral/exchange`,
},
common: {
consumerSession: `${api}common/login`,
......
......@@ -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
{
"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
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({
school_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
{
"navigationBarTitleText": "兑换记录",
"usingComponents": {}
"usingComponents": {
"list-loading": "../../../components/listloading"
}
}
\ No newline at end of file
<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>
......@@ -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;
}
......@@ -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) => {
......
{
"navigationBarTitleText": "商品详情",
"usingComponents": {},
"usingComponents": {
"w-qr-code": "../../../dist/w-qr-code/index"
},
"enablePullDownRefresh": true
}
\ No newline at end of file
......@@ -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>
......@@ -93,7 +93,7 @@
line-height: 1;
}
.procontent {
padding: 48rpx 24rpx 100rpx;
padding: 48rpx 24rpx 200rpx;
}
.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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment