result json change
This commit is contained in:
parent
3b88a7daba
commit
c1300780ef
@ -13,7 +13,7 @@
|
||||
<div class="card-bd">
|
||||
<div class="card-cont">{{maker.desc}}</div>
|
||||
<div class="card-ipt-wrap">
|
||||
<input class="card-ipt" placeholder="点击输入你的名字" type="text" v-model="users" />
|
||||
<input class="card-ipt" placeholder="点击输入你的名字" type="text" v-model="users" maxlength="12"/>
|
||||
</div>
|
||||
<div @click="getResult" class="card-btn">GO</div>
|
||||
</div>
|
||||
|
@ -106,6 +106,10 @@ export default {
|
||||
async mounted() {
|
||||
await this.getResult()
|
||||
await this.getHot()
|
||||
let str = this.result.join('\n');
|
||||
console.log('[result]');
|
||||
console.log(this.result);
|
||||
console.log(str);
|
||||
const palette = {
|
||||
background: '#eee',
|
||||
width: '750rpx',
|
||||
@ -125,37 +129,50 @@ export default {
|
||||
type: 'text',
|
||||
text: this.users,
|
||||
css: {
|
||||
top: '20rpx',
|
||||
left: '40rpx',
|
||||
width: '750rpx',
|
||||
top: '100rpx',
|
||||
left: '100rpx',
|
||||
width: '650rpx',
|
||||
color: '#000000',
|
||||
textAlign: 'left',
|
||||
fontSize: '40rpx'
|
||||
fontSize: '40rpx',
|
||||
fontWeight: 'bold',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
text: '--------------------------------',
|
||||
css: {
|
||||
top: '150rpx',
|
||||
left: '100rpx',
|
||||
width: '650rpx',
|
||||
color: '#000000',
|
||||
textAlign: 'left',
|
||||
fontSize: '40rpx',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
text: this.title,
|
||||
css: {
|
||||
top: '100rpx',
|
||||
left: '0rpx',
|
||||
width: '750rpx',
|
||||
top: '210rpx',
|
||||
left: '100rpx',
|
||||
width: '650rpx',
|
||||
color: '#000000',
|
||||
textAlign: 'center',
|
||||
textAlign: 'left',
|
||||
fontSize: '52rpx',
|
||||
fontWeight: 'bold',
|
||||
lineHeight: '64rpx'
|
||||
lineHeight: '60rpx'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
text: this.result.join('\n'),
|
||||
css: {
|
||||
top: '220rpx',
|
||||
top: '310rpx',
|
||||
left: '100rpx',
|
||||
width: '550rpx',
|
||||
color: '#000000',
|
||||
lineHeight: '72rpx',
|
||||
lineHeight: '80rpx',
|
||||
fontSize: '48rpx'
|
||||
}
|
||||
},
|
||||
@ -224,6 +241,11 @@ export default {
|
||||
users: this.users
|
||||
})
|
||||
this.result = data.result
|
||||
if(this.result instanceof Array){
|
||||
if(this.result.length > 0 && this.result[0] == ''){
|
||||
this.result.splice(0,1);
|
||||
}
|
||||
}
|
||||
this.title = data.title
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user