Browse Source

月出货量

featrue/v4.2
huziyuan 5 years ago
parent
commit
41f1b9ba8b
8 changed files with 270 additions and 1 deletions
  1. 2
      app.js
  2. 1
      app.json
  3. 5
      pages/home/info/index.js
  4. 4
      pages/home/info/index.wxml
  5. 137
      pages/home/tab6/index.js
  6. 3
      pages/home/tab6/index.json
  7. 40
      pages/home/tab6/index.wxml
  8. 79
      pages/home/tab6/index.wxss

2
app.js

@ -1,7 +1,7 @@
//app.js //app.js
App({ App({
//----------------------------------------------globalData-------------------------------------- //----------------------------------------------globalData--------------------------------------
evn: 0,//0:开发环境,1:测试环境,2:生产环境
evn: 1,//0:开发环境,1:测试环境,2:生产环境
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'], tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'], agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'],
version: 152, version: 152,

1
app.json

@ -18,6 +18,7 @@
"pages/home/tab3/index", "pages/home/tab3/index",
"pages/home/tab4/index", "pages/home/tab4/index",
"pages/home/tab5/index", "pages/home/tab5/index",
"pages/home/tab6/index",
"pages/home/attentionPaperList/index", "pages/home/attentionPaperList/index",
"pages/home/businessLicense/index", "pages/home/businessLicense/index",
"pages/shop/create/index", "pages/shop/create/index",

5
pages/home/info/index.js

@ -400,6 +400,11 @@ Page({
url: '/pages/home/tab5/index' url: '/pages/home/tab5/index'
}) })
}, },
toTab6: function () {
wx.navigateTo({
url: '/pages/home/tab6/index'
})
},
toTab3: function () { toTab3: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/home/tab3/index' url: '/pages/home/tab3/index'

4
pages/home/info/index.wxml

@ -78,6 +78,10 @@
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bindtap="toTab5"> <wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bindtap="toTab5">
<view slot="header" class="text-gray">希望出货品类</view> <view slot="header" class="text-gray">希望出货品类</view>
<view slot="footer" class="{{userInfo.numberOfProxyCategoriesTag? 'text-black':'text-gray'}}">{{userInfo.numberOfProxyCategoriesTag || '点击修改希望出货品类'}}</view> <view slot="footer" class="{{userInfo.numberOfProxyCategoriesTag? 'text-black':'text-gray'}}">{{userInfo.numberOfProxyCategoriesTag || '点击修改希望出货品类'}}</view>
</wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bindtap="toTab6">
<view slot="header" class="text-gray">月出货量</view>
<view slot="footer" class="{{userInfo.shipmentPerMonth? 'text-black':'text-gray'}}">{{userInfo.shipmentPerMonth || '点击月出货量'}}</view>
</wux-cell> </wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='numberMoon' data-tag='打包站名' bind:click="showDialog"> <wux-cell wx:if="{{userType == 1}}" is-link data-cid='numberMoon' data-tag='打包站名' bind:click="showDialog">
<view slot="header" class="text-gray">打包站名</view> <view slot="header" class="text-gray">打包站名</view>

137
pages/home/tab6/index.js

@ -0,0 +1,137 @@
// pages/home/tab6/index.js
import {
updateUserInfo,
getBaseInfo
} from '../../api/ztb'
const storage = require('../../../utils/storage')
Page({
/**
* 页面的初始数据
*/
data: {
bidType: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getUerInfoFct()
},
toMyInfo: function () {
wx.redirectTo({
url: '/pages/index/index'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
backspace: function () {
console.log('点击返回被触发3')
wx.redirectTo({
url: '/pages/home/tab2/index'
})
},
onTabChangeTop: function (e) {
if (this.data.bidType == Number(e.currentTarget.dataset.index)) {
return
}
var tabIndex = Number(e.currentTarget.dataset.index)
this.data.firstCategoryId = ''
this.setData({
['bidType']: tabIndex
})
var model={
experienceTag:''
}
if (this.data.bidType == 1) {
model.shipmentPerMonth = '1000吨以下'
this.submitForm(model)
}
if (this.data.bidType == 2) {
model.shipmentPerMonth = '1000~2000吨'
this.submitForm(model)
}
if (this.data.bidType == 3) {
model.shipmentPerMonth = '2000吨以上'
this.submitForm(model)
}
},
submitForm: function (model) {
console.log(model)
updateUserInfo(model).then(result => {
setTimeout(() => this.toMyInfo(), 1000)
}).catch(err => {
this.data.loopRequesting = false
})
},
getUerInfoFct: function () {
getBaseInfo().then(res => {
if (res.data.shipmentPerMonth == '1000吨以下') {
this.setData({
bidType: 1
})
} else if (res.data.shipmentPerMonth == '1000~2000吨') {
this.setData({
bidType: 2
})
} else if (res.data.shipmentPerMonth == '2000吨以上') {
this.setData({
bidType: 3
})
}
})
}
})

3
pages/home/tab6/index.json

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

40
pages/home/tab6/index.wxml

@ -0,0 +1,40 @@
<!--pages/home/tab6/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">经验</view>
</cu-custom>
<view class="bj">
<view style="width:100%;height:130rpx;padding-top:10rpx;padding-right:10rpx">
<button class="cu-btn bg-red round shadow-blur vip-btn" bindtap="toMyInfo">暂时不填</button>
</view>
<view class="top">
<view class="topText">
<text>HI,\n欢迎使用纸通宝\n开启一站式废纸交易</text>
</view>
<view style="width:310rpx;height:258rpx;float:right">
<image src="/assets/image/tabBj.png" style="width:310rpx;height:258rpx"></image>
</view>
</view>
<view class="mid">
<text>你的月出货量大约是?</text>
</view>
<view class="bottom">
<view class="btson1" style="color:{{bidType == 1 ? '#008AFF' : '#333'}};border-color:{{bidType == 1 ? '#008AFF' : '#D8D8D8'}};" data-index="1" bindtap="onTabChangeTop">
<view style="width:162rpx;height:50rpx;padding-left:20rpx;float:right">
<text>1000吨以下</text>
</view>
</view>
<view class="btson2" style="color:{{bidType == 2 ? '#008AFF' : '#333'}};border-color:{{bidType == 2 ? '#008AFF' : '#D8D8D8'}};" data-index="2" bindtap="onTabChangeTop">
<view style="width:183rpx;height:50rpx;background: #FFFFFF;">
<view style="width:162rpx;height:50rpx;padding-left:20rpx;float:right">
<text>1000~2000吨</text>
</view>
</view>
</view>
<view class="btson3" style="color:{{bidType == 3 ? '#008AFF' : '#333'}};border-color:{{bidType == 3 ? '#008AFF' : '#D8D8D8'}};" data-index="3" bindtap="onTabChangeTop">
<view style="width:162rpx;height:50rpx;padding-left:20rpx;float:right">
<text>2000吨以上</text>
</view>
</view>
</view>
</view>

79
pages/home/tab6/index.wxss

@ -0,0 +1,79 @@
/* pages/home/tab6/index.wxss */
.bj {
background-color: white;
min-height: 900rpx;
}
.vip-btn {
/* height: 90rpx; */
width: 180rpx;
background: #F5F5F5;
float: right;
color: rgba(0, 0, 0, 0.45);
font-size: 28rpx;
}
.top {
height: 258rpx;
width: 100%;
}
.topText {
width: 440rpx;
height: 258rpx;
float: left;
padding-left: 48rpx;
padding-top: 60rpx;
font-size: 44rpx;
color: #000000;
font-family: PingFangSC-Medium;
}
.mid {
height: 150rpx;
padding-top: 100rpx;
padding-left: 48rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #000000;
letter-spacing: 2px;
}
.bottom {
height: 410rpx;
padding: 48rpx;
}
.btson1 {
height: 147rpx;
width: 315rpx;
float: left;
overflow: hidden;
border: 3rpx solid #D8D8D8;
border-radius: 10rpx;
border-radius: 10rpx;
padding: 22px 35px 22px 35px;
}
.btson2 {
height: 147rpx;
width: 315rpx;
float: right;
overflow: hidden;
border: 3rpx solid #D8D8D8;
border-radius: 10rpx;
border-radius: 10rpx;
padding: 22px 35px 22px 35px;
}
.btson3 {
height: 147rpx;
width: 315rpx;
float: left;
margin-top: 20rpx;
overflow: hidden;
border: 3rpx solid #D8D8D8;
border-radius: 10rpx;
border-radius: 10rpx;
padding: 22px 35px 22px 35px;
}
Loading…
Cancel
Save