Commit a0181d1d authored by pengguangpu's avatar pengguangpu

添加首页;

parent 2c2350a2
{
"pages": [
"pages/poster/poster",
"pages/index/index",
"pages/home/home",
"pages/poster/poster",
"pages/waitoperate/waitoperate",
"pages/landscan/landscan",
"pages/payresult/payresult"
......
......@@ -20,5 +20,4 @@
</view>
</view>
</view>
\ No newline at end of file
/* home样式 */
.homePage {
......@@ -6,7 +5,7 @@
flex-direction: column;
width: 100%;
height: 100%;
background: #F3F7F9;
background: white;
/* border: 2px solid red; */
}
......@@ -26,28 +25,13 @@
width: auto;
}
.homeBodyView {
position: relative;
width: 100%;
height: 100%;
background: #ffffff;
.homeItemView {
width: 174rpx;
height: 148rpx;
/* border: 2px solid red; */
}
.homeGridItem {
/* box-sizing: border-box; */
display: flex;
flex-direction: column;
width: 96rpx;
align-items: center;
margin-top: 15rpx;
margin-bottom: 15rpx;
margin-left: 38rpx;
margin-right: 38rpx;
}
.homeItemImage {
width: 96rpx;
height: 96rpx;
}
.homeItemText {
......@@ -55,17 +39,30 @@
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 1);
line-height: 27rpx;
/* line-height: 27rpx; */
margin: 0 auto;
margin-top: 12rpx;
}
.homeBodyView {
position: relative;
width: 100%;
height: 100%;
/* background: #ffffff; */
/* border: 2px solid red; */
}
.homeItemImage {
width: 96rpx;
height: 96rpx;
}
/**
支付结果页样式css
*/
.topView {
position: relative;
width: 768rpx;
......
<view>
<view class="homePage" hidden="{{!pageShow['home']}}">
<view class="homeTopView">
<view class="topView">
<view class="store">
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
......@@ -10,20 +10,71 @@
<view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view>
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/>
</view>
</view>
<view class="homeBodyView">
<!-- 还需要加一层swiper -->
<view style="display:flex;flex-direction:row;position:relative;margin-top: 14rpx;margin-left: 32rpx;margin-right: 32rpx;">
<view class="homeGridItem" catchTap="sendGoToCollections">
<image mode="aspectFit" src="/images/collections.png" class="homeItemImage"/>
<view class="homeItemText">收银</view>
<view class="homeBodyView" style="height:100%;">
<swiper indicator-dots="{{true}}">
<swiper-item>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;">
<view class="homeItemView" onTap="sendGoToCollections">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/>
<text class="homeItemText">收银</text>
</view>
<view class="homeItemView" onTap="onHomeCashierImmediatelyClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/>
<text class="homeItemText">直接收款</text>
</view>
<view class="homeItemView" onTap="onHomeExchangeClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/>
<text class="homeItemText">兑换</text>
</view>
<view class="homeItemView" onTap="onHomePosterClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/>
<text class="homeItemText">海报</text>
</view>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/>
<text class="homeItemText">退款</text>
</view>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/>
<text class="homeItemText">打印上一单</text>
</view>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/>
<text class="homeItemText">核验</text>
</view>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/>
<text class="homeItemText">提货</text>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;">
<view class="homeItemView" onTap="onHomeDayCheckClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/>
<text class="homeItemText">日结</text>
</view>
<view class="homeItemView" onTap="onHomeAboutAppClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/>
<text class="homeItemText">关于系统</text>
</view>
<view class="homeItemView" onTap="onHomeSysSettingClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/>
<text class="homeItemText">系统设置</text>
</view>
<view class="homeItemView" onTap="onHomeAppSettingClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/>
<text class="homeItemText">应用设置</text>
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
<!--扫码页-->
<view hidden="{{!pageShow['landscan']}}">
......@@ -99,7 +150,6 @@
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view>
<!-- 结算页 -->
<view class="balance" hidden="{{!pageShow['waitoperate']}}">
<view class="balanceTopView">
......@@ -120,14 +170,12 @@
<view class="descText">商家优惠:</view>
<view class="totalCoupon">¥{{totalDisc}}</view>
</view>
<view style="position: absolute;display: flex;flex-direction: row;align-items: baseline;bottom:22rpx;left:0rpx;padding-left: 29rpx;">
<view class="descText">应收款:</view>
<view class="moneySign">¥</view>
<view class="payPrice">{{totalPrice}}</view>
<view class="descText">(共{{totalQuantity}}件)</view>
</view>
</view>
<view class="rightBody">
<view class="remindText">等待顾客付款…</view>
......@@ -138,7 +186,6 @@
</view>
</view>
</view>
<!--支付结果页-->
<view hidden="{{!pageShow['payresult']}}">
<!--top view-->
......
......@@ -145,9 +145,9 @@ Page({
});
context.goPage('payresult');
} else if(res.action == ACTION_GET_ACCOUNT){
} else if (res.action == ACTION_GET_ACCOUNT) {
context.setData({
storeName:res.data.storeName
storeName: res.data.storeName
});
}
}
......@@ -182,7 +182,7 @@ Page({
};
},
getAccountInfo(){
getAccountInfo() {
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: {
......@@ -200,6 +200,78 @@ Page({
});
},
/**首页相关 */
/**立即收款 */
onHomeCashierImmediatelyClicked() {
},
/**
* 兑换
*/
onHomeExchangeClicked() {
},
/**
* 海报
*/
onHomePosterClicked() {
},
/**
* 退款
*/
onHomeRefundClicked() {
},
/**
* 打印上一单
*/
onHomePrintLastOrderClicked() {
},
/**
* 核验
*/
onHomeVerifyClicked() {
},
/**
* 提货
*/
onHomePickUpGoodsClicked() {
},
/**日结 */
onHomeDayCheckClicked() {
},
/**关于系统(实际上是关于应用) */
onHomeAboutAppClicked() {
},
/**
* 系统设置
*/
onHomeSysSettingClicked() {
},
/**
* 应用设置
*/
onHomeAppSettingClicked() {
},
/**payresult页面逻辑方法 */
onReprint() {
//通知前屏重新打印
......@@ -423,15 +495,15 @@ Page({
})
},
waitOperateBack(){
waitOperateBack() {
//直接返回到扫码页面,并且通知前屏返回
this.goPage('landscan');
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: {
action:ACTION_GO_SCAN,
data:null
action: ACTION_GO_SCAN,
data: null
},
success: (res) => {
console.log("通知前屏跳转到结算页面 成功 ===》" + JSON.stringify(res));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment