index.wxml 2.71 KB
Newer Older
张杰's avatar
张杰 committed
1
<!--template/operate_btn/index.wxml-->
张杰's avatar
张杰 committed
2
<!-- 通用的操作按钮 -->
张杰's avatar
张杰 committed
3
<template name="operate_btn">
张杰's avatar
张杰 committed
4
  <view style='position:fixed;bottom: 0rpx;height:140rpx;background-color:white;'>
张杰's avatar
张杰 committed
5 6 7 8
    <view class='kg-separater' style='height:4rpx;'></view>
    <view class='kg-operate-btn-bg'>
      <button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>{{title}}</button>
    </view>
张杰's avatar
张杰 committed
9
  </view>
张杰's avatar
张杰 committed
10 11
</template>

张杰's avatar
张杰 committed
12
<!--通用的分区标题-->
张杰's avatar
张杰 committed
13
<template name='section_header'>
张杰's avatar
张杰 committed
14
  <view class='kg-section-header'>
张杰's avatar
张杰 committed
15
    <view style='width:10rpx; height:33rpx;background-color:#f9aa76; margin-left:20rpx'></view>
张杰's avatar
张杰 committed
16 17
    <view class='kg-text-normal-gray' style='margin-left:16rpx'>{{title}}</view>
  </view>
张杰's avatar
张杰 committed
18 19
</template>

张杰's avatar
张杰 committed
20
<!-- 添加记录的cell -->
张杰's avatar
张杰 committed
21
<template name='quantity_cell'>
张杰's avatar
张杰 committed
22
  <view class='kg-flex-row '>
张杰's avatar
张杰 committed
23
    <view class='g-text-normal-dark'>张小华</view>
张杰's avatar
张杰 committed
24
    <!-- 输入型cell -->
张杰's avatar
张杰 committed
25 26
    <view class='kg-flex-row' hidden="{{type != 'input'}}">
      <input class='kg-border' style='width:140rpx;margin-right:10rpx;'></input>
张杰's avatar
张杰 committed
27
      <view class='kg-text-normal-gray'>{{unit}}</view>
张杰's avatar
张杰 committed
28
    </view>
张杰's avatar
张杰 committed
29
    <!-- 选择型cell -->
张杰's avatar
张杰 committed
30
    <view class='kg-flex-row' hidden="{{type != 'select'}}">
张杰's avatar
张杰 committed
31 32
      <view wx:for="{{options}}">
        <view class="eat_category_btn {{selectIndex == index ? 'selected' : ''}}" bindtap='tap' data-index='{{index}}' style='width: 120rpx;margin-right: 0rpx;margin-bottom: 0rpx;margin-left:20rpx;'>{{item}}</view>
张杰's avatar
张杰 committed
33 34 35
      </view>
    </view>
  </view>
张杰's avatar
张杰 committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
</template>

<!-- 
用户信息
输入参数:
userImg:用户图片
sex:性别 f/m (女性/男性)
title:标题
subTitle:副标题

-->
<template name='userInfo'>
  <view class='kg-flex-row'>
    <image class='kg-user-icon' src='{{userImg}}'></image>
    <view class='kg-flex-column' style='margin-left: 16rpx;height: 120rpx;'>
张杰's avatar
张杰 committed
51
      <view class='kg-flex-row' style='justify-content:flex-start;'>
张杰's avatar
张杰 committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
        <view class='kg-text-title'>{{title}}</view>
        <template is="sex" data="{{sex:sex}}"></template>
      </view>
      <view class='kg-text-normal-gray'>{{subTitle}}</view>
    </view>
  </view>
</template>

<!-- 
性别
sex:性别 f/m (女性/男性)
 -->
<template name='sex'>
  <view class='kg-flex-row'>
    <view wx:if="{{sex == 'f'}}">
      <image class='kg-sex-icon' src='/src/img/female.png' mode='aspectFit'></image>
    </view>
    <view wx:elif="{{sex == 'm'}}">
      <image class='kg-sex-icon' src='/src/img/male.png' mode='aspectFit'></image>
    </view>
  </view>
</template>
张杰's avatar
张杰 committed
74

张杰's avatar
张杰 committed
75 76
<!-- 图片+文字 -->
<template name='imgTextView'>
张杰's avatar
张杰 committed
77
  <view class='kg-flex-row' style='justify-content: flex-start;height:60rpx;'>
张杰's avatar
张杰 committed
78 79 80
    <image src='/src/img/{{img}}.png' style='width: 50rpx;height: 40rpx;'></image>
    <text class='kg-text-normal-dark' style='margin-left:10rpx'>{{text}}</text>
  </view>
张杰's avatar
张杰 committed
81
</template>