Browse Source

no message

featrue/v.4.0
xpz2018 5 years ago
parent
commit
667190df00
17 changed files with 134 additions and 69 deletions
  1. 1
      app.json
  2. 2
      pages/agent/detail/index.js
  3. 22
      pages/article/price-index/index.js
  4. 1
      pages/article/publish/index.js
  5. 4
      pages/formate.wxs
  6. 7
      pages/goods/ablility/index.js
  7. 1
      pages/goods/goods.wxs
  8. 24
      pages/home/pinfo/index.js
  9. 17
      pages/html/banner/index.js
  10. 8
      pages/html/banner/index.wxml
  11. 23
      pages/html/html/index.js
  12. 3
      pages/html/html/index.json
  13. 6
      pages/html/html/index.wxml
  14. 1
      pages/html/html/index.wxss
  15. 1
      pages/html/integral/index.js
  16. 74
      pages/mall/index/index.js
  17. 8
      pages/mall/index/index.wxml

1
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",

2
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 })
}
}
})

22
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({

1
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 })
}

4
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)
}

7
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()
},

1
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 = '(今天)'

24
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,

17
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() {

8
pages/html/banner/index.wxml

@ -5,6 +5,8 @@
</view>
</view>
<wux-image width="{{750}}" height="{{3066}}" nuit="{{'rpx'}}"
src="https://pic.downk.cc/item/5feab4c93ffa7d37b3fd68fb.png" mode="aspectFill" bind:load="onImageLoad"
bind:click="onClick"></wux-image>
<wux-image width="{{750}}" height="{{height}}" nuit="{{'rpx'}}" src="{{src}}" mode="aspectFill" bind:load="onImageLoad" bind:click="onClick">
<view class="flex flex-center" slot="loading" style="height:1200rpx;width:750rpx">
<text class="icon--refresher"></text>
</view>
</wux-image>

23
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)
}
})

3
pages/html/html/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

6
pages/html/html/index.wxml

@ -0,0 +1,6 @@
<!--pages/html/html/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">{{title}}</view>
</cu-custom>
<web-view src="{{link}}" bindmessage="getMessage"></web-view>

1
pages/html/html/index.wxss

@ -0,0 +1 @@
/* pages/html/html/index.wxss */

1
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
}

74
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

8
pages/mall/index/index.wxml

@ -5,10 +5,14 @@
</cu-custom>
<scroll-view scroll-y style="height: {{height}}rpx;" bindscroll="onScroll" scroll-into-view="{{toView}}" bind:scrolltolower="fetchMoreList">
<swiper class="screen-swiper" style="height:270rpx;min-height: 270rpx" circular="{{true}}" indicator-dots="{{false}}" autoplay="true" interval="5000" duration="500">
<swiper-item wx:for="{{bannerList}}" wx:key="index">
<wux-image width="{{750}}" height="{{270}}" nuit="{{'rpx'}}" src="{{item}}" mode="aspectFill" data-index="{{index}}" bind:click="tapBanner"></wux-image>
<wux-image width="{{750}}" height="{{270}}" nuit="{{'rpx'}}" src="{{item.picUrl}}" mode="aspectFill" data-index="{{index}}" bind:click="tapBanner">
<view class="flex flex-center" slot="loading" style="height:270rpx;width:750rpx">
<text class="icon--refresher" wx:if="{{!finished[0]}}"></text>
</view>
</wux-image>
</swiper-item>
</swiper>

Loading…
Cancel
Save