Browse Source

Merge branch 'edit' into sit

戴艳蓉 3 years ago
parent
commit
eec1a30b92

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-319f756b.3de48d36.css


+ 1 - 0
dist/static/css/chunk-70a4c942.a122804c.css

@@ -0,0 +1 @@
+.paddy[data-v-3af2b734]{overflow:scroll}.paddy .top[data-v-3af2b734]{width:100%;margin:0 auto}.paddy .top img[data-v-3af2b734]{width:100%}.paddy .detail[data-v-3af2b734]{width:90%;margin:0 auto}.paddy .detail img[data-v-3af2b734]{width:100%;padding-bottom:20px}.paddy .middle[data-v-3af2b734]{width:90%;margin:0 auto;padding-bottom:20px}.paddy .middle img[data-v-3af2b734]{width:100%}.paddy .bottom[data-v-3af2b734]{width:100%;overflow:hidden;margin:0 auto}.paddy .bottom img[data-v-3af2b734]{width:100%}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-85ae62f4.827768f0.css


BIN
dist/static/img/paddy-detail.b67d8288.png


BIN
dist/static/img/paddy-title.7e5d6260.png


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.2b335b66.js


BIN
dist/static/js/app.2b335b66.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-319f756b.81a0d6af.js


+ 1 - 0
dist/static/js/chunk-70a4c942.9a0ed4b8.js

@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-70a4c942"],{4502:function(t,a,n){t.exports=n.p+"static/img/paddy-title.7e5d6260.png"},"48d5":function(t,a,n){t.exports=n.p+"static/img/paddy-middle.4673b03b.png"},"4aa2":function(t,a,n){"use strict";n.r(a);var i,c=n("5908"),s=n.n(c);for(i in c)["default"].indexOf(i)<0&&function(t){n.d(a,t,(function(){return c[t]}))}(i);a.default=s.a},5908:function(t,a){},"5f83":function(t,a,n){},"827b":function(t,a,n){t.exports=n.p+"static/img/paddy-bottom.8121bb17.png"},caa7:function(t,a,n){t.exports=n.p+"static/img/paddy-detail.b67d8288.png"},caed:function(t,a,n){t.exports=n.p+"static/img/paddy.62f9c076.png"},d97f:function(t,a,n){"use strict";n.d(a,"a",(function(){return i})),n.d(a,"b",(function(){return c}));var i=function(){var t=this;t.$createElement;return t._self._c,t._m(0)},c=[function(){var t=this.$createElement;t=this._self._c||t;return t("div",{staticClass:"paddy",staticStyle:{background:"#fff"}},[t("div",{staticClass:"top"},[t("img",{attrs:{src:n("caed"),alt:""}})]),t("div",{staticClass:"detail"},[t("img",{attrs:{src:n("4502"),alt:""}}),t("img",{attrs:{src:n("caa7"),alt:""}})]),t("div",{staticClass:"middle"},[t("img",{attrs:{src:n("48d5"),alt:""}})]),t("div",{staticClass:"bottom"},[t("img",{attrs:{src:n("827b"),alt:""}})])])}]},f01a:function(t,a,n){"use strict";n.r(a);var i,c=n("d97f"),s=n("4aa2");for(i in s)["default"].indexOf(i)<0&&function(t){n.d(a,t,(function(){return s[t]}))}(i);n("f8dc");var d=n("2877");c=Object(d.a)(s.default,c.a,c.b,!1,null,"3af2b734",null);a.default=c.exports},f8dc:function(t,a,n){"use strict";n("5f83")}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-85ae62f4.25aa24bd.js


BIN
src/assets/images/home/paddy-detail.png


BIN
src/assets/images/home/paddy-title.png


+ 1 - 15
src/views/login/index.vue

@@ -22,7 +22,7 @@
               <van-col span="5" style="width: 42px">
                 <div class="myCard">CJ1745</div>
               </van-col>
-              <van-col span="19">
+              <van-col span="19" style="width: calc(100% - 42px)">
                 <van-field
                   size="large"
                   v-model="form.mobile"
@@ -294,24 +294,10 @@ export default {
             color: #333333;
             font-size: 16px;
             font-weight: bolder;
-            // width: 54px;
-            // text-align: center;
-            // line-height: 50px;
-            // vertical-align: top;
-            // height: 42px;
-            // padding-left: 11px;
-            // box-sizing: border-box;
-            // img {
-            //   width: 15px;
-            //   box-sizing: border-box;
-            //   display: inline-block;
-            // }
           }
           &.van-field-input {
             box-sizing: border-box;
             width: 100%;
-
-            // width: calc(100% - 55px);
             .van-cell {
               height: 42px;
               line-height: 42px;

+ 4 - 55
src/views/paddy/index.vue

@@ -1,9 +1,10 @@
 <template>
-  <div class="paddy">
+  <div class="paddy" style="background: #fff">
     <div class="top">
       <img src="@/assets/images/home/paddy.png" alt="" />
     </div>
     <div class="detail">
+      <img src="@/assets/images/home/paddy-title.png" alt="" />
       <img src="@/assets/images/home/paddy-detail.png" alt="" />
     </div>
     <div class="middle">
@@ -12,95 +13,43 @@
     <div class="bottom">
       <img src="@/assets/images/home/paddy-bottom.png" alt="" />
     </div>
-    <!-- <div class="paddy-title">
-      <van-nav-bar
-        title="我的稻田"
-        class="van-nav-bar-my-fixed"
-      />
-    </div>
-    <div class="paddy-main">
- <img
-      src="https://retailcloud-oss-bucket.oss-cn-hangzhou.aliyuncs.com/20210302/824b52ce-ba5a-4418-b299-c3d91b010a5c.jpg?Expires=1615516693&OSSAccessKeyId=LTAIT3bnC94ivUGf&Signature=RNwkapvSZfdzxdaGb21vl3BIP1c%3D"
-      alt=""
-    />
-    </div> -->
   </div>
 </template>
-
 <script>
 </script>
-
 <style lang="scss" scoped>
 .paddy {
   overflow: scroll;
   .top {
     width: 100%;
-    height: 30%;
     margin: 0 auto;
     img {
       width: 100%;
-      height: 100%;
-      // background-size: 50% 50%;
     }
   }
   .detail {
     width: 90%;
-    height: 40%;
     margin: 0 auto;
-    position: relative;
-    padding-bottom: 30px;
-
-    top: -2%;
     img {
       width: 100%;
-      height: 100%;
-      // background-size: 50% 50%;
+      padding-bottom: 20px;
     }
   }
   .middle {
     width: 90%;
-    height: 50%;
     margin: 0 auto;
-    padding-bottom: 30px;
-
+    padding-bottom: 20px;
     img {
       width: 100%;
-      height: 100%;
-      // background-size: 50% 50%;
     }
   }
   .bottom {
     width: 100%;
-    height: 50%;
     overflow: hidden;
     margin: 0 auto;
     img {
       width: 100%;
-      height: 100%;
-      // background-size: 50% 50%;
     }
   }
-  // .paddy-title {
-  //   position: fixed;
-  //   padding: 0;
-  //   width: 100%;
-  //   margin: 0;
-  //   top: 0;
-  //   left: 0;
-  //   z-index: 3;
-  //   border: 0;
-  //   height: 44px;
-  // }
-  // .paddy-main {
-  //   display: block;
-  //   padding: 16px;
-  //   img {
-  //     width: 100%;
-  //     height: auto;
-  //     min-height: 30vh;
-  //     display: block;
-  //     border: 1px solid #b0b0b0;
-  //   }
-  // }
 }
 </style>

+ 24 - 19
src/views/product/index.vue

@@ -107,8 +107,13 @@ export default {
       if (!this.loading) {
         let res = await asyncRequest.get_stock({});
         if (res && res.code == 0) {
-          this.total = parseInt(res.data.stock);
-          await this.getUnitist();
+          let { limit, stock } = res.data;
+          if (!(limit && limit.length > 0)) {
+            limit = [];
+          }
+          this.distributeGoods(limit);
+          // await this.getUnitist(limit);
+          this.total = parseInt(stock + "");
         } else if (res && res.code >= 100 && res.code <= 104) {
           await this.logout();
         } else {
@@ -116,28 +121,28 @@ export default {
         }
       }
     },
-    async getUnitist() {
-      if (!this.loading) {
-        let res = await asyncRequest.unitist({});
-        if (res && res.code == 0 && res.data && res.data.list) {
-          this.unitist = res.data.list;
-          this.distributeGoods();
-        } else if (res && res.code >= 100 && res.code <= 104) {
-          await this.logout();
-        } else {
-          this.unitist = [];
-        }
-      }
-    },
-    distributeGoods() {
-      if (this.unitist.length > 0) {
+    // async getUnitist(list) {
+    //   if (!this.loading) {
+    //     let res = await asyncRequest.unitist({});
+    //     if (res && res.code == 0 && res.data && res.data.list) {
+    //       this.unitist = res.data.list;
+    //       this.distributeGoods();
+    //     } else if (res && res.code >= 100 && res.code <= 104) {
+    //       await this.logout();
+    //     } else {
+    //       this.unitist = [];
+    //     }
+    //   }
+    // },
+    distributeGoods(list) {
+      if (list.length > 0) {
         this.productList = [];
-        this.unitist.forEach((v1) => {
+        list.forEach((v1) => {
           let item = {
             id: v1.id,
             name: v1.id === "1" ? "藏金1745普通装" : "藏金1745礼盒",
             img: require(`@/assets/images/product/unit${v1.id}.png`),
-            stock: parseInt(this.total / parseInt(v1.weight)),
+            stock: parseInt(v1.limit_num+""),
             weight: v1.weight,
             unit: v1.name,
           };

Some files were not shown because too many files changed in this diff