增加微信sitemap文件, 增加收藏页面
This commit is contained in:
parent
d735ce9b7c
commit
45e9114a1b
@ -18,7 +18,7 @@ export const checkWord = (params: any) => {
|
|||||||
export const getArticle = (aid: string) => {
|
export const getArticle = (aid: string) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${GHOST_BASE}/api/emulated/article`,
|
url: `${GHOST_BASE}/emulated/article`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {id: aid},
|
data: {id: aid},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
@ -3,7 +3,8 @@ let jcshare = jcfw.share;
|
|||||||
|
|
||||||
let SDKManage = function() {
|
let SDKManage = function() {
|
||||||
// this.isoffical = global.env === 'product';
|
// this.isoffical = global.env === 'product';
|
||||||
this.isoffical = global.env === 'product';
|
// this.isoffical = global.env === 'product';
|
||||||
|
this.isoffical = true
|
||||||
this.gameId = 8007;
|
this.gameId = 8007;
|
||||||
this.hasLogin = false;
|
this.hasLogin = false;
|
||||||
this.vision = '1.0.0';
|
this.vision = '1.0.0';
|
||||||
|
@ -52,7 +52,8 @@
|
|||||||
"appid": "wxea7901da6fe663e6",
|
"appid": "wxea7901da6fe663e6",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : true
|
"urlCheck" : true
|
||||||
}
|
},
|
||||||
|
"sitemapLocation": "sitemap.json"
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
|
@ -46,6 +46,12 @@
|
|||||||
"navigationBarTitleText": "价格列表"
|
"navigationBarTitleText": "价格列表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/me/collect",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "收藏列表"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
"path": "pages/article/index",
|
"path": "pages/article/index",
|
||||||
|
@ -63,7 +63,6 @@ import PriceCell from '@/components/PriceCell/index.vue'
|
|||||||
import DlcCell from '@/components/DlcCell/index.vue'
|
import DlcCell from '@/components/DlcCell/index.vue'
|
||||||
import { getGameInfo, getGamePrice } from '@/api/game_data'
|
import { getGameInfo, getGamePrice } from '@/api/game_data'
|
||||||
import { IGameInfo } from '@/modules/gameinfo'
|
import { IGameInfo } from '@/modules/gameinfo'
|
||||||
import {uniIcons, uniTag} from '@dcloudio/uni-ui'
|
|
||||||
import { getCollectList, getZanList, updateCollectInfo, updateZanInfo } from '@/api/game'
|
import { getCollectList, getZanList, updateCollectInfo, updateZanInfo } from '@/api/game'
|
||||||
import { UserModule } from '@/store/modules/user'
|
import { UserModule } from '@/store/modules/user'
|
||||||
|
|
||||||
@ -73,8 +72,6 @@ import { UserModule } from '@/store/modules/user'
|
|||||||
ImageSwiper,
|
ImageSwiper,
|
||||||
PriceCell,
|
PriceCell,
|
||||||
DlcCell,
|
DlcCell,
|
||||||
uniIcons,
|
|
||||||
uniTag
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export default class extends Vue{
|
export default class extends Vue{
|
||||||
|
74
src/pages/me/collect.vue
Normal file
74
src/pages/me/collect.vue
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<uni-list>
|
||||||
|
<uni-list-item v-for="item in games" >
|
||||||
|
<game-small-cell :g-data="item" v-on:cellClicked = 'onClick'></game-small-cell>
|
||||||
|
</uni-list-item>
|
||||||
|
</uni-list>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component, Vue } from 'vue-property-decorator'
|
||||||
|
import { IGameInfo } from '@/modules/gameinfo'
|
||||||
|
import GameSmallCell from '@/components/GameSmallCell/index.vue'
|
||||||
|
import { searchGames } from '@/api/game_data'
|
||||||
|
import { UserModule } from '@/store/modules/user'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
name: 'Collect',
|
||||||
|
components: {
|
||||||
|
GameSmallCell
|
||||||
|
}
|
||||||
|
})
|
||||||
|
export default class extends Vue{
|
||||||
|
private games: IGameInfo[] = []
|
||||||
|
|
||||||
|
async onLoad() {
|
||||||
|
await this.fetchGames({})
|
||||||
|
}
|
||||||
|
|
||||||
|
onClick(e: any) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/info/index?gameId=' + e,
|
||||||
|
animationType: 'pop-in',
|
||||||
|
animationDuration: 200})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private async fetchGames(param: any) {
|
||||||
|
let searchParam: any = {skip: 0}
|
||||||
|
let ids = Array.from(UserModule.collectSet)
|
||||||
|
if (ids.length > 0) {
|
||||||
|
|
||||||
|
searchParam['gameids'] = ids.join(',');
|
||||||
|
}
|
||||||
|
Object.assign(searchParam, param)
|
||||||
|
let res: any = await searchGames(searchParam)
|
||||||
|
if (res.length === 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for (let data of res) {
|
||||||
|
data.gameId = data.oldGameId + ''
|
||||||
|
data.tags = []
|
||||||
|
if (data.chinese) {
|
||||||
|
let arr = data.chinese.split(';')
|
||||||
|
arr.forEach((o: string) => data.tags.push({name: o, type: 'error'}))
|
||||||
|
}
|
||||||
|
if (data.isLowest) data.tags.push({name: '史低', type: 'success', fill: true})
|
||||||
|
this.games.push(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
game-small-cell{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.uni-list-item-box {
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<uni-list>
|
<uni-list>
|
||||||
|
<uni-list-item>
|
||||||
|
<text-arrow-cell class="cell-item" title="收藏" icon="heart" @cellClicked = 'toCollect'></text-arrow-cell>
|
||||||
|
</uni-list-item>
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<uni-list-item>
|
<uni-list-item>
|
||||||
<text-arrow-cell class="cell-item" title="联系客服" icon="chatbubble" open-type="contact"></text-arrow-cell>
|
<text-arrow-cell class="cell-item" title="联系客服" icon="chatbubble" open-type="contact"></text-arrow-cell>
|
||||||
@ -33,6 +36,12 @@ export default class extends Vue{
|
|||||||
}
|
}
|
||||||
onClick() {
|
onClick() {
|
||||||
|
|
||||||
|
}
|
||||||
|
toCollect() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/me/collect`,
|
||||||
|
animationType: 'pop-in',
|
||||||
|
animationDuration: 200})
|
||||||
}
|
}
|
||||||
onClickSm() {
|
onClickSm() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
20
src/sitemap.json
Normal file
20
src/sitemap.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "pages/index/index"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "pages/list/index"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "pages/info/index"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "disallow",
|
||||||
|
"page": "*"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user