349 lines
7.9 KiB
Vue
349 lines
7.9 KiB
Vue
<template>
|
||
<view class="page">
|
||
<credit-header title="信用免押金" curved></credit-header>
|
||
|
||
<!-- 商品信息:承接页要让用户和审核方都看清楚「租的是什么」 -->
|
||
<view class="product-card">
|
||
<image class="product-img" :src="itemImage || brandLogo" mode="aspectFill"></image>
|
||
<view class="product-info">
|
||
<view class="product-name">{{ itemName }}</view>
|
||
<view class="product-desc">{{ itemDesc }}</view>
|
||
<view class="product-price">
|
||
<text class="price-symbol">¥</text>
|
||
<text class="price-num">{{ rentPrice }}</text>
|
||
<text class="price-unit">/{{ rentPeriod }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="info-section">
|
||
<rental-info :item-name="itemName" :deposit-amount="depositAmount" credit-free></rental-info>
|
||
</view>
|
||
|
||
<!-- 免押说明:明确写出本服务使用了哪项信用能力 -->
|
||
<view class="section">
|
||
<view class="section-title">免押说明</view>
|
||
<view class="section-text">
|
||
本服务为线上实物租赁,使用{{ creditBrand }}免押能力:{{ creditBrand }}评估通过后,可免交 {{ depositAmount }} 元押金租用「{{ itemName }}」,
|
||
商品以快递方式发出,{{ delivery.rentStart }}。评估未通过时,需支付押金后租用;租期结束寄回商品、租约结束后,免押服务随之解除。
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 服务流程 -->
|
||
<view class="section">
|
||
<view class="section-title">服务流程</view>
|
||
<view class="step-list">
|
||
<view v-for="(step, index) in steps" :key="index" class="step-item">
|
||
<view class="step-index">{{ index + 1 }}</view>
|
||
<view class="step-body">
|
||
<view class="step-title">{{ step.title }}</view>
|
||
<view class="step-desc">{{ step.desc }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 租赁与归还规则 -->
|
||
<view class="section">
|
||
<view class="section-title">租赁与归还</view>
|
||
<view v-if="serviceProvider" class="section-text">服务提供方:{{ serviceProvider }}</view>
|
||
<view class="rule-list">
|
||
<view v-for="(rule, index) in rules" :key="index" class="rule-item">
|
||
<text class="rule-dot"></text>
|
||
<text class="rule-text">{{ rule }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="agreement" @tap="toggleAgree">
|
||
<view class="checkbox" :class="{ checked: agreed }">
|
||
<view v-if="agreed" class="checkbox-check"></view>
|
||
</view>
|
||
<view class="agreement-text">
|
||
我已阅读并同意
|
||
<text class="agreement-link" @tap.stop="openAgreement">《信用服务授权条款》</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="tip">注:请记得归还物品哦,以免对你的信用产生影响</view>
|
||
|
||
<view class="bottom-bar">
|
||
<button class="btn-primary" @tap="handleContinue">继续</button>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { ref } from 'vue'
|
||
import config from '@/config'
|
||
|
||
const brandLogo = config.brandLogo
|
||
const itemImage = config.itemImage
|
||
const itemName = config.itemName
|
||
const itemDesc = config.itemDesc
|
||
const rentPrice = config.rentPrice
|
||
const rentPeriod = config.rentPeriod
|
||
const depositAmount = config.depositAmount
|
||
const creditBrand = config.creditBrand
|
||
const serviceProvider = config.serviceProvider
|
||
|
||
const delivery = config.delivery
|
||
|
||
const steps = [
|
||
{ title: '提交租赁申请', desc: '填写收货信息并提交订单,同意租赁规则与信用授权条款' },
|
||
{ title: '信用评估授权', desc: `跳转支付宝信用免押页,授权${creditBrand}完成信用评估` },
|
||
{ title: '免押成功下单', desc: '评估通过即免交押金,订单生效后安排发货' },
|
||
{ title: '收货并使用', desc: `${delivery.shipTime},${delivery.rentStart}` },
|
||
{ title: '寄回结束租约', desc: '租期结束前按寄回指引寄回商品,验收通过后租约结束,免押自动解除' }
|
||
]
|
||
|
||
const rules = [
|
||
`按 ${rentPrice} 元/${rentPeriod} 计收租金,实际金额以订单页为准`,
|
||
`押金 ${depositAmount} 元:信用评估通过可免交,未通过需支付,归还验收后退还`,
|
||
`运费:${delivery.shipFee};${delivery.shipTime},${delivery.rentStart}`,
|
||
'租期结束前请按寄回指引寄回商品,人为损坏或配件缺失按租赁规则处理',
|
||
'逾期未寄回将按租赁规则收取费用,并可能影响你的信用记录'
|
||
]
|
||
|
||
const agreed = ref(false)
|
||
|
||
function toggleAgree() {
|
||
agreed.value = !agreed.value
|
||
}
|
||
|
||
function openAgreement() {
|
||
uni.navigateTo({ url: config.agreements.credit })
|
||
}
|
||
|
||
// 线上下单需要收货信息,下一步在收货信息页填写并提交
|
||
function handleContinue() {
|
||
if (!agreed.value) {
|
||
uni.showToast({ title: '请先阅读并同意协议', icon: 'none' })
|
||
return
|
||
}
|
||
uni.navigateTo({ url: '/pages/address/address' })
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
.page {
|
||
min-height: 100vh;
|
||
padding-bottom: 220rpx;
|
||
background: #ffffff;
|
||
}
|
||
|
||
/* 商品卡片压在蓝色头部与白色内容交界处,对应截图里的悬浮效果 */
|
||
.product-card {
|
||
position: relative;
|
||
z-index: 2;
|
||
margin: -120rpx 40rpx 0;
|
||
overflow: hidden;
|
||
border-radius: 24rpx;
|
||
background: #ffffff;
|
||
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.12);
|
||
}
|
||
|
||
.product-img {
|
||
display: block;
|
||
width: 100%;
|
||
/* 商品实拍图为横版(约 1.9:1),满版展示才能看清项圈全貌 */
|
||
height: 340rpx;
|
||
background: #f7f8fa;
|
||
}
|
||
|
||
.product-info {
|
||
padding: 24rpx;
|
||
}
|
||
|
||
.product-name {
|
||
font-size: 32rpx;
|
||
font-weight: 600;
|
||
color: #1a1a1a;
|
||
}
|
||
|
||
.product-desc {
|
||
margin-top: 12rpx;
|
||
font-size: 24rpx;
|
||
line-height: 1.5;
|
||
color: #888888;
|
||
}
|
||
|
||
.product-price {
|
||
display: flex;
|
||
align-items: baseline;
|
||
margin-top: 16rpx;
|
||
color: #1e6bff;
|
||
}
|
||
|
||
.price-symbol {
|
||
font-size: 24rpx;
|
||
}
|
||
|
||
.price-num {
|
||
font-size: 38rpx;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.price-unit {
|
||
margin-left: 4rpx;
|
||
font-size: 24rpx;
|
||
color: #999999;
|
||
}
|
||
|
||
.info-section {
|
||
margin-top: 40rpx;
|
||
}
|
||
|
||
.section {
|
||
margin: 48rpx 40rpx 0;
|
||
}
|
||
|
||
.section-title {
|
||
display: flex;
|
||
align-items: center;
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #1a1a1a;
|
||
}
|
||
|
||
.section-title::before {
|
||
content: '';
|
||
width: 6rpx;
|
||
height: 28rpx;
|
||
margin-right: 12rpx;
|
||
border-radius: 6rpx;
|
||
background: #1e6bff;
|
||
}
|
||
|
||
.section-text {
|
||
margin-top: 16rpx;
|
||
font-size: 26rpx;
|
||
line-height: 1.7;
|
||
color: #555555;
|
||
}
|
||
|
||
.step-list {
|
||
margin-top: 24rpx;
|
||
}
|
||
|
||
.step-item {
|
||
display: flex;
|
||
margin-bottom: 24rpx;
|
||
}
|
||
|
||
.step-item:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.step-index {
|
||
display: flex;
|
||
flex-shrink: 0;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
margin-right: 16rpx;
|
||
border-radius: 50%;
|
||
background: rgba(30, 107, 255, 0.1);
|
||
font-size: 24rpx;
|
||
font-weight: 600;
|
||
color: #1e6bff;
|
||
}
|
||
|
||
.step-body {
|
||
flex: 1;
|
||
}
|
||
|
||
.step-title {
|
||
font-size: 28rpx;
|
||
color: #1a1a1a;
|
||
}
|
||
|
||
.step-desc {
|
||
margin-top: 6rpx;
|
||
font-size: 24rpx;
|
||
line-height: 1.5;
|
||
color: #999999;
|
||
}
|
||
|
||
.rule-list {
|
||
margin-top: 16rpx;
|
||
}
|
||
|
||
.rule-item {
|
||
display: flex;
|
||
margin-top: 14rpx;
|
||
}
|
||
|
||
.rule-item:first-child {
|
||
margin-top: 0;
|
||
}
|
||
|
||
.rule-dot {
|
||
flex-shrink: 0;
|
||
width: 8rpx;
|
||
height: 8rpx;
|
||
margin: 16rpx 14rpx 0 4rpx;
|
||
border-radius: 50%;
|
||
background: #c9cdd4;
|
||
}
|
||
|
||
.rule-text {
|
||
flex: 1;
|
||
font-size: 26rpx;
|
||
line-height: 1.6;
|
||
color: #555555;
|
||
}
|
||
|
||
.agreement {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
margin: 48rpx 40rpx 0;
|
||
}
|
||
|
||
.checkbox {
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 32rpx;
|
||
height: 32rpx;
|
||
margin-top: 4rpx;
|
||
border: 2rpx solid #c9cdd4;
|
||
border-radius: 50%;
|
||
background: #ffffff;
|
||
}
|
||
|
||
.checkbox.checked {
|
||
border-color: #1e6bff;
|
||
background: #1e6bff;
|
||
}
|
||
|
||
.checkbox-check {
|
||
width: 12rpx;
|
||
height: 6rpx;
|
||
margin-top: -4rpx;
|
||
border-left: 2rpx solid #ffffff;
|
||
border-bottom: 2rpx solid #ffffff;
|
||
transform: rotate(-45deg);
|
||
}
|
||
|
||
.agreement-text {
|
||
margin-left: 14rpx;
|
||
font-size: 26rpx;
|
||
line-height: 1.5;
|
||
color: #333333;
|
||
}
|
||
|
||
.agreement-link {
|
||
color: #1e6bff;
|
||
}
|
||
|
||
.tip {
|
||
margin: 20rpx 40rpx 0 86rpx;
|
||
font-size: 24rpx;
|
||
line-height: 1.6;
|
||
color: #999999;
|
||
}
|
||
</style>
|