Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
b723590f23
5 changed files with 21 additions and 11 deletions
  1. 5
      pages/home/enterprise/enterprise.js
  2. 10
      pages/home/enterprise/enterprise.wxml
  3. 2
      pages/home/index/index.js
  4. 5
      pages/home/personal/personal.js
  5. 10
      pages/home/personal/personal.wxml

5
pages/home/enterprise/enterprise.js

@ -92,6 +92,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.showLoading({ title: '加载中', mask: true })
getBaseInfo().then(res => { getBaseInfo().then(res => {
this.setData({ this.setData({
userInfo: res.data, userInfo: res.data,
@ -103,6 +104,10 @@ Page({
userType: res.data.userType, userType: res.data.userType,
realName: res.data.realName || res.data.userName, realName: res.data.realName || res.data.userName,
}) })
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
util.showToast(err)
}) })
this.cascaderView = this.cascaderView || this.selectComponent('#wux-cascader') this.cascaderView = this.cascaderView || this.selectComponent('#wux-cascader')
this.pickerView = this.pickerView || this.selectComponent('#picker-view') this.pickerView = this.pickerView || this.selectComponent('#picker-view')

10
pages/home/enterprise/enterprise.wxml

@ -30,24 +30,24 @@
<view slot="header" class="text-gray">公司地址</view> <view slot="header" class="text-gray">公司地址</view>
<view slot="footer" style="width:500rpx">{{companyAddress}}</view> <view slot="footer" style="width:500rpx">{{companyAddress}}</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}}" data-cid='numberMoon' data-tag='打包厂名'>
<view slot="header" class="text-gray">工厂名</view> <view slot="header" class="text-gray">工厂名</view>
<view slot="footer" class="{{userInfo.packageFactoryName? 'text-black':'text-gray'}}">{{userInfo.packageFactoryName || '点击修改打包厂名'}}</view> <view slot="footer" class="{{userInfo.packageFactoryName? 'text-black':'text-gray'}}">{{userInfo.packageFactoryName || '点击修改打包厂名'}}</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}}" data-cid='numberMoon' data-tag='打包厂占地面积'>
<view slot="header" class="text-gray">打包厂占地面积</view> <view slot="header" class="text-gray">打包厂占地面积</view>
<view slot="footer" class="{{userInfo.packageFactoryArea? 'text-black':'text-gray'}}">{{userInfo.packageFactoryArea || '点击修改打包厂占地面积'}}</view> <view slot="footer" class="{{userInfo.packageFactoryArea? 'text-black':'text-gray'}}">{{userInfo.packageFactoryArea || '点击修改打包厂占地面积'}}</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}}" data-cid='numberMoon' data-tag='工厂人数'>
<view slot="header" class="text-gray">工厂人数</view> <view slot="header" class="text-gray">工厂人数</view>
<view slot="footer" class="{{userInfo.numberOfEmployee? 'text-black':'text-gray'}}">{{userInfo.numberOfEmployee || '点击修改工厂人数'}}</view> <view slot="footer" class="{{userInfo.numberOfEmployee? 'text-black':'text-gray'}}">{{userInfo.numberOfEmployee || '点击修改工厂人数'}}</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}}" data-cid='numberMoon' data-tag='打包机数'>
<view slot="header" class="text-gray">打包机数</view> <view slot="header" class="text-gray">打包机数</view>
<view slot="footer" class="{{userInfo.numberOfPackageMachine? 'text-black':'text-gray'}}">{{userInfo.numberOfPackageMachine || '点击修改工厂打包机数'}}</view> <view slot="footer" class="{{userInfo.numberOfPackageMachine? 'text-black':'text-gray'}}">{{userInfo.numberOfPackageMachine || '点击修改工厂打包机数'}}</view>
</wux-cell> </wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='numberMoon' data-tag='营业执照' bind:click="toBusinessLicense">
<wux-cell wx:if="{{userType == 1}}" data-cid='numberMoon' data-tag='营业执照'>
<view slot="header" class="text-gray">营业执照</view> <view slot="header" class="text-gray">营业执照</view>
<view slot="footer" class="{{userInfo.businessLicenseUrl? 'text-black':'text-gray'}}">{{userInfo.businessLicenseUrl==null?'未上传':'查看'}}</view> <view slot="footer" class="{{userInfo.businessLicenseUrl? 'text-black':'text-gray'}}">{{userInfo.businessLicenseUrl==null?'未上传':'查看'}}</view>
</wux-cell> </wux-cell>

2
pages/home/index/index.js

@ -172,7 +172,7 @@ Component({
if (app.globalData.userInfo.isAuth != 1) { if (app.globalData.userInfo.isAuth != 1) {
wx.navigateTo({ url: '/pages/home/idcard/index' }) wx.navigateTo({ url: '/pages/home/idcard/index' })
} else { } else {
wx.navigateTo({ url: '/pages/home/certificate/index' })
wx.navigateTo({ url: '/pages/home/info/index' })
} }
}, },
toAuthor: function () { toAuthor: function () {

5
pages/home/personal/personal.js

@ -92,6 +92,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.showLoading({ title: '加载中', mask: true })
getBaseInfo().then(res => { getBaseInfo().then(res => {
this.setData({ this.setData({
userInfo: res.data, userInfo: res.data,
@ -103,6 +104,10 @@ Page({
userType: res.data.userType, userType: res.data.userType,
realName: res.data.realName || res.data.userName, realName: res.data.realName || res.data.userName,
}) })
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
util.showToast(err)
}) })
this.cascaderView = this.cascaderView || this.selectComponent('#wux-cascader') this.cascaderView = this.cascaderView || this.selectComponent('#wux-cascader')
this.pickerView = this.pickerView || this.selectComponent('#picker-view') this.pickerView = this.pickerView || this.selectComponent('#picker-view')

10
pages/home/personal/personal.wxml

@ -19,23 +19,23 @@
<view slot="header" class="text-gray">从业身份</view> <view slot="header" class="text-gray">从业身份</view>
<view slot="footer" class="{{userInfo.identityTag? 'text-black':'text-gray'}}">{{userInfo.identityTag || '点击修改从业身份'}}</view> <view slot="footer" class="{{userInfo.identityTag? 'text-black':'text-gray'}}">{{userInfo.identityTag || '点击修改从业身份'}}</view>
</wux-cell> </wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='city' bindtap="toTab2">
<wux-cell wx:if="{{userType == 1}}" data-cid='city'>
<view slot="header" class="text-gray">所在城市</view> <view slot="header" class="text-gray">所在城市</view>
<view slot="footer" class="text-sg {{userInfo.locateCityTag?'text-blue':'input-grey'}}">{{userInfo.locateCityTag.provinceName+userInfo.locateCityTag.cityName||'请选择所在地区'}}</view> <view slot="footer" class="text-sg {{userInfo.locateCityTag?'text-blue':'input-grey'}}">{{userInfo.locateCityTag.provinceName+userInfo.locateCityTag.cityName||'请选择所在地区'}}</view>
</wux-cell> </wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='age' data-tag='从业经验' bindtap="toTab3">
<wux-cell wx:if="{{userType == 1}}" data-cid='age' data-tag='从业经验'>
<view slot="header" class="text-gray">从业经验</view> <view slot="header" class="text-gray">从业经验</view>
<view slot="footer" class="{{userInfo.experienceTag? 'text-black':'text-gray'}}">{{userInfo.experienceTag || '点击修改从业经验'}}</view> <view slot="footer" class="{{userInfo.experienceTag? 'text-black':'text-gray'}}">{{userInfo.experienceTag || '点击修改从业经验'}}</view>
</wux-cell> </wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type' data-tag='希望采购品类' bindtap="toTab4">
<wux-cell wx:if="{{userType == 1}}" data-cid='type' data-tag='希望采购品类'>
<view slot="header" class="text-gray">希望采购品类</view> <view slot="header" class="text-gray">希望采购品类</view>
<view slot="footer" class="{{userInfo.numberOfPurchaseCategoriesTag? 'text-black':'text-gray'}}">{{userInfo.numberOfPurchaseCategoriesTag || '点击修改希望采购品类'}}</view> <view slot="footer" class="{{userInfo.numberOfPurchaseCategoriesTag? 'text-black':'text-gray'}}">{{userInfo.numberOfPurchaseCategoriesTag || '点击修改希望采购品类'}}</view>
</wux-cell> </wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bindtap="toTab5">
<wux-cell wx:if="{{userType == 1}}" data-cid='type2' data-tag='希望出货品类'>
<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>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bindtap="toTab6">
<wux-cell wx:if="{{userType == 1}}" data-cid='type2' data-tag='希望出货品类'>
<view slot="header" class="text-gray">月出货量</view> <view slot="header" class="text-gray">月出货量</view>
<view slot="footer" class="{{userInfo.shipmentPerMonth? 'text-black':'text-gray'}}">{{userInfo.shipmentPerMonth || '点击月出货量'}}</view> <view slot="footer" class="{{userInfo.shipmentPerMonth? 'text-black':'text-gray'}}">{{userInfo.shipmentPerMonth || '点击月出货量'}}</view>
</wux-cell> </wux-cell>

Loading…
Cancel
Save