From 7ddff44ca4923d21057f8d78e103064dd8d96557 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 29 七月 2024 17:55:54 +0800
Subject: [PATCH] 提交
---
wechat_staff/components/disRealpic/index.js | 20 +++-------
wechat_jiaxuan/components/disCase/index.js | 2
wechat_jiaxuan/components/disProduct/index.js | 2
wechat_jiaxuan/components/disCase/index.wxml | 2
wechat_jiaxuan/components/disRealpic/index.less | 6 +-
wechat_staff/components/disProduct/index.js | 5 +-
wechat_staff/components/disCase/index.js | 7 +--
wechat_jiaxuan/components/disRealpic/index.js | 38 ++++++++++---------
wechat_staff/components/disCase/index.wxml | 2
wechat_staff/components/disProduct/index.wxml | 2
wechat_jiaxuan/components/disRealpic/index.wxml | 3 +
wechat_jiaxuan/components/disRealpic/index.wxss | 6 +-
wechat_jiaxuan/components/disProduct/index.wxml | 2
13 files changed, 45 insertions(+), 52 deletions(-)
diff --git a/wechat_jiaxuan/components/disCase/index.js b/wechat_jiaxuan/components/disCase/index.js
index fe190d4..695fc91 100644
--- a/wechat_jiaxuan/components/disCase/index.js
+++ b/wechat_jiaxuan/components/disCase/index.js
@@ -104,7 +104,7 @@
const { cateList, tagCodes, activeParam, activeIndex } = this.data
const index = tagCodes.indexOf(code)
- if (index === -1) {
+ if (cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex) {
// // 鍚宲aram閲宑ode閲嶅
// if (activeParam && activeParam.length > 0) {
// activeParam.forEach(item => {
diff --git a/wechat_jiaxuan/components/disCase/index.wxml b/wechat_jiaxuan/components/disCase/index.wxml
index 53ca131..1d3bcb5 100644
--- a/wechat_jiaxuan/components/disCase/index.wxml
+++ b/wechat_jiaxuan/components/disCase/index.wxml
@@ -19,7 +19,7 @@
<!-- param -->
<view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
<view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index a93ce61..0ca5b83 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -131,7 +131,7 @@
console.log('code', code)
console.log('tagCodes', tagCodes)
console.log(secondCateList)
- if (index === -1) {
+ if ( secondCateList[activeIndex].tempParamIndex==null || secondCateList[activeIndex].tempParamIndex != paramIndex) {
// 鍚宲aram閲宑ode閲嶅
// if (activeParam && activeParam.length > 0) {
// activeParam.forEach(item => {
diff --git a/wechat_jiaxuan/components/disProduct/index.wxml b/wechat_jiaxuan/components/disProduct/index.wxml
index 9c34af4..4c5358a 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxml
+++ b/wechat_jiaxuan/components/disProduct/index.wxml
@@ -21,7 +21,7 @@
</view>
<view wx:if="{{ activeParam.length > 0 }}" class="query_form">
<view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index 24d02de..66c005c 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -76,9 +76,15 @@
},
videoClick(e) {
const { videourl } = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{ url: videourl, type: 'video' }]
- })
+
+ let videoPlay = this.selectComponent('.videoPlay');
+ if(videoPlay){
+ videoPlay.startPlayVideo(videourl,this );
+ }
+ console.log(videourl+"-------------------------------------")
+ // wx.previewMedia({
+ // sources: [{ url: videourl, type: 'video' }]
+ // })
},
priviewFull(e){
const item = e.currentTarget.dataset.item
@@ -111,9 +117,14 @@
const item = e.currentTarget.dataset.item
console.log('item', item);
if(item.openType == 'video'){
- wx.previewMedia({
- sources: [{ url: item.openContent, type: 'video' }]
- })
+
+ let videoPlay = this.selectComponent('.videoPlay');
+ if(videoPlay){
+ videoPlay.startPlayVideo(item.openContent,this );
+ }
+ // wx.previewMedia({
+ // sources: [{ url: item.openContent, type: 'video' }]
+ // })
}
if(item.openType == 'link'){
wx.navigateTo({
@@ -137,18 +148,9 @@
const code = e.currentTarget.dataset.code
const paramIndex = e.currentTarget.dataset.index
const { cateList, tagCodes, activeParam, activeIndex } = this.data
- const index = tagCodes.indexOf(code)
-
- if(index === -1){
- // if(activeParam && activeParam.length > 0){
- // activeParam.forEach(item => {
- // const indexTemp = tagCodes.indexOf(item.labelValueCode)
- // if(indexTemp > -1){
- // tagCodes.splice(indexTemp, 1)
- // }
- // })
- // }
- // tagCodes.push(code)
+ const index = tagCodes.indexOf(code)
+ if( cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex){
+
cateList[activeIndex].tempParamIndex = paramIndex
cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
cateList[activeIndex].tempParamCode = code
diff --git a/wechat_jiaxuan/components/disRealpic/index.less b/wechat_jiaxuan/components/disRealpic/index.less
index d73de13..31f4f16 100644
--- a/wechat_jiaxuan/components/disRealpic/index.less
+++ b/wechat_jiaxuan/components/disRealpic/index.less
@@ -172,10 +172,10 @@
right: 32rpx;
font-size: 20rpx;
color: rgba(255, 255, 255, 0.8);
- width: 112rpx;
- height: 42rpx;
+ width:52rpx;
+ height: 46rpx;
background: rgba(0, 0, 0, 0.54);
- border-radius: 30rpx;
+ border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
diff --git a/wechat_jiaxuan/components/disRealpic/index.wxml b/wechat_jiaxuan/components/disRealpic/index.wxml
index 758ba67..88c3210 100644
--- a/wechat_jiaxuan/components/disRealpic/index.wxml
+++ b/wechat_jiaxuan/components/disRealpic/index.wxml
@@ -20,7 +20,7 @@
<!-- param -->
<view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
<view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
@@ -66,4 +66,5 @@
</view>
+ <videoPlay class="videoPlay"/>
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/components/disRealpic/index.wxss b/wechat_jiaxuan/components/disRealpic/index.wxss
index 911a199..22360ef 100644
--- a/wechat_jiaxuan/components/disRealpic/index.wxss
+++ b/wechat_jiaxuan/components/disRealpic/index.wxss
@@ -158,10 +158,10 @@
right: 32rpx;
font-size: 20rpx;
color: rgba(255, 255, 255, 0.8);
- width: 112rpx;
- height: 42rpx;
+ width:52rpx;
+ height: 46rpx;
background: rgba(0, 0, 0, 0.54);
- border-radius: 30rpx;
+ border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
diff --git a/wechat_staff/components/disCase/index.js b/wechat_staff/components/disCase/index.js
index 5c4fd11..04a3324 100644
--- a/wechat_staff/components/disCase/index.js
+++ b/wechat_staff/components/disCase/index.js
@@ -101,11 +101,10 @@
return
}
const code = e.currentTarget.dataset.code
- const paramIndex = e.currentTarget.dataset.index
+ const paramIndex = e.currentTarget.dataset.index
const { cateList, tagCodes, activeParam, activeIndex } = this.data
- const index = tagCodes.indexOf(code)
-
- if(index === -1){
+ const index = tagCodes.indexOf(code)
+ if( cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex){
cateList[activeIndex].tempParamIndex = paramIndex
cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
cateList[activeIndex].tempParamCode = code
diff --git a/wechat_staff/components/disCase/index.wxml b/wechat_staff/components/disCase/index.wxml
index e5bd206..740b6e1 100644
--- a/wechat_staff/components/disCase/index.wxml
+++ b/wechat_staff/components/disCase/index.wxml
@@ -19,7 +19,7 @@
<!-- param -->
<view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
<view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
diff --git a/wechat_staff/components/disProduct/index.js b/wechat_staff/components/disProduct/index.js
index 2e23c6d..d92ef71 100644
--- a/wechat_staff/components/disProduct/index.js
+++ b/wechat_staff/components/disProduct/index.js
@@ -120,9 +120,8 @@
tagClick(e) {
const code = e.currentTarget.dataset.code
const paramIndex = e.currentTarget.dataset.index
- const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
- const index = tagCodes.indexOf(code)
- if(index === -1){
+ const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
+ if( secondCateList[activeIndex].tempParamIndex==null || secondCateList[activeIndex].tempParamIndex != paramIndex){
// 鍚宲aram閲宑ode閲嶅
// if (activeParam && activeParam.length > 0) {
// activeParam.forEach(item => {
diff --git a/wechat_staff/components/disProduct/index.wxml b/wechat_staff/components/disProduct/index.wxml
index 8c1084f..c5a8ecc 100644
--- a/wechat_staff/components/disProduct/index.wxml
+++ b/wechat_staff/components/disProduct/index.wxml
@@ -21,7 +21,7 @@
</view>
<view wx:if="{{ activeParam.length > 0 }}" class="query_form">
<view class="list">
- <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
+ <view data-index="{{index}}" data-tempindex="{{item.tempParamIndex}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
diff --git a/wechat_staff/components/disRealpic/index.js b/wechat_staff/components/disRealpic/index.js
index 8ffbc56..ae17a12 100644
--- a/wechat_staff/components/disRealpic/index.js
+++ b/wechat_staff/components/disRealpic/index.js
@@ -133,28 +133,20 @@
}
const code = e.currentTarget.dataset.code
const paramIndex = e.currentTarget.dataset.index
- const { cateList, tagCodes, activeParam, activeIndex } = this.data
- const index = tagCodes.indexOf(code)
-
- if(index === -1){
- // if(activeParam && activeParam.length > 0){
- // activeParam.forEach(item => {
- // const indexTemp = tagCodes.indexOf(item.labelValueCode)
- // if(indexTemp > -1){
- // tagCodes.splice(indexTemp, 1)
- // }
- // })
- // }
- // tagCodes.push(code)
+ const { cateList, tagCodes, activeParam, activeIndex } = this.data
+ if( cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex){
cateList[activeIndex].tempParamIndex = paramIndex
cateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
cateList[activeIndex].tempParamCode = code
+ console.log(code)
}else{
cateList[activeIndex].tempParamIndex = -1
cateList[activeIndex].tempParamName = null
- cateList[activeIndex].tempParamCode = null
+ cateList[activeIndex].tempParamCode = null
+ console.log(1)
}
this.setData({ cateList })
+ console.log(cateList)
},
cancelParam() {
const { cateList } = this.data
--
Gitblit v1.9.3