Browse Source

小程序:商家端-商品添加api

panyong 2 years ago
parent
commit
50ed71dc3e

+ 4 - 0
htmldev/wxMini/app.wxss

@@ -255,3 +255,7 @@ view.footer-fixed-bottom button[type='default'] {
   line-height: 48rpx;
   background: transparent;
 }
+
+.van-picker {
+  --picker-confirm-action-color: #333;
+}

+ 2 - 2
htmldev/wxMini/custom-tab-bar/index.scss

@@ -1,5 +1,5 @@
 .tab-icon {
   display: block;
-  width: 40rpx;
-  height: 34rpx;
+  width: 44rpx;
+  height: 44rpx;
 }

BIN
htmldev/wxMini/image/home/media.png


BIN
htmldev/wxMini/image/home/new_goods.png


BIN
htmldev/wxMini/image/home/news.png


BIN
htmldev/wxMini/image/home/notice.png


BIN
htmldev/wxMini/image/home/vr.png


BIN
htmldev/wxMini/image/tabBar/home_0@2x.png


BIN
htmldev/wxMini/image/tabBar/home_1@2x.png


BIN
htmldev/wxMini/image/tabBar/mine_0@2x.png


BIN
htmldev/wxMini/image/tabBar/mine_1@2x.png


BIN
htmldev/wxMini/image/tabBar/news_0@2x.png


BIN
htmldev/wxMini/image/tabBar/news_1@2x.png


BIN
htmldev/wxMini/image/tabBar/partner_0@2x.png


BIN
htmldev/wxMini/image/tabBar/partner_1@2x.png


+ 2 - 2
htmldev/wxMini/pages/businessGoodsEdit/businessGoodsEdit.js

@@ -16,7 +16,7 @@ Page({
     // * 发售时间:不能低于当前创建时间
     form: {
       'product_img_url': [], // 商品主图
-      'product_rotation_img_list': [], // 商品轮播图
+      'product_rotation_img_list': [{"url":"https://tuotuoyinfu-oss.oss-cn-beijing.aliyuncs.com/images/user/bashi632322ffe57fa.jpg","formkey":"product_rotation_img_list"},{"url":"https://tuotuoyinfu-oss.oss-cn-beijing.aliyuncs.com/images/user/bashi632322ffe51c4.jpg","formkey":"product_rotation_img_list"},{"url":"https://tuotuoyinfu-oss.oss-cn-beijing.aliyuncs.com/images/user/bashi632322ffefa54.jpg","formkey":"product_rotation_img_list"},{"url":"https://tuotuoyinfu-oss.oss-cn-beijing.aliyuncs.com/images/user/bashi6323230067e26.png","formkey":"product_rotation_img_list"}], // 商品轮播图
       'product_detail_img_list': [], // 详情图
       'product_title': '测试商品', // 商品标题
       'product_category_id': 1, // 分类ID
@@ -31,7 +31,7 @@ Page({
     product_img_url_max: 1,
     product_rotation_img_list_max: 5,
     product_detail_img_list_max: 5,
-    show: true,
+    show: false,
     columns: ['杭州', '宁波', '温州', '嘉兴', '湖州']
   },
 

+ 8 - 0
htmldev/wxMini/pages/businessGoodsEdit/businessGoodsEdit.scss

@@ -38,6 +38,14 @@ label {
   }
 }
 
+.van-uploader__wrapper {
+  .van-uploader__preview {
+    &:nth-of-type(4n) {
+      margin: 0;
+    }
+  }
+}
+
 .photo {
   .value {
     display: flex;

+ 48 - 0
htmldev/wxMini/pages/businessGoodsEdit/businessGoodsEdit.wxml

@@ -130,6 +130,54 @@
             placeholder-class="placeholder"></input>
         </view>
       </view>
+
+      <view class="name">
+        <label>
+          <text>批发价</text>
+        </label>
+        <view class="value">
+          <input
+            value="{{form.product_all_price}}"
+            placeholder="输入批发价"
+            placeholder-class="placeholder"></input>
+        </view>
+      </view>
+
+      <view class="name">
+        <label>
+          <text>零售价</text>
+        </label>
+        <view class="value">
+          <input
+            value="{{form.product_price}}"
+            placeholder="输入零售价"
+            placeholder-class="placeholder"></input>
+        </view>
+      </view>
+
+      <view class="name">
+        <label>
+          <text>库 存</text>
+        </label>
+        <view class="value">
+          <input
+            value="{{form.product_count}}"
+            placeholder="输入库存"
+            placeholder-class="placeholder"></input>
+        </view>
+      </view>
+
+      <!--      <view class="name">-->
+      <!--        <label>-->
+      <!--          <text>状态</text>-->
+      <!--        </label>-->
+      <!--        <view class="value">-->
+      <!--          <input-->
+      <!--            value="{{form.product_spec}}"-->
+      <!--            placeholder=""-->
+      <!--            placeholder-class="placeholder"></input>-->
+      <!--        </view>-->
+      <!--      </view>-->
       <!-- 编 辑: edit 发 布: send-->
       <button
         class="btn-submit edit"

+ 7 - 6
htmldev/wxMini/pages/home/home.js

@@ -13,11 +13,12 @@ Page({
       '小程序上下滚动效果总结',
       '这是一行上下滚动的文字,文字最好短点,超过一行省略'
     ],
-    headerNav: [{
-      icon: 'partner@2x.png',
-      name: '供应商',
-      path: 'partner'
-    },
+    headerNav: [
+      {
+        icon: 'partner@2x.png',
+        name: '供应商',
+        path: 'partner'
+      },
       {
         icon: 'guide@2x.png',
         name: '采购指南',
@@ -29,7 +30,7 @@ Page({
         path: 'collection'
       },
       {
-        icon: '',
+        icon: 'news.png',
         name: '农事天地',
         path: 'news'
       }

+ 9 - 5
htmldev/wxMini/pages/home/home.wxml

@@ -30,8 +30,12 @@
   </view>
   <!-- 消息通知 -->
   <view class="news-section">
-    <image src=""></image>
-    <swiper vertical="{{true}}" interval="{{2000}}" circular="{{true}}" autoplay="{{true}}">
+    <image src="../../image/home/notice.png"></image>
+    <swiper
+      vertical="{{true}}"
+      interval="{{2000}}"
+      circular="{{true}}"
+      autoplay="{{true}}">
       <block wx:for="{{txtlist}}" wx:key="*this">
         <swiper-item>
           <view class="swiper-item {{item}}">{{item}}</view>
@@ -56,19 +60,19 @@
     <view>
       <image
         class="new-goods"
-        src=""
+        src="../../image/home/new_goods.png"
         data-page="newGoods"
         bind:tap="openMarketing"></image>
       <image
         class="vr"
         data-page="VR"
-        src=""
+        src="../../image/home/vr.png"
         bind:tap="openMarketing"></image>
     </view>
     <image
       class="media"
       data-page="media"
-      src=""
+      src="../../image/home/media.png"
       bind:tap="openMarketing"></image>
   </view>
   <view class="excellent-goods-title">优秀产品</view>

+ 1 - 3
htmldev/wxMini/pages/home/home.wxss

@@ -75,7 +75,7 @@
 .news-section image {
   width: 140rpx;
   height: 42rpx;
-  background: pink;
+  margin-bottom: 5rpx;
 }
 
 .news-section swiper {
@@ -140,13 +140,11 @@
 .marketing-wrap .vr {
   width: 339rpx;
   height: 194rpx;
-  background: pink;
 }
 
 .marketing-wrap .media {
   width: 100%;
   height: 175rpx;
-  background: pink;
 }
 
 .excellent-goods-title {