Browse Source

no message

feature/v1.0
xpz2018 5 years ago
parent
commit
1e8596cc6f
6 changed files with 25 additions and 19 deletions
  1. 2
      api/saas.js
  2. 5
      pages/home/customer/index.js
  3. 2
      pages/home/customer/index.json
  4. 29
      pages/home/customer/index.wxml
  5. 4
      pages/login/index.js
  6. 2
      pages/process/order-price/index.wxml

2
api/saas.js

@ -27,7 +27,7 @@ const getPaperList = (params) => mGet(`/ztb-factory/factory/get/all-product`, pa
const getPaperPrice = (params) => mGet(`/ztb-factory/factory/get/product-price-list`, params, sconfig)
const savePaperPrice = (params) => mPost(`/ztb-factory/factory/save/product-price`, params, sconfig)
const updatePaperPrice = (params) => mPost(`/ztb-factory/factory/update/product-price`, params, sconfig)
const getCustomerList = (params) => mGet(`/ztb-factory/factory/wechat-applet/get/customer-list`, params, sconfig)
const getCustomerList = (params) => mGet(`/ztb-factory/factory/get/customer-list`, params, sconfig)
const editCustomer = (params) => mPost(`/ztb-factory/factory/edit/customer`, params, sconfig)
const deleteCustomer = (id) => mPost(`/ztb-factory/factory/delete/customer/${id}`, null, sconfig)
const getCustomerInfo = (id) => mPost(`/ztb-factory/factory/wechat-applet/get/customer-detail/${id}`, null, sconfig)

5
pages/home/customer/index.js

@ -76,7 +76,8 @@ Page({
this.setData({ requesting: false, loading: false })
util.showToast(err)
})
},
onSearch:function(){
this.onRefreshList()
}
})

2
pages/home/customer/index.json

@ -2,7 +2,7 @@
"usingComponents": {
"van-search": "/components/search/index",
"refresh-view": "/components/refresher/index",
"van-tabs": "/components/tabs/index",
"van-image": "/components/image/index",
"van-divider": "/components/divider/index",
"van-loading": "/components/loading/index",
"van-cell": "/components/cell/index"

29
pages/home/customer/index.wxml

@ -1,13 +1,14 @@
<!--pages/home/customer/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">客户列表</view>
<view slot="content">客户列表</view>
</cu-custom>
<van-search value="{{ form.name }}" shape="round" placeholder="请输入搜索关键词" use-action-slot bind:change="onChange">
<view slot="action" bind:tap="onSearch" style="padding: 0rpx 8rpx">搜索</view>
</van-search>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchCustomerList">
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}"
bind:scrolltolower="fetchCustomerList">
<view class="list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}">
<view style="margin-bottom:24px" wx:if="{{loading}}">
<van-loading type="spinner" size="32" />
@ -15,16 +16,20 @@
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image>
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
</view>
<view wx:else>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view class="bg-white" style="padding:0rpx 32rpx" wx:if="{{pageIndex>0}}">
<view style="height:2rpx;background-color:#f3f3f3"></view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<van-cell clickable wx:for="{{pageItem}}" wx:key="index">
<view slot="title" class="flex" style="margin-bottom:-12rpx">
<van-image round width="80rpx" height="80rpx" src="{{ item.avatarUrl || '/assets/image/ygImg.png' }}" />
<view style="margin-left:18rpx;width:100%">
<view class="text-sg text-bold">{{item.name || ''}}</view>
<view class="text-sm text-gray" style="line-height:32rpx">{{item.mobile || ('卡号:' + item.cardNo)}}</view>
</view>
</view>
</view>
<!--加载更多的UI-->
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}" custom-style="padding:0rpx 120rpx">
<van-loading type="spinner" size="16" wx:if="{{!finished}}" />
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</van-divider>
</van-cell>
</view>
<!--加载更多的UI-->
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}" custom-style="padding:0rpx 120rpx">
<van-loading type="spinner" size="16" wx:if="{{!finished}}" />
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</van-divider>
</refresh-view>

4
pages/login/index.js

@ -23,8 +23,8 @@ Page({
loging: false,
regist: false,
metaData: null,
// code: null,
code: '?mark=ztb_saas&QrCodeRecordId=554641854092677120'
code: null
// code: '?mark=ztb_saas&QrCodeRecordId=554641854092677120'
},
/************************************** 初始化登录流程 ********************************************/
onLoad: function (options) {

2
pages/process/order-price/index.wxml

@ -57,7 +57,7 @@
</van-cell>
<van-cell bind:click="paddingOrder">
<view slot="title" class="flex flex-justify">
<view class="text-black">是否无皮过磅</view>
<view class="text-black">无皮过磅</view>
<view class="flex flex-center">
<van-checkbox value="{{ form.isWithoutTare }}" icon-size="32rpx"></van-checkbox>
<view class="text-gray" style="margin-left:8rpx">{{ form.isWithoutTare ? '是' : '否'}}</view>

Loading…
Cancel
Save