Commit cbe8fb2e authored by lvtz's avatar lvtz

fix

parent f85d70c0
......@@ -425,21 +425,18 @@
"root": "src/pages/mall",
"name": "mall",
"pages": [
"index"
]
},
{
"root": "src/pages/myscoreindex",
"name": "myscoreindex",
"pages": [
"index"
"index",
"goodsdetail"
]
},
{
"root": "src/pages/scoreprodetail",
"name": "scoreprodetail",
"root": "src/pages/integralfile",
"name": "integralfile",
"pages": [
"index"
"index",
"inout",
"rule",
"exchangerecord"
]
},
{
......@@ -630,27 +627,6 @@
"index"
]
},
{
"root": "src/pages/pointsrule",
"name": "pointsrule",
"pages": [
"index"
]
},
{
"root": "src/pages/pointsexchangerecord",
"name": "pointsexchangerecord",
"pages": [
"index"
]
},
{
"root": "src/pages/pointsInOut",
"name": "pointsInOut",
"pages": [
"index"
]
},
{
"root": "business/pages/scoreproedit",
"name": "businessscoreproedit",
......@@ -711,7 +687,7 @@
"mylikes",
"growthrecord",
"mall",
"myscoreindex",
"integralfile",
"rankingList",
"exchangebusiness",
"papersquare",
......@@ -747,16 +723,6 @@
"clockdetail"
]
},
"src/pages/myscoreindex/index": {
"network": "all",
"packages": [
"pointsInOut",
"pointsrule",
"mall",
"scoretasklist",
"rankingList"
]
},
"src/pages/papersquare/index": {
"network": "all",
"packages": [
......
<wxs src="./../../../filter/index.wxs" module="filter" />
<view class="container points-exchange-record">
<view class="record-list" wx:if="{{recordList.length!=0}}">
<view class="record-list" wx:if="{{!emptyPage}}">
<block wx:for="{{recordList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="record-item" wx:for="{{bigitem}}" wx:key="" data-info="{{item}}" bindtap="toCheckRecord">
<image class="item-points-pic" src="{{filter.imagify(item.good.cover)}}" mode="aspectFit|aspectFill|widthFix"></image>
......@@ -18,6 +18,6 @@
</view>
</block>
</view>
<empty-content text="暂无兑换记录~" emptyimg="" wx:if="{{recordList.length==0}}"></empty-content>
<empty-content text="暂无兑换记录~" emptyimg="" wx:if="{{emptyPage}}"></empty-content>
<view class="has-nomore" wx:if="{{!emptyPage && !hasmore}}">没有更多了</view>
</view>
......@@ -35,7 +35,7 @@ Component({
},
goscorecenter () {
wx.navigateTo({
url: `/src/pages/myscoreindex/index?sid=${this.data.sid}`
url: `/src/pages/integralfile/index?sid=${this.data.sid}`
});
}
}
......
......@@ -41,20 +41,19 @@ Page({
school_id:this.data.sid,
remark: ''
})
wx.hideShareMenu();
},
onShow () {
this.setData({
page: 1,
hasmore: true,
})
this.data.page = 1
this.pointsExchangeRecordGet('init')
},
onPullDownRefresh: function () {
this.setData({
hasmore: true,
page: 1,
})
this.data.page = 1
this.pointsExchangeRecordGet('down')
},
onReachBottom: function () {
......@@ -83,66 +82,50 @@ Page({
} else {
if (data.total) {
this.setData({
recordTotal: data.total
})
this.data.recordTotal = data.total
}
switch (type) {
case 'init': //页面进来第一次加载
this.setData({
recordList: data.list || []
}, () => {
if (this.data.recordTotal > this.data.recordList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
} else { // 没有更多了
this.setData({
hasmore: false
})
}
recordList: [data.list]
})
if (this.data.recordTotal > this.caculateArrLength(this.data.recordList)) {
this.data.page += 1;
} else { // 没有更多了
this.setData({
hasmore: false
})
}
break;
case 'down': // 页面下拉刷新
this.setData({
recordList: data.list || []
}, () => {
if (this.data.recordTotal > this.data.recordList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
} else { // 没有更多了
this.setData({
hasmore: false
})
}
recordList: [data.list]
})
if (this.data.recordTotal > this.caculateArrLength(this.data.recordList)) {
this.data.page += 1;
} else { // 没有更多了
this.setData({
hasmore: false
})
}
wx.stopPullDownRefresh();
break;
case 'up': // 页面上拉刷新
let list = this.data.recordList;
let _list = list.concat(data.list);
this.setData({
recordList: _list
}, () => {
if (this.data.recordTotal > this.data.recordList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
} else { // 没有更多了
this.setData({
hasmore: false
})
}
[`recordList[${this.data.page - 1}]`]: data.list,
})
if (this.data.recordTotal > this.caculateArrLength(this.data.recordList)) {
this.data.page += 1;
} else { // 没有更多了
this.setData({
hasmore: false
})
}
break;
default:
break;
}
if (this.data.recordList.length == 0) {
if (this.caculateArrLength(this.data.recordList) == 0) {
this.setData({
emptyPage: true
})
......@@ -162,9 +145,8 @@ Page({
toCheckRecord (e) {
let that = this;
const {dataset} = e.currentTarget;
console.log(dataset)
wx.navigateTo({
url: `/src/pages/scoreprodetail/index?sid=${this.data.sid}&gid=${dataset.info.id}&pagefrom=exchange`,
url: `/src/pages/mall/goodsdetail?sid=${this.data.sid}&gid=${dataset.info.id}&pagefrom=exchange`,
})
},
formIdCreate(e) {
......@@ -175,4 +157,11 @@ Page({
formId
})
},
caculateArrLength(array) {
let _length = 0;
array.forEach(ele => {
_length = _length + ele.length;
})
return _length;
},
})
\ No newline at end of file
......@@ -3,6 +3,7 @@
"enablePullDownRefresh": true,
"usingComponents": {
"list-loading": "../../../components/listloading",
"sjdbottombar":"../../../components/sjdbottombar"
"sjdbottombar":"../../../components/sjdbottombar",
"empty-content": "../../../components/emptycontent"
}
}
\ No newline at end of file
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="record-list" wx:if="{{!emptyPage}}">
<block wx:for="{{recordList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="record-item" wx:for="{{bigitem}}" wx:key="" data-info="{{item}}" bindtap="toCheckRecord">
<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.good.title}}</view>
<view class="item-points">-{{item.good.price}}积分</view>
</view>
<view class="item-checkperson">
<view class="checkpeople"></view>
<view wx:if="{{item.verify_status==1}}" class="checkstatus">待核销</view>
</view>
<image class="checkstatus-icon" wx:if="{{item.verify_status==2}}" src="{{imageRoot}}2c/mall/hasexchange.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
</block>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<empty-content text="您还没有已经兑换的奖品哦~" emptyimg="common/empty/empty_c_sraech.png" width="263" height="219" wx:if="{{emptyPage}}"></empty-content>
<view class="has-nomore" wx:if="{{!emptyPage && !hasmore}}">没有更多了</view>
</view>
page{
min-height:100%;
background:#F7F7F9;
}
.points-exchange-record{
.container{
width: 100%;
padding: 25rpx 24rpx;
padding: 25rpx 24rpx 0;
}
.record-list{
}
.record-item{
.record-list{}
.record-list .record-item{
width: 100%;
height: 170rpx;
background: rgba(255,255,255,1);
background: #fff;
border-radius: 20rpx;
box-sizing: border-box;
display: flex;
......@@ -22,6 +19,9 @@ page{
padding: 17rpx 30rpx 17rpx 17rpx;
position: relative;
}
.record-list .record-item:last-of-type{
margin-bottom: 0;
}
.record-item .item-points-pic{
width: 157rpx;
min-width: 157rpx;
......@@ -69,26 +69,4 @@ page{
bottom: 8rpx;
width: 99rpx;
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;
}
}
\ No newline at end of file
......@@ -202,13 +202,13 @@ Page({
// 积分规则
toRulePage () {
wx.navigateTo({
url: `/src/pages/pointsrule/index?sid=${this.data.sid}`
url: `/src/pages/integralfile/rule?sid=${this.data.sid}`
})
},
// 积分明细
toPointsInOutPage () {
wx.navigateTo({
url: `/src/pages/pointsInOut/index?sid=${this.data.sid}`
url: `/src/pages/integralfile/inout?sid=${this.data.sid}`
})
},
// 积分商城
......
......@@ -219,7 +219,7 @@ Page({
// 赚积分
goEarnPoints () {
wx.navigateTo({
url: `/src/pages/myscoreindex/index?sid=${this.data.sid}`
url: `/src/pages/integralfile/index?sid=${this.data.sid}`
})
}
})
\ No newline at end of file
......@@ -9,7 +9,7 @@
</view>
</view>
<view class="swiperbox" wx:if="{{params.type == 1}}">
<swiper style="height: 310rpx" bindchange="swiperChange">
<swiper style="height: 310rpx" bindchange="swiperChange" circular="true">
<swiper-item class="" item-id="" wx:for="{{params.banner}}" wx:key="{{index}}">
<image class="swiperimg" src="{{filter.imagify(item)}}" ></image>
</swiper-item>
......@@ -18,9 +18,6 @@
<view class="proswiper" wx:if="{{params.type == 1}}">
<view class="swiperpagination">
<view class="dot {{swiperIndex == index ? 'active' : ''}}" wx:for="{{params.banner}}" wx:key="{{index}}"></view>
<!-- <view class="dot"></view>
<view class="dot active"></view>
<view class="dot"></view> -->
</view>
</view>
<view class="prodetail" >
......
......@@ -143,18 +143,18 @@ Page({
},
goEarnPoints () {
wx.navigateTo({
url: `/src/pages/myscoreindex/index?sid=${this.data.sid}`
url: `/src/pages/integralfile/index?sid=${this.data.sid}`
})
},
goExchangeList () {
wx.navigateTo({
url: `/src/pages/pointsexchangerecord/index?sid=${this.data.sid}`,
url: `/src/pages/integralfile/exchangerecord?sid=${this.data.sid}`,
})
},
goGoodDetail (e) {
const {id} = e.currentTarget.dataset;
wx.navigateTo({
url: `/src/pages/scoreprodetail/index?sid=${this.data.sid}&gid=${id}`,
url: `/src/pages/mall/goodsdetail?sid=${this.data.sid}&gid=${id}`,
})
},
formIdCreate (e) {
......
<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="{{filter.imagify(item.good.cover)}}" mode="aspectFit|aspectFill|widthFix"></image>
<view class="item-content-box">
<view class="item-top">
<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.verify_status==1}}" class="checkstatus">待核销</view>
</view>
<image class="checkstatus-icon" wx:if="{{item.verify_status==2}}" src="{{imageRoot}}2c/mall/hasexchange.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"></image>
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="empty-content" wx:if="{{emptyPage}}">
<view class="empty-img-box" >
<image class="empty-icon" src='{{imageRoot}}2c/rankinglist/empty.png?{{imageVersion}}'></image>
</view>
<view class="empty-text" >您还没有已经兑换的奖品哦~</view>
</view>
<sjdbottombar></sjdbottombar>
</view>
......@@ -366,7 +366,7 @@ Page({
return
}
wx.navigateTo({
url: `/src/pages/myscoreindex/index?sid=${this.data.sid}`,
url: `/src/pages/integralfile/index?sid=${this.data.sid}`,
})
},
toSetting () {
......
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