rank
parent
58c2fdb7a3
commit
f43d0df1a7
|
|
@ -1,3 +1,3 @@
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
VUE_APP_BASE_API = 'http://local.party-rank.host'
|
VUE_APP_BASE_API = 'http://party-rank.abcdefg.fun'
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
border: 1px solid #e5e5e5;
|
border: 1px solid #e5e5e5;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
padding: 15rpx 0;
|
||||||
}
|
}
|
||||||
.table-td {
|
.table-td {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,13 @@
|
||||||
"navigationBarTitleText" : "排行榜"
|
"navigationBarTitleText" : "排行榜"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/score/cate-rank",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "排行榜"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/user/profile",
|
"path" : "pages/user/profile",
|
||||||
"style" :
|
"style" :
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<swiper class="swiper" autoplay circular>
|
<swiper class="swiper" autoplay circular>
|
||||||
<swiper-item v-for="item in banners" :key="item.id">
|
<swiper-item v-for="item in banners" :key="item.id" @click="target(item.link_config)">
|
||||||
<image :src="item.picture" style="height: 300rpx;width: 100%;" />
|
<image :src="item.picture" style="height: 300rpx;width: 100%;" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="app-content">
|
<view class="app-content">
|
||||||
<view class="item" @click="commonArticle('common')">
|
<view v-for="item in navList" :key="item.id" class="item" @click="target(item.link_config)">
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
<image src="../../static/images/form-active.png" />
|
<image :src="item.picture" />
|
||||||
</view>
|
</view>
|
||||||
<view class="title">共性指标</view>
|
<view class="title">{{ item.title }}</view>
|
||||||
</view>
|
|
||||||
<view class="item" @click="authArticle">
|
|
||||||
<view class="icon">
|
|
||||||
<image src="../../static/images/form-active.png" />
|
|
||||||
</view>
|
|
||||||
<view class="title">进阶指标</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="feedback">
|
|
||||||
<view class="icon">
|
|
||||||
<image src="../../static/images/form-active.png" />
|
|
||||||
</view>
|
|
||||||
<view class="title">书记信箱</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rank">
|
<view class="rank">
|
||||||
|
|
@ -48,20 +36,17 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Rank from '../../components/rank.vue'
|
import Rank from '../../components/rank.vue'
|
||||||
import { isLogin } from '../../utils/index'
|
import { isLogin, navigateTarget } from '../../utils/index'
|
||||||
export default {
|
export default {
|
||||||
components: { Rank },
|
components: { Rank },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
header: ['排名', '党员', '得分'],
|
header: ['排名', '党员', '得星'],
|
||||||
header1: ['排名', '支部', '得分'],
|
header1: ['排名', '支部', '平均得星'],
|
||||||
userList: [],
|
userList: [],
|
||||||
cateList: [],
|
cateList: [],
|
||||||
banners: [
|
banners: [],
|
||||||
{id: 1, 'image': 'https://via.placeholder.com/800x300.png?text=1'},
|
navList: [],
|
||||||
{id: 2, 'image': 'https://via.placeholder.com/800x300.png?text=2'},
|
|
||||||
{id: 3, 'image': 'https://via.placeholder.com/800x300.png?text=3'},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -75,25 +60,27 @@
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.banners = res.data
|
this.banners = res.data
|
||||||
}
|
}
|
||||||
res = await this.$ajax.get('/api/rank', { params: { type: 'user', limit: 20 } })
|
res = await this.$ajax.get('/api/rank/user', { params: { limit: 20 } })
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.userList = res.data
|
this.userList = res.data.list
|
||||||
}
|
}
|
||||||
res = await this.$ajax.get('/api/rank', { params: { type: 'cate', limit: 5 } })
|
res = await this.$ajax.get('/api/rank/cate', { params: { limit: 5 } })
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.cateList = res.data
|
this.cateList = res.data.list
|
||||||
|
}
|
||||||
|
res = await this.$ajax.get('/api/banner', { params: { key: 'banner_3' }})
|
||||||
|
if (res.status == 0) {
|
||||||
|
this.navList = res.data
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},
|
},
|
||||||
userRank(type) {
|
userRank(type) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/score/user-rank?type=${type}`
|
url: `/pages/score/${type}-rank`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
commonArticle() {
|
target(option) {
|
||||||
uni.navigateTo({
|
return navigateTarget(option)
|
||||||
url: `/pages/article/detail?type=common`
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
authArticle() {
|
authArticle() {
|
||||||
// 验证是否登录
|
// 验证是否登录
|
||||||
|
|
@ -113,11 +100,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
feedback() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/feedback/add'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -166,13 +148,15 @@
|
||||||
.rank .header {
|
.rank .header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
position: relative;
|
||||||
|
padding: 15rpx 0;
|
||||||
}
|
}
|
||||||
.rank .title {
|
.rank .title {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
.rank .tool {
|
.rank .tool {
|
||||||
float: right;
|
right: 30rpx;
|
||||||
margin-right: 30rpx;
|
position: absolute;
|
||||||
}
|
}
|
||||||
.rank .body {
|
.rank .body {
|
||||||
padding-top: 15rpx;
|
padding-top: 15rpx;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export default {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/auth/login'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,114 @@
|
||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<view class="title">
|
||||||
|
<view class="name1">
|
||||||
|
<picker mode="selector" :range="dates" @change="changeDate">{{ date }}<u-icon name="arrow-down-fill" /></picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="user.show" class="me">
|
||||||
|
我的支部平均得星: <text class="waring">{{ user.score }}</text>, 我的排名: <text class="waring">{{ user.rank }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="rank">
|
||||||
|
<rank :header="header" :list="list" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Rank from '../../components/rank.vue'
|
||||||
|
import { isLogin } from '../../utils/index'
|
||||||
|
export default {
|
||||||
|
components: { Rank },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
header: ['排名', '支部', '平均得星'],
|
||||||
|
list: [],
|
||||||
|
date: '当前',
|
||||||
|
index: 0,
|
||||||
|
dates: ['当前'],
|
||||||
|
user: {
|
||||||
|
show: false,
|
||||||
|
score: '-',
|
||||||
|
rank: '-'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.user.show = isLogin()
|
||||||
|
this.init()
|
||||||
|
this.load()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
this.$ajax.get('/api/rank/cate/dates').then(res => {
|
||||||
|
if (res.status == 0) {
|
||||||
|
this.dates = ['当前'].concat(res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
load() {
|
||||||
|
let params = {}
|
||||||
|
let url = '/api/rank/cate'
|
||||||
|
if (this.index > 0) {
|
||||||
|
params.sn = this.dates[this.index]
|
||||||
|
url = '/api/rank/cate/list'
|
||||||
|
}
|
||||||
|
this.$ajax.get(url, { params, custom: {loading: true} }).then(res => {
|
||||||
|
if (res.status == 0) {
|
||||||
|
this.list = res.data.list
|
||||||
|
const current = res.data.current
|
||||||
|
if (this.user.show && current.cate) {
|
||||||
|
this.user.score = current.score
|
||||||
|
this.user.rank = current.rank
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeDate(e) {
|
||||||
|
this.index = e.detail.value
|
||||||
|
this.date = this.dates[this.index]
|
||||||
|
this.load()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.title {
|
||||||
|
background-color: white;
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
.rank {
|
||||||
|
background-color: white;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.name1 {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.name1 ::v-deep .u-icon {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.me {
|
||||||
|
background-color: white;
|
||||||
|
text-align: center;
|
||||||
|
margin: 15rpx 0;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
}
|
||||||
|
.me .waring {
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #f0ad4e;
|
||||||
|
}
|
||||||
|
::v-deep uni-picker {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<swiper class="swiper" autoplay circular>
|
<swiper class="swiper" autoplay circular>
|
||||||
<swiper-item v-for="item in banners" :key="item.id">
|
<swiper-item v-for="item in banners" :key="item.id" @click="target(item.link_config)">
|
||||||
<image :src="item.picture" style="height: 300rpx;width: 100%;" />
|
<image :src="item.picture" style="height: 300rpx;width: 100%;" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
@ -27,14 +27,14 @@
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="article rich-text">
|
<view v-if="content" class="article rich-text">
|
||||||
<rich-text :nodes="content" />
|
<rich-text :nodes="content" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { isLogin } from '../../utils/index'
|
import { isLogin, navigateTarget } from '../../utils/index'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -81,6 +81,9 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/score/form?type=${id}`
|
url: `/pages/score/form?type=${id}`
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
target(option) {
|
||||||
|
return navigateTarget(option)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -97,11 +100,10 @@
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
.app .item {
|
.app .item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 10rpx;
|
|
||||||
}
|
}
|
||||||
.app .icon ::v-deep uni-image {
|
.app .icon ::v-deep uni-image {
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<u-cell title="审核时间" :value="info.check_at"></u-cell>
|
<u-cell title="审核时间" :value="info.check_at"></u-cell>
|
||||||
<u-cell title="审核人" :value="info.check_user ? info.check_user.name : ''"></u-cell>
|
<u-cell title="审核人" :value="info.check_user ? info.check_user.name : ''"></u-cell>
|
||||||
<u-cell v-if="info.check_status == 2" title="未通过原因" :value="info.check_remarks"></u-cell>
|
<u-cell v-if="info.check_status == 2" title="未通过原因" :value="info.check_remarks"></u-cell>
|
||||||
<u-cell v-if="info.check_status == 1" title="得分" :value="info.score"></u-cell>
|
<u-cell v-if="info.check_status == 1" title="得星" :value="info.score"></u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<view class="labels">
|
<view class="labels">
|
||||||
<view class="label">提交时间: {{ item.created_at }}</view>
|
<view class="label">提交时间: {{ item.created_at }}</view>
|
||||||
<view v-if="item.check_status > 0" class="label">审核时间: {{ item.check_at }}</view>
|
<view v-if="item.check_status > 0" class="label">审核时间: {{ item.check_at }}</view>
|
||||||
<view v-if="item.check_status == 1" class="label">得分: <text class="text-success">+{{ item.score }}</text></view>
|
<view v-if="item.check_status == 1" class="label">得星: <text class="text-success">+{{ item.score }}</text></view>
|
||||||
<view v-if="item.check_status == 2" class="label">未通过原因: <u-text type="error" :text="item.check_remarks" /></view>
|
<view v-if="item.check_status == 2" class="label">未通过原因: <u-text type="error" :text="item.check_remarks" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="options">
|
<view class="options">
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="user.show" class="me">
|
<view v-if="user.show" class="me">
|
||||||
我的得分: <text class="waring">{{ user.score }}</text>, 我的排名: <text class="waring">{{ user.rank }}</text>
|
我的得星: <text class="waring">{{ user.score }}</text>, 我的排名: <text class="waring">{{ user.rank }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rank">
|
<view class="rank">
|
||||||
<rank :header="header" :list="list" />
|
<rank :header="header" :list="list" />
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
components: { Rank },
|
components: { Rank },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
type: 'user',
|
header: ['排名', '支部', '得星'],
|
||||||
header: ['排名', '党员', '得分'],
|
|
||||||
list: [],
|
list: [],
|
||||||
date: '当前',
|
date: '当前',
|
||||||
index: 0,
|
index: 0,
|
||||||
|
|
@ -35,50 +34,33 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
if (e.type) {
|
|
||||||
this.type = e.type
|
|
||||||
this.header = ['排名', this.type == 'user' ? '党员' : '支部', '得分'];
|
|
||||||
}
|
|
||||||
this.user.show = isLogin()
|
this.user.show = isLogin()
|
||||||
this.init()
|
this.init()
|
||||||
this.load()
|
this.load()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
this.$ajax.get('/api/rank/dates', { params: { type: this.type } }).then(res => {
|
this.$ajax.get('/api/rank/user/dates').then(res => {
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.dates = ['当前'].concat(res.data)
|
this.dates = ['当前'].concat(res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
load() {
|
load() {
|
||||||
let url = '/api/rank'
|
let params = {}
|
||||||
let params = { type: this.type }
|
let url = '/api/rank/user'
|
||||||
if (this.index > 0) {
|
if (this.index > 0) {
|
||||||
url = '/api/rank/list'
|
|
||||||
params.sn = this.dates[this.index]
|
params.sn = this.dates[this.index]
|
||||||
|
url = '/api/rank/user/list'
|
||||||
}
|
}
|
||||||
this.$ajax.get(url, { params, custom: {loading: true} }).then(res => {
|
this.$ajax.get(url, { params, custom: {loading: true} }).then(res => {
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.list = res.data
|
this.list = res.data.list
|
||||||
}
|
const current = res.data.current
|
||||||
})
|
if (this.user.show) {
|
||||||
this.loadUser()
|
this.user.score = current.score
|
||||||
},
|
this.user.rank = current.rank
|
||||||
loadUser() {
|
}
|
||||||
if (!this.user.show) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let url = '/api/rank/current'
|
|
||||||
let params = { type: this.type }
|
|
||||||
if (this.index > 0) {
|
|
||||||
url = '/api/rank/current-list'
|
|
||||||
params.sn = this.dates[this.index]
|
|
||||||
}
|
|
||||||
this.$ajax.get(url, { params }).then(res => {
|
|
||||||
if (res.status == 0) {
|
|
||||||
this.user.rank = res.data.rank
|
|
||||||
this.user.score = res.data.score
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,17 +21,17 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item">
|
<view class="item" @click="rank">
|
||||||
<view class="number">{{ user.current_score }}</view>
|
<view class="number">{{ user.current_score }}</view>
|
||||||
<view class="text">当前得星</view>
|
<view class="text">当前得星</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border"></view>
|
<view class="border"></view>
|
||||||
<view class="item">
|
<view class="item" @click="rank">
|
||||||
<view class="number">{{ user.rank }}</view>
|
<view class="number">{{ user.rank }}</view>
|
||||||
<view class="text">总排名</view>
|
<view class="text">总排名</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="border"></view>
|
<view class="border"></view>
|
||||||
<view class="item">
|
<view class="item" @click="rank">
|
||||||
<view class="number">{{ user.score }}</view>
|
<view class="number">{{ user.score }}</view>
|
||||||
<view class="text">累计得星</view>
|
<view class="text">累计得星</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -84,9 +84,11 @@
|
||||||
this.user.score = res.data.score
|
this.user.score = res.data.score
|
||||||
radarValue = res.data.scores
|
radarValue = res.data.scores
|
||||||
}
|
}
|
||||||
res = await this.$ajax.get('/api/rank/current', { params: { type: 'user' } })
|
res = await this.$ajax.get('/api/rank/user')
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.user.rank = res.data.rank
|
if (res.data.current) {
|
||||||
|
this.user.rank = res.data.current.rank
|
||||||
|
}
|
||||||
}
|
}
|
||||||
res = await this.$ajax.get('/api/keyword', { params: { key: 'score_cate_' } })
|
res = await this.$ajax.get('/api/keyword', { params: { key: 'score_cate_' } })
|
||||||
let radarIndicator = [
|
let radarIndicator = [
|
||||||
|
|
@ -156,6 +158,11 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/score/list'
|
url: '/pages/score/list'
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
rank() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/score/user-rank?type=user'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@ export default {
|
||||||
this.$ajax.get('/api/user/profile', {custom: {loading: true}}).then(res => {
|
this.$ajax.get('/api/user/profile', {custom: {loading: true}}).then(res => {
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.user = res.data
|
this.user = res.data
|
||||||
|
if (!this.user.avatar) {
|
||||||
|
this.user.avatar = '../../static/images/default-avatar.png'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,15 @@ export function setToken(value) {
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
return uni.getStorageSync('party_rank_auth_token')
|
return uni.getStorageSync('party_rank_auth_token')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function navigateTarget(option) {
|
||||||
|
console.log(option)
|
||||||
|
if (!option || !option.target_url) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (option.target_type == 'app') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: option.target_url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue