fenggang 5 år sedan
förälder
incheckning
2a126deb5c

+ 1 - 1
2019专题/云顶之弈模拟器/src/API/index.js

@@ -6,7 +6,7 @@ export const getSimulatorData = () => {
   return new Promise((resolve, reject) => {
     $.ajax(
       {
-        url: 'http://lol.duowan.com/s/2/ydzySimulator.js',
+        url: 'http://lol.duowan.com/s/ydzySimulator.js',
         jsonpCallback: 'ydzySimulator',
         dataType: 'jsonp',
         success: resolve,

+ 1 - 2
2019专题/云顶之弈模拟器/src/components/index.vue

@@ -3,7 +3,7 @@
     <div class="container" @drop="dropHero" @dragover="allowDrop">
       <div class="title" ></div>
       <div class="guide">
-        <a href="http://lol.duowan.com/1908/429554416930.html" target="_blank">>>使用指南<<</a>
+        <a href="http://lol.duowan.com/1910/436207301201.html" target="_blank">>>使用指南<<</a>
         <a href="http://lol.duowan.com/" target="_blank">>>联盟专区<<</a>
         <a href="http://lol.duowan.com/1906/m_425042631560.html" target="_blank">>>云顶之弈<<</a>
       </div>
@@ -846,7 +846,6 @@ export default {
         // ************************
         // 生成羁绊目标 start
         const goals = []
-
         temp.forEach(job => {
           if (!this.activatedFetters.some(f => f.requiredType === job)) {
             let fetter = fetters.find(f => f.requiredType === job)

+ 19 - 1
2019专题/云顶之弈模拟器/src/components/m-index.vue

@@ -412,6 +412,11 @@ export default {
     // 点击添加英雄到阵容中
     addHero(_hero) {
       if (this.currentPopulation < this.currentMaxHero) {
+        if(_hero.name === '大元素使 拉克丝') {
+          if(this.selectedHeroes.find(h => h && h.name === '大元素使 拉克丝')) {
+            return alert('场上只能存在一个拉克丝。')
+          }
+        }
         this.currentHero = JSON.parse(JSON.stringify(_hero))
         this.selectedHeroes.splice(
           this.currentGird,
@@ -707,7 +712,19 @@ export default {
         this.currentSelectType = 'hero'
       }
     },
-    currentElement() {
+    currentElement(newVal) {
+      // 这里的逻辑针对琪亚娜这个英雄做特殊处理
+      const heroIndex = this.selectedHeroes.findIndex(h => h && h.name === '元素女皇 琪亚娜')
+      if(heroIndex !== -1) {
+        const elementToFetter = {
+          water: 'heroSort7',
+          fire: 'heroSort5',
+          wind: 'heroSort2',
+          earth: 'heroSort11'
+        }
+        this.selectedHeroes[heroIndex].sort = [elementToFetter[newVal]]
+      }
+      // 这里的逻辑针对阵容中在元素位置上的英雄的元素装备做修改
       this.memoElementsIndexes.forEach(i => {
         const hero = this.selectedHeroes[i]
         if(hero) {
@@ -715,6 +732,7 @@ export default {
           hero.selectedEquipments.splice(elementEquipmentIndex, 1, elementEquipmentsMap[this.currentElement])
         }
       })
+
     }
   },
   mounted() {

+ 3 - 2
2019专题/云顶之弈模拟器/webpack.prod.js

@@ -7,14 +7,15 @@ const CleanWebpackPlugin = require('clean-webpack-plugin')
 const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
 const webpack = require('webpack')
 const path = require('path')
+const VERSION = '-s2'
 
 module.exports = env => {
   const prodConf = {
     mode: 'production',
     devtool: 'cheap-module-source-map',
     output: {
-      path: env && env.test ? path.resolve(__dirname, '../../../pub/zq2019/t_ydzy_simulator') : path.resolve(__dirname, '../../../pub/zq2019/ydzy_simulator'),
-      publicPath: env && env.test ? '//pub.dwstatic.com/zq2019/t_ydzy_simulator/' : '//pub.dwstatic.com/zq2019/ydzy_simulator/',
+      path: env && env.test ? path.resolve(__dirname, '../../../pub/zq2019/t_ydzy_simulator') : path.resolve(__dirname, '../../../pub/zq2019/ydzy_simulator' + VERSION),
+      publicPath: env && env.test ? '//pub.dwstatic.com/zq2019/t_ydzy_simulator/' : '//pub.dwstatic.com/zq2019/ydzy_simulator' + VERSION + '/',
       filename: 'js/[name]_[contenthash:5].js',
     },
     module: {