Browse Source

首页UI完成

master
chenxuhui 7 years ago
parent
commit
9971e51f87
6 changed files with 90 additions and 24 deletions
  1. +2
    -1
      app.json
  2. BIN
      imgs/customerCheck.png
  3. BIN
      imgs/saleOutStore.png
  4. +5
    -1
      pages/homePage/homePage.js
  5. +35
    -18
      pages/homePage/homePage.wxml
  6. +48
    -4
      pages/homePage/homePage.wxss

+ 2
- 1
app.json View File

@ -22,6 +22,7 @@
"disableScroll": true
},
"tabBar": {
"borderStyle": "white",
"selectedColor": "#f98b29",
"color": "#999999",
"list": [
@ -33,7 +34,7 @@
},
{
"pagePath": "pages/homePage/homePage",
"text": "主页",
"text": "消息",
"iconPath": "/imgs/message1.png",
"selectedIconPath": "/imgs/message.png"
},


BIN
imgs/customerCheck.png View File

Before After
Width: 140  |  Height: 140  |  Size: 8.4 KiB

BIN
imgs/saleOutStore.png View File

Before After
Width: 140  |  Height: 140  |  Size: 8.4 KiB Width: 140  |  Height: 140  |  Size: 10 KiB

+ 5
- 1
pages/homePage/homePage.js View File

@ -1,6 +1,8 @@
// pages/homePage/homePage.js
var network = require("../../utils/net.js")
var timechage = require("../../utils/dateTimeUtil.js")
function GetUserProfile(successtion) {
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetUserProfile';
let params = [];
@ -21,10 +23,12 @@ function GetUserProfile(successtion) {
Page({
data: {
currentDate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y/M/D'),
balance:"",
},
onLoad: function (options) {
// 添加接口请求当前余额
// GetUserProfile(function (res) {
// });


+ 35
- 18
pages/homePage/homePage.wxml View File

@ -1,24 +1,41 @@
<!--pages/homePage/homePage.wxml-->
<view class='imageContainer'>
<image class='beijingtu' src='/imgs/beijingtu.png'></image>
</view>
<view class="body-box">
<view class="ico" catchtap='transBtnClicked' data-itemid='1'>
<image src="/imgs/findDriver.png"></image>
<text class='text'>找司机</text>
<image class='beijingtu' src='/imgs/beijingtu.png'>
<view class='dateView'>
<text class='dateText'>{{currentDate}}</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='2'>
<image src="/imgs/statementOfAccount.png"></image>
<text class='text'>对账单</text>
<view class='totalMoneyView'>
<text class='totalMoney'>当前余额</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='3'>
<image src="/imgs/orderList.png"></image>
<text class='text'>订单</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='4'>
<image src="/imgs/saleOutStore.png"></image>
<text class='text'>销售出库</text>
<view class='balanceView'>
<text class='balance'>¥2032323{{balance}}</text>
</view>
</image>
</view>
<view class="body-box">
<view class="ico" catchtap='transBtnClicked' data-itemid='1'>
<image src="/imgs/saleForecast.png"></image>
<text class='text'>销售预报</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='2'>
<image src="/imgs/orderList.png"></image>
<text class='text'>销售订单</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='3'>
<image src="/imgs/findDriver.png"></image>
<text class='text'>客户找车</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='4'>
<image src="/imgs/saleOutStore.png"></image>
<text class='text'>销售出库</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='5'>
<image src="/imgs/customerCheck.png"></image>
<text class='text'>客户验收</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='6'>
<image src="/imgs/statementOfAccount.png"></image>
<text class='text'>客户对账</text>
</view>
</view>

+ 48
- 4
pages/homePage/homePage.wxss View File

@ -5,15 +5,59 @@ page{
height: 100%;
}
.imageContainer{
/* .imageContainer{
width: 100%;
height: 280rpx;
background-color: #2E8CF5;
} */
.imageContainer {
height: 350rpx;
position: relative;
align-items: center;
}
.beijingtu{
width: 100%;
height: 100%;
.beijingtu {
width: 100%;
height: 100%;
}
.dateView{
position: absolute;
top: 0;
left: 20rpx;
text-align: left;
}
.dateText{
color: white;
font-size: 18px;
}
.totalMoneyView {
position: absolute;
width: 100%;
/* height: 100%; */
top: 100rpx;
text-align: center;
}
.balanceView {
position: absolute;
width: 100%;
/* height: 100%; */
top: 150rpx;
text-align: center;
}
.totalMoney {
color: white;
font-size: 20px;
}
.balance {
color: white;
font-size: 30px;
}
.body-box{


Loading…
Cancel
Save