Browse Source

小程序:购物车

panyong 2 years ago
parent
commit
6126e0c0ae

+ 197 - 0
htmldev/wxMini/pages/contactBusiness/contactBusiness.scss

@@ -0,0 +1,197 @@
+.wrapper {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 34rpx 0 68rpx;
+}
+
+.list {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  margin-bottom: 40rpx;
+}
+
+.icon-wrap {
+  display: flex;
+  width: 114rpx;
+  padding-left: 30rpx;
+
+  image {
+    width: 34rpx;
+    height: 32rpx;
+    background: pink;
+  }
+}
+
+.goods-wrap {
+  display: flex;
+  align-items: center;
+  width: calc(100% - 114rpx);
+}
+
+.photo-wrap {
+  width: 202rpx;
+  height: 194rpx;
+  border-radius: 20rpx;
+  overflow: hidden;
+
+  image {
+    display: block;
+    width: 100%;
+    height: 100%;
+    background: pink;
+  }
+}
+
+.info {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  width: calc(100% - 202rpx);
+  min-height: 194rpx;
+  padding: 0 30rpx 0 50rpx;
+}
+
+.name-wrap {
+  display: flex;
+  flex-direction: column;
+}
+
+.goods-name {
+  width: 100%;
+  font-size: 32rpx;
+  line-height: 46rpx;
+  color: rgba(0, 28, 51, 1);
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.partner-name {
+  width: 100%;
+  font-size: 24rpx;
+  line-height: 34rpx;
+  color: rgba(163, 163, 163, 1);
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.price {
+  margin-top: 10rpx;
+  font-size: 28rpx;
+  line-height: 32rpx;
+  color: rgba(0, 28, 51, 1);
+}
+
+.count-wrap {
+  display: flex;
+  align-items: center;
+}
+
+.count {
+  min-width: 69rpx;
+  font-size: 24rpx;
+  line-height: 30rpx;
+  color: rgba(0, 28, 51, 1);
+  text-align: center;
+}
+
+.del,
+.add {
+  width: 38rpx;
+  height: 36rpx;
+  background: pink;
+}
+
+.business-info {
+  width: 100%;
+
+  .label {
+    width: 100%;
+    padding-left: 36rpx;
+    font-size: 36rpx;
+    line-height: 52rpx;
+    color: rgba(0, 28, 51, 1);
+  }
+
+  .value {
+    display: flex;
+    align-items: center;
+    width: 100%;
+    padding-left: 36rpx;
+    margin-top: 24rpx;
+  }
+
+  .icon-map {
+    width: 112rpx;
+    height: 112rpx;
+    border-radius: 16rpx;
+    background: pink;
+  }
+
+  .address-wrap {
+    width: 515rpx;
+    padding: 0 80rpx 0 32rpx;
+  }
+
+  .address {
+    width: 100%;
+    font-size: 26rpx;
+    line-height: 40rpx;
+    color: rgba(0, 28, 51, 1);
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+
+  .phone {
+    margin-top: 8rpx;
+    font-size: 24rpx;
+    line-height: 28rpx;
+    color: rgba(163, 163, 163, 1);
+  }
+
+  .icon-arrow {
+    width: 15rpx;
+    height: 27rpx;
+    background: pink;
+  }
+}
+
+.qrcode {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 542rpx;
+  height: 542rpx;
+  margin-top: 108rpx;
+  border-radius: 20rpx;
+  box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1);
+
+  image {
+    width: 468rpx;
+    height: 468rpx;
+    border-radius: 20rpx;
+    overflow: hidden;
+    background: pink;
+  }
+}
+
+.tip {
+  margin-top: 26rpx;
+  font-size: 24rpx;
+  line-height: 34rpx;
+  color: rgba(163, 163, 163, 1);
+}
+
+button.btn-business[type="primary"] {
+  width: 627rpx;
+  height: 80rpx;
+  margin-top: 250rpx;
+  border-radius: 88rpx;
+  background: rgba(145, 179, 121, 1);
+  font-size: 36rpx;
+  font-weight: 500;
+}

+ 60 - 0
htmldev/wxMini/pages/contactBusiness/contactBusiness.wxml

@@ -0,0 +1,60 @@
+<view class="wrapper">
+  <view
+    class="list"
+    wx:for="{{[1]}}"
+    wx:key="item">
+    <view
+      class="icon-wrap">
+      <image
+        src=""
+        hidden="{{true}}"></image>
+      <image
+        src=""
+        hidden="{{false}}"></image>
+    </view>
+    <view
+      class="goods-wrap">
+      <view class="photo-wrap">
+        <image src=""></image>
+      </view>
+      <view class="info">
+        <view class="name-wrap">
+          <text
+            class="goods-name">名字名字名字名字名字名字名字名字名字名字名字</text>
+          <text
+            class="partner-name"
+            user-select>上三村合作社名字名字名字名字名字名字名字名字名字名字名字</text>
+          <text class="price">¥12.00</text>
+        </view>
+        <view class="count-wrap">
+          <image
+            class="del"
+            src=""></image>
+          <text class="count">9</text>
+          <image
+            class="add"
+            src=""></image>
+        </view>
+      </view>
+    </view>
+  </view>
+  <view class="business-info">
+    <view class="label">商家信息</view>
+    <view class="value">
+      <image class="icon-map" src=""></image>
+      <view class="address-wrap">
+        <view class="address">地址:浙江省杭州市余杭区道浙江省杭州市余杭区道浙江省杭州市余杭区道浙江省杭州市余杭区道</view>
+        <text class="phone" user-select>12345678910</text>
+      </view>
+      <image class="icon-arrow" src=""></image>
+    </view>
+  </view>
+  <view class="qrcode">
+    <image src=""></image>
+  </view>
+  <view class="tip">长按扫码,添加微信</view>
+  <button
+    class="btn-business"
+    type="primary">点击联系
+  </button>
+</view>