Browse Source

小程序:商户端

panyong 2 years ago
parent
commit
fa2bb5c7d6

+ 32 - 1
htmldev/wxMini/pages/businessHome/businessHome.js

@@ -3,7 +3,30 @@ Page({
   /**
    * 页面的初始数据
    */
-  data: {},
+  data: {
+    nav: [
+      {
+        icon: '',
+        name: '产品发布',
+        path: 'businessGoodsEdit'
+      },
+      {
+        icon: '',
+        name: '产品管理',
+        path: 'businessGoodsManage'
+      },
+      {
+        icon: '',
+        name: '视频管理',
+        path: 'businessVideoManage'
+      },
+      {
+        icon: '',
+        name: '互动消息',
+        path: 'businessLeavingAMessage'
+      }
+    ]
+  },
 
   /**
    * 生命周期函数--监听页面加载
@@ -59,5 +82,13 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+  handleNav(e) {
+    const { item } = e.currentTarget.dataset
+    const path = item.path
+
+    wx.navigateTo({
+      url: `/pages/${path}/${path}`
+    })
   }
 })

+ 113 - 0
htmldev/wxMini/pages/businessHome/businessHome.scss

@@ -52,6 +52,7 @@
   height: 329rpx;
   padding: 46rpx 0 33rpx;
   margin-top: 52rpx;
+  margin-bottom: 50rpx;
   border-radius: 32rpx;
   background: pink;
 
@@ -87,3 +88,115 @@
     color: rgba(157, 151, 177, 1);
   }
 }
+
+.excellent-goods-title {
+  position: relative;
+  left: 0;
+  top: 0;
+  display: flex;
+  align-items: center;
+  width: 690rpx;
+  padding-left: 24rpx;
+  line-height: 40rpx;
+  font-size: 36rpx;
+  font-weight: 500;
+  color: #1F1F39;
+
+  &:before {
+    content: '';
+    position: absolute;
+    left: 0;
+    top: 1rpx;
+    width: 14rpx;
+    height: 37rpx;
+    border-radius: 40rpx;
+    background: #91B379;
+  }
+
+  &:after {
+    content: '';
+    position: absolute;
+    right: 36rpx;
+    top: 0;
+    width: 40rpx;
+    height: 40rpx;
+    background: pink;
+  }
+}
+
+.nav-wrap {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 50rpx;
+  margin-bottom: 80rpx;
+
+  & > view {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    flex: 1;
+  }
+
+  image {
+    width: 104rpx;
+    height: 104rpx;
+    background: pink;
+  }
+
+  text {
+    margin-top: 30rpx;
+    line-height: 40rpx;
+    font-size: 28rpx;
+    color: rgba(37, 31, 57, 1);
+  }
+}
+
+.list {
+  display: flex;
+  margin-top: 40rpx;
+}
+
+.photo-wrap {
+  width: 82rpx;
+  height: 82rpx;
+  border-radius: 16rpx;
+  overflow: hidden;
+
+  image {
+    display: block;
+    width: 100%;
+    height: 100%;
+    background: pink;
+  }
+}
+
+.box {
+  width: 326rpx;
+  padding-left: 19rpx;
+}
+
+.goods-name {
+  width: 100%;
+  line-height: 48rpx;
+  font-size: 32rpx;
+  color: rgba(37, 31, 57, 1);
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.add-time {
+  margin-top: 6rpx;
+  line-height: 40rpx;
+  font-size: 24rpx;
+  color: rgba(157, 151, 177, 1);
+}
+
+.price {
+  width: 282rpx;
+  line-height: 40rpx;
+  font-size: 28rpx;
+  color: rgba(166, 166, 166, 1);
+  text-align: right;
+}

+ 24 - 0
htmldev/wxMini/pages/businessHome/businessHome.wxml

@@ -20,5 +20,29 @@
         <text class="check">查看详情</text>
       </view>
     </view>
+    <view class="excellent-goods-title">管理</view>
+    <view class="nav-wrap">
+      <view
+        wx:for="{{nav}}"
+        wx:key="index"
+        data-item="{{item}}"
+        bind:tap="handleNav">
+        <image src="{{item.icon}}"></image>
+        <text>{{item.name}}</text>
+      </view>
+    </view>
+    <view class="excellent-goods-title">我的发布</view>
+    <view class="main">
+      <view class="list">
+        <view class="photo-wrap">
+          <image src=""></image>
+        </view>
+        <view class="box">
+          <view class="goods-name">山东大瓜山东大瓜山东大瓜山东大瓜</view>
+          <view class="add-time">2022/03/17  19:20</view>
+        </view>
+        <view class="price">产品价格:¥9.99</view>
+      </view>
+    </view>
   </view>
 </view>

+ 0 - 1
htmldev/wxMini/pages/businessLeavingAMessage/businessLeavingAMessage.scss

@@ -1 +0,0 @@
-/* pages/businessLeavingAMessage/businessLeavingAMessage.wxss */

+ 0 - 2
htmldev/wxMini/pages/businessLeavingAMessage/businessLeavingAMessage.wxml

@@ -1,2 +0,0 @@
-<!--pages/businessLeavingAMessage/businessLeavingAMessage.wxml-->
-<text>pages/businessLeavingAMessage/businessLeavingAMessage.wxml</text>