奇点
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

177 lines
3.6 KiB

<template>
<view class="maxbox" v-if="list">
<image :src="list.imagePath"></image>
<view>
<view>{{list.collectionName}}</view>
<view>{{list.collectorNumber}}</view>
<view>
<image :src="list.writerAvatar"></image>
<text>{{list.artistName}}</text>
</view>
</view>
</view>
<view class="phone">
<input placeholder="请输入好友手机号" v-model="phone"/>
</view>
<view class="phone">
<input placeholder="请再次输入手机号" v-model="newphone"/>
</view>
<view @click="zhuanzhen" class="butns">
转赠
</view>
<view class="suomin">
<view class="title">转赠说明</view>
<view>1. 转赠冷却期为7天,用户在获得藏品7天后可进行转赠</view>
<view>2. 请确认好友手机号,转赠成功后不可撤回</view>
<view>3. 转赠只限无偿赠送,本平台外发生的任何交易,均与本平台无关,如造成任何损失均由当事人自行承担全部责任</view>
<view style="margin-top:55upx ;">* 最终解释权在法律允许范围内归平台所有</view>
</view>
</template>
<script>
import {criticismmydetails,donation} from '@/api/user.js'
import {reactive,toRefs} from 'vue'
export default {
props:['id'],
setup(props) {
let details=reactive({
list:{},
phone:'',
newphone:''
})
criticismmydetails({
id: props.id
}).then(res => {
console.log(res);
details.list = res.data
})
let fangdou=false
function zhuanzhen(){
if(fangdou){
return
}
fangdou=true
if(details.phone!=details.newphone){
uni.showToast({
title:'两次号码不一致,请确认正确号码',
icon:'none'
})
return
}
donation({phone:details.phone,myCollId:props.id}).then(res=>{
console.log(res);
if(res.code==200){
uni.showToast({
title:'转赠成功',
icon:'none'
})
setTimeout(()=>{
uni.reLaunch({
url:'../user/user'
})
},1500)
}else{
fangdou=false
uni.showToast({
title:res.msg,
icon:'none'
})
}
})
}
return {
zhuanzhen,
...toRefs(details)
}
}
}
</script>
<style lang="scss">
.suomin{
margin-top: 140upx;
margin-left: 32upx;
color: #ffffff;
font-weight: 500;
font-size: 24upx;
line-height: 40upx;
>.title{
font-size: 32upx;
margin-bottom: 20upx;
}
}
.butns{
width: 668upx;
height: 84upx;
background: linear-gradient(351deg, #9735DC 0%, #570CDC 100%);
border-radius: 200upx;
font-size: 28upx;
display: flex;
align-items: center;
justify-content: center;
margin: auto;
margin-top: 66upx;
color: #ffffff;
}
.phone{
margin: auto;
margin-top: 45upx;
width: 668upx;
height: 84upx;
border-radius: 42upx;
opacity: 1;
border: 2upx solid #8D8C9F;
display: flex;
align-items: center;
padding-left: 45upx;
box-sizing: border-box;
color: #ffffff;
}
.phone input{
width: 550upx;
}
.maxbox{
width: 686upx;
// height: 258upx;
background: #23262F;
margin: auto;
margin-top: 40upx;
margin-bottom:106upx;
border-radius: 12upx;
display: flex;
align-items: center;
padding: 32upx 28upx;
box-sizing: border-box;
>image{
width: 190upx;
height: 190upx;
margin-right: 26upx;
}
>view{
display: flex;
flex-direction: column;
color: #ffffff;
>view{
&:nth-of-type(1){
font-size: 32upx;
}
&:nth-of-type(2){
font-size: 24upx;
margin-top: 24upx;
margin-bottom: 20upx;
}
&:nth-of-type(3){
font-size: 28upx;
display: flex;
align-items: center;
}
>image{
width: 56upx;
height: 56upx;
border-radius: 50%;
margin-right: 26upx;
}
}
}
}
</style>