Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
e8c17550bc
27 changed files with 282 additions and 53 deletions
  1. 2
      api/moment.js
  2. 2
      colorui/main.wxss
  3. 4
      pages/agent/factory/index.json
  4. 21
      pages/agent/factory/index.wxml
  5. 22
      pages/agent/factory/index.wxss
  6. 4
      pages/agent/fragment/index.js
  7. 4
      pages/agent/fragment/index.wxml
  8. 3
      pages/article/detail/index.json
  9. 16
      pages/article/detail/index.wxml
  10. 20
      pages/article/detail/index.wxss
  11. 3
      pages/index/index.js
  12. 7
      pages/index/index.wxml
  13. 3
      pages/mall/fragment/index.js
  14. 18
      pages/mall/fragment/index.wxml
  15. 10
      pages/mall/search-list/index.js
  16. 7
      pages/moment/fragment/index.js
  17. 6
      pages/moment/fragment/index.wxml
  18. 33
      pages/moment/index.wxs
  19. 3
      pages/moment/info-item/index.js
  20. 6
      pages/moment/info-item/index.wxml
  21. 44
      pages/moment/information/index.js
  22. 13
      pages/moment/information/index.wxml
  23. 35
      pages/moment/moment-item/index.wxml
  24. 8
      pages/moment/moment-item/index.wxss
  25. 34
      pages/moment/theall/index.js
  26. 3
      pages/ztbvip/index.js
  27. 4
      pages/ztbvip/index.wxml

2
api/moment.js

@ -15,6 +15,7 @@ const postMoment = (params) => mPost(`/information-center/article/save/Article`,
// /article/update/Article/{id} 编辑文章 // /article/update/Article/{id} 编辑文章
const updateMoment = (id, params) => mPost(`/information-center/article/update/Article/${id}`, params, mconfig) const updateMoment = (id, params) => mPost(`/information-center/article/update/Article/${id}`, params, mconfig)
// /article/get/Article-list/文章列表 // /article/get/Article-list/文章列表
const getPreferType = (params) => mGet(`/information-center/article-category/get/article-category-list`, params, mconfig)
const getPreferList = (params) => mGet(`/information-center/article/get/Article-list/`, params, mconfig) const getPreferList = (params) => mGet(`/information-center/article/get/Article-list/`, params, mconfig)
// /article/get/Article-view-list 浏览文章历史列表 // /article/get/Article-view-list 浏览文章历史列表
const getViewedList = (params) => mGet(`/information-center/article/get/Article-view-list`, params, mconfig) const getViewedList = (params) => mGet(`/information-center/article/get/Article-view-list`, params, mconfig)
@ -44,6 +45,7 @@ const getMillPaperList = (params) => mGet(`/ztb-market-information-service/get/p
export { export {
mconfig, mconfig,
getPreferType,
getPreferList, getPreferList,
postMoment, postMoment,
updateMoment, updateMoment,

2
colorui/main.wxss

@ -987,7 +987,7 @@ button.icon.lg {
.cu-custom .cu-bar { .cu-custom .cu-bar {
min-height: 0px; min-height: 0px;
padding-right: 212rpx;
padding-right: 102px;
z-index: 99; z-index: 99;
/* box-shadow: 0rpx 0rpx 0rpx; */ /* box-shadow: 0rpx 0rpx 0rpx; */
box-shadow: 0 -1rpx 2rpx rgba(0, 0, 0, 0.01) box-shadow: 0 -1rpx 2rpx rgba(0, 0, 0, 0.01)

4
pages/agent/factory/index.json

@ -8,6 +8,8 @@
"wux-sticky": "/components/sticky/index", "wux-sticky": "/components/sticky/index",
"fold-text": "/components/fold-text/index", "fold-text": "/components/fold-text/index",
"wux-divider": "/components/divider/index", "wux-divider": "/components/divider/index",
"article-item": "/pages/article/article-item/index"
"info-item": "/pages/moment/info-item/index",
"article-item": "/pages/article/article-item/index",
"wux-popup": "/components/popup/index"
} }
} }

21
pages/agent/factory/index.wxml

@ -92,8 +92,9 @@
</view> </view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{momentList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{momentList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index" class="cu-card dynamic no-card"> <view wx:for="{{pageItem}}" wx:key="index" class="cu-card dynamic no-card">
<view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>
<article-item item="{{item}}" mclick="{{false}}"></article-item>
<!-- <view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>
<article-item item="{{item}}" mclick="{{false}}"></article-item> -->
<info-item item="{{item}}" mclick="{{false}}"></info-item>
</view> </view>
</view> </view>
<view wx:if="{{form.pageNum>1}}" style="padding:20rpx"> <view wx:if="{{form.pageNum>1}}" style="padding:20rpx">
@ -176,6 +177,20 @@
</view> </view>
</view> </view>
<wux-popup wux-class="wux-landscape" wux-content-class="wux-landscape__popup" wux-body-class="wux-landscape__popup-body"
hasHeader="{{ false }}" hasFooter="{{ false }}" visible="{{ true }}" mask="{{ true }}">
<view class="wux-landscape__inner">
<wux-image width="{{654}}" height="{{680}}" nuit="{{'rpx'}}" src="https://636c-cloud1-1gjilu3e74c1a18a-1305669442.tcb.qcloud.la/d88cfa6ca3ff48a188dad034bad713f9.png?sign=e6d591315b5597f00b902c5fc4629e9d&t=1633660970" bind:click="onImageClick">
<view class="flex flex-center" slot="loading" style="height:654rpx;width:680rpx">
<text class="icon--refresher"></text>
</view>
</wux-image>
<view class="text-df" style="margin-top:16rpx">
<text style="color:#FFEF93;padding:12rpx 24rpx;" catchtap="toRule">活动规则</text>
</view>
</view>
</wux-popup>
<wxs module="priceItem"> <wxs module="priceItem">
function priceItem(item, kg) { function priceItem(item, kg) {
if(kg){ if(kg){
@ -192,5 +207,5 @@
return (parseFloat(item.unitPrice) * 1000).toFixed(1) + '元/吨' return (parseFloat(item.unitPrice) * 1000).toFixed(1) + '元/吨'
} }
} }
module.exports = priceItem;
module.exports = priceItem
</wxs> </wxs>

22
pages/agent/factory/index.wxss

@ -91,3 +91,25 @@
transform-origin: 50% 50%; transform-origin: 50% 50%;
transform: rotate(180deg); transform: rotate(180deg);
} }
.wux-landscape{
width: 100%;
max-width: 750rpx;
}
.wux-landscape__popup {
background-color: transparent!important
}
.wux-landscape__popup-body {
padding: 0!important
}
.wux-landscape__inner {
line-height: 1.5;
color: rgba(0,0,0,.65)
}
.wux-landscape__inner > image {
width: 100%;
max-width: 100%
}

4
pages/agent/fragment/index.js

@ -12,7 +12,8 @@ Component({
properties:{ properties:{
height: { type: Number, value: 0 }, height: { type: Number, value: 0 },
customHeight: { type: Number, value: 0 }, customHeight: { type: Number, value: 0 },
StatusBar: { type: Number, value: 0 }
StatusBar: { type: Number, value: 0 },
customWidth: { type: Number, value: 0 }
}, },
/** /**
* 页面的初始数据 * 页面的初始数据
@ -105,7 +106,6 @@ Component({
}) })
}, },
onCityChange: function({ detail }){ onCityChange: function({ detail }){
console.log('onCityChange>>>>')
for (let index = 0; index < this.data.cateList.length; index++) { for (let index = 0; index < this.data.cateList.length; index++) {
if(this.data.cateList[index].cityId == detail.cityId){ if(this.data.cateList[index].cityId == detail.cityId){
detail.index = index detail.index = index

4
pages/agent/fragment/index.wxml

@ -1,8 +1,8 @@
<!--pages/agent/index/index.wxml--> <!--pages/agent/index/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 99;"> <view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 99;">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none">
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 60rpx;" catchtap="searchList">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none;padding-right: 24rpx;width: {{customWidth}}px">
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 64rpx;" catchtap="searchList">
<image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image> <image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image>
<text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入纸名/品名/纸厂/规格</text> <text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入纸名/品名/纸厂/规格</text>
</view> </view>

3
pages/article/detail/index.json

@ -5,6 +5,7 @@
"sudoku-image": "/components/sudoku-image/index", "sudoku-image": "/components/sudoku-image/index",
"wux-divider": "/components/divider/index", "wux-divider": "/components/divider/index",
"refresh-view": "/components/refresher/index", "refresh-view": "/components/refresher/index",
"wux-tag": "/components/tag/index"
"wux-tag": "/components/tag/index",
"wux-popup": "/components/popup/index"
} }
} }

16
pages/article/detail/index.wxml

@ -164,4 +164,18 @@
<view class="canvas-box"> <view class="canvas-box">
<canvas style="width: 350px;height: 667px;position:fixed;top:9999px;" canvas-id="mycanvas" /> <canvas style="width: 350px;height: 667px;position:fixed;top:9999px;" canvas-id="mycanvas" />
</view> </view>
</view>
</view>
<wux-popup wux-class="wux-landscape" wux-content-class="wux-landscape__popup" wux-body-class="wux-landscape__popup-body"
hasHeader="{{ false }}" hasFooter="{{ false }}" visible="{{ true }}" mask="{{ true }}">
<view class="wux-landscape__inner">
<wux-image width="{{654}}" height="{{680}}" nuit="{{'rpx'}}" src="https://636c-cloud1-1gjilu3e74c1a18a-1305669442.tcb.qcloud.la/d88cfa6ca3ff48a188dad034bad713f9.png?sign=e6d591315b5597f00b902c5fc4629e9d&t=1633660970" bind:click="onImageClick">
<view class="flex flex-center" slot="loading" style="height:654rpx;width:680rpx">
<text class="icon--refresher"></text>
</view>
</wux-image>
<view class="text-df" style="margin-top:16rpx">
<text style="color:#FFEF93;padding:12rpx 24rpx;" catchtap="toRule">活动规则</text>
</view>
</view>
</wux-popup>

20
pages/article/detail/index.wxss

@ -194,5 +194,25 @@
font-size: 48rpx; font-size: 48rpx;
color: #3539F8; color: #3539F8;
margin-bottom: 30rpx; margin-bottom: 30rpx;
}
.wux-landscape{
width: 100%;
max-width: 750rpx;
}
.wux-landscape__popup {
background-color: transparent!important
}
.wux-landscape__popup-body {
padding: 0!important
}
.wux-landscape__inner {
line-height: 1.5;
color: rgba(0,0,0,.65)
}
.wux-landscape__inner > image {
width: 100%;
max-width: 100%
} }

3
pages/index/index.js

@ -55,10 +55,11 @@ Page({
const fheght = (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight) - 100 const fheght = (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight) - 100
this.setData({ this.setData({
fragment: fheght, fragment: fheght,
safeBottom: app.globalData.safeBottom,
safeBottom: app.globalData.safeBottom,
maxDate, minDate, calendar, maxDate, minDate, calendar,
cityName: this.data.cityName, cityName: this.data.cityName,
customHeight: app.globalData.customHeight, customHeight: app.globalData.customHeight,
customWidth: app.globalData.Custom.left,
StatusBar: app.globalData.StatusBar || 40, StatusBar: app.globalData.StatusBar || 40,
}) })
var authorization = app.globalData.token || storage.get('Authorization') var authorization = app.globalData.token || storage.get('Authorization')

7
pages/index/index.wxml

@ -1,12 +1,12 @@
<swiper current="{{pageIndex}}" duration="0" style="height:{{fragment}}rpx"> <swiper current="{{pageIndex}}" duration="0" style="height:{{fragment}}rpx">
<swiper-item catchtouchmove="stopTouchMove"> <swiper-item catchtouchmove="stopTouchMove">
<article id="{{TabList[0].value}}" customHeight="{{customHeight}}" height="{{fragment}}" StatusBar="{{StatusBar}}" city-name="{{cityName}}" bind:click="onAgentClick"/>
<article id="{{TabList[0].value}}" customHeight="{{customHeight}}" customWidth="{{customWidth}}" height="{{fragment}}" StatusBar="{{StatusBar}}" city-name="{{cityName}}" bind:click="onAgentClick"/>
</swiper-item> </swiper-item>
<swiper-item catchtouchmove="stopTouchMove"> <swiper-item catchtouchmove="stopTouchMove">
<moment id="{{TabList[1].value}}" customHeight="{{customHeight}}" height="{{fragment}}" StatusBar="{{StatusBar}}" safeBottom="{{safeBottom}}" city-name="{{cityName}}" bind:picker="onPicker"/>
<moment id="{{TabList[1].value}}" customHeight="{{customHeight}}" customWidth="{{customWidth}}" height="{{fragment}}" StatusBar="{{StatusBar}}" safeBottom="{{safeBottom}}" city-name="{{cityName}}" bind:picker="onPicker"/>
</swiper-item> </swiper-item>
<swiper-item catchtouchmove="stopTouchMove"> <swiper-item catchtouchmove="stopTouchMove">
<agent id="{{TabList[2].value}}" customHeight="{{customHeight}}" height="{{fragment}}" StatusBar="{{StatusBar}}" city-list="{{cityList}}" bind:region="onRegionList" bind:picker="onPicker"/>
<agent id="{{TabList[2].value}}" customHeight="{{customHeight}}" customWidth="{{customWidth}}" height="{{fragment}}" StatusBar="{{StatusBar}}" city-list="{{cityList}}" bind:region="onRegionList" bind:picker="onPicker"/>
</swiper-item> </swiper-item>
<swiper-item catchtouchmove="stopTouchMove"> <swiper-item catchtouchmove="stopTouchMove">
<home id="{{TabList[3].value}}" height="{{fragment}}"/> <home id="{{TabList[3].value}}" height="{{fragment}}"/>
@ -76,7 +76,6 @@
</view> </view>
</wux-popup> </wux-popup>
<wxs module="tabImage"> <wxs module="tabImage">
function tabImage(tabIndex, index) { function tabImage(tabIndex, index) {
if (index == 0) { if (index == 0) {

3
pages/mall/fragment/index.js

@ -17,7 +17,8 @@ Component({
cityName: { type: String, value: '' }, cityName: { type: String, value: '' },
height: { type: Number, value: 0 }, height: { type: Number, value: 0 },
customHeight: { type: Number, value: 0 }, customHeight: { type: Number, value: 0 },
StatusBar: { type: Number, value: 0 }
StatusBar: { type: Number, value: 0 },
customWidth: { type: Number, value: 0 }
}, },
/** /**
* 页面的初始数据 * 页面的初始数据

18
pages/mall/fragment/index.wxml

@ -1,19 +1,19 @@
<!--pages/message/index.wxml--> <!--pages/message/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 1;"> <view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 1;">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none;padding-right: 0px;width: {{customWidth}}px">
<view class="flex flex-center" style="margin-left: 32rpx;width: 100%;flex: 1;"> <view class="flex flex-center" style="margin-left: 32rpx;width: 100%;flex: 1;">
<view id="city" class="flex flex-center" catchtap="gridTap"> <view id="city" class="flex flex-center" catchtap="gridTap">
<text class="text-white text-lg">{{cityName}}</text> <text class="text-white text-lg">{{cityName}}</text>
<text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text> <text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text>
</view> </view>
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 60rpx;" catchtap="searchList">
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 64rpx;" catchtap="searchList">
<image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image> <image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image>
<text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入关键字搜索</text> <text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入关键字搜索</text>
</view> </view>
</view> </view>
<view class="flex flex-center" style="margin-left: 24rpx;margin-right: 12rpx;" id="message" bindtap="gridTap">
<image style="height: 40rpx;width: 40rpx;" src="/assets/myinfo/messageWhite.png"></image>
<view class="flex flex-center" style="margin: 0px 24rpx" id="message" bindtap="gridTap">
<image style="height: 44rpx;width: 44rpx;" src="/assets/myinfo/messageWhite.png"></image>
<wux-badge count="{{messageNumber}}" top="-40" right="4"></wux-badge> <wux-badge count="{{messageNumber}}" top="-40" right="4"></wux-badge>
</view> </view>
</view> </view>
@ -22,7 +22,7 @@
<view slot="right" style="color:black;font-size:36rpx">商品详情</view> <view slot="right" style="color:black;font-size:36rpx">商品详情</view>
</cu-custom> --> </cu-custom> -->
<view class="top-bg" style="height: 24rpx;"></view> <view class="top-bg" style="height: 24rpx;"></view>
<scroll-view scroll-y class="mian-list" style="height: {{height - 100}}rpx;">
<scroll-view scroll-y class="mian-list" style="height: {{height - 124}}rpx;">
<view wx:if="{{bannerList.length}}" style="height:270rpx;min-height: 270rpx;margin-top: 16rpx;"> <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 class="screen-swiper" circular="{{true}}" indicator-dots="{{false}}" autoplay="true" interval="5000" duration="500">
<swiper-item wx:for="{{bannerList}}" wx:key="index"> <swiper-item wx:for="{{bannerList}}" wx:key="index">
@ -93,13 +93,13 @@
</view> </view>
<information-item item="{{item}}"></information-item> <information-item item="{{item}}"></information-item>
</view> </view>
<view class="flex flex-center" style="padding: 24rpx;">
<wux-button id="moment" outline type="stable" size="small" bind:click="gridTap">查看更多行情</wux-button>
</view>
</view> </view>
<view class="bg-white list-empty" style="height: 480rpx;margin-bottom: 48rpx;border-radius: 0rpx 0rpx 24rpx 24rpx" wx:else>
<view class="bg-white list-empty" style="height: 480rpx;border-radius: 0rpx 0rpx 24rpx 24rpx" wx:else>
<image class="img-empty" src="/assets/image/list_empty.png"></image> <image class="img-empty" src="/assets/image/list_empty.png"></image>
<view class="text-empty">暂无数据</view> <view class="text-empty">暂无数据</view>
</view> </view>
<view class="flex flex-center" style="padding: 24rpx;">
<wux-button id="moment" outline type="stable" size="small" bind:click="gridTap">查看更多行情</wux-button>
</view>
</scroll-view> </scroll-view>

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

@ -37,6 +37,9 @@ Page({
if(options.tab) { if(options.tab) {
this.data.tabIndex = Number(options.tab) this.data.tabIndex = Number(options.tab)
} }
var min = new Date()
min.setHours(0, 0, 0)
this.data.form.date = util.formatDate(min, 'Y-M-D')
this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex}) this.setData({height: app.globalData.fragmentHeight - 100, tabIndex: this.data.tabIndex})
}, },
clearHistory: function(){ clearHistory: function(){
@ -161,14 +164,9 @@ Page({
tdsdk.Page.onHide() tdsdk.Page.onHide()
}, },
onUnload: function() { onUnload: function() {
console.log('onUnload>>>')
tdsdk.Page.onUnload() tdsdk.Page.onUnload()
if(this.data.rearchStringList.length){ if(this.data.rearchStringList.length){
try {
wx.setStorageSync('mall-search', this.data.rearchStringList.toString())
} catch (e) {
console.log(e)
}
storage.put('mall-search', this.data.rearchStringList.toString())
} }
} }
}) })

7
pages/moment/fragment/index.js

@ -16,7 +16,8 @@ Component({
height: { type: Number, value: 0 }, height: { type: Number, value: 0 },
customHeight: { type: Number, value: 0 }, customHeight: { type: Number, value: 0 },
StatusBar: { type: Number, value: 0 }, StatusBar: { type: Number, value: 0 },
safeBottom: { type: Number, value: 0 }
safeBottom: { type: Number, value: 0 },
customWidth: { type: Number, value: 0 }
}, },
/** /**
* 页面的初始数据 * 页面的初始数据
@ -68,6 +69,10 @@ Component({
if(fragment && fragment.calendarChange){ if(fragment && fragment.calendarChange){
fragment.calendarChange(date) fragment.calendarChange(date)
} }
fragment = this.selectComponent('#theall')
if(fragment && fragment.calendarChange){
fragment.calendarChange(date)
}
}, },
chooseCity: function(){ chooseCity: function(){
wx.navigateTo({url: `/pages/home/city-select/index?type=1` }) wx.navigateTo({url: `/pages/home/city-select/index?type=1` })

6
pages/moment/fragment/index.wxml

@ -1,17 +1,17 @@
<!--pages/message/index.wxml--> <!--pages/message/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 99;"> <view class="cu-custom top-bg" style="height:{{customHeight}}rpx;z-index: 99;">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none">
<view class="cu-bar fixed " style="height:{{customHeight}}rpx;padding-top:{{StatusBar}}rpx;border-bottom:none;padding-right: 0px;width: {{customWidth}}px">
<view class="flex flex-center" style="margin-left: 32rpx;width: 100%;"> <view class="flex flex-center" style="margin-left: 32rpx;width: 100%;">
<view class="flex flex-center" catchtap="chooseCity"> <view class="flex flex-center" catchtap="chooseCity">
<text class="text-white text-lg">{{cityName}}</text> <text class="text-white text-lg">{{cityName}}</text>
<text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text> <text class="cuIcon-unfold text-white" style="font-size:16px;padding-top: 8rpx;margin-left: 8rpx;"></text>
</view> </view>
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 60rpx;" catchtap="searchList">
<view class="bg-white flex flex-center" style="margin-left:24rpx;flex: 1;border-radius: 16rpx;height: 64rpx;" catchtap="searchList">
<image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image> <image src="/assets/image/icon-search.png" style="height: 30rpx;width: 30rpx;margin-left: 16rpx"></image>
<text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入关键字搜索</text> <text class="text-gray text-sm" style="flex: 1;margin-left: 8rpx">输入关键字搜索</text>
</view> </view>
<image src="/assets/image/icon-calendar.png" style="height: 42rpx;width: 42rpx;margin-left: 24rpx;" bindtap="chooseCalendar"></image>
<image src="/assets/image/icon-calendar.png" style="height: 44rpx;width: 44rpx;margin: 0px 24rpx;" bindtap="chooseCalendar"></image>
</view> </view>
</view> </view>
</view> </view>

33
pages/moment/index.wxs

@ -0,0 +1,33 @@
function isEmpty(val) {
return typeof val === 'undefined' || val === '' || val === null
}
function formateDate(datetime) {
if (isEmpty(datetime)) {
return ''
}
var date = getDate(datetime.trim())
var today = getDate()
var week = ''
if (date.toString().substring(0, 15) === today.toString().substring(0, 15)) {
week = '(今天)'
} else if (date.getTime() > today.getTime()) {
week = '(明天)'
}
return week + datetime
}
function formateText(text, length) {
if (!text) {
return ''
}
if (text.length <= length) {
return text
}
return text.substring(0, length)
}
module.exports = {
formateDate: formateDate,
formateText: formateText
}

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

@ -16,6 +16,9 @@ Component({
util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id) util.navigateTo('/pages/article/detail/index?id=' + this.data.item.id)
}, },
lookFactory: function(){ lookFactory: function(){
if(!this.data.mclick){
return
}
util.navigateTo(`/pages/agent/factory/index?id=${this.data.item.millPaperId}`) util.navigateTo(`/pages/agent/factory/index?id=${this.data.item.millPaperId}`)
} }
} }

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

@ -1,13 +1,13 @@
<!--pages/main/index.wxml-->
<!-- <wxs module="moment" src="../../moment/index.wxs"></wxs> -->
<view class="bg-white flex flex-justify" style="padding:18rpx 24rpx;border-bottom: 1rpx solid #f3f3f3;" bindtap="lookItem"> <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;"> <view style="height: 180rpx;padding-right: 16rpx;flex: 1;position: relative;">
<highlight-text content="{{item.content}}" keyword="{{keyword}}" class="text-title"></highlight-text> <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;"> <view class="flex flex-justify" style="position: absolute;bottom: 0;width: 100%;padding-right: 16rpx;">
<view class="attention-bg" catchtap="lookFactory" wx:if="{{item.millPaperId}}">
<view class="attention-bg" catchtap="lookFactory" style="margin-right: 16rpx;" wx:if="{{item.millPaperId}}">
<text class="text-blue text-cut" style="max-width: 160rpx;">{{item.shortName || item.millPaperName}}</text> <text class="text-blue text-cut" style="max-width: 160rpx;">{{item.shortName || item.millPaperName}}</text>
<text class="cuIcon-right text-blue" style="font-size:24rpx;"></text> <text class="cuIcon-right text-blue" style="font-size:24rpx;"></text>
</view> </view>
<view class="text-sm text-gray" style="margin-left: 16rpx;padding-top: 2rpx;">{{item.createTime}}</view>
<view class="text-sm text-gray" style="padding-top: 2rpx;">{{item.createTime}}</view>
<view class="text-sm text-gray" style="margin-left: 16rpx;">{{item.readingQuantity}}次阅读</view> <view class="text-sm text-gray" style="margin-left: 16rpx;">{{item.readingQuantity}}次阅读</view>
</view> </view>
</view> </view>

44
pages/moment/information/index.js

@ -1,5 +1,5 @@
// pages/message/index.js // pages/message/index.js
import { getInformationList } from "../../../api/moment"
import { getPreferType, getPreferList } from "../../../api/moment"
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -12,6 +12,10 @@ Component({
height: { type: Number, value: 0 } height: { type: Number, value: 0 }
}, },
data: { data: {
tabList: [],
tabIndex: 0,
typeList: [],
scrolled: false,
form: { form: {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
@ -23,17 +27,47 @@ Component({
}, },
methods: { methods: {
onRestart: function () { onRestart: function () {
this.fetchTypeList()
if(!this.firstShow){ if(!this.firstShow){
// this.fetchList()
this.fetchList()
} }
this.firstShow = true this.firstShow = true
}, },
fetchList: function(){
fetchTypeList: function(){
if(this.data.tabList.length > 0){
return
}
getPreferType().then(result => {
this.data.typeList = [{ id: '', name: '全部' }].concat(result.data)
for (let index = 0; index < this.data.typeList.length; index++) {
this.data.tabList.push(this.data.typeList[index].name)
}
this.setData({ tabList: this.data.tabList, scrolled: this.data.typeList.length >= 5 })
})
},
onTabChange: function ({ detail }) {
if (this.data.tabIndex == Number(detail.index)) {
return
}
this.data.tabIndex = Number(detail.index)
this.data.form.categoryId = this.data.typeList[this.data.tabIndex].id
this.onRefreshList()
},
// 下拉刷新...
onRefreshList: function () {
if (this.data.requesting) { if (this.data.requesting) {
return return
} }
this.data.requesting = true
getInformationList(this.data.form).then(result => {
this.setData({ orderList: [], tabIndex: this.data.tabIndex, ['form.pageNum']: 1, loading: true, finished: false })
this.fetchList()
},
fetchList: function(){
if (this.data.requesting || this.data.finished) {
return
}
// this.data.requesting = true
this.setData({ requesting: true })
getPreferList(this.data.form).then(result => {
if (result.data && result.data.records.length) { if (result.data && result.data.records.length) {
var respList = result.data.records var respList = result.data.records
let nowList = `orderList[${this.data.orderList.length}]` let nowList = `orderList[${this.data.orderList.length}]`

13
pages/moment/information/index.wxml

@ -1,5 +1,16 @@
<!--pages/message/index.wxml--> <!--pages/message/index.wxml-->
<scroll-view scroll-y style="height: {{height}}rpx;" bind:scrolltolower="fetchList">
<view class="bg-white" style="height: 90rpx;border-bottom: 1rpx solid #f3f3f3;position: relative;" wx:if="{{tabList.length}}">
<wux-tabi scroll="{{scrolled}}" tab-data="{{tabList}}" disable="{{requesting}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
<!-- <view class="flex flex-justify bg-white" style="height: 88rpx;position: absolute;right: 0px;top: 0px;padding: 0rpx 24rpx;">
<text class="cuIcon-right text-blue" style="padding-top: 4rpx;"></text>
</view> -->
</view>
<wux-skeleton active wx:else>
<view class="flex bg-white" style="height: 90rpx;padding:32rpx;border-bottom: 1rpx solid #f3f3f3">
<wux-skeleton-paragraph rounded rows="1" wux-class="case3-class" />
</view>
</wux-skeleton>
<scroll-view scroll-y style="height: {{height - 90}}rpx;" bind:scrolltolower="fetchList">
<wux-skeleton active wx:if="{{!orderList.length}}"> <wux-skeleton active wx:if="{{!orderList.length}}">
<view class="flex item-content"> <view class="flex item-content">
<wux-skeleton-paragraph rounded rows="16" wux-class="case3-class" /> <wux-skeleton-paragraph rounded rows="16" wux-class="case3-class" />

35
pages/moment/moment-item/index.wxml

@ -1,6 +1,7 @@
<!--pages/main/index.wxml--> <!--pages/main/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<view style="height: 64rpx;line-height: 64rpx;text-align: center;background-color: #F7F8FA;color: #888888;" wx:if="{{item.tipsTime}}">{{item.tipsTime}}</view>
<wxs module="moment" src="../../moment/index.wxs"></wxs>
<view class="item-tips" wx:if="{{item.tipsTime}}">{{moment.formateDate(item.tipsTime)}}</view>
<view class="bg-white flex flex-justify" style="padding:18rpx 24rpx"> <view class="bg-white flex flex-justify" style="padding:18rpx 24rpx">
<view style="width: 25%;"> <view style="width: 25%;">
<view class="text-df text-black text-cut" bindtap="lookItem">{{item.shortName}}</view> <view class="text-df text-black text-cut" bindtap="lookItem">{{item.shortName}}</view>
@ -14,7 +15,7 @@
<text class="text-lg text-red">{{item.typicalFloatingQuotedPrice}}</text> <text class="text-lg text-red">{{item.typicalFloatingQuotedPrice}}</text>
<text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text> <text class="cuIcon-refresharrow text-red" style="font-size:12px;margin-left: 4rpx;"></text>
</view> </view>
<!-- <view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">更新时间09-09</view> -->
<view class="text-gray text-sm" style="margin-top: 4rpx;text-align: center">更新时间:{{moment.formateText(item.latestQuoteTime, 10)}}</view>
</view> </view>
<view style="flex: 1;">{{item.retainedReceivedQuantity || '- -'}}</view> <view style="flex: 1;">{{item.retainedReceivedQuantity || '- -'}}</view>
<view style="flex: 1;">{{item.startDeductionPoints}}</view> <view style="flex: 1;">{{item.startDeductionPoints}}</view>
@ -52,4 +53,32 @@
<wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button> <wux-button outline round type="positive" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button>
</view> </view>
</view> </view>
</view>
</view>
<wxs module="formateTime">
function formateTime(lasttime) {
if (index == 0) {
if(tabIndex == index){
return '/assets/tabs/tab-host-blue.png'
}
return '/assets/tabs/tab-host-gray.png'
} else if (index == 1) {
if(tabIndex == index){
return '/assets/tabs/tab-infi-blue.png'
}
return '/assets/tabs/tab-infi-gray.png'
} else if (index == 2) {
if(tabIndex == index){
return '/assets/tabs/tab-trans-blue.png'
}
return '/assets/tabs/tab-trans-gray.png'
} else if (index == 3) {
if(tabIndex == index){
return '/assets/tabs/tab-self-blue.png'
}
return '/assets/tabs/tab-self-gray.png'
}
return ''
}
module.exports = formateTime
</wxs>

8
pages/moment/moment-item/index.wxss

@ -11,6 +11,14 @@
margin-top: 4rpx; margin-top: 4rpx;
} }
.item-tips{
height: 64rpx;
line-height: 64rpx;
text-align: center;
background-color: #F7F8FA;
color: #888888;
}
.item-content{ .item-content{
padding:16rpx 24rpx; padding:16rpx 24rpx;
border-bottom: 1rpx solid #f3f3f3; border-bottom: 1rpx solid #f3f3f3;

34
pages/moment/theall/index.js

@ -23,6 +23,7 @@ Component({
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
dataIndex: 0,
loading: true, loading: true,
requesting: false, requesting: false,
finished: false, finished: false,
@ -54,6 +55,7 @@ Component({
this.data.tabIndex = Number(detail.index) this.data.tabIndex = Number(detail.index)
this.data.form.proviceId = area.list[this.data.tabIndex].data[this.data.pIndex].code this.data.form.proviceId = area.list[this.data.tabIndex].data[this.data.pIndex].code
var proviceList = this.getProviceListByIndex(this.data.tabIndex) var proviceList = this.getProviceListByIndex(this.data.tabIndex)
this.data.dataIndex = 0
this.setData({ pIndex: 0, proviceList, orderList: [], ['form.pageNum']: 1, finished: false, loading: true }) this.setData({ pIndex: 0, proviceList, orderList: [], ['form.pageNum']: 1, finished: false, loading: true })
this.fetchList() this.fetchList()
}, },
@ -65,10 +67,15 @@ Component({
this.data.form.proviceId = area.list[this.data.tabIndex].data[this.data.pIndex].code this.data.form.proviceId = area.list[this.data.tabIndex].data[this.data.pIndex].code
this.onRefreshList() this.onRefreshList()
}, },
calendarChange: function(date){
this.data.form.date = date
this.onRefreshList()
},
onRefreshList: function(){ onRefreshList: function(){
if (this.data.requesting) { if (this.data.requesting) {
return return
} }
this.data.dataIndex = 0
this.setData({ orderList: [], ['form.pageNum']: 1, finished: false, loading: true }) this.setData({ orderList: [], ['form.pageNum']: 1, finished: false, loading: true })
this.fetchList() this.fetchList()
}, },
@ -80,6 +87,33 @@ Component({
getInformationList(this.data.form).then(result => { getInformationList(this.data.form).then(result => {
if (result.data && result.data.records.length) { if (result.data && result.data.records.length) {
var respList = result.data.records var respList = result.data.records
var lastTime = null
if(this.data.dataIndex < 2){
// 对返回的消息列表进行处理,将同一天的消息显示在一起
var qrtime = new Date(this.data.form.date).getTime()
for (let i = 0; i < respList.length; i++) {
if(this.data.dataIndex == 2){
continue
}
lastTime = respList[i].latestQuoteTime
if (lastTime.length > 10) {
lastTime = lastTime.substring(0, 10)
}
var itemtime = new Date(lastTime).getTime()
if(this.data.dataIndex == 0){
if(itemtime > qrtime){
this.data.dataIndex = 1
respList[i].tipsTime = lastTime
} else {
this.data.dataIndex = 2
respList[i].tipsTime = this.data.form.date
}
} else if(this.data.dataIndex == 1 && itemtime <= qrtime){
this.data.dataIndex = 2
respList[i].tipsTime = this.data.form.date
}
}
}
let nowList = `orderList[${this.data.orderList.length}]` let nowList = `orderList[${this.data.orderList.length}]`
var num = this.data.form.pageNum var num = this.data.form.pageNum
var finished = this.data.form.pageNum >= result.data.pages var finished = this.data.form.pageNum >= result.data.pages

3
pages/ztbvip/index.js

@ -49,9 +49,6 @@ Page({
util.navigateTo('/pages/home/idcard/index') util.navigateTo('/pages/home/idcard/index')
} }
}, },
/**
* 点击选择会员资费类型事件
*/
onGridTap:function(e){ onGridTap:function(e){
var divIndexId=e.currentTarget.dataset.index var divIndexId=e.currentTarget.dataset.index
this.setData({ divIndex:this.data.iconList[divIndexId].id }) this.setData({ divIndex:this.data.iconList[divIndexId].id })

4
pages/ztbvip/index.wxml

@ -3,8 +3,8 @@
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">纸通宝会员</view> <view slot="content">纸通宝会员</view>
</cu-custom> </cu-custom>
<wux-image width="{{750}}" height="{{270}}" nuit="{{'rpx'}}" src="https://pic.downk.cc/item/5f181ed214195aa594565927.png" mode="aspectFill">
</wux-image>
<!-- <wux-image width="{{750}}" height="{{270}}" nuit="{{'rpx'}}" src="https://pic.downk.cc/item/5f181ed214195aa594565927.png" mode="aspectFill">
</wux-image> -->
<view style="padding:18rpx 24rpx;background-color:white"> <view style="padding:18rpx 24rpx;background-color:white">
<view class="header-box"> <view class="header-box">
<view class="flex"> <view class="flex">

Loading…
Cancel
Save