|
@@ -5,7 +5,17 @@
|
|
|
class="close"
|
|
|
@click="onClickCloseDesc"
|
|
|
/>
|
|
|
- <h2>{{ desc.name }}</h2>
|
|
|
+ <h2>
|
|
|
+ <!-- 返回按钮,有bid和T才有 -->
|
|
|
+ <img
|
|
|
+ v-if="RouterObj.bid&&RouterObj.T"
|
|
|
+ class="addBackImg"
|
|
|
+ src="@/assets/images/arrow_left.png"
|
|
|
+ alt=""
|
|
|
+ @click="$router.push(`${backTypeObj[RouterObj.T]}?id=${RouterObj.bid}`)"
|
|
|
+ >
|
|
|
+ {{ desc.name }}
|
|
|
+ </h2>
|
|
|
<img
|
|
|
class="splitter"
|
|
|
src="@/assets/images/splitter.png"
|
|
@@ -21,6 +31,18 @@
|
|
|
|
|
|
<!-- 大盒子 -->
|
|
|
<div class="G4mainBox">
|
|
|
+ <!-- 简介 -->
|
|
|
+ <div class="G4box">
|
|
|
+ <div class="G4Tit">
|
|
|
+ <div class="G4TitOne">
|
|
|
+ 简介
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="G4Txt"
|
|
|
+ v-html="desc.detail || ''"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<!-- 企业 -->
|
|
|
<div
|
|
|
v-if="G4info.company.length"
|
|
@@ -38,14 +60,16 @@
|
|
|
更多 +
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 单个企业 -->
|
|
|
- <div
|
|
|
- v-for="item in G4info.company"
|
|
|
- :key="item.id"
|
|
|
- class="G41row"
|
|
|
- @click="$router.push(`/general?id=${item.id}`)"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
+ <!-- 企业列表循环 -->
|
|
|
+ <div class="G41rowMain">
|
|
|
+ <div
|
|
|
+ v-for="item in G4info.company"
|
|
|
+ :key="item.id"
|
|
|
+ class="G41row"
|
|
|
+ @click="$router.push(`/general?id=${item.id}&bid=${qiuId}&T=4`)"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 人物 -->
|
|
@@ -65,24 +89,15 @@
|
|
|
更多 +
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-for="item in G4info.person"
|
|
|
- :key="item.id"
|
|
|
- class="G42row"
|
|
|
- >
|
|
|
- <img
|
|
|
- v-if="item.thumb"
|
|
|
- :src="`${prefix}/${item.thumb}`"
|
|
|
- alt=""
|
|
|
- >
|
|
|
- <img
|
|
|
- v-else
|
|
|
- :src="require('@/assets/images/imgErr.png')"
|
|
|
- alt=""
|
|
|
+ <!-- 人物列表循环 -->
|
|
|
+ <div class="G41rowMain">
|
|
|
+ <div
|
|
|
+ v-for="item in G4info.person"
|
|
|
+ :key="item.id"
|
|
|
+ class="G41row"
|
|
|
+ @click="$router.push(`/history?id=${item.id}&bid=${qiuId}&T=4`)"
|
|
|
>
|
|
|
- <div class="G1RenBoxTxt">
|
|
|
- <h3>{{ item.name }}</h3>
|
|
|
- <p>  {{ item.description }}</p>
|
|
|
+ {{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -103,40 +118,17 @@
|
|
|
更多 +
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="G43rowBox">
|
|
|
+ <!-- 重器的列表循环 -->
|
|
|
+ <div class="G41rowMain">
|
|
|
<div
|
|
|
v-for="item in G4info.goods"
|
|
|
:key="item.id"
|
|
|
- class="G43row"
|
|
|
- :title="item.name"
|
|
|
- @click="$router.push(`/Treasure-detail?id=${item.id}`)"
|
|
|
+ class="G41row"
|
|
|
+ @click="$router.push(`/Treasure-detail?id=${item.id}&bid=${qiuId}&T=4`)"
|
|
|
>
|
|
|
- <img
|
|
|
- v-if="item.thumb"
|
|
|
- :src="`${prefix}/${item.thumb}`"
|
|
|
- alt=""
|
|
|
- >
|
|
|
- <img
|
|
|
- v-else
|
|
|
- :src="require('@/assets/images/imgErr.png')"
|
|
|
- alt=""
|
|
|
- >
|
|
|
-
|
|
|
- <p>{{ item.description }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 简介 -->
|
|
|
- <div class="G4box">
|
|
|
- <div class="G4Tit">
|
|
|
- <div class="G4TitOne">
|
|
|
- 简介
|
|
|
+ {{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="G4Txt"
|
|
|
- v-html="desc.detail || ''"
|
|
|
- />
|
|
|
</div>
|
|
|
</div>
|
|
|
</article>
|
|
@@ -152,10 +144,11 @@
|
|
|
<script>
|
|
|
import {
|
|
|
reactive,
|
|
|
- toRefs,
|
|
|
ref,
|
|
|
onMounted,
|
|
|
} from 'vue'
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
+import { backTypeObjTemp } from '@/utils2.js'
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -165,6 +158,14 @@ export default {
|
|
|
},
|
|
|
setup() {
|
|
|
|
|
|
+ // 回跳逻辑和回跳 信息
|
|
|
+ const router = useRouter()
|
|
|
+ const RouterObj = ref({})
|
|
|
+ const backTypeObj = ref(backTypeObjTemp)
|
|
|
+
|
|
|
+ // 当前选中的星球id
|
|
|
+ const qiuId = ref('')
|
|
|
+
|
|
|
const prefix = ref(process.env.VUE_APP_API_ORIGIN)
|
|
|
|
|
|
const rawData = reactive({ value: null })
|
|
@@ -193,14 +194,19 @@ export default {
|
|
|
window.gUnityInst.SendMessage('Page4', 'OnClickPlaneId', idx + 1)
|
|
|
}
|
|
|
onMounted(async () => {
|
|
|
- const url = window.location.href
|
|
|
- if (url.includes('id=')) {
|
|
|
- const id = url.split('id=')[1]
|
|
|
- // console.log('ppppppppppppppppp', id)
|
|
|
+ // console.log('router:', router.currentRoute.value.query)
|
|
|
+
|
|
|
+ const routerObj = router.currentRoute.value.query
|
|
|
+
|
|
|
+ RouterObj.value = routerObj
|
|
|
+
|
|
|
+ if (routerObj.id ) {
|
|
|
+
|
|
|
setTimeout(() => {
|
|
|
- focusStar(Number(id) - 1)
|
|
|
+ focusStar(Number(routerObj.id) - 1)
|
|
|
}, 400)
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
|
|
|
// 详情数据
|
|
@@ -232,6 +238,9 @@ export default {
|
|
|
// 发送接口拿到详情数据
|
|
|
getInfoFu(id)
|
|
|
|
|
|
+ // 星球id存起来
|
|
|
+ qiuId.value = id
|
|
|
+
|
|
|
console.log('click planet', id)
|
|
|
onClickStar(id - 1)
|
|
|
}
|
|
@@ -258,7 +267,10 @@ export default {
|
|
|
onClickStar,
|
|
|
|
|
|
isShowLoadingMask,
|
|
|
- G4info
|
|
|
+ G4info,
|
|
|
+ RouterObj,
|
|
|
+ backTypeObj,
|
|
|
+ qiuId
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -305,12 +317,21 @@ export default {
|
|
|
}
|
|
|
|
|
|
>h2 {
|
|
|
- flex: 0 0 auto;
|
|
|
+ height: 30px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ // flex: 0 0 auto;
|
|
|
font-size: 24px;
|
|
|
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
|
|
font-weight: bold;
|
|
|
color: #FFFFFF;
|
|
|
margin-bottom: 21px;
|
|
|
+ .addBackImg{
|
|
|
+ cursor: pointer;
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 20px;
|
|
|
+ height: 50px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
>img.splitter {
|
|
@@ -363,116 +384,67 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 企业
|
|
|
- .G41row {
|
|
|
- position: relative;
|
|
|
- padding-left: 30px;
|
|
|
- cursor: pointer;
|
|
|
- font-size: 16px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
-
|
|
|
- &::before {
|
|
|
- opacity: .5;
|
|
|
- content: '';
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 8px;
|
|
|
- transform: translateY(-50%);
|
|
|
- width: 10px;
|
|
|
- height: 10px;
|
|
|
- background-color: #FFE59F;
|
|
|
- border-radius: 50%;
|
|
|
- }
|
|
|
+ .G41rowMain {
|
|
|
+ max-height: 150px;
|
|
|
+ overflow-y: auto;
|
|
|
|
|
|
- &::after {
|
|
|
- content: '';
|
|
|
- opacity: 0;
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 4px;
|
|
|
- transform: translateY(-50%);
|
|
|
- width: 16px;
|
|
|
- height: 16px;
|
|
|
- border: 1px dashed #FFE59F;
|
|
|
- border-radius: 50%;
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ background: transparent;
|
|
|
+ width: calc(4 / 1080 * 83vh);
|
|
|
+ }
|
|
|
|
|
|
+ /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
|
|
|
+ &::-webkit-scrollbar-thumb {
|
|
|
+ background: rgba(220, 231, 240, 0.2);
|
|
|
+ border-radius: 2px;
|
|
|
}
|
|
|
|
|
|
- &:hover {
|
|
|
- color: #FFE59F;
|
|
|
+ .G41row {
|
|
|
+ position: relative;
|
|
|
+ padding-left: 30px;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 16px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
|
|
|
&::before {
|
|
|
- opacity: 1;
|
|
|
+ opacity: .5;
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 8px;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 10px;
|
|
|
+ height: 10px;
|
|
|
+ background-color: #FFE59F;
|
|
|
+ border-radius: 50%;
|
|
|
}
|
|
|
|
|
|
&::after {
|
|
|
- opacity: 1;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ content: '';
|
|
|
+ opacity: 0;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 4px;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ border: 1px dashed #FFE59F;
|
|
|
+ border-radius: 50%;
|
|
|
|
|
|
- // 人物
|
|
|
- .G42row {
|
|
|
- align-items: flex-start;
|
|
|
- display: flex;
|
|
|
- margin-bottom: 20px;
|
|
|
-
|
|
|
- &>img {
|
|
|
- width: 105px;
|
|
|
- object-fit: contain;
|
|
|
- }
|
|
|
-
|
|
|
- .G1RenBoxTxt {
|
|
|
- width: calc(100% - 125px);
|
|
|
- margin-left: 20px;
|
|
|
- color: #fff;
|
|
|
-
|
|
|
- &>h3 {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: 700;
|
|
|
- margin-bottom: 15px;
|
|
|
}
|
|
|
|
|
|
- &>p {
|
|
|
- font-size: 18px;
|
|
|
- font-family: Source Han Sans CN-Light, Source Han Sans CN;
|
|
|
- font-weight: 400;
|
|
|
- color: rgba(255, 255, 255, 0.8);
|
|
|
- line-height: 1.5;
|
|
|
- white-space: pre-wrap;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ &:hover {
|
|
|
+ color: #FFE59F;
|
|
|
|
|
|
- // 重器
|
|
|
- .G43rowBox {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- }
|
|
|
-
|
|
|
- .G43row {
|
|
|
- cursor: pointer;
|
|
|
- margin-bottom: 20px;
|
|
|
- margin-right: 24px;
|
|
|
- width: calc(50% - 24px);
|
|
|
- height: 180px;
|
|
|
-
|
|
|
- &>img {
|
|
|
- width: 100%;
|
|
|
- height: calc(100% - 30px);
|
|
|
- object-fit: cover;
|
|
|
- }
|
|
|
-
|
|
|
- &>p {
|
|
|
- font-size: 16px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- text-align: center;
|
|
|
- padding: 0 3px;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
+ &::before {
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
|
|
|
+ &::after {
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|