shish 3 лет назад
Родитель
Сommit
38eac609d0

+ 3 - 4
hdApp/src/mixins/cgProduct.js

@@ -642,10 +642,9 @@ export default {
 					}
 				}
 			}
+			//this.$util.hitRemind()
 
-			this.setSelectInfoByType({ type: this.pageType, info: list });
-
-			console.log('this.selectList',this.selectList)
+			this.setSelectInfoByType({ type: this.pageType, info: list })
 
 			//记忆已经选择的花材
 			this.rememberProduct()
@@ -711,8 +710,8 @@ export default {
 					}
 				}
 			}
+			//this.$util.hitRemind()
 			this.setSelectInfoByType({type: this.pageType, info: list});
-			console.log('this.selectList','减少花材之后:',this.selectList)
 			//记忆已经选择的花材
 			this.rememberProduct()
 		},

+ 7 - 7
hdApp/src/pagesPurchase/components/item.vue

@@ -23,8 +23,8 @@
 					<view class="open-bx" >
 						<i class="iconfont iconjian" :class="delAnimationData?'animation':''" @click.stop="delEvent(info.variety)" v-if="bigCount > 0 || smallCount > 0"></i>
 						<text class="num">
-							<text v-if="bigCount > 0" style="font-size:24upx;font-weight:bold;color:#3385ff;">{{ `${bigCount}` }}</text>
-							<text v-if="smallCount > 0" style="font-size:24upx;">{{ `${smallCount}` }}</text>
+							<text v-if="bigCount > 0" style="font-weight:bold;color:#3385ff;">{{ `${bigCount}` }}</text>
+							<text v-if="smallCount > 0" >{{ `${smallCount}` }}</text>
 						</text>
 						<i class="iconfont iconzeng" :class="addAnimationData?'animation':''" @click.stop="addEvents(info.variety)"></i>
 					</view>
@@ -259,7 +259,7 @@ export default {
 				align-items: center;
 				& .iconfont {
 					color: #3385ff;
-					font-size: 50upx;
+					font-size: 72upx;
 				}
 				.position{
 					display: block;
@@ -275,15 +275,15 @@ export default {
 				}
 				& > .num {
 					display: inline-block;
-					width: 120upx;
-					height:45upx;
+					width: 140upx;
+					height:60upx;
+					line-height:60upx;
 					text-align:center;
 					margin: 0 8upx;
 					color: #868686;
 					border-radius: 22upx;
 					background-color: #f5f5f5;
-					padding: 3upx 0;
-					font-size: 25upx;
+					font-size: 33upx;
 				}
 				.change-input {
 					width: 164upx;

+ 58 - 66
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -1,56 +1,30 @@
 <!--姜枫 2021.04.11-->
 <template>
 	<view class="billing_box_bg">
-    <view class="c_header" :class="myClass">
-      <view class="header_inside">
-        <image :src="ghsInfo.avatar"></image>
-
-        <view class="shop_info">
-			<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id='+ghsInfo.id})"> {{ghsInfo.name}} </view>
-
-			<view v-if="ghsInfo.hasRechargeHb && ghsInfo.hasRechargeHb ==1" class="shop_intro" @tap="recharge(ghsInfo)">
-				<text>充值得<text style="color:red;font-weight:700;">{{parseFloat(ghsInfo.hasRechargeHbAmount)}}</text>元红包
-					<text style="z-index:999999;margin-left:15upx;color:red;color: #3385FF;">点我充值</text>
-				</text>
-			</view>
-
-			<view v-else class="shop_intro">
-				<text style="margin-right: 20upx;">已采购:{{ghsInfo.expendAmount || '0.00'}}</text>
-				<text>欠账:{{ghsInfo.debtAmount || '0.00'}}</text>
+		<view class="c_header" :class="myClass">
+		<view class="header_inside">
+			<image :src="ghsInfo.avatar"></image>
+			<view class="shop_info">
+				<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id='+ghsInfo.id})"> {{ghsInfo.name}} </view>
 			</view>
-        </view>
-
-		<i class="iconfont icondianhua1" style="font-size:55upx;color:#6da3f5;position:absolute;top:45upx;" v-if="ghsInfo.mobile !=''" @tap="toPhone(ghsInfo.mobile)"></i>
-		<image v-if="tjFl == 1" class="hbImg" :src="`${constant.imgUrl}/icon/hb128.png`" mode="widthFix" @click="invite()"></image>
-        <view v-if="tjFl == 1" class="hbInfo" @click="invite()">邀请得红包</view>
-      </view>
-    </view>
+			<i class="iconfont icondianhua1" style="font-size:55upx;color:#6da3f5;position:absolute;top:20upx;right:50upx;" v-if="ghsInfo.mobile !=''" @tap="toPhone(ghsInfo.mobile)"></i>
+		</view>
+		</view>
 
 		<view class="input-wrap" >
+			<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
+				<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 v-model="py" placeholder="拼音首字母也可以搜索" @input="searchFn" />
 			</view>
 			<view style="padding:0 0upx 0 20upx;" >
-				<button class="admin-button-com middle blue" @click="delMemory()">清除已选</button>
+				<button class="admin-button-com middle blue" @click="delMemory()">清空花材</button>
 			</view>
 		</view>
 
 		<view class="scroll-middle_bx">
-			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" >
-				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
-					<!--<text>{{ item.className || "" }}</text>-->
-					<text v-if="item.classId=='-1'" style="color: red">{{ item.className || "" }}</text>
-					<text v-else>{{ item.className }}</text>
-					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0 ">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0"> / </text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{ getSelectClassById(item.classId).smallCount }}</text>
-					</text>
-				</div>
-				<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"
@@ -128,7 +102,7 @@
 			<view style="position: fixed;bottom: 108upx;width:100vw;heigh:300upx;background-color:white;">
 				<view class="commodity-view">
 					<view class="summary-bar">
-						<view class="operate-view" @click="delMemory()"> 清空花材 </view>
+						<button class="admin-button-com blue mini-btn" @click="delMemory()">清空花材</button>
 					</view>
 					<view class="commodity-list">
 						<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
@@ -147,8 +121,8 @@
 									<view class="open-bx" >
 										<i class="iconfont iconjian" @click="delItem(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
 										<text class="num" @click="customUpdate(item)">
-										<text v-if="item.bigCount > 0" style="font-size:24upx;font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
-										<text v-if="item.smallCount > 0" style="font-size:24upx;"><text v-if="item.bigCount > 0">/</text>{{ item.smallCount }}</text>
+										<text v-if="item.bigCount > 0" style="font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
+										<text v-if="item.smallCount > 0"><text v-if="item.bigCount > 0">/</text>{{ item.smallCount }}</text>
 										</text>
 										<i class="iconfont iconzeng" @click="addEvents(item)"></i>
 									</view>
@@ -160,6 +134,18 @@
 			</view>
 		</view>
 
+		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false">
+		<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;">
+
+			<view v-for="(item, index) in filterProductInfo" :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;text-overflow: ellipsis;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
+			</view>
+
+		</view>
+		</uni-popup>
+
+
 	</view>
 </template>
 
@@ -305,6 +291,7 @@ export default {
 		this.xjData = {}
 	},
 	onLoad() {
+
 	},
 	onUnload() {
 	},
@@ -329,6 +316,13 @@ export default {
 
 	},
 	methods: {
+		changeClass(index){
+			this.$refs.selectFlowerNumRef.close()
+			this.swichClass(index)
+		},
+		selectFlowerNumFn(){
+			this.$refs.selectFlowerNumRef.open('top')
+		},
 		delMemory(id){
 			this.cartItemShow = false
 			this.removeMemory(this.option.id)
@@ -658,23 +652,22 @@ export default {
 	display: flex;
 	flex-direction: column;
   .c_header{
-    // height: 240upx;
     width: 100vw;
     padding: 0 15upx;
     box-sizing: border-box;
     background: linear-gradient(to bottom,#3385FF, #fff);
     &>.header_inside{
       position: relative;
-      height: 190upx;
-      margin-top: 30upx;
+      height: 100upx;
+      margin-top: 15upx;
       background: #fff;
       box-shadow: 0upx 1px 21px 0upx rgba(161, 166, 173, 0.4);
       border-radius: 20upx;
-      padding: 30upx;
+      padding: 23upx 30upx 30upx 30upx;
       box-sizing: border-box;
       &>image{
-        height: 130upx;
-        width: 130upx;
+        height: 50upx;
+        width: 50upx;
         display: inline-block;
         border-radius: 10upx;
         background-color: #eee;
@@ -684,9 +677,9 @@ export default {
         vertical-align: top;
         display: inline-block;
         height: 100%;
-        margin-left: 30upx;
+        margin-left: 20upx;
         &>.shop_title{
-          margin-top: 14upx;
+          margin-top:0upx;
           font-size: 36upx;
           font-weight: 600;
           color: #060606;
@@ -741,7 +734,7 @@ export default {
   }
 	.input-wrap {
 		display: flex;
-		padding: 22upx 20upx 22upx 30upx;
+		padding: 22upx 20upx 22upx 13upx;
 		.search-bar {
 			flex: 1;
 		}
@@ -808,7 +801,7 @@ export default {
 		box-sizing: border-box;
 	}
 	.item_list_bx {
-		padding: 40upx 16upx;
+		padding: 20upx 16upx;
 		&:last-child{
 			margin-bottom: 70upx;
 		}
@@ -837,7 +830,7 @@ export default {
 		margin-bottom: 20upx;
 		font-size: 24upx;
 		font-weight: 600;
-		color: #666666;
+		color: #242424;
 	}
 	.select-cmd_bx {
 		& .kc {
@@ -873,7 +866,7 @@ export default {
     animation-duration:.3s;
   }
   .fadeIn{
-    height: 240upx;
+    height: 130upx;
     overflow: hidden;
     animation-name: fadeInFrames;
     animation-duration:.3s;
@@ -883,11 +876,11 @@ export default {
     0%{
         opacity: 1;
         transform:translateY(0);
-        height: 240upx;
+        height: 130upx;
     }
     100% {
         opacity: 0;
-        transform:translateY(-240upx);
+        transform:translateY(-130upx);
         height: 0upx;
         overflow: hidden;
     }
@@ -901,8 +894,7 @@ export default {
     }
     100% {
         opacity: 1;
-        // transform:translateY(240upx);
-        height: 240upx;
+        height: 130upx;
     }
   }
 }
@@ -964,7 +956,7 @@ export default {
 				align-items: center;
 				& .iconfont {
 					color: #3385ff;
-					font-size: 50upx;
+					font-size: 60upx;
 				}
 
 				.position{
@@ -981,15 +973,15 @@ export default {
 				}
 				& > .num {
 					display: inline-block;
-					width: 120upx;
-					height:45upx;
+					width: 130upx;
+					height:55upx;
+					line-height:55upx;
 					text-align:center;
 					margin: 0 8upx;
 					color: #868686;
 					border-radius: 22upx;
 					background-color: #f5f5f5;
-					padding: 3upx 0;
-					font-size: 25upx;
+					font-size: 28upx;
 				}
 				.change-input {
 					width: 164upx;
@@ -1025,10 +1017,10 @@ export default {
 				border-top: 1px solid #eeeeee;
 				.operate-view {
 					display: flex;
-
 					align-items: center;
 					color: #3385ff;
-					font-size: 26upx;
+					font-size: 28upx;
+					font-weight:bold;
 					.iconfont {
 						margin-right: 20upx;
 						font-size: 40upx;

+ 10 - 9
hdApp/src/utils/util.js

@@ -302,15 +302,16 @@ export const unique = (arr) => {
 
 //点击声效 shish
 export const hitRemind = () =>{
-	const innerAudioContext = uni.createInnerAudioContext()
-	innerAudioContext.autoplay = false
-	innerAudioContext.src = "/static/hit.mp3"
-	innerAudioContext.onPlay()
-	innerAudioContext.onError()
-	innerAudioContext.onPause(function() {
-		innerAudioContext.destroy()
-	})
-	innerAudioContext.play()
+	if(uni.getSystemInfoSync().platform != 'windows'){
+		const innerAudioContext = uni.createInnerAudioContext()
+		innerAudioContext.autoplay = true
+		innerAudioContext.src = '/static/hit.mp3'
+		innerAudioContext.onPlay()
+		innerAudioContext.onError()
+		innerAudioContext.onPause(function() {
+			innerAudioContext.destroy()
+		})
+	}
 }
 
 //#ifdef APP-PLUS