|
|
@@ -6,7 +6,7 @@
|
|
|
<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
|
|
|
</view>
|
|
|
<view class="search-bar">
|
|
|
- <app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="searchFn" />
|
|
|
+ <app-search-module ref="globalSearchRef" v-model="globalPy" placeholder="这里搜索" @input="globalSearch" />
|
|
|
</view>
|
|
|
<view style="float:right">
|
|
|
<button class="admin-button-com middle blue" @click="removeFromSave(0)">清除花材</button>
|
|
|
@@ -16,22 +16,20 @@
|
|
|
<view class="scroll-middle_bx">
|
|
|
|
|
|
<scroll-view scroll-y scroll-with-animation class="tab-view">
|
|
|
- <!--分类 start -->
|
|
|
- <div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="classIndex == index ? 'active' : ''" :data-current="index" @tap.stop="swichClass(index)">
|
|
|
- <text>{{ item.className || "" }}</text>
|
|
|
+ <div v-for="(item, index) in globalClassData" :key="index" class="tab-bar-item" :class="globalClassIndex == index ? 'active' : ''" :data-current="index" @tap.stop="globalSwitchClass(index,item)">
|
|
|
+ <text>{{ item.name || "" }}</text>
|
|
|
</div>
|
|
|
- <!--分类 end -->
|
|
|
<view style="height: 120upx"></view>
|
|
|
</scroll-view>
|
|
|
|
|
|
- <scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true" @scroll="scroll_detail" lower-threshold="100" @scrolltolower="scroll_bottom">
|
|
|
- <!--花材列表 start -->
|
|
|
- <block v-if="!$util.isEmpty(globalClassItemList)">
|
|
|
- <view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
|
|
|
- <view class="item_list_title">{{ classItem.className }}</view>
|
|
|
- <template v-for="(productItem, productIndex) in classItem.child">
|
|
|
- <view style="height: 175upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
|
|
|
- <Commondity v-if="classItem.isActive"
|
|
|
+ <scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
|
|
|
+ :scroll-top="globalScrollTopPlace" @scroll="globalGetScroll" lower-threshold="100" @scrolltolower="globalScrollBottom">
|
|
|
+ <block v-if="!$util.isEmpty(globalItemData)">
|
|
|
+ <view class="item_list_bx selectAll">
|
|
|
+ <view class="item_list_title"></view>
|
|
|
+ <template v-for="(productItem, productIndex) in globalItemData">
|
|
|
+ <view style="height: 175upx" :key="productIndex">
|
|
|
+ <Commondity
|
|
|
:checkStock="true"
|
|
|
:info="productItem"
|
|
|
@showAddModelFn="showAddModelFn"
|
|
|
@@ -42,9 +40,8 @@
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
- <app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalClassItemList)" />
|
|
|
+ <app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalItemData)" />
|
|
|
</block>
|
|
|
- <!--花材列表 end -->
|
|
|
</scroll-view>
|
|
|
|
|
|
</view>
|
|
|
@@ -80,19 +77,17 @@
|
|
|
|
|
|
<FooterCart :price="allPrice" :count="allCount" @confirm="confirmToSave" :selectJobType="selectJobType" ></FooterCart>
|
|
|
|
|
|
- <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
|
|
|
- <view v-for="(item, index) in globalClassItemList" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
- <image :src="item.classCover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
|
|
|
- <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
|
|
|
+ <view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
+ <image :src="item.cover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
|
|
|
+ <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.name}}</view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
- <image v-if="showClassRemind" @click="hideClassRemind" style="position:absolute;width:610upx;height:699upx;top:225upx;left:80upx;z-index:9999;" :src="`${constant.imgUrl}/class_remind.png`"></image>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -105,7 +100,7 @@ import Commondity from "@/components/module/app-commodity";
|
|
|
import FooterCart from "@/components/module/app-footer-cart";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import { COMMODITY_TYPE } from "@/utils/declare";
|
|
|
-import productMins from "@/mixins/product";
|
|
|
+import productMins from "@/mixins/product2";
|
|
|
export default {
|
|
|
name: "breakageIndex",
|
|
|
components: {
|
|
|
@@ -136,18 +131,12 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onLoad(){
|
|
|
- this.initData({requestType:'break'})
|
|
|
+ this.globalRequestType = 'break'
|
|
|
+ this.initData()
|
|
|
},
|
|
|
methods: {
|
|
|
- changeClass(index){
|
|
|
- this.$refs.selectFlowerNumRef.close()
|
|
|
- this.swichClass(index)
|
|
|
- },
|
|
|
selectFlowerNumFn(){
|
|
|
- this.$refs.selectFlowerNumRef.open('top')
|
|
|
- },
|
|
|
- hideClassRemind(){
|
|
|
-
|
|
|
+ this.$refs.globalClassImgRef.open('top')
|
|
|
},
|
|
|
switchGlobalUnitType(){
|
|
|
if(this.globalUnitType == 0){
|