Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
3e0f32461f
14 changed files with 4 additions and 410 deletions
  1. 5
      app.json
  2. 118
      pages/article/allNewInfo/index.js
  3. 8
      pages/article/allNewInfo/index.json
  4. 108
      pages/article/allNewInfo/index.wxml
  5. 171
      pages/article/allNewInfo/index.wxss
  6. 0
      pages/article/attention-factory/index.js
  7. 0
      pages/article/attention-factory/index.json
  8. 0
      pages/article/attention-factory/index.wxml
  9. 0
      pages/article/attention-factory/index.wxss
  10. 2
      pages/mall/fragment/index.js
  11. 0
      pages/mall/index/index.js
  12. 0
      pages/mall/index/index.json
  13. 2
      pages/mall/index/index.wxml
  14. 0
      pages/mall/index/index.wxss

5
app.json

@ -36,19 +36,18 @@
"pages/article/price-detail/index", "pages/article/price-detail/index",
"pages/article/queue-detail/index", "pages/article/queue-detail/index",
"pages/article/factory/index", "pages/article/factory/index",
"pages/article/allNewInfo/index",
"pages/article/feedback/index", "pages/article/feedback/index",
"pages/article/list/index", "pages/article/list/index",
"pages/article/index/index", "pages/article/index/index",
"pages/article/attentionPaperFactory/index",
"pages/article/attention-factory/index",
"pages/article/sucessFul/index", "pages/article/sucessFul/index",
"pages/mall/index/index",
"pages/mall/price-index/index", "pages/mall/price-index/index",
"pages/mall/detail/index", "pages/mall/detail/index",
"pages/mall/search-list/index", "pages/mall/search-list/index",
"pages/morder/index/index", "pages/morder/index/index",
"pages/morder/create/index", "pages/morder/create/index",
"pages/morder/detail/index", "pages/morder/detail/index",
"pages/agent/index/index",
"pages/agent/ability/index", "pages/agent/ability/index",
"pages/agent/factory/index", "pages/agent/factory/index",
"pages/agent/edit/index", "pages/agent/edit/index",

118
pages/article/allNewInfo/index.js

@ -1,118 +0,0 @@
const util = require('../../../utils/util')
const math = require('../../../utils/math') //导入模块
const app = getApp()
import { getPaperMillOfInformationList } from "../../../api/ztb"
Page({
/**
* 页面的初始数据
*/
data: {
height: app.globalData.fragmentHeight - 80,
safeBottom: app.globalData.safeBottom,
orderList: [],
tableSgin: null,
loading: false,
pximg: '/assets/info/px-mr.png',
querFrom: {
queryWay: 1,
priceSort: 0
},
factoryList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
StatusBar: app.globalData.StatusBar || 40,
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
height: app.globalData.fragmentHeight - 80
})
this.getPaperMillOfInformationListFct({
queryWay: 1
})
},
toPage: function (e) {
if (e.currentTarget.id == 'toqb') {
util.navigateTo('/pages/article/index/index')
}
if (e.currentTarget.id == 'toAttentionPaperFctory') {
util.navigateTo('/pages/article/attentionPaperFactory/index')
}
if (e.currentTarget.id == 'toFactoryDetails') {
util.navigateTo('/pages/agent/factory/index?id=' + e.currentTarget.dataset.factoryid)
}
if (e.currentTarget.id == 'toDmai') {
if (!app.globalData.userInfo) {
wx.navigateTo({ url: '/pages/login/index' })
return
}
if(!e.currentTarget.dataset.operations){
util.showToast(e.currentTarget.dataset.msg)
return
}
util.navigateTo('/pages/agent/edit/index?id=' + e.currentTarget.dataset.fcid + '&categoryId=' + e.currentTarget.dataset.paperid)
}
},
changeTable: function (e) {
var a = e.currentTarget.id
if (e.currentTarget.id === this.data.tableSgin) {
this.setData({
tableSgin: null
})
} else {
this.setData({
tableSgin: e.currentTarget.id
})
}
},
getPaperMillOfInformationListFct(model) {
this.setData({
loading: true
})
wx.showLoading({
title: '加载中'
})
getPaperMillOfInformationList(model).then(res => {
this.setData({
orderList: res.data,
loading: false
})
wx.hideLoading()
}).catch((e) => {
wx.hideLoading()
})
},
changeSort: function () {
if (this.data.pximg == '/assets/info/px-mr.png') {
this.setData({
pximg: '/assets/info/px-sx.png'
})
this.data.querFrom.priceSort = 1
this.getPaperMillOfInformationListFct(this.data.querFrom)
return
}
if (this.data.pximg == '/assets/info/px-sx.png') {
this.setData({
pximg: '/assets/info/px-jx.png'
})
this.data.querFrom.priceSort = 0
this.getPaperMillOfInformationListFct(this.data.querFrom)
return
}
if (this.data.pximg == '/assets/info/px-jx.png') {
this.setData({
pximg: '/assets/info/px-mr.png'
})
this.data.querFrom.priceSort = 0
this.getPaperMillOfInformationListFct(this.data.querFrom)
return
}
},
mathTimesRtrun: function (text) {
return math.times(text, 1000)
}
})

8
pages/article/allNewInfo/index.json

@ -1,8 +0,0 @@
{
"component": true,
"usingComponents": {
"wux-tabi": "/components/tabi/index",
"wux-accordion-group": "/components/accordion-group/index",
"wux-accordion": "/components/accordion/index"
}
}

108
pages/article/allNewInfo/index.wxml

@ -1,108 +0,0 @@
<!--pages/main/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">全部纸厂</view>
</cu-custom>
<view class="flex flex-justify"
style="width:100%;height:80rpx;font-size: 28px;color: rgba(0,0,0,0.65);letter-spacing: 0;padding: 0rpx 32rpx;">
<view class="text-df text-gray" style="flex:1;overflow: hidden;">纸厂名称</view>
<view class="text-df text-gray flex flex-center" style="flex:1;text-align: center" bindtap="changeSort">
<view>价格涨跌</view>
<image style="width:30rpx;height:30rpx" src="{{pximg}}"></image>
</view>
<view class="text-df text-gray" style="flex:0.8;text-align: center">纸厂排队</view>
<view class="text-df text-gray" style="flex:1;text-align:center">最近扣点</view>
</view>
<scroll-view scroll-y="true" style='height:{{height}}rpx;width:100%;background-color:white'>
<view class="img-nodata" style="height:{{height}}rpx" wx:if="{{!orderList.length}}">
<view class="load-spinner text-gray" style="margin-bottom:24px" wx:if="{{loading}}" />
<image class="onDataImg" src="https://636c-cloud1-1gjilu3e74c1a18a-1305669442.tcb.qcloud.la/noData.png?sign=c2f746eb85912444f9633f43fedb7fab&t=1631629208" wx:else></image>
<view
style="font-family: PingFangSC-Medium;font-size: 40rpx;color: #000000;letter-spacing: 0;text-align: left;margin-top:30rpx">
{{loading? '正在加载' : '暂无关注'}}</view>
<view class="top-nodata-text1">可前往纸厂列表添加关注</view>
<view wx:if="{{loading==false}}" class="top-nodata-text2" id="toAttentionFactory" bindtap="toPage">添加关注</view>
</view>
<!-- <view class="bg-white" wx:else> -->
<view class="bg-white">
<view wx:for="{{orderList}}" wx:key="index" class="tableStyle">
<view class="flex flex-justify" style="border-top:2rpx solid #f3f3f3;padding: 0rpx 32rpx;" id="toFactoryDetails"
data-factoryId="{{item.paperMillId}}" catchtap="toPage">
<view class="text-df text-balck" style="flex:1">
{{m2.newString(item.shortName)}}
<view wx:if="{{item.hasFollowed==true}}" class="yesAttention">已关注</view>
<view wx:if="{{item.hasFollowed==false}}" class="noAttention">未关注</view>
</view>
<view
class="text-df {{item.biggestFloatPrice>0?'text-red':(item.biggestFloatPrice<0?'text-green':'text-black')}}"
style="flex:1">
<text
style="margin-left:40rpx;">{{ formate.formateDrice(item.unitPrice)}}<text style="font-size: 32rpx;">{{item.biggestFloatPrice>0?'↑':(item.biggestFloatPrice<0?'↓':'')}}</text></text>
<text wx:if="{{item.biggestFloatPrice != 0}}"
style="margin-left: 12rpx;font-size:26rpx">{{ item.biggestFloatPrice > 0 ? '+' : '' }}{{ formate.formateDrice(item.biggestFloatPrice)}}</text>
</view>
<view class="text-df text-balck" style="flex:0.8;text-align: center">{{item.yesterdayTotalQuantity || 0}}辆
</view>
<view class="flex flex-center text-df text-balck" style="flex:1;text-align: center">
<view style="flex:1.5;text-align: center">
<view style="line-height:32rpx">{{formate.formateDescripe(item.minimumDeductionPoint)}}</view>
<view class="text-gray" style="font-size:24rpx;line-height:32rpx">
{{formate.substring(item.priceDate, 0, 10)}}</view>
</view>
<view class="text-df text-balck" style="flex:0.5;text-align: center" id="{{item.paperMillId}}"
catchtap="changeTable" wx:if="{{tableSgin==item.paperMillId}}">
<image style="width:28rpx;height:28rpx;" src="/assets/info/factoryUp.png"></image>
</view>
<view class="text-df text-balck" style="flex:0.5;text-align: center" id="{{item.paperMillId}}"
catchtap="changeTable" wx:if="{{tableSgin !== item.paperMillId}}">
<image style="width:28rpx;height:28rpx;" src="/assets/info/factoryDown.png"></image>
</view>
</view>
</view>
<view wx:if="{{tableSgin==item.paperMillId}}"
style="width:100%;background-color:#f3f3f3;padding-left:10rpx;padding:10rpx 24rpx 15rpx 24rpx">
<view class="flex flex-justify" style="">
<view class="text-df text-gray" style="flex:1;text-align: center">品类</view>
<view class="text-df text-gray" style="flex:1;text-align: center">价格</view>
<view class="text-df text-gray" style="flex:1;text-align: center">涨跌</view>
<view class="text-df text-gray" style="flex:1;text-align: center">最近扣点</view>
<view class="text-df text-gray" style="flex:1;text-align: center">操作</view>
</view>
<view class="flex flex-justify" style="margin-top:20rpx" wx:for="{{ item.paperCategoryList }}"
wx:for-item="cell" wx:key="index" style="background-color:white;margin-top:10rpx">
<view class="text-df {{cell.categoryName>0?'text-red':(cell.categoryName<0?'text-green':'text-black')}}"
style="flex:1;text-align: center;line-height: 40rpx;">{{cell.categoryName|| '---'}}</view>
<view class="text-df {{cell.floatPrice>0?'text-red':(cell.floatPrice<0?'text-green':'text-black')}}"
style="flex:1;text-align: center;">
{{formate.formatePrice(cell.unitPrice)}}<text style="font-size:32rpx">{{cell.floatPrice>0?'↑':(cell.floatPrice<0?'↓':'')}}</text></view>
<view class="text-df {{cell.floatPrice>0?'text-red':(cell.floatPrice<0?'text-green':'text-black')}}"
style="flex:1;text-align: center;font-size:26rpx">{{formate.formatePrice(cell.floatPrice)}}</view>
<view
class="text-df {{cell.curDeductionPoint>0?'text-red':(cell.curDeductionPoint<0?'text-green':'text-black')}}"
style="flex:1;text-align: center">{{cell.curDeductionPoint|| 0}}</view>
<view class="text-df text-balck" style="flex:1;text-align: center" id="toDmai"
data-fcId="{{item.paperMillId}}" data-paperId="{{cell.categoryId}}" data-operations="{{item.isOperations}}" data-msg="{{item.manageNotifyMessage}}" catchtap="toPage">
<view class="son-table-btn">代卖</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- <view class="gzBtn" id="toAttentionPaperFctory" bindtap="toPage">
<view class="gzBtnIcon"><image style="width:36rpx;height:36rpx" src="/assets/info/addgzicon.png"></image></view>
<view class="gzBtnText">关注纸厂</view>
</view> -->
<wxs module="m2">
var newString = function (string) {
if (string.length > 4) {
var newString = string.substring(0, 4)
return newString + '...';
}else{
return string
}
}
module.exports.newString = newString;
</wxs>

171
pages/article/allNewInfo/index.wxss

@ -1,171 +0,0 @@
/* pages/main/index.wxss */
page {
background-color: white;
}
.onDataImg {
width: 320rpx;
height: 249rpx;
}
.img-nodata {
width: 100%;
height: 548rpx;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 30rpx;
}
.top-nodata-text1 {
font-family: PingFangSC-Medium;
font-size: 30rpx;
color: rgba(0, 0, 0, 0.75);
letter-spacing: 0;
text-align: left;
margin-top: 16rpx;
}
.top-nodata-text2 {
width: 480rpx;
height: 88rpx;
background: #007AFF;
border-radius: 10rpx;
border-radius: 10rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #FFFFFF;
letter-spacing: 0;
text-align: left;
line-height: 88rpx;
text-align: center;
margin-top: 41rpx;
}
.bottomView {
width: 750rpx;
height: 228rpx;
padding: 24rpx 32rpx 24rpx 32rpx
}
.bottomViewleft {
width: 423rpx;
height: 180rpx;
float: left;
}
.bottomViewRight {
width: 240rpx;
height: 180rpx;
background-color: green;
float: right;
}
.tableStyle {
width: 100%;
line-height: 100rpx;
font-size: 34rpx;
color: rgba(0, 0, 0, 0.85);
letter-spacing: 0;
}
.son-table-btn {
width: 120rpx;
height: 56rpx;
line-height: 56rpx;
font-size: 26rpx;
color: #007AFF;
letter-spacing: 0;
text-align: left;
background: #FFFFFF;
border: 1rpx solid #007AFF;
border-radius: 28rpx;
border-radius: 28rpx;
text-align: center;
}
.bottomViewleft-top {
width: 100%;
height: 90rpx;
}
.bottomViewleft-bottem {
width: 100%;
height: 33rpx;
margin-top: 57rpx;
}
.bottomViewRightImg {
width: 240rpx;
height: 180rpx;
}
.gzBtn {
width: 255rpx;
height: 96rpx;
background: #F4F4F4;
border: 1rpx solid #F4F4F4;
box-shadow: 0 5rpx 10rpx 0 rgba(0, 0, 0, 0.10);
border-radius: 48rpx;
border-radius: 48rpx;
position: absolute;
right: 32rpx;
bottom: 233rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.gzBtnIcon {
height: 96rpx;
display: flex;
align-items: center;
margin-left: 35rpx;
}
.gzBtnText {
height: 96rpx;
display: flex;
align-items: center;
font-family: PingFangSC-Semibold;
font-size: 30rpx;
color: rgba(0, 0, 0, 0.60);
letter-spacing: 2px;
margin-right: 35rpx;
}
.yesAttention {
width: 78rpx;
height: 26rpx;
background: rgb(204, 224, 245);
border-radius: 1px;
border-radius: 1px;
line-height: 26rpx;
text-align: center;
font-family: PingFangSC-Regular;
font-size: 18rpx;
color: #007AFF;
letter-spacing: 0;
position: absolute;
bottom: 1rpx;
}
.noAttention {
width: 78rpx;
height: 26rpx;
background: #F4F4F4;
border-radius: 1px;
border-radius: 1px;
line-height: 26rpx;
text-align: center;
font-family: PingFangSC-Regular;
font-size: 18rpx;
color: rgb(150, 150, 150);
letter-spacing: 0;
position: absolute;
bottom: 1rpx;
}

pages/article/attentionPaperFactory/index.js → pages/article/attention-factory/index.js

pages/article/attentionPaperFactory/index.json → pages/article/attention-factory/index.json

pages/article/attentionPaperFactory/index.wxml → pages/article/attention-factory/index.wxml

pages/article/attentionPaperFactory/index.wxss → pages/article/attention-factory/index.wxss

2
pages/mall/fragment/index.js

@ -108,7 +108,7 @@ Component({
if(e.currentTarget.id == 'agent'){ if(e.currentTarget.id == 'agent'){
this.triggerEvent("click", { what: 2 }) this.triggerEvent("click", { what: 2 })
} else if(e.currentTarget.id == 'trans'){ } else if(e.currentTarget.id == 'trans'){
util.navigateTo('/pages/agent/index/index')
util.navigateTo('/pages/mall/index/index')
} else if(e.currentTarget.id == 'action'){ } else if(e.currentTarget.id == 'action'){
util.navigateTo(`/pages/agent/ability/index`) util.navigateTo(`/pages/agent/ability/index`)
} else if(e.currentTarget.id == 'moment'){ } else if(e.currentTarget.id == 'moment'){

pages/agent/index/index.js → pages/mall/index/index.js

pages/agent/index/index.json → pages/mall/index/index.json

pages/agent/index/index.wxml → pages/mall/index/index.wxml

@ -18,7 +18,7 @@
</view> </view>
</view> </view>
<swiper current="{{pageIndex}}" duration="300" style="height:{{height}}rpx">
<swiper current="{{pageIndex}}" duration="0" style="height:{{height}}rpx">
<swiper-item catchtouchmove="stopTouchMove"> <swiper-item catchtouchmove="stopTouchMove">
<focus id="{{TabList[0].value}}" /> <focus id="{{TabList[0].value}}" />
</swiper-item> </swiper-item>

pages/agent/index/index.wxss → pages/mall/index/index.wxss

Loading…
Cancel
Save