Browse Source

增加最近代卖标识.wz

featrue/v4.5
wangzhen 4 years ago
parent
commit
5f2718234a
8 changed files with 97 additions and 77 deletions
  1. 2
      app.js
  2. 2
      app.json
  3. 1
      pages/agent/agent-item/index.json
  4. 16
      pages/agent/agent-item/index.wxml
  5. 15
      pages/agent/agent-item/index.wxss
  6. 112
      pages/mall/index/index.js
  7. 24
      pages/mall/index/index.wxml
  8. 2
      pages/message/index/index.js

2
app.js

@ -1,7 +1,7 @@
//app.js
App({
//----------------------------------------------globalData--------------------------------------
evn: 2,//0:开发环境,1:测试环境,2:生产环境
evn: 0,//0:开发环境,1:测试环境,2:生产环境
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
version: 152,

2
app.json

@ -84,7 +84,6 @@
"pages/article/newInfo/index",
"pages/moment/paper/index",
"pages/ztbvip/index"
],
"subpackages": [
{
@ -101,7 +100,6 @@
"pages/article/index/index",
"pages/article/attentionPaperFactory/index",
"pages/article/sucessFul/index"
]
}
],

1
pages/agent/agent-item/index.json

@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"wux-button": "/components/button/index",
"wux-tag": "/components/tag/index",
"wux-image": "/components/image/index"
}
}

16
pages/agent/agent-item/index.wxml

@ -7,7 +7,13 @@
<image class="image-load" slot="empty" src="/assets/image/def_image.png"></image>
</wux-image>
<view style="margin-left:24rpx;flex:1">
<view class="text-sg text-cut text-bold">{{item.name}}</view>
<view class="flex">
<view class="text-sg text-cut text-bold" >
{{item.name}}
</view>
<!-- 这里等接口传一个最近代卖参数 -->
<text wx:if="{{item.cumulativeWeight>20000}}" class="item-tag" size="">最近代卖</text>
</view>
<view class="text-xs text-gray" style="margin-top:4rpx">
<text>{{item.locProvinceName + item.locCityName + item.locDistrictName}}</text>
<text class="text-gray" style="margin: 0rpx 8rpx" wx:if="{{item.cumulativeWeight > 0}}">|</text>
@ -18,11 +24,13 @@
<text wx:else>昨日排队:--</text>
</view>
<view class="flex flex-justify text-df" style="margin-top:4rpx">
<text class="flex" >
<text class="flex">
<text class="text-black" wx:if="{{item.proxypaySurcharge}}">代卖费:</text>
<text class="text-red" style="font-size:26rpx" wx:if="{{item.proxypaySurcharge}}">{{formate.formatePrice2(item.proxypaySurcharge, kg)}}</text>
<text class="text-red" style="font-size:26rpx"
wx:if="{{item.proxypaySurcharge}}">{{formate.formatePrice2(item.proxypaySurcharge, kg)}}</text>
<text class="text-black" style="margin-left:12rpx" wx:if="{{item.foreignPaybackIntervalString}}">纸厂账期:</text>
<text class="text-red" style="font-size:26rpx" wx:if="{{item.foreignPaybackIntervalString}}">{{item.foreignPaybackIntervalString}}</text>
<text class="text-red" style="font-size:26rpx"
wx:if="{{item.foreignPaybackIntervalString}}">{{item.foreignPaybackIntervalString}}</text>
</text>
<!-- <text class="flex" wx:if="{{item.foreignPaybackIntervalString}}">
<text class="text-black">纸厂账期:</text>

15
pages/agent/agent-item/index.wxss

@ -3,7 +3,20 @@
background: rgba(255, 255, 255, 1);
padding: 32rpx;
}
.item-tag {
background-color: rgba( 0, 113, 255,0.2);
/* list-style: lower-alpha; */
height: 20px;
align-items: center;
text-align: center;
margin-left: 16px;
align-items: center;
color: #007AFF;
font-size: 14px;
width: 60px;
border-radius: 4px;
padding: 2px 8px;
}
.item-cate {
flex: 5;
padding: 10rpx 30rpx;

112
pages/mall/index/index.js

@ -31,12 +31,12 @@ Component({
{ icon: '/assets/image/ico_price.png', badge: 0, name: '实时价格' },
{ icon: '/assets/image/ico_queue.png', badge: 0, name: '车辆排队' }
],
tabList: [ '卖废纸', '买废纸', '代卖' ],
tabList: [ '代卖', '卖废纸', '买废纸' ],
tabIndex: 0,
loading: [true, true, true],
requesting: [false, false, false],
finished: [false, false, false],
form: [{ isOnlySupplyProduct: true, pageNum: 1 }, { pageNum: 1 }, { pageNum: 1, enableSalesAgent: 1 }],
form: [{ pageNum: 1, enableSalesAgent: 1 },{ isOnlySupplyProduct: true, pageNum: 1 }, { pageNum: 1 }],
orderList: [],
orderList1: [],
orderList2: []
@ -124,11 +124,11 @@ Component({
} else {
this.setData({ tabIndex: parseInt(detail.index) })
}
if(this.data.tabIndex == 0 && !this.data.orderList.length){
if(this.data.tabIndex == 1 && !this.data.orderList.length){
this.fetchGoodsList()
} else if(this.data.tabIndex == 1 && !this.data.orderList1.length){
} else if(this.data.tabIndex == 2 && !this.data.orderList1.length){
this.fetchPurchaseList()
} else if(this.data.tabIndex == 2 && !this.data.orderList2.length){
} else if(this.data.tabIndex == 0 && !this.data.orderList2.length){
this.fetchAgentList()
}
},
@ -151,7 +151,7 @@ Component({
})
},
onRefreshList: function () {
if(this.data.tabIndex == 0){
if(this.data.tabIndex == 1){
this.setData({
orderList: [],
['form[' + this.data.tabIndex + '].pageNum']: 1,
@ -159,7 +159,7 @@ Component({
['finished[' + this.data.tabIndex + ']']: false
})
this.fetchGoodsList()
} else if(this.data.tabIndex == 1){
} else if(this.data.tabIndex == 2){
this.setData({
orderList1: [],
['form[' + this.data.tabIndex + '].pageNum']: 1,
@ -167,7 +167,7 @@ Component({
['finished[' + this.data.tabIndex + ']']: false
})
this.fetchPurchaseList()
} else if(this.data.tabIndex == 2){
} else if(this.data.tabIndex == 0){
this.setData({
orderList2: [],
['form[' + this.data.tabIndex + '].pageNum']: 1,
@ -179,25 +179,25 @@ Component({
},
fetchMoreList: function(){
if(this.data.tabIndex == 0){
if(this.data.tabIndex == 1){
this.fetchGoodsList()
} else if(this.data.tabIndex == 1){
this.fetchPurchaseList()
} else if(this.data.tabIndex == 2){
this.fetchPurchaseList()
} else if(this.data.tabIndex == 0){
this.fetchAgentList()
}
},
//*************************************************fetchGoodsList************************************************//
fetchGoodsList: function () {
if (this.data.requesting[this.data.tabIndex] || this.data.finished[this.data.tabIndex]) {
if (this.data.requesting[1] || this.data.finished[1]) {
return
}
if (this.data.loading[this.data.tabIndex]) {
this.data.requesting[this.data.tabIndex] = true
if (this.data.loading[1]) {
this.data.requesting[1] = true
} else {
this.setData({ ['requesting[' + this.data.tabIndex + ']']: true })
this.setData({ ['requesting[' + 1 + ']']: true })
}
getMiniProxyList(this.data.form[0]).then(result => {
getMiniProxyList(this.data.form[1]).then(result => {
if (result.data.records.length) {
var respList = result.data.records
let nowList = `orderList[${this.data.orderList.length}]`
@ -205,37 +205,37 @@ Component({
var finished = result.data.current >= result.data.pages
this.setData({
[nowList]: respList,
['form[0].pageNum']: (num + 1),
['finished[0]']: finished,
['requesting[0]']: false,
['loading[0]']: false
['form[1].pageNum']: (num + 1),
['finished[1]']: finished,
['requesting[1]']: false,
['loading[1]']: false
})
} else {
this.setData({
['finished[0]']: true,
['requesting[0]']: false,
['loading[0]']: false
['finished[1]']: true,
['requesting[1]']: false,
['loading[1]']: false
})
}
}).catch(err => {
this.setData({
['requesting[0]']: false,
['finished[0]']: true,
['loading[0]']: false
['requesting[1]']: false,
['finished[1]']: true,
['loading[1]']: false
})
})
},
//*************************************************fetchPurchaseList************************************************//
fetchPurchaseList: function () {
if (this.data.requesting[1] || this.data.finished[1]) {
if (this.data.requesting[2] || this.data.finished[2]) {
return
}
if (this.data.loading[1]) {
this.data.requesting[1] = true
if (this.data.loading[2]) {
this.data.requesting[2] = true
} else {
this.setData({ ['requesting[1]']: true })
this.setData({ ['requesting[2]']: true })
}
getProductList(this.data.form[1]).then(result => {
getProductList(this.data.form[2]).then(result => {
//成功回调
if (result.data.records.length) {
var respList = result.data.records
@ -244,39 +244,39 @@ Component({
var finished = result.data.current >= result.data.pages
this.setData({
[nowList]: respList,
['form[1].pageNum']: (num + 1),
['finished[1]']: finished,
['requesting[1]']: false,
['loading[1]']: false
['form[2].pageNum']: (num + 1),
['finished[2]']: finished,
['requesting[2]']: false,
['loading[2]']: false
})
} else {
this.setData({
['requesting[1]']: false,
['finished[1]']: true,
['loading[1]']: false
['requesting[2]']: false,
['finished[2]']: true,
['loading[2]']: false
})
}
}).catch(err => {
//异常回调
this.setData({
['requesting[1]']: false,
['finished[1]']: true,
['loading[1]']: false
['requesting[2]']: false,
['finished[2]']: true,
['loading[2]']: false
})
})
},
//*************************************************fetchAgentList************************************************//
// 获取特价列表
fetchAgentList: function () {
if (this.data.requesting[2] || this.data.finished[2]) {
if (this.data.requesting[0] || this.data.finished[0]) {
return
}
if (this.data.loading[2]) {
this.data.requesting[2] = true
if (this.data.loading[0]) {
this.data.requesting[0] = true
} else {
this.setData({ ['requesting[2]']: true })
this.setData({ ['requesting[0]']: true })
}
getFactoryPrice(this.data.form[2]).then(result => {
getFactoryPrice(this.data.form[0]).then(result => {
if (result.data.records.length) {
var respList = result.data.records
let nowList = `orderList2[${this.data.orderList2.length}]`
@ -284,24 +284,24 @@ Component({
var finished = result.data.current >= result.data.pages
this.setData({
[nowList]: respList,
['form[2].pageNum']: (num + 1),
['finished[2]']: finished,
['requesting[2]']: false,
['loading[2]']: false
['form[0].pageNum']: (num + 1),
['finished[0]']: finished,
['requesting[0]']: false,
['loading[0]']: false
})
} else {
this.setData({
['requesting[2]']: false,
['finished[2]']: true,
['loading[2]']: false
['requesting[0]']: false,
['finished[0]']: true,
['loading[0]']: false
})
}
}).catch(err => {
//异常回调
this.setData({
['requesting[2]']: false,
['finished[2]']: true,
['loading[2]']: false
['requesting[0]']: false,
['finished[0]']: true,
['loading[0]']: false
})
})
}

24
pages/mall/index/index.wxml

@ -39,7 +39,7 @@
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
</view>
<view slot="content" style="min-height:{{height - 90}}rpx">
<view style="display:{{tabIndex == 0 ? 'inline' : 'none'}}">
<view style="display:{{tabIndex == 1 ? 'inline' : 'none'}}">
<wux-skeleton active wx:if="{{!orderList.length}}">
<view class="flex item-content" wx:for="{{4}}" wx:key="index">
<wux-skeleton-avatar shape="square" size="page" />
@ -57,17 +57,17 @@
</view>
</view>
<!--加载更多的UI-->
<view wx:if="{{form[0].pageNum > 1}}" style="padding:20rpx">
<view wx:if="{{form[1].pageNum > 1}}" style="padding:20rpx">
<wux-divider>
<view class="loadmore">
<text class="icon--refresher" wx:if="{{!finished[0]}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{finished[0]?'到底啦~':'加载中...'}}</text>
<text class="icon--refresher" wx:if="{{!finished[1]}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{finished[1]?'到底啦~':'加载中...'}}</text>
</view>
</wux-divider>
</view>
</view>
<view style="display:{{tabIndex == 1 ? 'inline' : 'none'}}">
<view style="display:{{tabIndex == 2 ? 'inline' : 'none'}}">
<wux-skeleton active wx:if="{{!orderList1.length}}">
<view class="flex item-content" wx:for="{{4}}" wx:key="index">
<wux-skeleton-avatar shape="square" size="page" />
@ -85,17 +85,17 @@
</view>
</view>
<!--加载更多的UI-->
<view wx:if="{{form[1].pageNum > 1}}" style="padding:20rpx">
<view wx:if="{{form[2].pageNum > 1}}" style="padding:20rpx">
<wux-divider>
<view class="loadmore">
<text class="icon--refresher" wx:if="{{!finished[1]}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{ finished[1] ? '到底啦~' : '加载中...' }}</text>
<text class="icon--refresher" wx:if="{{!finished[2]}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{ finished[2] ? '到底啦~' : '加载中...' }}</text>
</view>
</wux-divider>
</view>
</view>
<view style="display:{{tabIndex == 2 ? 'inline' : 'none'}}">
<view style="display:{{tabIndex == 0 ? 'inline' : 'none'}}">
<wux-skeleton active wx:if="{{!orderList2.length}}">
<view class="cu-card dynamic no-card" wx:for="{{4}}" wx:key="index">
<view class="cu-item shadow" style="padding-left:30rpx">
@ -122,11 +122,11 @@
</view>
</view>
<!--加载更多的UI-->
<view wx:if="{{form[2].pageNum > 1}}" style="padding:20rpx">
<view wx:if="{{form[0].pageNum > 1}}" style="padding:20rpx">
<wux-divider>
<view class="loadmore">
<text class="icon--refresher" wx:if="{{!finished[2]}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{ finished[2] ? '到底啦~' : '加载中...' }}</text>
<text class="icon--refresher" wx:if="{{!finished[0]}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{ finished[0] ? '到底啦~' : '加载中...' }}</text>
</view>
</wux-divider>
</view>

2
pages/message/index/index.js

@ -155,7 +155,7 @@ Page({
wx.navigateTo({ url: '/pages/bank/bill-detail/index?id=' + redirect.params.id })
} else if(redirect.targetView == 'member'){// 会员页 member
wx.navigateTo({ url: '/pages/ztbvip/index' })
} else if(redirect.targetView == 'proxySellSellerOrderDetail'){// 代卖详情proxySellSellerOrderDetail
} else if(redirect.targetView == 'proxySellSellerOrderDetail'||redirect.targetView == 'proxyOrderDetail'){// 代卖详情proxySellSellerOrderDetail
wx.navigateTo({ url: '/pages/agent/detail/index?id=' + redirect.params.id })
}else if(redirect.targetView == 'callServer'){// 提现消息
wx.makePhoneCall({

Loading…
Cancel
Save