48 lines
1.0 KiB
Vue
48 lines
1.0 KiB
Vue
<template>
|
|
<!-- 自定义PK消息组件模板 -->
|
|
<view class="custom-pk-message" @click="onTap">
|
|
<image
|
|
:src="message.link"
|
|
mode="scaleToFill"
|
|
style="width: 100%;height: 100%;"
|
|
/>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
message: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
title: 'Hello'
|
|
}
|
|
},
|
|
onLoad() {
|
|
// 页面加载时执行
|
|
},
|
|
methods: {
|
|
// 方法定义
|
|
onTap() {
|
|
uni.navigateTo({
|
|
url: `/pages/PKMessageprocessing/PKMessageprocessing?customData=${JSON.stringify(this.message.customData)}`,
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.custom-pk-message{
|
|
width: 385rpx;
|
|
height: 195rpx;
|
|
padding: 20rpx;
|
|
background-color: #ffffff;
|
|
border-radius: 20rpx;
|
|
margin:19rpx 15rpx 19rpx 15rpx;;
|
|
}
|
|
</style> |