Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
8f082be548
18 changed files with 135 additions and 110 deletions
  1. 2
      app.js
  2. 4
      colorui/components/cu-custom.js
  3. 2
      colorui/components/cu-custom.wxml
  4. 3
      colorui/components/cu-custom.wxss
  5. 25
      pages/agent/detail/item-money-info/money-info.wxml
  6. 25
      pages/agent/fragment/index.js
  7. 6
      pages/agent/fragment/index.wxml
  8. 38
      pages/index/index.js
  9. 6
      pages/index/index.wxml
  10. 17
      pages/mall/fragment/index.js
  11. 5
      pages/mall/fragment/index.wxml
  12. 44
      pages/mall/search-list/index.js
  13. 24
      pages/mall/search-list/index.wxml
  14. 17
      pages/moment/fragment/index.js
  15. 12
      pages/moment/fragment/index.wxml
  16. 3
      pages/moment/info-item/index.js
  17. 2
      pages/moment/info-item/index.wxml
  18. 10
      pages/moment/moment-item/index.js

2
app.js

@ -90,7 +90,7 @@ App({
let pages = getCurrentPages()
let page = pages[pages.length - 1]
if(page && page.route == 'pages/index/index' && !page.data.inited){
page.onResume()
// page.setHeightData()
}
})
},

4
colorui/components/cu-custom.js

@ -36,6 +36,10 @@ Component({
bgImage: {
type: String,
default: ''
},
fragment: {
type: Boolean,
default: false
}
},
/**

2
colorui/components/cu-custom.wxml

@ -1,4 +1,4 @@
<view class="cu-custom" style="height:{{CustomBar}}px;z-index: 99;">
<view class="cu-custom {{fragment ? 'top-bg': ''}}" style="height:{{CustomBar}}px;z-index: 99;">
<view class="cu-bar fixed {{bgColor}}" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}rpx;">
<view class="action" bindtap="backspace" wx:if="{{isBack}}">
<text class="weui_goback"></text>

3
colorui/components/cu-custom.wxss

@ -1,3 +1,6 @@
/* colorui/components/cu-custom.wxss */
.top-bg{
background-image: linear-gradient(127deg, rgba(0,122,255,0.67) 0%, rgba(13,100,227,0.95) 100%);
}

25
pages/agent/detail/item-money-info/money-info.wxml

@ -1,14 +1,13 @@
<!--pages/agent/detail/money-info/money-info.wxml-->
<wxs module="agent" src="../../../agent/index.wxs"></wxs>
<wxs module="formate" src="../../../../pages/formate.wxs"></wxs>
<!-- 预付款 -->
<view class="bg-white" style="padding: 24rpx 30rpx;margin-top:16rpx"
wx:if="{{item.activityOrderAuditPassNum!=null&&item.activityOrderAuditPassNum >= 1}}">
<view class="text-df text-gray" style="border-bottom: 1rpx solid #f3f3f3;padding-bottom:24rpx">首款信息</view>
<view class="flex flex-justify text-sg">
<text class="text-black">预计总金额</text>
<text style="">{{formate.formateAmount(item.preTotalMoney)}}元</text>
<text>{{formate.formateAmount(item.preTotalMoney)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:2rpx">
<text class="text-gray">结算单价 x 净重</text>
@ -17,7 +16,7 @@
</view>
<view class="flex flex-justify text-sg" style="margin-top:24rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black">首笔应收金额</text>
<text style="">{{formate.formateAmount(item.prepayMoney)}}元</text>
<text>{{formate.formateAmount(item.prepayMoney)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:2rpx">
<text class="text-gray">预估总金额 x {{agent.getActivitySettleType(orderInfo.activitySettleType)}}</text>
@ -26,7 +25,7 @@
</view>
<view class="flex flex-justify text-sg" style="margin-top:24rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black">代卖费总额</text>
<text style="">{{formate.formateAmount(item.proxyAmount) || 0}}元</text>
<text>{{formate.formateAmount(item.proxyAmount) || 0}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:2rpx" wx:if="{{item.proxySellerSettleType==0}}">
<text class="text-gray">代卖费单价 x 净重</text>
@ -49,7 +48,7 @@
<view class="text-df text-gray" style="border-bottom: 1rpx solid #f3f3f3;padding-bottom:24rpx">尾款信息</view>
<view class="flex flex-justify text-sg">
<text class="text-black">未结算金额</text>
<text style="">{{formate.formateAmount(item.unSettleMoney)}}元</text>
<text>{{formate.formateAmount(item.unSettleMoney)}}元</text>
</view>
<view class="flex flex-justify text-xs" style="margin-top:2rpx" wx:if="{{item.proxySellerSettleType==1}}">
<text class="text-gray">单价 x 结算重量 - 首笔应收金额</text>
@ -66,7 +65,7 @@
<!-- <view class="flex flex-justify text-sg" style="margin-top:24rpx;border-top:2rpx solid #f3f3f3;padding-top:24rpx"
wx:if="{{item.adjustMoney && item.adjustMoney != 0}}">
<text class="text-black">调节费</text>
<text style="">-{{formate.formateAmount(item.adjustMoney)}}元</text>
<text>-{{formate.formateAmount(item.adjustMoney)}}元</text>
</view> -->
<view wx:if="{{isShowtotalOtherAmount==false}}" class="flex flex-justify text-sg"
style="margin-top:24rpx;border-top:2rpx solid #f3f3f3;padding-top:24rpx">
@ -76,12 +75,12 @@
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx"
wx:if="{{item.refundSubsidy!=null&&item.refundSubsidy!=0}}">
<text class="text-black">返还补贴</text>
<text style="">{{formate.formateAmount(item.refundSubsidy==null?0:item.refundSubsidy)}}元</text>
<text>{{formate.formateAmount(item.refundSubsidy==null?0:item.refundSubsidy)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx"
wx:if="{{item.adjustMoney}}">
<text class="text-black">调节费</text>
<text style="">{{formate.formateAmount(item.adjustMoney==null?0:item.adjustMoney)}}元</text>
<text>{{formate.formateAmount(item.adjustMoney==null?0:item.adjustMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:24rpx;border-top:2rpx solid #f3f3f3;padding-top:24rpx">
@ -112,7 +111,7 @@
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black">代卖费总额</text>
<text style="">{{formate.formateAmount(item.surcharge) || 0}}元</text>
<text>{{formate.formateAmount(item.surcharge) || 0}}元</text>
</view>
<view class="flex flex-justify text-xs" style="margin-top:2rpx" wx:if="{{item.proxySellerSettleType==1}}">
<text class="text-gray">代卖费单价 x 结算重量</text>
@ -127,18 +126,18 @@
<!-- <view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx"
wx:if="{{item.adjustMoney && item.adjustMoney}}">
<text class="text-black">调节费</text>
<text style="">{{item.adjustMoney > 0 ? '+' : ''}}{{formate.formateAmount(item.adjustMoney)}}元</text>
<text>{{item.adjustMoney > 0 ? '+' : ''}}{{formate.formateAmount(item.adjustMoney)}}元</text>
</view> -->
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx"
wx:if="{{isShowtotalOtherAmount==false}}">
<text class="text-black">纸厂补贴与扣款</text>
<text style="">{{formate.formateAmount(item.totalOtherAmount==null?0:item.totalOtherAmount)}}元</text>
<text>{{formate.formateAmount(item.totalOtherAmount==null?0:item.totalOtherAmount)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx" wx:if="{{item.refundSubsidy!=null&&item.refundSubsidy!=0}}">
<text class="text-black">返还补贴</text>
<text style="">{{formate.formateAmount(item.refundSubsidy==null?0:item.refundSubsidy)}}元</text>
<text>{{formate.formateAmount(item.refundSubsidy==null?0:item.refundSubsidy)}}元</text>
</view>
<view class="flex flex-justify text-xs" style="margin-top:2rpx">
<text class="text-gray">补贴单价单价 x 结算重量</text>
@ -148,7 +147,7 @@
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx"
wx:if="{{item.adjustMoney}}">
<text class="text-black">调节费</text>
<text style="">{{formate.formateAmount(item.adjustMoney==null?0:item.adjustMoney)}}元</text>
<text>{{formate.formateAmount(item.adjustMoney==null?0:item.adjustMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:24rpx;border-top:2rpx solid #f3f3f3;padding-top:20rpx">
<text class="text-black text-bold">总收款金额:</text>

25
pages/agent/fragment/index.js

@ -9,12 +9,15 @@ Component({
addGlobalClass: true,
multipleSlots: true
},
properties:{
height: { type: Number, value: 0 },
customHeight: { type: Number, value: 0 },
StatusBar: { type: Number, value: 0 }
},
/**
* 页面的初始数据
*/
data: {
height: app.globalData.safeFragmentHeight - 190,
CustomBar: app.globalData.CustomBar,
kg: app.globalData.kg,
loading: true,
requesting: false,
@ -45,6 +48,8 @@ Component({
this.setData({ hasActivity: result.data })
})
}
// this.fetchRegionList()
// this.fetchPapersList()
},
detached: function () {
event.remove('EventMessage', this)
@ -52,16 +57,8 @@ Component({
},
methods: {
onRestart: function(){
if (!this.data.firstShow) {
this.setData({
height: app.globalData.safeFragmentHeight - 190,
StatusBar: app.globalData.StatusBar || 40,
customHeight: app.globalData.customHeight,
tabIndex: 0,
kg: app.globalData.kg,
firstShow: true
})
this.fetchRegionList()
this.fetchRegionList()
if(!this.data.firstShow){
this.fetchPapersList()
}
this.data.firstShow = true
@ -95,6 +92,9 @@ Component({
util.navigateTo('/pages/agent/ability/index')
},
fetchRegionList: function () {
if(this.data.tabList.length > 0){
return
}
getFactoryCity().then(result => {
this.triggerEvent("region", result.data)
this.data.cateList = [{ cityId: '', cityName: '全部' }].concat(result.data)
@ -105,6 +105,7 @@ Component({
})
},
onCityChange: function({ detail }){
console.log('onCityChange>>>>')
for (let index = 0; index < this.data.cateList.length; index++) {
if(this.data.cateList[index].cityId == detail.cityId){
detail.index = index

6
pages/agent/fragment/index.wxml

@ -23,13 +23,13 @@
</view>
</wux-skeleton>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchPapersList">
<refresh-view bind:refresh="onRefreshList" height="{{height - 90 - customHeight}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchPapersList">
<wux-skeleton active wx:if="{{loading}}">
<view class="flex bg-white" style="height:{{height}}rpx;padding:32rpx">
<view class="flex bg-white" style="height:{{height - 90 - customHeight}}rpx;padding:32rpx">
<wux-skeleton-paragraph rounded rows="12" wux-class="case3-class" />
</view>
</wux-skeleton>
<view class="bg-white list-empty" style="height:{{height}}rpx" bindtap="onRefreshList" wx:elif="{{!orderList.length && !loading}}">
<view class="bg-white list-empty" style="height:{{height - 90 - customHeight}}rpx" bindtap="onRefreshList" wx:elif="{{!orderList.length && !loading}}">
<image class="img-empty" src="/assets/image/list_empty.png"></image>
<view class="text-empty">暂无数据,点击重新加载</view>
</view>

38
pages/index/index.js

@ -9,7 +9,6 @@ const event = require('../../utils/event')
const storage = require('../../utils/storage')
const app = getApp()
const qqwxmap = new wxqqmap({ key: 'GAMBZ-CBGCK-GB6J3-A6PJX-F6ZHH-IWFUD'})
var fragments = []
Page({
data: {
@ -54,7 +53,14 @@ Page({
event.on('EventMessage', this, this.onEvent)
wx.showLoading({ title: '加载中', mask: true })
const fheght = (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight) - 100
this.setData({ fragment: fheght, safeBottom: app.globalData.safeBottom, maxDate, minDate, calendar, cityName: this.data.cityName })
this.setData({
fragment: fheght,
safeBottom: app.globalData.safeBottom,
maxDate, minDate, calendar,
cityName: this.data.cityName,
customHeight: app.globalData.customHeight,
StatusBar: app.globalData.StatusBar || 40,
})
var authorization = app.globalData.token || storage.get('Authorization')
if (authorization) {
app.globalData.token = authorization
@ -85,7 +91,7 @@ Page({
defaultIndex: function () {
this.data.inited = true
this.locationing()
this.onResume()
// this.onResume()
if (this.data.path && '/pages/index/index' != this.data.path) {
util.navigateTo(this.data.path)
}
@ -190,9 +196,9 @@ Page({
})
},
onResume: function () {
fragments[this.data.pageIndex] = fragments[this.data.pageIndex] || this.selectComponent('#' + this.data.TabList[this.data.pageIndex].value)
if (fragments[this.data.pageIndex]) {
fragments[this.data.pageIndex].onRestart()
var fragment = this.selectComponent('#' + this.data.TabList[this.data.pageIndex].value)
if (fragment) {
fragment.onRestart()
}
},
//事件处理函数
@ -205,6 +211,16 @@ Page({
this.setData({ pageIndex: detail.what })
this.onResume()
},
setHeightData: function(){
const fheght = (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight) - 100
this.setData({
fragment: fheght,
safeBottom: app.globalData.safeBottom,
cityName: this.data.cityName,
customHeight: app.globalData.customHeight,
StatusBar: app.globalData.StatusBar || 40,
})
},
/**
* 生命周期函数--监听页面显示
*/
@ -248,8 +264,9 @@ Page({
},
onConfirm({detail}) {
this.setData({ calendar: detail.label })
if(fragments[1].onCalendarChange){
fragments[1].onCalendarChange(detail.label)
var fragment = this.selectComponent('#' + this.data.TabList[1].value)
if(fragment && fragment.onCalendarChange){
fragment.onCalendarChange(detail.label)
}
},
onImageClick: function () {
@ -277,8 +294,9 @@ Page({
},
clickCity: function(e){
this.setData({cityId: e.currentTarget.dataset.id, visible2: false })
if(fragments[2].onCityChange){
fragments[2].onCityChange({detail: {cityId: e.currentTarget.dataset.id}})
var fragment = this.selectComponent('#' + this.data.TabList[2].value)
if(fragment && fragment.onCityChange){
fragment.onCityChange({detail: {cityId: e.currentTarget.dataset.id}})
}
if(!util.isEmpty(e.currentTarget.dataset.index)){
var item = this.data.cityList[e.currentTarget.dataset.index]

6
pages/index/index.wxml

@ -1,12 +1,12 @@
<swiper current="{{pageIndex}}" duration="0" style="height:{{fragment}}rpx">
<swiper-item catchtouchmove="stopTouchMove">
<article id="{{TabList[0].value}}" city-name="{{cityName}}" bind:click="onAgentClick"/>
<article id="{{TabList[0].value}}" customHeight="{{customHeight}}" height="{{fragment}}" StatusBar="{{StatusBar}}" city-name="{{cityName}}" bind:click="onAgentClick"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<moment id="{{TabList[1].value}}" height="{{fragment}}" city-name="{{cityName}}" bind:picker="onPicker"/>
<moment id="{{TabList[1].value}}" customHeight="{{customHeight}}" height="{{fragment}}" StatusBar="{{StatusBar}}" safeBottom="{{safeBottom}}" city-name="{{cityName}}" bind:picker="onPicker"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<agent id="{{TabList[2].value}}" city-list="{{cityList}}" bind:region="onRegionList" bind:picker="onPicker"/>
<agent id="{{TabList[2].value}}" customHeight="{{customHeight}}" height="{{fragment}}" StatusBar="{{StatusBar}}" city-list="{{cityList}}" bind:region="onRegionList" bind:picker="onPicker"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<home id="{{TabList[3].value}}" height="{{fragment}}"/>

17
pages/mall/fragment/index.js

@ -14,16 +14,15 @@ Component({
multipleSlots: true
},
properties:{
cityName: { //这个是可以自定义最外层的view的样式
type: String,
value: ''
}
cityName: { type: String, value: '' },
height: { type: Number, value: 0 },
customHeight: { type: Number, value: 0 },
StatusBar: { type: Number, value: 0 }
},
/**
* 页面的初始数据
*/
data: {
height: app.globalData.safeFragmentHeight - 100,
firstShow: false,
bannerList: [],
momentList: [],
@ -54,13 +53,6 @@ Component({
methods: {
onRestart: function () {
if(!this.data.firstShow){
this.setData({
height: app.globalData.safeFragmentHeight - 100,
StatusBar: app.globalData.StatusBar || 40,
customHeight: app.globalData.customHeight,
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
firstShow: true
})
getPreferList().then(result => {
this.setData({ momentList: result.data.records.slice(0, 3) })
})
@ -141,6 +133,7 @@ Component({
if(this.data.tabIndex == Number(detail.index)){
return
}
this.data.tabIndex = Number(detail.index)
form.categoryId = typeList[Number(detail.index)].categoryId
this.fetchAgentList()
},

5
pages/mall/fragment/index.wxml

@ -18,8 +18,11 @@
</view>
</view>
</view>
<!-- <cu-custom fragment="1" isBack="{{false}}">
<view slot="right" style="color:black;font-size:36rpx">商品详情</view>
</cu-custom> -->
<view class="top-bg" style="height: 24rpx;"></view>
<scroll-view scroll-y class="mian-list" style="height: {{height}}rpx;">
<scroll-view scroll-y class="mian-list" style="height: {{height - 100}}rpx;">
<view wx:if="{{bannerList.length}}" style="height:270rpx;min-height: 270rpx;margin-top: 16rpx;">
<swiper class="screen-swiper" circular="{{true}}" indicator-dots="{{false}}" autoplay="true" interval="5000" duration="500">
<swiper-item wx:for="{{bannerList}}" wx:key="index">

44
pages/mall/search-list/index.js

@ -62,13 +62,16 @@ Page({
return
}
this.data.tabIndex = Number(detail.index)
if (!app.globalData.userInfo && this.data.tabIndex == 3) {
wx.navigateTo({ url: '/pages/login/index' })
if(util.isEmpty(this.data.form.searchKey)){
return
}
this.onSearchList({ detail:{value: this.data.form.searchKey} })
},
onSearchList: function({detail}){
if (!app.globalData.userInfo && this.data.tabIndex == 3) {
wx.navigateTo({ url: '/pages/login/index' })
return
}
this.data.form.searchKey = detail.value
if(util.isEmpty(this.data.form.searchKey)){
util.showToast('请输入要搜索的关键字')
@ -94,57 +97,57 @@ Page({
if(this.data.tabIndex == 0){
getFactoryPrice(this.data.form).then(result => {
if (result.data.records.length) {
this.handRespList(result.data.records)
this.handRespList(result.data)
} else {
this.setData({ finished: true, requesting: false, loading: false })
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
}
}).catch(err => {
this.setData({ requesting: false, loading: false })
this.setData({ requesting: false, loading: false, tabIndex: this.data.tabIndex})
util.showToast(err)
})
} else if(this.data.tabIndex == 1){
getInformationList(this.data.form).then(result => {
if (result.data.records.length) {
this.handRespList(result.data.records)
this.handRespList(result.data)
} else {
this.setData({ finished: true, requesting: false, loading: false })
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
}
}).catch(err => {
this.setData({ requesting: false, loading: false })
this.setData({ requesting: false, loading: false, tabIndex: this.data.tabIndex })
util.showToast(err)
})
} else if(this.data.tabIndex == 2){
getProxyOrderList(this.data.form).then(result => {
if (result.data.records.length) {
this.handRespList(result.data.records)
this.handRespList(result.data)
} else {
this.setData({ finished: true, requesting: false, loading: false })
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
}
}).catch(err => {
this.setData({ requesting: false, loading: false })
this.setData({ requesting: false, loading: false, tabIndex: this.data.tabIndex })
util.showToast(err)
})
} else if(this.data.tabIndex == 3){
getPreferList(this.data.form).then(result => {
if (result.data.records.length) {
this.handRespList(result.data.records)
this.handRespList(result.data)
} else {
this.setData({ finished: true, requesting: false, loading: false })
this.setData({ finished: true, requesting: false, loading: false, tabIndex: this.data.tabIndex })
}
}).catch(err => {
this.setData({ requesting: false, loading: false })
this.setData({ requesting: false, loading: false, tabIndex: this.data.tabIndex })
util.showToast(err)
})
}
},
handRespList: function(respList){
handRespList: function(data){
let nowList = `taskList[${this.data.taskList.length}]`
var num = this.data.form.pageNum
var finished = this.data.form.pageNum >= result.data.pages
var finished = this.data.form.pageNum >= data.pages
if (this.data.form.pageNum == 1) {
this.setData({ [nowList]: respList, total: result.data.total, ['form.pageNum']: (num + 1), top: 0, finished, requesting: false, loading: false })
this.setData({ [nowList]: data.records, total: data.total, ['form.pageNum']: (num + 1), top: 0, finished, requesting: false, loading: false, tabIndex: this.data.tabIndex })
} else {
this.setData({ [nowList]: respList, total: result.data.total, ['form.pageNum']: (num + 1), finished, requesting: false, loading: false })
this.setData({ [nowList]: data.records, total: data.total, ['form.pageNum']: (num + 1), finished, requesting: false, loading: false, tabIndex: this.data.tabIndex })
}
},
tagClick: function(e){
@ -157,13 +160,14 @@ Page({
onHide: function(){
tdsdk.Page.onHide()
},
onUnload() {
onUnload: function() {
console.log('onUnload>>>')
tdsdk.Page.onUnload()
if(this.data.rearchStringList.length){
try {
wx.setStorageSync('mall-search', this.data.rearchStringList.toString())
} catch (e) {
console.log(e)
}
}
}

24
pages/mall/search-list/index.wxml

@ -7,14 +7,14 @@
<free-input value="{{form.searchKey}}" placeholder="请输入关键字" extreaWord="搜索" bind:focus="onFocusChange" bind:blur="onBlurChange" focus="{{focus}}" close="{{true}}" bind:extrea="onSearchList"></free-input>
</view>
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3" wx:if="{{!focus || rearchStringList.length == 0}}">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" line-height="{{3}}" scroll="{{false}}" bind:change="onTabChange"></wux-tabi>
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" line-height="{{3}}" disable="{{requesting || loading}}" scroll="{{false}}" bind:change="onTabChange"></wux-tabi>
</view>
<view class="bg-white" wx:if="{{focus}}">
<view class="cu-form-group" style="min-height:80rpx" wx:if="{{rearchStringList.length}}">
<view class="bg-white" wx:if="{{focus && rearchStringList.length}}">
<view class="cu-form-group" style="min-height:80rpx">
<view class="action" style="color:black">搜索历史</view>
<text class="cuIcon-delete" style="font-size: 17px" bindtap="clearHistory"></text>
</view>
<view class="flex flex-wrap" style="padding: 0rpx 20rpx 30rpx 20rpx" wx:if="{{rearchStringList.length}}">
<view class="flex flex-wrap" style="padding: 0rpx 20rpx 30rpx 20rpx">
<view class="padding-xs" wx:for-item="item" wx:for="{{rearchStringList}}" wx:key="index">
<view class="cu-tag round" style="padding:18rpx 24rpx" data-index="{{index}}" bindtap="tagClick">{{item}}</view>
</view>
@ -31,10 +31,8 @@
</view>
<scroll-view scroll-y scroll-top="{{top}}" style="height:{{height - 90}}rpx;" wx:else bindscrolltolower="fetchTaskList">
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{taskList}}" wx:key="pageIndex">
<view class="bg-white" style="padding:0rpx 32rpx" wx:if="{{pageIndex>0}}">
<view style="height:2rpx;background-color:#f3f3f3"></view>
</view>
<view wx:for="{{pageItem}}" wx:key="index">
<view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>
<agent-item item="{{item}}" keyword="{{form.searchKey}}" wx:if="{{tabIndex == 0}}"></agent-item>
<moment-item item="{{item}}" keyword="{{form.searchKey}}" wx:elif="{{tabIndex == 1}}"></moment-item>
<order-item item="{{item}}" keyword="{{form.searchKey}}" wx:elif="{{tabIndex == 2}}"></order-item>
@ -42,9 +40,13 @@
</view>
</view>
<!--加载更多的UI-->
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}" custom-style="padding:0rpx 120rpx">
<van-loading type="spinner" size="16" wx:if="{{!finished}}" />
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</van-divider>
<view wx:if="{{form.pageNum > 1}}" style="padding:20rpx">
<wux-divider>
<view class="loadmore">
<text class="icon--refresher" wx:if="{{!finished}}"></text>
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</view>
</wux-divider>
</view>
</scroll-view>
</view>

17
pages/moment/fragment/index.js

@ -13,20 +13,19 @@ Component({
},
properties:{
cityName: { type: String, value: '' },
height: { type: Number, value: 0 }
height: { type: Number, value: 0 },
customHeight: { type: Number, value: 0 },
StatusBar: { type: Number, value: 0 },
safeBottom: { type: Number, value: 0 }
},
/**
* 页面的初始数据
*/
data: {
fragmentHeight: app.globalData.safeFragmentHeight - 270,
safeBottom: app.globalData.safeBottom,
kg: app.globalData.kg,
firstShow: false,
noticeList: [],
tabList: [ '推荐', '关注', '全部' , '资讯'],
tabIndex: 0,
},
lifetimes: {
attached: function () {
@ -39,14 +38,6 @@ Component({
methods: {
onRestart: function () {
if(!this.data.firstShow){
this.setData({
fragmentHeight: this.data.height - 167 - app.globalData.customHeight,
StatusBar: app.globalData.StatusBar || 40,
customHeight: app.globalData.customHeight,
safeBottom: app.globalData.safeBottom,
tabIndex: 0,
firstShow: true
})
params.date = util.formatDate(new Date(), 'Y-M-D')
}
this.data.firstShow = true

12
pages/moment/fragment/index.wxml

@ -27,22 +27,22 @@
</swiper-item>
</swiper>
</view>
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3;border-top:2rpx solid #f3f3f3" wx:if="{{firstShow}}">
<view class="bg-white" style="height:90rpx;border-bottom:2rpx solid #f3f3f3;border-top:2rpx solid #f3f3f3">
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" line-height="{{4}}" scroll="{{false}}" bind:change="onTabChange"></wux-tabi>
</view>
<swiper current="{{tabIndex}}" duration="0" style="height:{{fragmentHeight}}rpx">
<swiper current="{{tabIndex}}" duration="0" style="height:{{height - 167 - customHeight}}rpx">
<swiper-item catchtouchmove="stopTouchMove">
<recommend id="recommend" height="{{fragmentHeight}}"/>
<recommend id="recommend" height="{{height - 167 - customHeight}}"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<attention id="attention" height="{{fragmentHeight}}"/>
<attention id="attention" height="{{height - 167 - customHeight}}"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<theall id="theall" height="{{fragmentHeight}}"/>
<theall id="theall" height="{{height - 167 - customHeight}}"/>
</swiper-item>
<swiper-item catchtouchmove="stopTouchMove">
<information id="information" height="{{fragmentHeight}}"/>
<information id="information" height="{{height - 167 - customHeight}}"/>
</swiper-item>
</swiper>

3
pages/moment/info-item/index.js

@ -12,9 +12,6 @@ Component({
mclick: { type: Boolean, value: true }
},
methods: {
onFlodTap: function(){
this.setData({ unflod: !this.data.unflod })
},
lookItem: function(e){
util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id)
}

2
pages/moment/info-item/index.wxml

@ -1,5 +1,5 @@
<!--pages/main/index.wxml-->
<view class="bg-white flex flex-justify" style="padding:18rpx 24rpx;border-bottom: 1rpx solid #f3f3f3;">
<view class="bg-white flex flex-justify" style="padding:18rpx 24rpx;border-bottom: 1rpx solid #f3f3f3;" bindtap="lookItem">
<view style="height: 180rpx;padding-right: 16rpx;flex: 1;position: relative;">
<highlight-text content="{{item.content}}" keyword="{{keyword}}" class="text-title"></highlight-text>
<view class="flex flex-justify" style="position: absolute;bottom: 0;width: 100%;padding-right: 16rpx;">

10
pages/moment/moment-item/index.js

@ -41,6 +41,16 @@ Component({
})
},
lookItem: function(e){
if(!this.data.item.isCooperate) {
if(!app.globalData.userInfo){
util.navigateTo('/pages/login/index')
return
}
if(!app.globalData.userInfo.isVIP){
util.showToast('当前纸厂信息仅仅VIP会员用户可查看')
return
}
}
util.navigateTo('/pages/agent/factory/index?id=' + this.data.item.paperMillId)
},
fetchItemList: function(){

Loading…
Cancel
Save