lmj 2 år sedan
förälder
incheckning
1761ba5c2e

+ 9 - 2
app.json

@@ -2,7 +2,8 @@
   "pages": [
     "pages/index/index",
     "pages/logs/logs",
-    "pages/success/paySuccess"
+    "pages/success/paySuccess",
+    "pages/business/business"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -15,6 +16,12 @@
     "van-button": "@vant/weapp/button/index",
     "van-empty": "@vant/weapp/empty/index",
     "van-row": "@vant/weapp/row/index",
-    "van-col": "@vant/weapp/col/index"
+    "van-col": "@vant/weapp/col/index",
+    "van-search": "@vant/weapp/search/index",
+    "van-card": "@vant/weapp/card/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-tag": "@vant/weapp/tag/index",  
+    "van-tabbar": "@vant/weapp/tabbar/index",
+    "van-tabbar-item": "@vant/weapp/tabbar-item/index"
   }
 }

+ 22 - 0
pages/business/business.js

@@ -0,0 +1,22 @@
+Page({
+  data: {
+    value: '',
+    active:0,
+    imageURL:"https://img2.baidu.com/it/u=2170808470,2611792870&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375"
+  },
+  onChange(event) {
+    // event.detail 的值为当前选中项的索引
+    this.setData({ active: event.detail });
+  },
+  onChange(e) {
+    this.setData({
+      value: e.detail,
+    });
+  },
+  onSearch() {
+    Toast('搜索' + this.data.value);
+  },
+  onClick() {
+    Toast('搜索' + this.data.value);
+  },
+});

+ 4 - 0
pages/business/business.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "商户"
+}

+ 103 - 0
pages/business/business.wxml

@@ -0,0 +1,103 @@
+<view>
+  <view>
+    <van-search value="{{ value }}" placeholder="麻辣烫" use-action-slot bind:change="onChange" bind:search="onSearch" background="#FFA500" shape="round">
+      <view slot="action" bind:tap="onClick">搜索</view>
+    </van-search>
+    <view class="con">
+      <view class="content">
+        <van-card desc="起送¥15 货到付款" title="二食堂二楼麻辣烫麻辣香..." thumb="{{ imageURL }}" />
+        <view class="gg">
+          公告:麻辣烫调科辣烫没有麻辣烫调料麻辣烫调料麻辣烫
+        </view>
+        <view class="time">
+          30分钟
+        </view>
+        <view class="business">
+          <van-icon color="green" name="phone-circle" />店家
+        </view>
+
+      </view>
+
+
+    </view>
+  </view>
+</view>
+<view class="under">
+  <view class="one">
+    <van-card origin-price="28.8" price="10.98+40积分" desc="包含香菜、菠菜、面、豆芽、海带" title="麻辣烫微辣" thumb="{{ imageURL }}">
+
+    </van-card>
+
+    <view class="shop">
+      <van-tag type="danger">优惠商品</van-tag>
+    </view>
+    <view class="num">
+      限购2份
+    </view>
+    <view class="add">
+      <van-icon name="add" /> 
+      2
+      <van-icon name="add" />
+    </view>
+  </view>
+  <view class="one">
+    <van-card origin-price="28.8" price="10.98+40积分" desc="包含香菜、菠菜、面、豆芽、海带" title="麻辣烫微辣" thumb="{{ imageURL }}">
+
+    </van-card>
+
+    <view class="shop">
+      <van-tag type="danger">优惠商品</van-tag>
+    </view>
+    <view class="num">
+      限购2份
+    </view>
+    <view class="add">
+      <van-icon name="add" /> 
+      2
+      <van-icon name="add" />
+    </view>
+  </view>
+  <view class="one">
+    <van-card price="19.98" desc="包含香菜、菠菜、面、豆芽、海带" title="麻辣烫微辣" thumb="{{ imageURL }}">
+
+    </van-card>
+
+    <view class="add">
+
+      <van-icon name="add" />
+    </view>
+  </view>
+  <view class="one">
+    <van-card price="19.98" desc="包含香菜、菠菜、面、豆芽、海带" title="麻辣烫微辣" thumb="{{ imageURL }}">
+
+    </van-card>
+
+    <view class="add">
+
+      <van-icon name="add" />
+    </view>
+  </view>
+
+
+</view>
+
+<view class="tab">
+  <van-tabbar active="{{ active }}" bind:change="onChange">
+  <view class="car">
+      <van-icon name="shopping-cart" />
+  </view>
+  <view class="sum">
+    ¥10.98+40积分
+  </view>
+  <view class="mony">
+    共优惠¥10.0
+  </view>
+  <view class="fill"> 
+    货款费¥0
+  </view>
+  <view class="button">
+    <van-button round type="primary" color="#FFA500">去结算</van-button>
+
+  </view>
+</van-tabbar>
+</view>

+ 91 - 0
pages/business/business.wxss

@@ -0,0 +1,91 @@
+.con{
+  height: 240rpx;
+  background-color: #FFA500;
+}
+.content{
+  width: 650rpx;
+  margin: 0 auto;
+  position: relative;
+}
+.gg{
+  float: left;
+  font-size: 10px;
+  position: absolute;
+  top: 50px;
+  left: 110px;
+  width: 300rpx;
+}
+.time{
+  position: absolute;
+  float: left;
+  height: 40rpx;
+  width: 90rpx;
+  font-size: 10px;
+  line-height: 40rpx;
+  text-align: center;
+  background-color: #FFA500;
+  top: 55rpx;
+  left: 550rpx;
+}
+.business{
+  float: left;
+  position: absolute;
+  font-size: 10px;
+  color: green;
+  top: 135rpx;
+  left: 555rpx;
+}
+.under{
+  height: 1000rpx;
+  background-color: rgb(223, 218, 218);
+}
+.one{
+  float: left;
+  width: 750rpx;
+  padding-top: 15rpx;
+  position: relative;
+}
+.shop{
+  position: absolute;
+  top: 25rpx;
+  left: 410rpx;
+}
+.num{
+  position: absolute;
+  font-size: 10px;
+  color: #FFA500;
+  top: 155rpx;
+  left: 655rpx;
+}
+.add{
+  position: absolute;
+  color: #FFA500;
+  top: 200rpx;
+  left: 620rpx;
+}
+.car{
+  color: red;
+  font-size: 40px;
+  margin-left: 20rpx;
+}
+.sum{
+  color: red;
+  margin-top: 20rpx;
+  margin-left: 10rpx;
+}
+.mony{
+  color: red;
+  font-size: 12px;
+  margin-top: 64rpx;
+  margin-left:-275rpx ;
+}
+.fill{
+ font-size: 12px;
+  color: rgb(59, 58, 56);
+  margin-top: 64rpx;
+  margin-left:15rpx ;
+}
+.button{
+  margin-left: 100rpx;
+}
+

BIN
pages/image/pay.png


+ 2 - 1
pages/success/paySuccess.json

@@ -1,3 +1,4 @@
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText": "支付成功"
 }

+ 7 - 0
project.private.config.json

@@ -13,6 +13,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "商户",
+          "pathName": "pages/business/business",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }