From cc9ffe02479be4828fa9954faa48e04d7f5c4bab Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Sat, 20 Mar 2021 14:01:50 +0800
Subject: [PATCH] no message
---
pages/agent/agent-item/index.wxml | 4 +--
pages/agent/edit/index.js | 8 +++--
pages/agent/factory/index.wxml | 4 +--
pages/article/allNewInfo/index.js | 47 +++++++++-----------------
pages/article/allNewInfo/index.wxml | 47 ++++++++++++++------------
pages/article/newInfo/index.wxml | 52 +++++++++++++++--------------
pages/article/newInfo/index.wxss | 21 +++++-------
pages/formate.wxs | 9 ++++-
8 files changed, 93 insertions(+), 99 deletions(-)
diff --git a/pages/agent/agent-item/index.wxml b/pages/agent/agent-item/index.wxml
index 7334a36..a6bcc93 100644
--- a/pages/agent/agent-item/index.wxml
+++ b/pages/agent/agent-item/index.wxml
@@ -79,13 +79,13 @@
function priceItem(item, kg) {
if(kg){
if(item.publicSubsidies && Number(item.publicSubsidies) > 0){
- let price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
+ var price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
return (parseFloat(price)).toFixed(3) + '元/KG'
}
return (parseFloat(item.unitPrice)).toFixed(3) + '元/KG'
} else {
if(item.publicSubsidies && Number(item.publicSubsidies) > 0){
- let price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
+ var price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
return (parseFloat(price) * 1000).toFixed(1) + '元/吨'
}
return (parseFloat(item.unitPrice) * 1000).toFixed(1) + '元/吨'
diff --git a/pages/agent/edit/index.js b/pages/agent/edit/index.js
index eea0a96..70bb970 100644
--- a/pages/agent/edit/index.js
+++ b/pages/agent/edit/index.js
@@ -53,7 +53,6 @@ Page({
//异常回调
})
getFactoryPriceDetail(options.id).then(result => {
- //成功回调
this.data.cateList = []
if(result.data.paperCategoryList && result.data.paperCategoryList.length){
for (let index = 0; index < result.data.paperCategoryList.length; index++) {
@@ -62,7 +61,12 @@ Page({
if(options.unitPrice){
this.data.form.unitPrice = Number(options.unitPrice)
} else {
- this.data.form.unitPrice = element.unitPrice
+ if(element.publicSubsidies && Number(element.publicSubsidies) > 0){
+ this.data.form.publicSubsidies = element.publicSubsidies
+ this.data.form.unitPrice = math.plus(element.unitPrice, element.publicSubsidies)
+ } else {
+ this.data.form.unitPrice = element.unitPrice
+ }
}
this.data.cateName = element.categoryName
}
diff --git a/pages/agent/factory/index.wxml b/pages/agent/factory/index.wxml
index 7881f51..d5ac5e9 100644
--- a/pages/agent/factory/index.wxml
+++ b/pages/agent/factory/index.wxml
@@ -182,13 +182,13 @@
function priceItem(item, kg) {
if(kg){
if(item.publicSubsidies && Number(item.publicSubsidies) > 0){
- let price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
+ var price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
return (parseFloat(price)).toFixed(3) + '元/KG'
}
return (parseFloat(item.unitPrice)).toFixed(3) + '元/KG'
} else {
if(item.publicSubsidies && Number(item.publicSubsidies) > 0){
- let price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
+ var price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
return (parseFloat(price) * 1000).toFixed(1) + '元/吨'
}
return (parseFloat(item.unitPrice) * 1000).toFixed(1) + '元/吨'
diff --git a/pages/article/allNewInfo/index.js b/pages/article/allNewInfo/index.js
index c9e802c..fda6852 100644
--- a/pages/article/allNewInfo/index.js
+++ b/pages/article/allNewInfo/index.js
@@ -1,8 +1,6 @@
const util = require('../../../utils/util')
const app = getApp()
-import {
- getPaperMillOfInformationList
-} from "../../api/ztb"
+import { getPaperMillOfInformationList } from "../../api/ztb"
Page({
@@ -10,7 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
- height: app.globalData.safeFragmentHeight - 190,
+ height: app.globalData.fragmentHeight - 80,
safeBottom: app.globalData.safeBottom,
orderList: [],
tableSgin: null,
@@ -30,11 +28,9 @@ Page({
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
- })
-
+ this.getPaperMillOfInformationListFct({ queryWay: 1 })
},
toPage: function (e) {
if (e.currentTarget.id == 'toqb') {
@@ -53,49 +49,36 @@ Page({
changeTable: function (e) {
var a = e.currentTarget.id
if (e.currentTarget.id === this.data.tableSgin) {
- this.setData({
- tableSgin: null
- })
+ this.setData({ tableSgin: null })
} else {
- this.setData({
- tableSgin: e.currentTarget.id
- })
+ this.setData({ tableSgin: e.currentTarget.id })
}
},
getPaperMillOfInformationListFct(model) {
- this.setData({
- loading: true
- })
+ this.setData({ loading: true })
+ wx.showLoading({ title: '加载中' })
getPaperMillOfInformationList(model).then(res => {
- this.setData({
- orderList: res.data
- })
- this.setData({
- loading: false
- })
+ 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.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.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.setData({ pximg:'/assets/info/px-mr.png' })
this.data.querFrom.priceSort=0
this.getPaperMillOfInformationListFct(this.data.querFrom)
return
diff --git a/pages/article/allNewInfo/index.wxml b/pages/article/allNewInfo/index.wxml
index 61fbf4f..96c48ce 100644
--- a/pages/article/allNewInfo/index.wxml
+++ b/pages/article/allNewInfo/index.wxml
@@ -3,17 +3,16 @@
全部纸厂
-
-
-
- 纸厂名称
- 价格涨跌
+
+ 纸厂名称
+
+ 价格涨跌
+
纸厂排队
- 最近扣点
-
+ 最近扣点
-
+
@@ -24,21 +23,26 @@
-
-
- {{item.shortName}}已关注未关注
- {{item.biggestFloatPrice*1000||0}}
- {{item.yesterdayTotalQuantity || 0}}辆
- {{item.minimumDeductionPoint || 0}}%
-
-
+
+ {{item.shortName}}
+ 已关注
+ 未关注
+
+
+ {{ formate.formateDrice(item.unitPrice)}}
+ {{ item.biggestFloatPrice > 0 ? '+' : '' }}{{ formate.formateDrice(item.biggestFloatPrice)}}
-
-
+ {{item.yesterdayTotalQuantity || 0}}辆
+
+ {{item.minimumDeductionPoint || 0}}%
+
+
+
+
+
+
-
品类
@@ -63,5 +67,4 @@
-
\ No newline at end of file
+ -->
\ No newline at end of file
diff --git a/pages/article/newInfo/index.wxml b/pages/article/newInfo/index.wxml
index 9ea2d42..da17b94 100644
--- a/pages/article/newInfo/index.wxml
+++ b/pages/article/newInfo/index.wxml
@@ -5,44 +5,42 @@
- 纸厂情报
- 全部纸厂>
+
+ 纸厂情报
+ 全部纸厂>
+
-
-
-
+
+
{{curDate}}
-
+
-
+
反馈情报
-
-
-
+
-
- 纸厂名称
+
+ 纸厂名称
价格涨跌
纸厂排队
- 最近扣点
-
+ 最近扣点
@@ -54,17 +52,21 @@
-
-
- {{item.shortName}}
- {{item.biggestFloatPrice*1000 || 0}}
- {{item.yesterdayTotalQuantity || 0}}辆
- {{item.minimumDeductionPoint || 0}}%
-
-
+
+ {{item.shortName}}
+
+ {{ formate.formateDrice(item.unitPrice)}}
+ {{ item.biggestFloatPrice > 0 ? '+' : '' }}{{ formate.formateDrice(item.biggestFloatPrice)}}
-
-
+ {{item.yesterdayTotalQuantity || 0}}辆
+
+ {{item.minimumDeductionPoint || 0}}%
+
+
+
+
+
+
@@ -94,7 +96,7 @@
行业情报
更多资讯>
-
+
diff --git a/pages/article/newInfo/index.wxss b/pages/article/newInfo/index.wxss
index d8047eb..f0263ff 100644
--- a/pages/article/newInfo/index.wxss
+++ b/pages/article/newInfo/index.wxss
@@ -75,7 +75,7 @@ page {
.topLeft {
width: 50%;
- height: 60rpx;
+ height: 80rpx;
display: flex;
justify-content: space-between;
}
@@ -107,17 +107,13 @@ page {
letter-spacing: 0;
height: 60rpx;
line-height: 60rpx;
- position: absolute;
- left: 196rpx;
}
+
.topRight-text{
- height: 70rpx;
- width: 112rpx;
+ height: 80rpx;
+ width: 200rpx;
text-align: right;
- line-height: 70rpx;
- float: right;
- margin-right: 10rpx;
-
+ line-height: 80rpx;
}
.topRight-icon{
float: right;
@@ -127,7 +123,6 @@ page {
margin-right: 35rpx;
}
-
.topRightIcon {
height: 60rpx;
float: right;
@@ -179,7 +174,7 @@ page {
width: 750rpx;
height: 228rpx;
padding: 24rpx 32rpx 24rpx 32rpx;
- border-bottom: 2px solid #f3f3f3;
+ border-bottom: 1px solid #f3f3f3;
}
.bottomViewleft {
@@ -237,8 +232,8 @@ page {
}
.piker {
- height: 70rpx;
- line-height: 70rpx;
+ height: 80rpx;
+ line-height: 80rpx;
font-family: PingFangSC-Medium;
font-size: 28rpx;
color: rgba(0, 0, 0, 0.40);
diff --git a/pages/formate.wxs b/pages/formate.wxs
index 9a0f2d0..7850f2c 100644
--- a/pages/formate.wxs
+++ b/pages/formate.wxs
@@ -76,6 +76,12 @@ var numberUtil = {
}
return ''
},
+ formateDrice: function (value) {
+ if (value || value == 0) {
+ return (parseFloat(value) * 1000).toFixed(0)
+ }
+ return '- -'
+ },
substring: function(str, start, end){
if(str){
return str.substring(start, end)
@@ -96,5 +102,6 @@ module.exports = {
formatePrice: numberUtil.formatePrice,
formatePrice2: numberUtil.formatePrice2,
substring: numberUtil.substring,
- forWeight: numberUtil.forWeight
+ forWeight: numberUtil.forWeight,
+ formateDrice: numberUtil.formateDrice
}
\ No newline at end of file