score/form
parent
f43d0df1a7
commit
e3d658ae7b
|
|
@ -149,7 +149,6 @@
|
|||
text-align: center;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
padding: 15rpx 0;
|
||||
}
|
||||
.rank .title {
|
||||
font-size: 36rpx;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<u-cell title="图片">
|
||||
<u-album slot="label" :urls="info.images" />
|
||||
</u-cell>
|
||||
<u-cell title="附件" :label="info.file"></u-cell>
|
||||
<u-cell title="附件" :label="info.file" isLink @click="copy(info.file)" />
|
||||
<u-cell title="提交时间" :value="info.created_at"></u-cell>
|
||||
<u-cell title="审核状态" :value="info.check_status_text"></u-cell>
|
||||
<u-cell title="审核时间" :value="info.check_at"></u-cell>
|
||||
|
|
@ -37,6 +37,20 @@ export default {
|
|||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
copy(text) {
|
||||
if (text) {
|
||||
uni.setClipboardData({
|
||||
data: text,
|
||||
showToast: false,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '下载地址已复制',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,13 @@
|
|||
onLoad(e) {
|
||||
if (e.type) {
|
||||
this.type = e.type
|
||||
this.$ajax.get(`/api/keyword/${this.type}`).then(res => {
|
||||
if (res.status == 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.name
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (e.id) {
|
||||
this.id = e.id
|
||||
|
|
@ -148,7 +155,12 @@
|
|||
images: this.images.length > 0 ? this.images.map(item => { return item.url }) : null,
|
||||
file: this.files.length > 0 ? this.files[0].url : null
|
||||
}
|
||||
this.$ajax.post('/api/user/score', params, { custom: {loading: true} }).then(res => {
|
||||
this.$ajax.request({
|
||||
url: this.id ? `/api/user/score/${this.id}` : '/api/user/score',
|
||||
method: this.id ? 'PUT' : 'POST',
|
||||
data: params,
|
||||
custom: { loading: true }
|
||||
}).then(res => {
|
||||
if (res.status == 0) {
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
|
|
|
|||
|
|
@ -55,8 +55,10 @@ export default {
|
|||
listHeight: 0,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
this.loadData(true)
|
||||
},
|
||||
onLoad() {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.listHeight = res.safeArea.height - 54
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -90,40 +90,17 @@
|
|||
this.user.rank = res.data.current.rank
|
||||
}
|
||||
}
|
||||
res = await this.$ajax.get('/api/keyword', { params: { key: 'score_cate_' } })
|
||||
let radarIndicator = [
|
||||
{ name: '政治忠诚' },
|
||||
{ name: '政治定力' },
|
||||
{ name: '政治担当' },
|
||||
{ name: '政治能力' },
|
||||
{ name: '政治自律' },
|
||||
]
|
||||
let radarValues = []
|
||||
res = await this.$ajax.get('/api/user/chart-option')
|
||||
var option = null
|
||||
if (res.status == 0) {
|
||||
radarIndicator = res.data.map(item => {
|
||||
radarValues.push(radarValue[item.key])
|
||||
return {key: item.key, name: item.name}
|
||||
})
|
||||
option = res.data
|
||||
}
|
||||
uni.hideLoading()
|
||||
var option = {
|
||||
radar: {
|
||||
indicator: radarIndicator
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'radar',
|
||||
data: [
|
||||
{
|
||||
value: radarValues,
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
this.$nextTick(() => {
|
||||
this.chart(option)
|
||||
})
|
||||
if (option) {
|
||||
this.$nextTick(() => {
|
||||
this.chart(option)
|
||||
})
|
||||
}
|
||||
},
|
||||
chart(option) {
|
||||
if (document.getElementById('echart')) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ export function getToken() {
|
|||
}
|
||||
|
||||
export function navigateTarget(option) {
|
||||
console.log(option)
|
||||
if (!option || !option.target_url) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -19,5 +18,7 @@ export function navigateTarget(option) {
|
|||
uni.navigateTo({
|
||||
url: option.target_url
|
||||
})
|
||||
} else if (option.target_type == 'web') {
|
||||
window.open(option.target_url)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue