BF-202210271038\Administrator 2 жил өмнө
parent
commit
4982a850af

+ 11 - 12
components/dgex-tantan/dgex-tantan.vue

@@ -24,7 +24,7 @@
 <!--         -->
 					 <!-- 加载图片会闪屏 双if避免 -->
 					<template v-if="currentIndex + visible >= index && currentIndex <= index">
-            <view :animation="animationData"  class="tantan-slide-img-box"   :style="{height: winHeight + 'px'}">
+            <view   class="tantan-slide-img-box" :class="{'animate__shakeX':true}"   :style="{height: winHeight + 'px'}">
               <scroll-view :enhanced="true"  :bounces="false" :show-scrollbar="false" refresher-default-style="none" class="tantan-slide-img-scroll-box" @scroll="endScroll"  :scroll-y="!ifLongTap" :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}">
               <view class="img-list tantan-slide-img">
                   <swiper  :style="{height: item.boxHeight + 'px',width:item.boxWidth+'px'}" class="swiper" :current="item.imgIndex" :indicator-dots="false" :autoplay="false" :interval="0"
@@ -191,22 +191,24 @@
         })
       },
       setImgKey(item, type){
+        // this.touchEndNext(this.currentIndex)
+        // return;
         console.log('type:'+type)
         if( this.overturnType<=0){
           let imgNum=item.images.length-1
           if(type===0){
             if(item.imgIndex<=0){
-              this.setOverturnTwo()
+              // this.setOverturnTwo()
             }else {
               --item.imgIndex
-              this.setOverturnImg(item)
+              // this.setOverturnImg(item)
             }
           }else {
             if(item.imgIndex>=imgNum){
-              this.setOverturnTwo()
+              // this.setOverturnTwo()
             }else {
               ++item.imgIndex
-              this.setOverturnImg(item)
+              // this.setOverturnImg(item)
             }
           }
           console.log('item.imgIndex:'+item.imgIndex)
@@ -281,13 +283,9 @@
             },50)
           }
         }
-
-        console.log('滚动结束')
       },
 
 			touchStart(e, index) {
-        console.log(e)
-        console.log('外层滑动事件')
 				if (this.slideing) return;
         if (this.isSlide) return
 				if (typeof this.list[index].x === 'undefined' && typeof this.list[index].y === 'undefined') {
@@ -315,7 +313,7 @@
         this.list[index].x = this.x.move - this.x.start
         this.list[index].y = this.y.move - this.y.start
         let moveX= Math.abs(this.list[index].x)
-        if(moveX>30){
+        if(moveX>18){
           this.ifLongTap=true
           this.setBox(this.currentIndex,2)
           let angleNum= this.getAngleNum(moveX)
@@ -375,7 +373,7 @@
 				this.slideing = true;
 				this.list[index].x = this.list[index].x * 5;
 				this.list[index].y = this.list[index].y * 5;
-        this.list[index].moveX *= 5;
+        this.list[index].moveX *= 5 ;
         this.list[index].angleNum *= 5;
         this.setBox(this.currentIndex+1,1)
 				this.touchEndDone()
@@ -429,6 +427,7 @@
 	};
 </script>
 <style lang="scss">
+@import 'animate.css';
 	.tantan-slide {
 		width: 100%;
 		height: 100%;
@@ -454,7 +453,7 @@
 		position: absolute;
 		opacity: 0;
 		transform: rotate(0) translateX(0);
-		transition: 300ms;
+		transition: 450ms;
 		color: #fff;
 
 	}

+ 6 - 182
package-lock.json

@@ -1,187 +1,6 @@
 {
-  "name": "lcoco",
-  "lockfileVersion": 2,
   "requires": true,
-  "packages": {
-    "": {
-      "dependencies": {
-        "inobounce": "^0.2.1",
-        "jquery": "^3.6.4",
-        "uni-read-pages": "^1.0.5",
-        "uni-simple-router": "^2.0.7",
-        "uploading-oss": "^1.0.3"
-      },
-      "devDependencies": {
-        "@types/html5plus": "^1.0.2",
-        "@types/uni-app": "^1.4.4",
-        "vue-waterfall-easy": "^2.4.4"
-      }
-    },
-    "node_modules/@babel/parser": {
-      "version": "7.19.0",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz",
-      "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==",
-      "dev": true,
-      "bin": {
-        "parser": "bin/babel-parser.js"
-      },
-      "engines": {
-        "node": ">=6.0.0"
-      }
-    },
-    "node_modules/@types/html5plus": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/@types/html5plus/-/html5plus-1.0.2.tgz",
-      "integrity": "sha512-OklP5lrmLq8/6TUOLgWc0LndUVvAiTWX5dnyoCFhIUtFW9opWsnCtG/UxPgeuC28Rv2XNbFfft/hEEI39P/4Ag==",
-      "dev": true
-    },
-    "node_modules/@types/uni-app": {
-      "version": "1.4.4",
-      "resolved": "https://registry.npmjs.org/@types/uni-app/-/uni-app-1.4.4.tgz",
-      "integrity": "sha512-ZTXnrCTblZyoLIoKbTv1Whz1nxrTcM7vg0qGXzDpXP8m9MqdjKt48N3FffQT1IsJWNkxbvJ1Eg5UHDaq+k+oBQ==",
-      "dev": true,
-      "dependencies": {
-        "vue": "^2.6.8"
-      }
-    },
-    "node_modules/@vue/compiler-sfc": {
-      "version": "2.7.10",
-      "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.10.tgz",
-      "integrity": "sha512-55Shns6WPxlYsz4WX7q9ZJBL77sKE1ZAYNYStLs6GbhIOMrNtjMvzcob6gu3cGlfpCR4bT7NXgyJ3tly2+Hx8Q==",
-      "dev": true,
-      "dependencies": {
-        "@babel/parser": "^7.18.4",
-        "postcss": "^8.4.14",
-        "source-map": "^0.6.1"
-      }
-    },
-    "node_modules/crypto-js": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
-      "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
-    },
-    "node_modules/csstype": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz",
-      "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==",
-      "dev": true
-    },
-    "node_modules/inobounce": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/inobounce/-/inobounce-0.2.1.tgz",
-      "integrity": "sha512-dmKhRDbUS3zGD8HDGchsZBuxaXnfFM+2jXrZpnEnBToEWCgcs3lBfCQe0wzkbpIoJwU/lufaMquSyWoX8OXTRw=="
-    },
-    "node_modules/jquery": {
-      "version": "3.6.4",
-      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz",
-      "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ=="
-    },
-    "node_modules/js-base64": {
-      "version": "2.6.4",
-      "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
-      "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
-    },
-    "node_modules/nanoid": {
-      "version": "3.3.4",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
-      "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
-      "dev": true,
-      "bin": {
-        "nanoid": "bin/nanoid.cjs"
-      },
-      "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
-      }
-    },
-    "node_modules/picocolors": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
-      "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
-      "dev": true
-    },
-    "node_modules/postcss": {
-      "version": "8.4.16",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz",
-      "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/postcss"
-        }
-      ],
-      "dependencies": {
-        "nanoid": "^3.3.4",
-        "picocolors": "^1.0.0",
-        "source-map-js": "^1.0.2"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >=14"
-      }
-    },
-    "node_modules/source-map": {
-      "version": "0.6.1",
-      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/source-map-js": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
-      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/uni-read-pages": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmmirror.com/uni-read-pages/-/uni-read-pages-1.0.5.tgz",
-      "integrity": "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA==",
-      "hasInstallScript": true
-    },
-    "node_modules/uni-simple-router": {
-      "version": "2.0.7",
-      "resolved": "https://registry.npmmirror.com/uni-simple-router/-/uni-simple-router-2.0.7.tgz",
-      "integrity": "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA=="
-    },
-    "node_modules/uploading-oss": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/uploading-oss/-/uploading-oss-1.0.3.tgz",
-      "integrity": "sha512-aqHh5NCOBcrA4d8yCIKR7B9GrKzH88X7gL8BSvIw18pi79AgWnhDkCoyjQmDqzTvjQqYfKwyFTEgnafzMx/GbQ==",
-      "dependencies": {
-        "crypto-js": "^4.1.1",
-        "js-base64": "^2.6.4"
-      }
-    },
-    "node_modules/vue": {
-      "version": "2.7.10",
-      "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.10.tgz",
-      "integrity": "sha512-HmFC70qarSHPXcKtW8U8fgIkF6JGvjEmDiVInTkKZP0gIlEPhlVlcJJLkdGIDiNkIeA2zJPQTWJUI4iWe+AVfg==",
-      "dev": true,
-      "dependencies": {
-        "@vue/compiler-sfc": "2.7.10",
-        "csstype": "^3.1.0"
-      }
-    },
-    "node_modules/vue-waterfall-easy": {
-      "version": "2.4.4",
-      "resolved": "https://registry.npmjs.org/vue-waterfall-easy/-/vue-waterfall-easy-2.4.4.tgz",
-      "integrity": "sha512-5OkpT2FPNC3rHBy858zk/nmJxqdPaGmj/KVbmA6dgcvtsovKMa+zuf/Z7F+S2NnObeavpIBztTWgcH3S42ZD+g==",
-      "dev": true,
-      "engines": {
-        "node": ">= 6.0.0",
-        "npm": ">= 3.0.0"
-      }
-    }
-  },
+  "lockfileVersion": 1,
   "dependencies": {
     "@babel/parser": {
       "version": "7.19.0",
@@ -215,6 +34,11 @@
         "source-map": "^0.6.1"
       }
     },
+    "animate.css": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
+      "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
+    },
     "crypto-js": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",

+ 1 - 0
package.json

@@ -1,5 +1,6 @@
 {
   "dependencies": {
+    "animate.css": "^4.1.1",
     "inobounce": "^0.2.1",
     "jquery": "^3.6.4",
     "uni-read-pages": "^1.0.5",