130 lines
2.6 KiB
Vue
130 lines
2.6 KiB
Vue
<template>
|
|
<view class="content">
|
|
<view class="head">
|
|
<image class="img" src="/static/images/liangbiao-bg.png" mode="widthFix"></image>
|
|
</view>
|
|
<view class="center">
|
|
<view class="center-title">{{ table.tableInfo.tableName }}</view>
|
|
<view class="center-text">
|
|
<u-parse :content="table.tableInfo.tableJson" class="table-content"></u-parse>
|
|
</view>
|
|
</view>
|
|
<view class="bottom">
|
|
<view class="btn" @click="toFillInfo">填写信息</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
let music = uni.createInnerAudioContext(); //创建播放器对象
|
|
export default {
|
|
data() {
|
|
return {
|
|
tableAlias: null,
|
|
table: {
|
|
tableInfo: {
|
|
tableName: null,
|
|
tableJson: null,
|
|
tableBgmusic: null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
this.tableAlias = option.alias
|
|
this.table = JSON.parse(uni.getStorageSync(option.alias));
|
|
console.log('36',this.table,option)
|
|
// this.playBgMusic(this.table.tableInfo.tableBgmusic);
|
|
},
|
|
methods: {
|
|
playBgMusic(url) {
|
|
if (url) {
|
|
url = this.baseUrl + url;
|
|
music.src = url; //选择播放的音频
|
|
music.loop = true;
|
|
music.play(); //执行播放
|
|
}
|
|
},
|
|
async toFillInfo() {
|
|
const res = await this.$myRequest({
|
|
url: '/getAppInfo',
|
|
method: 'GET'
|
|
})
|
|
uni.navigateTo({
|
|
url: '/tablePackage/pages/infoFill?alias=' + this.tableAlias+"&tableName="+this.table.tableInfo.tableName
|
|
})
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.content {
|
|
.head {
|
|
width: 100%;
|
|
|
|
.img {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.center {
|
|
margin: 0rpx 30rpx;
|
|
line-height: 20px;
|
|
border-radius: 10px;
|
|
background-color: rgba(255, 255, 255, 1);
|
|
text-align: center;
|
|
box-shadow: 0px 2px 6px 0px rgba(228, 228, 228, 100);
|
|
padding: 22rpx 60rpx;
|
|
|
|
.center-title {
|
|
color: rgba(16, 16, 16, 1);
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
margin-bottom: 24rpx;
|
|
}
|
|
|
|
.center-text {
|
|
color: rgba(82, 81, 81, 1);
|
|
font-size: 14px;
|
|
text-align: left;
|
|
}
|
|
|
|
.attention {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 28rpx;
|
|
color: rgba(82, 81, 81, 1);
|
|
margin-top: 20rpx;
|
|
margin-bottom: 10rpx;
|
|
|
|
text {
|
|
margin-left: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.bottom {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: 50rpx;
|
|
|
|
.btn {
|
|
width: 700rpx;
|
|
height: 100rpx;
|
|
border-radius: 50rpx;
|
|
background-color: rgba(40, 123, 206, 1);
|
|
color: rgba(255, 255, 255, 1);
|
|
font-size: 14px;
|
|
text-align: center;
|
|
line-height: 100rpx;
|
|
margin-bottom: 50rpx;
|
|
}
|
|
}
|
|
|
|
.table-content {
|
|
text-indent: 2em;
|
|
}
|
|
}
|
|
</style> |