Commit 0b5ecca05775e6fb28f18c01743cb7bc35aa708e

Authored by wangfan
1 parent 9fd16c33

c端预定

  1 +// components/stat/stat.js
  2 +Component({
  3 + /**
  4 + * 组件的属性列表
  5 + */
  6 + properties: {
  7 + stat: {
  8 + type: Number,
  9 + value:4,
  10 + },
  11 + color:{
  12 + type:String,
  13 + value:'',
  14 + }
  15 + }
  16 + ,
  17 +
  18 + /**
  19 + * 组件的初始数据
  20 + */
  21 + data: {},
  22 +
  23 + /**
  24 + * 组件的方法列表
  25 + */
  26 + methods: {}
  27 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/stat/stat.wxml-->
  2 +<view class="stat">
  3 + <view class="bg" style="background-color: {{$color}};width: {{(stat/5)*100}}%"></view>
  4 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E9%95%82%E7%A9%BA%E6%98%9F%E6%98%9F.png"></image>
  5 +</view>
  1 +/* components/stat/stat.wxss */
  2 +.stat{
  3 + width: 168rpx;
  4 + height: 30rpx;
  5 + position: relative;
  6 + background-color: #E0E0E0;
  7 + overflow: hidden;
  8 +}
  9 +.stat .bg{
  10 + position: absolute;
  11 + left: 0;
  12 + width: 80%;
  13 + top:0;
  14 + height: 100%;
  15 + background-color: #F05522;
  16 + z-index: 1;
  17 +}
  18 +.stat image{
  19 + width: 100%;
  20 + height: 100%;
  21 + position: absolute;
  22 + left: 0;
  23 + top:0;
  24 + z-index: 2;
  25 +}
  1 +// pages/me/follow.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
  1 +{
  2 + "usingComponents": {}
  3 +}
  1 +<!--pages/me/follow.wxml-->
  2 +<text>pages/me/follow.wxml</text>
  1 +/* pages/me/follow.wxss */
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 "navigationBarTitleText":"一键订", 4 "navigationBarTitleText":"一键订",
5 "usingComponents": { 5 "usingComponents": {
6 "formids":"/components/formids/formids", 6 "formids":"/components/formids/formids",
  7 + "stat":"/components/stat/stat",
7 "nav":"/components/nav/nav" 8 "nav":"/components/nav/nav"
8 } 9 }
9 } 10 }
@@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@
19 <view class="name">陕西风味面馆</view> 19 <view class="name">陕西风味面馆</view>
20 <view class="ping flex-cc"> 20 <view class="ping flex-cc">
21 <view class="item flex-lr fen"> 21 <view class="item flex-lr fen">
22 - <view>*****</view>  
23 - <view>4.0分</view> 22 + <stat stat="2"></stat>
  23 + <view class="text">4.0分</view>
24 </view> 24 </view>
25 <view class="item">西北菜</view> 25 <view class="item">西北菜</view>
26 <view class="item">人均60元</view> 26 <view class="item">人均60元</view>
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <view class="block"> 63 <view class="block">
64 <view class="header flex-ll"> 64 <view class="header flex-ll">
65 <view class="line"></view> 65 <view class="line"></view>
66 - <view class="name">包间环境</view> 66 + <view class="name">推荐菜品</view>
67 </view> 67 </view>
68 <scroll-view 68 <scroll-view
69 scroll-y 69 scroll-y
@@ -81,3 +81,20 @@ @@ -81,3 +81,20 @@
81 </scroll-view> 81 </scroll-view>
82 </view> 82 </view>
83 </view> 83 </view>
  84 +<view class="footer flex-lr">
  85 + <view class="left flex-cc">
  86 + <formids class="flex-vc" url="/pages/customer/index">
  87 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E9%A6%96%E9%A1%B5.png"></image>
  88 + <view class="text">首页</view>
  89 + </formids>
  90 + <formids class="follow flex-vc" bindclick="follow">
  91 + <image src="http://qn.colorcun.com/custom/lite-online/image/%E6%94%B6%E8%97%8F.png"></image>
  92 + <view class="text">收藏</view>
  93 + </formids>
  94 + </view>
  95 + <view class="reserve">
  96 + <formids class="flex-vc" bindclick="reserve">
  97 + <view class="text">电话预定</view>
  98 + </formids>
  99 + </view>
  100 +</view>
@@ -48,6 +48,9 @@ @@ -48,6 +48,9 @@
48 margin-left: 0; 48 margin-left: 0;
49 padding-left: 0; 49 padding-left: 0;
50 } 50 }
  51 +.base .ping .fen .text{
  52 + margin-left: 10rpx;
  53 +}
51 .base .peitao{ 54 .base .peitao{
52 margin-top: 10rpx; 55 margin-top: 10rpx;
53 } 56 }
@@ -79,6 +82,10 @@ @@ -79,6 +82,10 @@
79 82
80 .block{ 83 .block{
81 padding: 80rpx 0 60rpx; 84 padding: 80rpx 0 60rpx;
  85 + border-bottom: 2rpx solid #F5F5F5;
  86 +}
  87 +.block:last-child{
  88 + border-width: 0;
82 } 89 }
83 .block .header{ 90 .block .header{
84 height: 44rpx; 91 height: 44rpx;
@@ -97,4 +104,47 @@ @@ -97,4 +104,47 @@
97 font-size: 24rpx; 104 font-size: 24rpx;
98 color: #FFFFFF; 105 color: #FFFFFF;
99 text-align: center; 106 text-align: center;
  107 +}
  108 +.footer{
  109 + height: 100rpx;
  110 + line-height: 100rpx;
  111 + box-shadow: 0 0 8rpx 0 #E0E0E0;
  112 + position: fixed;
  113 + bottom: 0;
  114 + left: 0;
  115 + right: 0;
  116 + background-color: #FFFFFF;
  117 +}
  118 +.footer .left{
  119 + width: 50%;
  120 + height: 100%;
  121 +}
  122 +.footer .left formids{
  123 + height: 70rpx;
  124 + line-height: 34rpx;
  125 +}
  126 +.footer .left image{
  127 + width: 36rpx;
  128 + height: 34rpx;
  129 + line-height: 34rpx;
  130 +}
  131 +.footer .left .text{
  132 + line-height: 28rpx;
  133 + height: 28rpx;
  134 + font-size: 20rpx;
  135 + margin-top: 8rpx;
  136 +}
  137 +.footer .follow{
  138 + margin-left: 110rpx;
  139 +}
  140 +.footer .reserve{
  141 + width: 50%;
  142 + height: 100%;
  143 + background-color: #242320;
  144 +}
  145 +.footer .reserve .text{
  146 + line-height: 42rpx;
  147 + height: 42rpx;
  148 + font-size: 30rpx;
  149 + color:#ffffff;
100 } 150 }