Browse Source

no message

feature/v1.0
xpz2018 5 years ago
parent
commit
83fa9a3c57
11 changed files with 90 additions and 26 deletions
  1. 1
      app.json
  2. 66
      pages/home/customer/index.js
  3. 3
      pages/home/customer/index.json
  4. 4
      pages/home/customer/index.wxml
  5. 1
      pages/home/customer/index.wxss
  6. 6
      pages/home/index/index.js
  7. 12
      pages/home/index/index.wxml
  8. 2
      pages/index/index.js
  9. 8
      pages/message/index/index.js
  10. 11
      pages/message/index/index.wxml
  11. 2
      pages/process/order-info/index.js

1
app.json

@ -4,6 +4,7 @@
"pages/index/index",
"pages/home/mobile/index",
"pages/home/employee/index",
"pages/home/customer/index",
"pages/home/authory/index",
"pages/process/order-list/index",
"pages/process/order-price/index",

66
pages/home/customer/index.js

@ -0,0 +1,66 @@
// pages/home/customer/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/home/customer/index.json

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

4
pages/home/customer/index.wxml

@ -0,0 +1,4 @@
<!--pages/home/customer/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">客户列表</view>
</cu-custom>

1
pages/home/customer/index.wxss

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

6
pages/home/index/index.js

@ -1,6 +1,7 @@
// pages/stock/index.js
import Dialog from '../../../components/dialog/dialog'
import { finalizeToken } from "../../../api/user"
import { getBaseInfo } from "../../../api/saas"
const util = require('../../../utils/util')
const event = require('../../../utils/event')
const storage = require('../../../utils/storage')
@ -39,14 +40,13 @@ Component({
onEvent: function (message) {
if (message.what == 82) {
// 认证成功
} else if (message.what == 888) {
this.setData({creditInfo: { availableCreditLine: 0, creditLine: 0, usedCreditLine: 0.00 }})
}
},
setUserInfo: function(){
if(!app.userInfo){
return
}
var nickname = ''
if(app.userInfo.isAuth) {
nickname = app.userInfo.realName.substring(0, 14)
@ -74,7 +74,7 @@ Component({
wx.navigateTo({ url: '/pages/mall/order-list/index' })
},
loginOut: function () {
Dialog.confirm({ title: '温馨提示', message: '确定退出云印通账号?' }).then(() => {
Dialog.confirm({ title: '温馨提示', message: '确定退出纸通宝账号?' }).then(() => {
storage.remove('Authorization')
app.globalData.token = null
app.userInfo = null

12
pages/home/index/index.wxml

@ -51,16 +51,16 @@
<!-- 企业信息 -->
<view style="height:16rpx"></view>
<van-cell-group>
<van-cell is-link link-type="navigateTo" url="/pages/enterprise/index/index" wx:if="{{userInfo.enterpriseId && userInfo.position != 'ORDINARY'}}">
<van-cell is-link link-type="navigateTo" url="/pages/home/employee/index" wx:if="{{userInfo.enterpriseId && userInfo.position != 'ORDINARY'}}">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="wap-home-o" size="18" />
<text class="text-sg" style="margin-left:12rpx">我的企业</text>
<van-icon name="contact" size="18"/>
<text class="text-sg" style="margin-left:12rpx">员工管理</text>
</view>
</van-cell>
<van-cell is-link link-type="navigateTo" url="/pages/htmls/saas/index" wx:if="{{!userInfo.enterpriseId}}">
<van-cell is-link link-type="navigateTo" url="/pages/home/customer/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="wap-home-o" size="18" />
<text class="text-sg" style="margin-left:12rpx">申请企业入驻</text>
<van-icon name="user-circle-o" size="18"/>
<text class="text-sg" style="margin-left:12rpx">客户管理</text>
</view>
</van-cell>
<van-cell is-link bind:click="loginOut">

2
pages/index/index.js

@ -28,7 +28,7 @@ Page({
/************************************** 生命周期函数--监听页面初次渲染完成 ********************************************/
onShow: function () {
var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value)
if (pageView && this.data.inited) {
if (pageView) {
pageView.onRestart()
}
},

8
pages/message/index/index.js

@ -12,7 +12,7 @@ Component({
* 页面的初始数据
*/
data: {
height: app.globalData.safeFragmentHeight - 190,
height: app.globalData.safeFragmentHeight - 100,
CustomBar: app.globalData.CustomBar,
userInfo: null,
firstShow: false,
@ -39,9 +39,9 @@ Component({
if (this.data.firstShow) {
return
}
this.setData({ height: app.globalData.safeFragmentHeight - 190, CustomBar: app.globalData.CustomBar, userInfo: app.accountInfo })
this.fetchCategoryList()
this.fetchOrderList()
this.setData({ height: app.globalData.safeFragmentHeight - 100, CustomBar: app.globalData.CustomBar })
// this.fetchCategoryList()
// this.fetchOrderList()
this.data.firstShow = true
},
onEvent: function (message) {

11
pages/message/index/index.wxml

@ -4,17 +4,6 @@
<view slot="content" style="color:black;font-size:36rpx" wx:else>消息</view>
</cu-custom>
<view class="bg-white" style="height:90rpx;" wx:if="{{tabList.length}}">
<van-tabs sticky active="{{tabIndex}}" color="#008AFF" bind:change="onTabChange" line-height="2px" swipe-threshold="6">
<van-tab wx:for="{{tabList}}" wx:key="index" title="{{item.name}}" title-style="color:{{tabIndex==index?'#008AFF':'#333333'}}"></van-tab>
</van-tabs>
</view>
<view wx:else class="bg-white" style="height:90rpx;padding: 10rpx 32rpx">
<skeleton active>
<skeleton-avatar shape="rounded" size="tab" />
</skeleton>
</view>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchOrderList">
<van-search disabled shape="round" placeholder="请输入要搜索的商品" bindtap="searchList"/>
<view class="list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}">

2
pages/process/order-info/index.js

@ -1,6 +1,6 @@
// pages/process/order-check/index.js
import Dialog from '../../../components/dialog/dialog'
import { cancelOrder, getFactoryOrderInfo, checkingOrder} from "../../../api/saas"
import { repeatOrder, getFactoryOrderInfo, checkingOrder} from "../../../api/saas"
const event = require('../../../utils/event')
const math = require('../../../utils/math')
const util = require('../../../utils/util')

Loading…
Cancel
Save