action-jump.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <template>
  2. <view>
  3. <view class="flex justify-center" style="height: 75px; margin-top: 46rpx;">
  4. <!-- 计时器 -->
  5. <view class="action-jump-timer flex justify-center">
  6. <boxingCountDown ref="boxingCountDownRef" :show-day="false" :second="showTime" color="#FFFFFF"
  7. background-color="rgba(255,255,255,0);" border-color="#007AFF" splitorColor="#FFFFFF" />
  8. </view>
  9. <view class="grid-progress-vertical-container" style="top:-460rpx; ">
  10. <view class="grid-progress-vertical-bar">
  11. <view class="grid-progress-vertical-child" v-for="(item, index) in 20" :key="index">
  12. <view
  13. :class="showCount>=index+1? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
  14. </view>
  15. <view :class="index%5 == 0?'':'grid-progress-text-hidden'" class="grid-progress-vertical-text">
  16. {{(index+1)*2}}
  17. </view>
  18. </view>
  19. </view>
  20. <view class="grid-progress-vertical-bar">
  21. <view class="grid-progress-vertical-child" v-for="(item, index) in 20" :key="index">
  22. <view :class="index%5 == 0?'':'grid-progress-text-hidden'" class="grid-progress-vertical-text">
  23. {{(index+26)*2}}
  24. </view>
  25. <view
  26. :class="showCount>=index+26? 'grid-progress-vertical-active':'grid-progress-vertical-inactive'">
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="flex justify-center align-center"
  32. style="height: 52rpx; width: 412rpx; background-color: rgba(255,255,255,0.11); border-radius: 12rpx;">
  33. <!-- 居中绘制星星样式 -->
  34. <view class="text-14px text-white">
  35. 拉伸运动:
  36. </view>
  37. <view class="flex flex-direction" v-for="(item, index) in 5" :key="index">
  38. <image style="width: 34rpx;height: 32rpx;" src="../../../static/modal/action-jump/stars.png">
  39. </image>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="action-jump-parent margin-bottom">
  44. <view class="action-jump-container">
  45. <canvas canvas-id="actionJumpCanvas"
  46. :style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
  47. </view>
  48. </view>
  49. <view class="flex align-center justify-center" style="font-size: 14px;">
  50. <view style="position: relative;">
  51. <image style="width: 135px;height: 75px;" src="../../../static/modal/action-jump/Fill.png"></image>
  52. <view class="mid-absolute flex flex-direction align-center justify-center text-white">
  53. <view class="flex align-center">
  54. <image style="width: 22rpx;height: 28rpx;"
  55. src="../../../static/modal/action-jump/jumpSpeed.png"></image>
  56. <view style="margin-left: 6rpx;">平均速度</view>
  57. </view>
  58. <view style="margin-top: 12rpx;">{{jumpSpeed}}</view>
  59. </view>
  60. </view>
  61. <view class="flex" style="position: relative;" @click="onControllerPlay">
  62. <image style="width: 112px;height: 111px;" src="../../../static/modal/action-jump/midButton.png">
  63. </image>
  64. <image v-if="!bJumpPlay" class="mid-absolute" style=" width: 28rpx;height: 28rpx;"
  65. src="../../../static/modal/action-jump/midPlay.png">
  66. </image>
  67. <image v-else class="mid-absolute" style="width: 28rpx;height: 28rpx;"
  68. src="../../../static/modal/action-jump/midPause.png">
  69. </image>
  70. </view>
  71. <view style="position: relative;">
  72. <image style="width: 135px;height: 75px; transform: scaleX(-1);"
  73. src="../../../static/modal/action-jump/Fill.png"></image>
  74. <view class="mid-absolute flex flex-direction align-center justify-center text-white">
  75. <view class="flex align-center">
  76. <image style="width: 22rpx;height: 28rpx;"
  77. src="../../../static/modal/action-jump/jumpCalorie.png"></image>
  78. <view style="margin-left: 6rpx;">卡路里</view>
  79. </view>
  80. <view style="margin-top: 12rpx;">{{jumpCalorie}}</view>
  81. </view>
  82. </view>
  83. </view>
  84. <view style="height: 41px;"></view>
  85. <!-- 测试按钮 -->
  86. <view style="display: flex;justify-content: space-between;">
  87. <button @click="startJumpGame">startGame</button>
  88. <button @click="onClear">onClear</button>
  89. </view>
  90. <view style="display: flex;justify-content: space-between;" class="margin-top margin-bottom">
  91. <button @click="onJumpType(0)">jump</button>
  92. <button @click="onJumpType(1)">left</button>
  93. <button @click="onJumpType(2)">right</button>
  94. <button @click="onJumpType(3)">rLeft</button>
  95. <button @click="onJumpType(4)">rRight</button>
  96. </view>
  97. <view style="display: flex;justify-content: space-around;">
  98. <view style="font-size: 14px;">t:{{countdown}}</view>
  99. <view style="font-size: 14px;">e:{{eliminationCount}}</view>
  100. <view style="font-size: 14px;">f:{{faultCount}}</view>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. import boxingCountDown from '@/components/uni-count-down/uni-count-down.vue'
  106. export default {
  107. components: {
  108. boxingCountDown
  109. },
  110. props: {
  111. showTime: {
  112. type: Number,
  113. default: 0
  114. }
  115. },
  116. data() {
  117. return {
  118. //满格的数值是 25
  119. maxShowCount: 25,
  120. //显示的点
  121. showCount: 0,
  122. canvasW: 0, // 画布宽
  123. canvasH: 0, // 画布高
  124. SystemInfo: {}, // 设备信息
  125. directionJump: null,
  126. midJump: null,
  127. rotateJump: null,
  128. directionJumpWhite: null,
  129. midJumpWhite: null,
  130. rotateJumpWhite: null,
  131. //参考图片
  132. cankao: null,
  133. jumpTipImage: null,
  134. jumpNormalImage: null,
  135. jumpTypeArray: [{
  136. jumpName: 'NORMAL',
  137. jumpCode: 0,
  138. icon: 'midJump',
  139. scaleX: 1,
  140. bTrigger: false,
  141. }, {
  142. jumpName: 'LEFT',
  143. jumpCode: 1,
  144. icon: 'directionJump',
  145. scaleX: -1,
  146. bTrigger: false,
  147. }, {
  148. jumpName: 'RIGHT',
  149. jumpCode: 2,
  150. icon: 'directionJump',
  151. scaleX: 1,
  152. bTrigger: false,
  153. }, {
  154. jumpName: 'LEFT_ROTATE',
  155. jumpCode: 3,
  156. icon: 'rotateJump',
  157. scaleX: 1,
  158. bTrigger: false,
  159. }, {
  160. jumpName: 'RIGHT_ROTATE',
  161. jumpCode: 4,
  162. icon: 'rotateJump',
  163. scaleX: -1,
  164. bTrigger: false,
  165. }],
  166. spawnArray: [],
  167. //下一个生成是相反的方向
  168. bNextSpawnRightDirection: false,
  169. bNextSpawnRightRotateDirection: false,
  170. //生成预制的模板,用count 来判断生成哪一种
  171. template: [{
  172. count: 1,
  173. spawnList: [
  174. [0]
  175. ]
  176. }, {
  177. count: 2,
  178. spawnList: [
  179. [2, 1],
  180. [1, 2],
  181. [3, 4],
  182. [4, 3]
  183. ]
  184. }, {
  185. count: 3,
  186. spawnList: [
  187. [2, 0, 1],
  188. [1, 0, 2],
  189. [3, 0, 4],
  190. [4, 0, 3]
  191. ]
  192. }, ],
  193. level: 3,
  194. countdown: 60,
  195. countdownInterval: null,
  196. faultCount: 0,
  197. eliminationCount: 0,
  198. bJumpPlay: false,
  199. jumpCalorie: 1000,
  200. jumpSpeed: 1000
  201. }
  202. },
  203. created() {
  204. let _self = this;
  205. this.onLoadImage();
  206. this.actionJumpCanvas = uni.createCanvasContext("actionJumpCanvas", this);
  207. // console.log("this.actionJumpCanvas:", this.actionJumpCanvas);
  208. this.SystemInfo = uni.getSystemInfoSync();
  209. this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
  210. this.canvasH = 114;
  211. },
  212. methods: {
  213. //load 相关图片
  214. onLoadImage() {
  215. let _self = this;
  216. uni.getImageInfo({
  217. src: "../../../static/modal/action-jump/directionJump.png",
  218. success: function(image) {
  219. _self.directionJump = image;
  220. }
  221. });
  222. uni.getImageInfo({
  223. src: "../../../static/modal/action-jump/midJump.png",
  224. success: function(image) {
  225. _self.midJump = image;
  226. console.log("==============", image);
  227. }
  228. });
  229. uni.getImageInfo({
  230. src: "../../../static/modal/action-jump/rotateJump.png",
  231. success: function(image) {
  232. _self.rotateJump = image;
  233. }
  234. });
  235. uni.getImageInfo({
  236. src: "../../../static/modal/action-jump/directionJumpWhite.png",
  237. success: function(image) {
  238. _self.directionJumpWhite = image;
  239. }
  240. });
  241. uni.getImageInfo({
  242. src: "../../../static/modal/action-jump/midJumpWhite.png",
  243. success: function(image) {
  244. _self.midJumpWhite = image;
  245. console.log("==============", image);
  246. }
  247. });
  248. uni.getImageInfo({
  249. src: "../../../static/modal/action-jump/rotateJumpWhite.png",
  250. success: function(image) {
  251. _self.rotateJumpWhite = image;
  252. }
  253. });
  254. uni.getImageInfo({
  255. src: "../../../static/modal/action-jump/jumpTip.png",
  256. success: function(image) {
  257. _self.jumpTipImage = image;
  258. }
  259. });
  260. uni.getImageInfo({
  261. src: "../../../static/modal/action-jump/jumpNormal.png",
  262. success: function(image) {
  263. _self.jumpNormalImage = image;
  264. _self.onDrawBg();
  265. }
  266. });
  267. uni.getImageInfo({
  268. src: "../../../static/modal/action-jump/cankao.png",
  269. success: function(image) {
  270. _self.cankao = image;
  271. }
  272. });
  273. },
  274. /**
  275. * 重置生成数组,重置倒计时
  276. */
  277. resetJumpGame() {
  278. this.spawnArray = [];
  279. if (this.countdownInterval) {
  280. clearInterval(this.countdownInterval);
  281. this.countdownInterval = null;
  282. }
  283. this.resetCountdown(60);
  284. },
  285. startJumpGame() {
  286. this.resetJumpGame();
  287. //开始游戏
  288. this.index = 0;
  289. // this.levelLabel.string = '关卡' + this.level;
  290. let _ranType = Math.floor(Math.random() * 2);
  291. if (this.level == 1) {
  292. //随便生成一组数据
  293. let _spawnList = this.template[1].spawnList;
  294. let ran = Math.floor(Math.random() * 2);
  295. if (_ranType >= 1) ran += 2;
  296. for (let i = 0; i < _spawnList[ran].length; i++) {
  297. this.spawnJumpPrefabsFromType(i, _spawnList[ran][i]);
  298. }
  299. } else if (this.level == 2) {
  300. //随便生成二组数据
  301. let _newArray = [];
  302. let _spawnList1 = this.template[1].spawnList;
  303. let ran1 = Math.floor(Math.random() * 2);
  304. _newArray = _newArray.concat(_spawnList1[ran1]);
  305. let _spawnList2 = this.template[2].spawnList;
  306. let ran2 = Math.floor(Math.random() * 2);
  307. if (_ranType >= 1) ran2 += 2;
  308. _newArray = _newArray.concat(_spawnList2[ran2]);
  309. console.log(_newArray);
  310. for (let i = 0; i < _newArray.length; i++) {
  311. this.spawnJumpPrefabsFromType(i, _newArray[i]);
  312. }
  313. } else if (this.level == 3) {
  314. //随便生成三组数据
  315. let _newArray = [];
  316. // let _spawnList1 = this.template[1].spawnList;
  317. // let ran1 = Math.floor(Math.random() * 2);
  318. // _newArray = _newArray.concat(_spawnList1[ran1]);
  319. let _spawnList2 = this.template[2].spawnList;
  320. let ran2 = Math.floor(Math.random() * 2);
  321. let ran3 = Math.floor(Math.random() * 2);
  322. if (_ranType >= 1) {
  323. ran2 += 2;
  324. ran3 += 2;
  325. }
  326. _newArray = _newArray.concat(_spawnList2[ran2]);
  327. _newArray = _newArray.concat(_spawnList2[ran3]);
  328. for (let i = 0; i < _newArray.length; i++) {
  329. this.spawnJumpPrefabsFromType(i, _newArray[i]);
  330. }
  331. //todo 暂时给循环
  332. this.level = 0;
  333. }
  334. this.level++;
  335. //倒计时
  336. // this.countdownInterval = setInterval(() => {
  337. // if (this.countdown <= 0) {
  338. // clearInterval(this.countdownInterval);
  339. // this.countdownInterval = null;
  340. // //处理下一个关卡
  341. // // console.warn('时间到,处理下一个关卡');
  342. // this.startJumpGame();
  343. // return;
  344. // }
  345. // this.setCountdown(1);
  346. // }, 1000);
  347. this.onDraw();
  348. },
  349. spawnJumpPrefabsFromType(index,_jumpType) {
  350. //todo 生成的节点,后面再处理节奏问题。比如生成顺序
  351. for(let i=0;i<this.jumpTypeArray.length;i++){
  352. if(this.jumpTypeArray[i].jumpCode == _jumpType){
  353. let _jumpPrefab = Object.assign({}, this.jumpTypeArray[i]);
  354. this.spawnArray.push(_jumpPrefab);
  355. break;
  356. }
  357. }
  358. },
  359. spawnJumpPrefabs(index) {
  360. let ran = Math.floor(Math.random() * 5);
  361. //todo 生成的节点,后面再处理节奏问题。比如生成顺序
  362. let _jumpPrefab = Object.assign({}, this.jumpTypeArray[ran]);
  363. //这里处理相反方向,比如生成了一个左旋转,下一个右旋转
  364. if (_jumpPrefab.jumpName == 'LEFT') {
  365. if (this.bNextSpawnRightDirection) {
  366. //如果是对应的需要记录一个对应的准确值
  367. this.bNextSpawnRightDirection = false;
  368. } else {
  369. ran = 2; //RIGHT;
  370. this.bNextSpawnRightDirection = true;
  371. }
  372. } else if (_jumpPrefab.jumpName == 'RIGHT') {
  373. if (this.bNextSpawnRightDirection) {
  374. ran = 1; //LEFT;
  375. this.bNextSpawnRightDirection = false;
  376. } else {
  377. this.bNextSpawnRightDirection = true;
  378. }
  379. }
  380. if (_jumpPrefab.jumpName == 'LEFT_ROTATE') {
  381. if (this.bNextSpawnRightRotateDirection) {
  382. //如果是对应的需要记录一个对应的准确值
  383. this.bNextSpawnRightRotateDirection = false;
  384. } else {
  385. ran = 4; //RIGHT_ROTATE;
  386. this.bNextSpawnRightRotateDirection = true;
  387. }
  388. // console.log('l==rotate', ran);
  389. } else if (_jumpPrefab.jumpName == 'RIGHT_ROTATE') {
  390. if (this.bNextSpawnRightRotateDirection) {
  391. ran = 3; //LEFT_ROTATE;
  392. this.bNextSpawnRightRotateDirection = false;
  393. } else {
  394. //如果是对应的需要记录一个对应的准确值
  395. this.bNextSpawnRightRotateDirection = true;
  396. }
  397. }
  398. this.spawnArray.push(_jumpPrefab);
  399. },
  400. //单纯的绘制八个背景
  401. onDrawBg() {
  402. this.actionJumpCanvas.clearRect(0, 0, this.canvasW, 114);
  403. let _currentBgStartX = this.canvasW / 2;
  404. let count = 4;
  405. for (let i = 0; i < count; i++) {
  406. let _currentStartPos = _currentBgStartX - i * 50 - 50;
  407. this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentStartPos, 0, 50, 114);
  408. let _currentEndPos = _currentBgStartX + i * 50;
  409. this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0, 50, 114);
  410. }
  411. this.actionJumpCanvas.draw();
  412. },
  413. onDraw() {
  414. this.actionJumpCanvas.clearRect(0, 0, this.canvasW, 114);
  415. //计算一个对象
  416. let _drawObj = {
  417. path: null,
  418. startX: 0,
  419. width: 0,
  420. bgWidth: 0,
  421. bgStartXAllNormal: 0,
  422. bgStartXHasTip: 0,
  423. }
  424. //计算居中的点
  425. _drawObj.width = this.spawnArray.length * (50 + 10);
  426. _drawObj.startX = this.canvasW / 2 - _drawObj.width / 2;
  427. //全部是普通背景
  428. _drawObj.bgStartXAllNormal = this.canvasW / 2 - (this.spawnArray.length * 50) / 2;
  429. _drawObj.bgStartXHasTip = this.canvasW / 2 - (this.spawnArray.length * 50 + 40) / 2;
  430. let _currentBgStartX = this.index == this.spawnArray.length ? _drawObj.bgStartXAllNormal : _drawObj
  431. .bgStartXHasTip;
  432. // console.log("_drawObj.startX:", _drawObj.startX, _drawObj.width / 2);
  433. //绘制八个位置。如果生成数量不够的话。补上对应的数量
  434. let count = 8 - this.spawnArray.length;
  435. count = Math.ceil(count / 2);
  436. //计算一个节点数组
  437. for (let i = 0; i < this.spawnArray.length; i++) {
  438. //默认 mid 图标
  439. let _temp = this.spawnArray[i].bTrigger ? this.midJump : this.midJumpWhite;
  440. if (this.spawnArray[i].icon == 'directionJump') {
  441. _temp = this.spawnArray[i].bTrigger ? this.directionJump : this.directionJumpWhite;
  442. } else if (this.spawnArray[i].icon == 'rotateJump') {
  443. _temp = this.spawnArray[i].bTrigger ? this.rotateJump : this.rotateJumpWhite;
  444. }
  445. //如果是相反绘制,需要加多一个自身位置偏移
  446. let _pos = this.spawnArray[i].scaleX < 0 ? i + 1 : i;
  447. let _spacing = i == 0 ? 0 : 1;
  448. let _addData = 0;
  449. //大图提示后面要加上大图占的位置,为大图宽度减小图( 90 - 50 )
  450. if (i >= this.index) {
  451. _addData = 40;
  452. }
  453. if (i == 0) {
  454. //_frontBgData 为减去大图位置,10 为偏移位置
  455. let _frontBgData = 40;
  456. //绘制前背景
  457. for (let i = 0; i < count; i++) {
  458. let _currentStartPos = _currentBgStartX - _frontBgData - i * 50 - 10;
  459. this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentStartPos, 0, 50, 114)
  460. }
  461. }
  462. this.actionJumpCanvas.save();
  463. this.actionJumpCanvas.globalAlpha = this.spawnArray[i].bTrigger ? 0.7 : 1;
  464. this.actionJumpCanvas.scale(this.spawnArray[i].scaleX, 1);
  465. let _currentPos = 0;
  466. let _currentCenterPos = 0;
  467. if (i == this.index) {
  468. _currentPos = (_currentBgStartX + _pos * 90 - i * 40) *
  469. this
  470. .spawnArray[i]
  471. .scaleX;
  472. this.actionJumpCanvas.drawImage(this.jumpTipImage.path, _currentPos, 0, 90, 114);
  473. //计算对应中心点的值
  474. _currentCenterPos = _currentPos + 90 / 2 - 25 / 2;
  475. //57 - 40/2 是取画布中心y点,减去图标本身高的一半的值
  476. this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos - 7.5, 37, 40, 40);
  477. } else {
  478. _currentPos = (_currentBgStartX + _addData + _pos *
  479. 50) * this
  480. .spawnArray[i]
  481. .scaleX;
  482. this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentPos, 0, 50, 114)
  483. //计算对应中心点的值
  484. _currentCenterPos = _currentPos + 50 / 2 - 25 / 2;
  485. //44.5 是取画布中心y点,减去图标本身高的一半的值
  486. this.actionJumpCanvas.drawImage(_temp.path, _currentCenterPos, 44.5, 25, 25);
  487. }
  488. this.actionJumpCanvas.restore();
  489. if (i == this.spawnArray.length - 1) {
  490. //绘制结束位置
  491. // console.log("count:", count);
  492. for (let i = 0; i < count; i++) {
  493. let _currentEndPos = _currentBgStartX + _addData + (this.spawnArray.length + i) * 50;
  494. // console.log("end _currentEndPos:", _currentEndPos);
  495. this.actionJumpCanvas.drawImage(this.jumpNormalImage.path, _currentEndPos, 0, 50, 114)
  496. }
  497. }
  498. }
  499. this.actionJumpCanvas.draw();
  500. },
  501. onClear() {
  502. this.resetJumpGame();
  503. this.onDrawBg();
  504. },
  505. onJumpType(event) {
  506. // console.log("onJumpType:", event);
  507. this.eliminateJumpPrefab(event);
  508. },
  509. // update (dt) {}
  510. eliminateJumpPrefab(_jumpType) {
  511. //如果消除完,需要重新生成
  512. if (this.index >= this.spawnArray.length) return;
  513. let _temp = this.spawnArray[this.index];
  514. _temp.bTrigger = true;
  515. this.index++;
  516. //绘制新触发状态
  517. this.onDraw();
  518. //如果当前的跳类型和预制目标一样
  519. if (_jumpType == _temp.jumpCode) {
  520. //成功
  521. this.setEliminationCount(1);
  522. } else {
  523. //失误
  524. this.setFaultCount(1);
  525. }
  526. },
  527. //设置倒计时
  528. setCountdown(value) {
  529. this.countdown -= value;
  530. // this.countdownLabel.string = '倒计时:' + this.countdown;
  531. },
  532. resetCountdown(value) {
  533. this.countdown = value;
  534. // this.countdownLabel.string = '倒计时:' + this.countdown;
  535. },
  536. //设置ui信息
  537. setEliminationCount(value) {
  538. this.eliminationCount += value;
  539. // this.eliminationLabel.string = '消除数量:' + this.eliminationCount.toString();
  540. },
  541. setFaultCount(value) {
  542. this.faultCount += value;
  543. // this.faultLabel.string = '失误:' + this.faultCount;
  544. },
  545. //控制播放
  546. onControllerPlay() {
  547. this.bJumpPlay = !this.bJumpPlay;
  548. if (this.bJumpPlay) {
  549. this.startJumpGame();
  550. } else {
  551. this.onClear();
  552. }
  553. }
  554. }
  555. }
  556. </script>
  557. <style lang="scss">
  558. .action-jump-parent {
  559. // border: 1rpx solid #ffaa7f;
  560. position: relative;
  561. display: flex;
  562. justify-content: center;
  563. overflow: hidden;
  564. top: 0;
  565. width: 750rpx;
  566. }
  567. .action-jump-container {
  568. width: 100%;
  569. height: 114px;
  570. // border: 1rpx solid #000000;
  571. position: relative;
  572. // display: flex;
  573. }
  574. .mid-absolute {
  575. position: absolute;
  576. top: 0;
  577. bottom: 0;
  578. right: 0;
  579. left: 0;
  580. margin: auto;
  581. }
  582. .action-jump-timer {
  583. position: absolute;
  584. top: -150rpx;
  585. }
  586. </style>