first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
0e636c3b-2219-4a18-b899-882f50e4071c

View File

@@ -0,0 +1,113 @@
const {
index,
util
} = getApp().globalData
Page({
/**
* 页面的初始数据
*/
data: {
id: 0,
listInfo: {},
isShow: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({ id: options.id })
this.GetInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
async GetInfo() {
let res = await index.info({
thing_id: this.data.id
});
console.log(res);
this.setData({
listInfo: res
})
},
iWant() {
if (this.data.listInfo.thing_status == 0) {
this.setData({ isShow: true })
} else {
wx.showToast({
title: '抱歉,已认领了哦 😁',
icon: 'none',
duration: 2000
})
}
},
showGallery() {
wx.previewImage({
current: 0,
urls: [ this.data.listInfo.thing_img ]
})
},
tellPhone() {
wx.makePhoneCall({
phoneNumber: this.data.listInfo.user_phone
})
},
onClose() {
this.setData({ isShow: false });
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,7 @@
{
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-tag": "@vant/weapp/tag/index"
},
"navigationBarTitleText": "详情"
}

View File

@@ -0,0 +1,51 @@
<view class="info content">
<view class="user_info">
<image src="{{ listInfo.user_portrait }}"></image>
<view class="user_text">
<view class="name">{{ listInfo.user_name }}</view>
<view class="school">
{{ listInfo.user_school.length == 0 ? '用户未填写学校信息': listInfo.user_school }}
</view>
</view>
<view bindtap="iWant" class="status {{ listInfo.thing_status == 0 ? 'no' : 'yes' }}">
{{
listInfo.thing_type == 1
? listInfo.thing_status == 0 ? '我要认领' : '已认领'
: listInfo.thing_status == 0 ? '我要归还' : '已寻回'
}}
</view>
</view>
<view class="goods">
<view class="title">
<view class="left_text">
{{ listInfo.thing_title }}
<view class="time">{{ listInfo.thing_createdtime }}</view>
</view>
<van-tag class="right_type" color="#ffd23c" round size="medium" plain type="primary">
{{ listInfo.thing_category == 1
? '证件'
: listInfo.thing_category == 2
? '服装'
: listInfo.thing_category == 3
? '数码'
: listInfo.thing_category == 4
? '日用品'
: '其他'
}}
</van-tag>
</view>
<view class="desc">{{ listInfo.thing_introduce }}</view>
<image src="{{ listInfo.thing_img }}" mode="widthFix" bindtap="showGallery"></image>
</view>
<van-popup show="{{ isShow }}" closeable round bind:close="onClose">
<view class="popup">
<view class="top">
<image src="{{ listInfo.user_portrait }}"></image>
<!-- <view class="popup_text">{{ listInfo.user_name }}</view> -->
<view class="tell" bindtap="tellPhone">电话联系我</view>
</view>
<view class="security">请勿轻易相信他人,线下见面请注意个人安全</view>
</view>
</van-popup>
</view>

View File

@@ -0,0 +1,109 @@
page {
background: #fff;
}
.info {
padding-top: 40rpx;
}
.user_info {
display: flex;
position: relative;
align-items: center;
}
.status {
position: absolute;
right: 0;
top: 24rpx;
padding: 17rpx 30rpx;
font-size: 31rpx;
color: #171717;
border-radius: 36rpx;
transform: rotate(28deg);
box-shadow: 3px 4px 18px #ffd23c;
}
.no {
background: #ffd23c;
}
.yes {
background: no-repeat;
box-shadow: none;
border: 1px solid #8d8d8d;
color: #999 !important;
}
.user_info image {
width: 120rpx;
height: 120rpx;
border-radius: 100%;
margin-right: 20rpx;
}
.user_info .user_text {}
.user_info .user_text .name {
font-size: 38rpx;
font-weight: 600;
}
.user_info .user_text .school,
.time {
font-size: 26rpx;
color: #999;
}
.goods {
margin-top: 48rpx;
}
.goods .title{
font-size: 34rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.goods .desc{
margin-bottom: 15rpx;
line-height: 42rpx;
font-size: 28rpx;
}
.goods image{
margin: 0 auto;
display: block;
}
.popup {
text-align: center;
padding: 30rpx 38rpx;
box-sizing: border-box;
width: 81vw;
height: 53vh;
display: flex;
flex-direction: column;
}
.popup image{
width: 240rpx;
height: 240rpx;
border-radius: 100%;
}
.top {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.popup .popup_text{}
.popup .tell{
width: 40%;
height: 86rpx;
line-height: 86rpx;
text-align: center;
border-radius: 46rpx;
border: 1px solid #ffd23c;
font-size: 30rpx;
color: #ecb600;
margin: 0 auto;
margin-top: 60rpx;
}
.security {
font-size: 24rpx;
color: #999;
}