|
@@ -1,7 +1,11 @@
|
|
<template>
|
|
<template>
|
|
<view class="share-body">
|
|
<view class="share-body">
|
|
<view class="share-head">
|
|
<view class="share-head">
|
|
- <u-image src="@/static/def_personal_avatar.png" width='750' height="253"></u-image>
|
|
|
|
|
|
+ <view class="back-icon" @click="toHome">
|
|
|
|
+ <u-icon name="home"></u-icon>
|
|
|
|
+ <text>首页</text>
|
|
|
|
+ </view>
|
|
|
|
+ <u-image src="@/static/share1.jpg" width='750' height="253"></u-image>
|
|
</view>
|
|
</view>
|
|
<view class="share-info">
|
|
<view class="share-info">
|
|
<view class="userinfo">
|
|
<view class="userinfo">
|
|
@@ -14,12 +18,12 @@
|
|
<view>
|
|
<view>
|
|
<u-image shape="circle" :src="carInfo.icon||'@/static/def_imgs.png'" width='150' height="150"></u-image>
|
|
<u-image shape="circle" :src="carInfo.icon||'@/static/def_imgs.png'" width='150' height="150"></u-image>
|
|
</view>
|
|
</view>
|
|
- <view>VIN:{{carInfo.vinNumber}}</view>
|
|
|
|
- <view>{{carInfo.modelLabel}}</view>
|
|
|
|
|
|
+ <view>VIN:{{vinNo}}</view>
|
|
|
|
+ <view>{{carInfo.text}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="cbutton flex align_center justify_between">
|
|
<view class="cbutton flex align_center justify_between">
|
|
- <u-button @click="copyVin" shape="circle">复制VIN</u-button>
|
|
|
|
- <u-button @click="copyCar" shape="circle">复制车型</u-button>
|
|
|
|
|
|
+ <u-button @click="copyVin" v-if="vinNo" shape="circle">复制VIN</u-button>
|
|
|
|
+ <u-button @click="copyCar" v-if="carInfo.text" shape="circle">复制车型</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -36,11 +40,17 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShareAppMessage(){},
|
|
onShareAppMessage(){},
|
|
- onLoad() {
|
|
|
|
|
|
+ onLoad(opts) {
|
|
this.vinNo = opts.vinNo
|
|
this.vinNo = opts.vinNo
|
|
this.userName = opts.userName || ''
|
|
this.userName = opts.userName || ''
|
|
|
|
+ this.getInfo()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ toHome(){
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: "/pages/index/index"
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 复制vin
|
|
// 复制vin
|
|
copyVin(){
|
|
copyVin(){
|
|
uni.setClipboardData({
|
|
uni.setClipboardData({
|
|
@@ -50,7 +60,7 @@
|
|
// 复制车型
|
|
// 复制车型
|
|
copyCar(){
|
|
copyCar(){
|
|
uni.setClipboardData({
|
|
uni.setClipboardData({
|
|
- data: this.carInfo.modelLabel||'',
|
|
|
|
|
|
+ data: this.carInfo.text||'',
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getInfo(){
|
|
getInfo(){
|
|
@@ -79,6 +89,19 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
|
+page{
|
|
|
|
+ background-color: #ffffff;
|
|
|
|
+}
|
|
|
|
+.share-head{
|
|
|
|
+ position: relative;
|
|
|
|
+ .back-icon{
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 30rpx;
|
|
|
|
+ top: 90rpx;
|
|
|
|
+ color: #333;
|
|
|
|
+ z-index: 10000;
|
|
|
|
+ }
|
|
|
|
+}
|
|
.share-info{
|
|
.share-info{
|
|
background-image: linear-gradient(#bceafa 0%,#ffffff 60%);
|
|
background-image: linear-gradient(#bceafa 0%,#ffffff 60%);
|
|
padding: 30rpx;
|
|
padding: 30rpx;
|