shish 4 лет назад
Родитель
Сommit
f3833559ad

+ 2 - 0
hdPad/src/admin/home/components/leftItem.vue

@@ -48,6 +48,8 @@ export default {
             selectJobId:0
         }
     },
+    created(){
+    },
     watch:{
         customId:{
             handler(newCustomId){

+ 10 - 12
hdPad/src/admin/home/components/rightGoodsArea.vue

@@ -4,7 +4,7 @@
             <view v-for="item in categoryData" :key="item.id" :class="[categoryId===item.id?'active':'']" @click="changeCategory(item)" > {{item.categoryName}} </view>
         </view>
 
-        <view class="shop-show_box">
+        <scroll-view class="shop-show_box" enable-flex="true" scroll-y="true" lower-threshold="20" @scrolltolower="reachBottom">
             <view v-for="item in list.data" :key="item.id" class="show-shop_box">
                 <view class="item-detail" @click="popAddModelFn(item)">
                     <image class="img" :src="item.cover" mode="scaleToFill" ></image>
@@ -16,7 +16,7 @@
                     </view>
                 </view>
             </view>
-        </view>
+        </scroll-view>
 
         <slot name="footer"></slot>
 
@@ -74,12 +74,11 @@ export default {
                     this.categoryData = res.data
                     this.categoryId = this.categoryData[0].id
                     this.getGoodsData()
-                    //this.initStorageData()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                 }
             })
         },
         getGoodsData(){
-            getGoodsList({cId:this.categoryId,page:this.list.page}).then(res=>{
+            getGoodsList({cId:this.categoryId,page:this.list.page,pageSize:30}).then(res=>{
                 if(res.code == 1){
                     this.completes(res)
                 }
@@ -111,6 +110,13 @@ export default {
     flex-direction: column;
     box-sizing: border-box;
     & .shop-show_box{
+        flex: 1;
+        padding: 2upx;
+        display: flex;
+        flex-wrap: wrap;
+        overflow-y: scroll;
+        overflow-x: hidden;
+        height:80vh;
         & .show-shop_box{
             & .item-detail{
                 position: relative;
@@ -164,14 +170,6 @@ export default {
             }
         }
     }
-    & .shop-show_box {
-        flex: 1;
-        padding: 2upx;
-        display: flex;
-        flex-wrap: wrap;
-        overflow-y: scroll;
-        overflow-x: hidden;
-    }
     & .shop-footer_box {
         height: 40upx;
         display: flex;

+ 0 - 2
hdPad/src/admin/home/components/rightItemArea.vue

@@ -72,8 +72,6 @@ export default {
             this.classData = data
             this.categoryId = this.classData[0].id
             this.getShowList()
-
-            this.initStorageData()
         },
         async getShowList(){
             let { data:{list} } =  await showList({})

+ 2 - 1
hdPad/src/admin/home/workbench.vue

@@ -50,7 +50,7 @@ export default {
 	data() {
 		return {
 			//0成品 1花材
-			currentProperty:0,
+			currentProperty:1,
 			itemList:[],
 			currenSelectShop:{},
 			selectItem: {},
@@ -66,6 +66,7 @@ export default {
 		...mapGetters(["getLoginInfo"])
 	},
 	onLoad() {
+		this.initDataFromStorage()
 	},
 	onPullDownRefresh() {
 	},

+ 2 - 4
hdPad/src/mixins/product.js

@@ -63,9 +63,6 @@ export default {
 	methods: {
 		...mapActions(["setSelectInfo", "reSetSelectInfo"]),
 		init(){
-			if (this.autoLoad) {
-				this.initStorageData();
-			}
 		},
 		//放到仓库
 		pushToSave(selectData){
@@ -101,7 +98,8 @@ export default {
 			}
 		},
 		//取出缓存数据
-		initStorageData() {
+		initDataFromStorage() {
+			console.log('aaaabc')
 			let currentInfo = uni.getStorageSync('selectList_'+this.selectJobType+'_target_'+this.selectJobId)
 			if(!this.$util.isEmpty(currentInfo)){
 				this.setSelectInfo({ selectJobType: this.selectJobType, info: currentInfo,selectJobId:this.selectJobId })