|
@@ -1,62 +1,65 @@
|
|
|
<template>
|
|
|
- <layout title='推荐云手机'>
|
|
|
- <div :class="isShowApp?'introduction':'introduction introduction-white'">
|
|
|
- <div class="introduction-title" v-if="isShowApp">
|
|
|
- 推荐云手机
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="introduction-tips">
|
|
|
- 请搜索您在云手机内希望使用的应用!
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="introduction-search">
|
|
|
- <img src="@/assets/image/introductionCloudPhone/search.png" alt="" />
|
|
|
- <input v-model="searchText" type="search" placeholder="请输入应用名"/>
|
|
|
- <div @click="search">搜索</div>
|
|
|
- </div>
|
|
|
+ <layoutBack :isGoBack='true'>
|
|
|
+ <layout title='推荐云手机'>
|
|
|
+ <div :class="isShowApp?'introduction':'introduction introduction-white'">
|
|
|
+ <div class="introduction-title" v-if="isShowApp">
|
|
|
+ 推荐云手机
|
|
|
+ </div>
|
|
|
|
|
|
- <div v-if="applicationList.length && isShow">
|
|
|
<div class="introduction-tips">
|
|
|
- 以下推荐应用选您需要使用的应用
|
|
|
+ 请搜索您在云手机内希望使用的应用!
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="introduction-search">
|
|
|
+ <img src="@/assets/image/introductionCloudPhone/search.png" alt="" />
|
|
|
+ <input v-model="searchText" type="search" placeholder="请输入应用名" />
|
|
|
+ <div @click="search">搜索</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <div class="application">
|
|
|
- <div v-for="(item,index) in applicationList" :key="index" @click="selectApplication(item)">
|
|
|
- {{ item }}
|
|
|
+
|
|
|
+ <div v-if="applicationList.length && isShow">
|
|
|
+ <div class="introduction-tips">
|
|
|
+ 以下推荐应用选您需要使用的应用
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="application">
|
|
|
+ <div v-for="(item,index) in applicationList" :key="index" @click="selectApplication(item)">
|
|
|
+ {{ item }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div style="margin-top: 24px;" v-if="appSeatchList.length && !isShow">
|
|
|
- <div class="application-list" v-for="(item,index) in appSeatchList" :key="index">
|
|
|
- <div class="application-list-top">
|
|
|
- <img class="application-list-img" width="42" height="42" :src="item.img" alt="" />
|
|
|
- <div class="application-list-rigth">
|
|
|
- <div class="application-list-title">{{item.appName}} <span v-if="item.articleId>0" @click="goArticleDetails(item)">点击阅读</span></div>
|
|
|
- <div class="application-list-tips">游戏名称云手机使用教程</div>
|
|
|
+ <div style="margin-top: 24px;" v-if="appSeatchList.length && !isShow">
|
|
|
+ <div class="application-list" v-for="(item,index) in appSeatchList" :key="index">
|
|
|
+ <div class="application-list-top">
|
|
|
+ <img class="application-list-img" width="42" height="42" :src="item.img" alt="" />
|
|
|
+ <div class="application-list-rigth">
|
|
|
+ <div class="application-list-title">{{item.appName}} <span v-if="item.articleId>0" @click="goArticleDetails(item)">点击阅读</span></div>
|
|
|
+ <div class="application-list-tips">游戏名称云手机使用教程</div>
|
|
|
+ </div>
|
|
|
+ <div class="application-list-btn" @click="pay(item)">购买云手机 <img width="12" src="@/assets/image/introductionCloudPhone/btn.png" /></div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="application-list-btn" @click="pay(item)">购买云手机 <img width="12" src="@/assets/image/introductionCloudPhone/btn.png" /></div>
|
|
|
|
|
|
+ <div class="application-list-bottom">推荐机型:{{item.list?item.list.map(o=>o.phoneTypeStr).join('/'):''}}</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="application-list-bottom">推荐机型:{{item.list?item.list.map(o=>o.phoneTypeStr).join('/'):''}}</div>
|
|
|
</div>
|
|
|
|
|
|
- </div>
|
|
|
+ <div class="application-default" v-if="!appSeatchList.length && !isShow">
|
|
|
+ <img v-if="isShowApp" width="305" src="@/assets/image/introductionCloudPhone/default.png" />
|
|
|
|
|
|
- <div class="application-default" v-if="!appSeatchList.length && !isShow">
|
|
|
- <img v-if="isShowApp" width="305" src="@/assets/image/introductionCloudPhone/default.png" />
|
|
|
+ <img v-else width="305" src="@/assets/image/introductionCloudPhone/defaultWhite.png" />
|
|
|
+ <div>很遗憾,没有搜索到您想要的应用</div>
|
|
|
+ </div>
|
|
|
|
|
|
- <img v-else width="305" src="@/assets/image/introductionCloudPhone/defaultWhite.png" />
|
|
|
- <div>很遗憾,没有搜索到您想要的应用</div>
|
|
|
</div>
|
|
|
-
|
|
|
- </div>
|
|
|
- </layout>
|
|
|
+ </layout>
|
|
|
+ </layoutBack>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import layoutBack from '@/components/layout';
|
|
|
import layout from './components/layout';
|
|
|
import { fileKeyToUrl } from '@/plugins/file-center.js';
|
|
|
import uni from '@/static/static/js/uni.webview.1.5.2';
|
|
@@ -74,12 +77,9 @@ export default {
|
|
|
appSeatchList: [], // 应用数组
|
|
|
};
|
|
|
},
|
|
|
- components: { layout },
|
|
|
+ components: { layout, layoutBack },
|
|
|
created() {
|
|
|
this.getSuggestApp()
|
|
|
- if (this.$userAgent.isAndroid) {
|
|
|
- window.native.goneBack()
|
|
|
- }
|
|
|
},
|
|
|
watch: {
|
|
|
searchText(value) {
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
computed: {
|
|
|
isShowApp() {
|
|
|
// 是否是APP
|
|
|
- // const isApp = this.$userAgent.isSzx || this.$userAgent.isSzxBrowser;
|
|
|
+ const isApp = this.$userAgent.isSzx || this.$userAgent.isSzxBrowser;
|
|
|
const isAndroid = this.$userAgent.isAndroid;
|
|
|
const isIos = this.$userAgent.isIos;
|
|
|
const isWx = this.$userAgent.isWx;
|
|
@@ -98,15 +98,16 @@ export default {
|
|
|
// 如果微信小程序环境的,也不显示头部
|
|
|
// 如果是h5 就显示头部
|
|
|
let bool = false;
|
|
|
- bool = isAndroid || isIos ? true : false;
|
|
|
+ bool = isApp && (isAndroid || isIos) ? true : false;
|
|
|
return bool;
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
pay() {
|
|
|
- if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
|
+ this.isApp = this.$userAgent.isSzx || this.$userAgent.isSzxBrowser
|
|
|
+ if (this.isApp && this.$userAgent.isAndroid) {
|
|
|
window.native.startPurchase();
|
|
|
- } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
|
|
|
+ } else if (this.isApp && this.$userAgent.isIos) {
|
|
|
window.webkit.messageHandlers.startPurchase.postMessage({});
|
|
|
} else if (this.$userAgent.isMiniProgram) {
|
|
|
this.$wx.miniProgram.navigateTo({
|
|
@@ -156,7 +157,7 @@ export default {
|
|
|
font-family: PingFangSC, PingFang SC;
|
|
|
font-weight: 500;
|
|
|
font-size: 18px;
|
|
|
- color: #CFD1D4;
|
|
|
+ color: #cfd1d4;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.introduction-tips {
|
|
@@ -238,6 +239,7 @@ export default {
|
|
|
.application-list-img {
|
|
|
width: 42px;
|
|
|
margin-right: 8px;
|
|
|
+ border-radius: 12px;
|
|
|
}
|
|
|
|
|
|
.application-list-rigth {
|