From 667190df00837127abf241f33c2627b1923f9dd2 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Wed, 6 Jan 2021 20:05:36 +0800
Subject: [PATCH] no message
---
app.json | 1 +
pages/agent/detail/index.js | 2 -
pages/article/price-index/index.js | 22 ---------
pages/article/publish/index.js | 1 -
pages/formate.wxs | 4 --
pages/goods/ablility/index.js | 7 ++-
pages/goods/goods.wxs | 1 -
pages/home/pinfo/index.js | 24 ++--------
pages/html/banner/index.js | 17 ++++++-
pages/html/banner/index.wxml | 8 ++--
pages/html/html/index.js | 23 ++++++++++
pages/html/html/index.json | 3 ++
pages/html/html/index.wxml | 6 +++
pages/html/html/index.wxss | 1 +
pages/html/integral/index.js | 1 -
pages/mall/index/index.js | 74 ++++++++++++++++++++++++++----
pages/mall/index/index.wxml | 8 +++-
17 files changed, 134 insertions(+), 69 deletions(-)
create mode 100644 pages/html/html/index.js
create mode 100644 pages/html/html/index.json
create mode 100644 pages/html/html/index.wxml
create mode 100644 pages/html/html/index.wxss
diff --git a/app.json b/app.json
index 9fc004a..2059dd9 100644
--- a/app.json
+++ b/app.json
@@ -86,6 +86,7 @@
"pages/html/agreement/index",
"pages/html/bankcard/index",
"pages/html/banner/index",
+ "pages/html/html/index",
"pages/html/logistics/index",
"pages/html/risk/index",
"pages/html/rules/index",
diff --git a/pages/agent/detail/index.js b/pages/agent/detail/index.js
index ab318db..81a7059 100644
--- a/pages/agent/detail/index.js
+++ b/pages/agent/detail/index.js
@@ -146,13 +146,11 @@ Page({
})
},
hideLayout: function(e){
- console.log(e.currentTarget.id)
if(e.currentTarget.id == 'info2'){
this.setData({ visiable2: !this.data.visiable2 })
} else {
this.setData({ visiable1: !this.data.visiable1 })
}
-
}
})
\ No newline at end of file
diff --git a/pages/article/price-index/index.js b/pages/article/price-index/index.js
index a7c2e74..6335978 100644
--- a/pages/article/price-index/index.js
+++ b/pages/article/price-index/index.js
@@ -59,28 +59,6 @@ Component({
this.onRefreshList()
}
},
- //***********************************参与纸厂讨论*****************************************//
- // 纸品价格>>>>选择纸厂
- // selectFactory: function(event){
- // wx.navigateTo({ url: '/pages/article/factory/index?type=' + event.currentTarget.id})
- // },
- // toPriceList: function(){
- // console.log(this.data.priceId)
- // wx.navigateTo({ url: '/pages/article/price-detail/index?id=' + this.data.priceId })
- // },
- // fetchPriceList: function(millId){
- // if(millId){
- // request.get('/recycle-service/get/paper-mill-paper-category-price-details/' + millId).then(result => {
- // //成功回调
- // this.setData({ priceList: result.data.paperCategoryList.slice(0, 8), priceName: result.data.name })
- // })
- // } else {
- // request.get('/recycle-service/get/paper-mill-list').then(result => {
- // this.data.priceId = result.data.records[0].paperMillId
- // this.fetchPriceList(this.data.priceId)
- // })
- // }
- // },
//*************************************************momentList************************************************//
onRefreshList: function () {
this.setData({
diff --git a/pages/article/publish/index.js b/pages/article/publish/index.js
index c8bec44..fe943ba 100644
--- a/pages/article/publish/index.js
+++ b/pages/article/publish/index.js
@@ -138,7 +138,6 @@ Page({
if(!e.detail){
return
}
- console.log(e.detail)
this.setData({ ['form.millPaperId']: e.detail.value, ['form.millPaperName']: e.detail.text })
}
diff --git a/pages/formate.wxs b/pages/formate.wxs
index a7204a8..9a0f2d0 100644
--- a/pages/formate.wxs
+++ b/pages/formate.wxs
@@ -1,7 +1,6 @@
var numberUtil = {
numberFormat: function (value) {
// var v = parseInt(value)//强转Int,毕竟有可能返回是String类型的数字
- // console.log('aaaaa===>'+v)
if (value || value == 0) {
return Number(value).toFixed(2)
}
@@ -9,7 +8,6 @@ var numberUtil = {
},
numberFormat2: function (value) {
// var v = parseInt(value)//强转Int,毕竟有可能返回是String类型的数字
- // console.log('aaaaa===>'+v)
if (value || value == 0) {
return Number(value).toFixed(2)
}
@@ -17,7 +15,6 @@ var numberUtil = {
},
numberFormat3: function (value) {
// var v = parseInt(value)//强转Int,毕竟有可能返回是String类型的数字
- // console.log('aaaaa===>'+v)
if (value) {
return value.toFixed(3)
}
@@ -25,7 +22,6 @@ var numberUtil = {
},
formateMoney: function (value) {
// var v = parseInt(value)//强转Int,毕竟有可能返回是String类型的数字
- // console.log('aaaaa===>'+v)
if (value || value == 0) {
return (parseFloat(value)).toFixed(2)
}
diff --git a/pages/goods/ablility/index.js b/pages/goods/ablility/index.js
index 7a468a3..8f05577 100644
--- a/pages/goods/ablility/index.js
+++ b/pages/goods/ablility/index.js
@@ -31,7 +31,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- this.setData({ height: app.globalData.fragmentHeight - 210, kg: app.globalData.kg, CustomBar: app.globalData.CustomBar })
+ this.setData({
+ height: app.globalData.fragmentHeight - 210,
+ kg: app.globalData.kg,
+ CustomBar: app.globalData.CustomBar,
+ ['form.bidType']: options.type ? Number(options.type) : statusList[1]
+ })
this.fetchCateList()
this.fetchGoodsList()
},
diff --git a/pages/goods/goods.wxs b/pages/goods/goods.wxs
index 378de77..286f23a 100644
--- a/pages/goods/goods.wxs
+++ b/pages/goods/goods.wxs
@@ -76,7 +76,6 @@ function formateDate(datetime) {
var date = getDate(datetime.trim())
var today = getDate()
var dayCode = 24 * 60 * 60 * 1000
- console.log((date.getTime() - today.getTime()) / dayCode)
var week = ''
if (date.getTime() === today.getTime()) {
week = '(今天)'
diff --git a/pages/home/pinfo/index.js b/pages/home/pinfo/index.js
index b5dcd87..98c533e 100644
--- a/pages/home/pinfo/index.js
+++ b/pages/home/pinfo/index.js
@@ -161,11 +161,6 @@ Page({
adminid: app.globalData.adminid //HTTP 请求中其他额外的参数比如 用户id
},
success(res) {
- // console.log(res.data)
- // // that.preservationheadimg(res.img);//回调成功调用保存图片接口
- // that.setData({
- // avatarUrl: res.data.data
- // })
var jsonStr = res.data;
jsonStr = jsonStr.replace(" ", "");
if (typeof jsonStr != 'object') {
@@ -194,11 +189,6 @@ Page({
adminid: app.globalData.adminid //HTTP 请求中其他额外的参数比如 用户id
},
success(res) {
- // console.log(res.data)
- // // that.preservationheadimg(res.img);//回调成功调用保存图片接口
- // that.setData({
- // avatarUrl: res.data.data
- // })
var jsonStr = res.data;
jsonStr = jsonStr.replace(" ", "");
if (typeof jsonStr != 'object') {
@@ -249,7 +239,6 @@ Page({
})
},
inputBlur(e) {
- console.log(e)
if (e.target.dataset.name == "nickName") {
if (this.data.nickName == '') {
util.showToast('请填写昵称')
@@ -384,20 +373,13 @@ Page({
})
},
bindchange: function (e) {
- console.log(e.detail)
- this.setData({
- identity: e.detail.value
- })
+ this.setData({ identity: e.detail.value })
if (this.data.identity == '') {
util.showToast('请选择身份')
- this.setData({
- backStatus: false
- })
+ this.setData({ backStatus: false })
return
} else {
- this.setData({
- backStatus: true
- })
+ this.setData({ backStatus: true })
}
request.put('/saas-user/user/updateUserInfo', {
avatarUrl: this.data.avatarUrl,
diff --git a/pages/html/banner/index.js b/pages/html/banner/index.js
index 09e56d2..6457e88 100644
--- a/pages/html/banner/index.js
+++ b/pages/html/banner/index.js
@@ -1,4 +1,5 @@
// pages/html/banner/index.js
+const math = require('../../../utils/math')
const app = getApp()
Page({
@@ -6,18 +7,30 @@ Page({
* 页面的初始数据
*/
data: {
+ src: null,
+ height: 1200
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ if(!options.src){
+ wx.navigateBack()
+ return
+ }
wx.showLoading({ title: '处理中', mask: true })
this.setData({
StatusBar: app.globalData.StatusBar || 40,
- CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60)
+ CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60),
+ src: options.src
})
},
- onImageLoad: function(){
+ onImageLoad: function({detail}){
+ if(detail && detail.width){
+ var radio = math.divide(detail.width, 750)
+ var height = parseInt(math.divide(detail.height, radio))
+ this.setData({ height })
+ }
wx.hideLoading()
},
backPage() {
diff --git a/pages/html/banner/index.wxml b/pages/html/banner/index.wxml
index 992ea77..e899bab 100644
--- a/pages/html/banner/index.wxml
+++ b/pages/html/banner/index.wxml
@@ -5,6 +5,8 @@
-
\ No newline at end of file
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/html/html/index.js b/pages/html/html/index.js
new file mode 100644
index 0000000..a2102b4
--- /dev/null
+++ b/pages/html/html/index.js
@@ -0,0 +1,23 @@
+// pages/html/html/index.js
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ title: 'https://www.baidu.com/',
+ link: null
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(!options.link){
+ wx.navigateBack()
+ return
+ }
+ this.setData({link: options.link, title: options.title})
+ },
+ getMessage: function(e){
+ console.log(e)
+ }
+})
\ No newline at end of file
diff --git a/pages/html/html/index.json b/pages/html/html/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/html/html/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/html/html/index.wxml b/pages/html/html/index.wxml
new file mode 100644
index 0000000..42f15d6
--- /dev/null
+++ b/pages/html/html/index.wxml
@@ -0,0 +1,6 @@
+
+
+ {{title}}
+
+
+
diff --git a/pages/html/html/index.wxss b/pages/html/html/index.wxss
new file mode 100644
index 0000000..77d2a6b
--- /dev/null
+++ b/pages/html/html/index.wxss
@@ -0,0 +1 @@
+/* pages/html/html/index.wxss */
\ No newline at end of file
diff --git a/pages/html/integral/index.js b/pages/html/integral/index.js
index 4b972b1..bed6bce 100644
--- a/pages/html/integral/index.js
+++ b/pages/html/integral/index.js
@@ -63,7 +63,6 @@ Page({
if(item.linkUrlJson && item.linkUrlJson.redirectInfo && item.linkUrlJson.redirectInfo.targetView){
targetView = item.linkUrlJson.redirectInfo.targetView
}
- console.log(targetView)
if(!targetView){
return
}
diff --git a/pages/mall/index/index.js b/pages/mall/index/index.js
index ca90cf7..15c3e3f 100644
--- a/pages/mall/index/index.js
+++ b/pages/mall/index/index.js
@@ -18,10 +18,8 @@ Component({
scrollTop: 0,
fixed: false,
toView: null,
- bannerList: [
- 'https://pic.downk.cc/item/5fd7606d3ffa7d37b3c4895f.png',
- 'https://pic.downk.cc/item/5fe42c023ffa7d37b3621620.png'
- ],
+ banning: true,
+ bannerList: [],
noticeList: [],
iconList: [
{ icon: '/assets/image/ico_trade.png', badge: 0, name: '特价专区' },
@@ -54,6 +52,9 @@ Component({
},
methods: {
onRestart: function () {
+ if(!this.data.noticeList.length){
+ this.fetchBannerList()
+ }
if(!this.data.noticeList.length){
this.fetchNoticeList()
}
@@ -78,12 +79,59 @@ Component({
this.setData({ scrollTop: detail.scrollTop })
},
tapBanner: function(e){
- if(e.currentTarget.dataset.index == 0){
- wx.navigateTo({ url: '/pages/ztbvip/index' })
- } else if(e.currentTarget.dataset.index == 1){
+ var item = this.data.bannerList[e.currentTarget.dataset.index]
+ if(item.redirectInfo.targetView == 'showH5'){
+ wx.navigateTo({ url: '/pages/html/html/index?link=' + item.redirectInfo.params.id + '?title=' + item.title})
+ } else if(item.redirectInfo.targetView == 'showImage'){
+ wx.navigateTo({ url: '/pages/html/banner/index?src=' + item.redirectInfo.params.id})
+ }
+
+ if(item.redirectInfo.targetView == 'showBidList'){
+ wx.navigateTo({ url: '/pages/goods/ablility/index' })
+ } else if(item.redirectInfo.targetView == 'showProxyList'){
// wx.navigateTo({ url: '/pages/goods/ablility/index' })
- wx.navigateTo({ url: '/pages/html/banner/index' })
- }
+ } else if(item.redirectInfo.targetView == 'showQNPrice'){
+ wx.navigateTo({ url: '/pages/mall/price-index/index' })
+ } else if(item.redirectInfo.targetView == 'showFactoryPrice'){
+ wx.navigateTo({ url: '/pages/article/price-detail/index' })
+ } else if(item.redirectInfo.targetView == 'showFactoryQueue'){
+ wx.navigateTo({ url: '/pages/article/queue-detail/index' })
+ } else if(item.redirectInfo.targetView == 'showFactoryQueue'){
+ wx.navigateTo({ url: '/pages/article/queue-detail/index' })
+ } else if(item.redirectInfo.targetView == 'showArticleHome'){
+ // 情报首页
+ event.emit('EventMessage', { what: 250, desc: 'page-article', index: 0 })
+ } else if(item.redirectInfo.targetView == 'myArticle'){
+ wx.navigateTo({ url: '/pages/article/list/index' })
+ } else if(item.redirectInfo.targetView == 'myMessage'){
+ wx.navigateTo({ url: '/pages/message/index/index' })
+ } else if(item.redirectInfo.targetView == 'member'){
+ wx.navigateTo({ url: '/pages/ztbvip/index' })
+ } else if(item.redirectInfo.targetView == 'showPurchaseList'){
+ wx.navigateTo({ url: '/pages/purchase/ablility/index' })
+ } else if(item.redirectInfo.targetView == 'showProductList'){
+ wx.navigateTo({ url: '/pages/goods/ablility/index?type=1' })
+ } else if(item.redirectInfo.targetView == 'logistics'){
+ wx.navigateTo({ url: '/pages/html/logistics/index' })
+ } else if(item.redirectInfo.targetView == 'contract'){
+ wx.navigateTo({ url: '/pages/home/service/index' })
+ } else if(item.redirectInfo.targetView == 'myAddress'){
+ wx.navigateTo({ url: '/pages/adress/list/index' })
+ } else if(item.redirectInfo.targetView == 'myBankCard'){
+ wx.navigateTo({ url: '/pages/bank/vindex/index' })
+ } else if(item.redirectInfo.targetView == 'personalBillDetail'){
+ wx.navigateTo({ url: '/pages/bank/bill/index' })
+ } else if(item.redirectInfo.targetView == 'myScore'){
+ wx.navigateTo({ url: '/pages/html/integral/index' })
+ } else if(item.redirectInfo.targetView == 'myBalance'){
+ wx.navigateTo({ url: '/pages/withdrawal/balance/index' })
+ } else if(item.redirectInfo.targetView == 'myProxyList'){
+ wx.navigateTo({ url: '/pages/agent/order/index' })
+ } else if(item.redirectInfo.targetView == 'myBidList'){
+ wx.navigateTo({ url: '/pages/bidding/index/index' })
+ } else if(item.redirectInfo.targetView == 'myShop'){
+ wx.navigateTo({ url: '/pages/shop/index/index' })
+ }
},
onGridTap: function(e){
var index = e.currentTarget.dataset.index
@@ -118,6 +166,14 @@ Component({
this.fetchAgentList()
}
},
+ fetchBannerList: function(){
+ // /banner/get/banner-list/{type} 获取banner
+ request.get('/recycle-service/banner/get/banner-list/1').then(result => {
+ //成功回调
+ this.setData({ bannerList: result.data })
+ }).catch(err => {
+ })
+ },
fetchNoticeList: function(){
if (this.data.loopRequesting) {
return
diff --git a/pages/mall/index/index.wxml b/pages/mall/index/index.wxml
index 653747e..56aa58a 100644
--- a/pages/mall/index/index.wxml
+++ b/pages/mall/index/index.wxml
@@ -5,10 +5,14 @@
-
+
-
+
+
+
+
+