miao33: 从 main 同步 single_uniapp22miao,dart-sass 兼容修复,DEPLOY.md 更新

- 从 main 获取 single_uniapp22miao 子项目
- dart-sass: /deep/ -> ::v-deep,calc 运算符加空格
- DEPLOY.md 采用 shccd159 版本(4 子项目架构说明)

Made-with: Cursor
This commit is contained in:
apple
2026-03-16 11:16:42 +08:00
parent 9c29721dc4
commit 079076a70e
356 changed files with 569762 additions and 129 deletions

View File

@@ -0,0 +1,72 @@
<template>
<view class="contract-page">
<view class="content">
<view class="title">{{ agreementTitle }}</view>
<view class="article">
<rich-text :nodes="agreementContent"></rich-text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
type: '',
agreementTitle: '',
agreementContent: ''
}
},
onLoad(options) {
this.type = options.type || 'user';
this.loadAgreement();
},
methods: {
async loadAgreement() {
try {
const res = await this.$http.get('/api/setting/agreement', {
type: this.type
});
if (res.code === 0) {
this.agreementTitle = res.data.title;
this.agreementContent = res.data.content;
}
} catch (error) {
console.error('加载协议失败:', error);
// 显示默认内容
this.agreementTitle = '用户协议';
this.agreementContent = '<p>协议内容加载中...</p>';
}
}
}
}
</script>
<style lang="scss" scoped>
.contract-page {
min-height: 100vh;
background-color: #fff;
padding: 30rpx;
}
.content {
.title {
font-size: 36rpx;
font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 40rpx;
}
.article {
font-size: 28rpx;
color: #666;
line-height: 1.8;
}
}
</style>

View File

@@ -0,0 +1,65 @@
<template>
<view class="contract-page">
<view class="content">
<view class="title">隐私政策</view>
<view class="article">
<rich-text :nodes="content"></rich-text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
content: ''
}
},
onLoad() {
this.loadContent();
},
methods: {
async loadContent() {
try {
const res = await this.$http.get('/api/setting/agreement', {
type: 'privacy'
});
if (res.code === 0) {
this.content = res.data.content;
}
} catch (error) {
console.error('加载隐私政策失败:', error);
}
}
}
}
</script>
<style lang="scss" scoped>
.contract-page {
min-height: 100vh;
background-color: #fff;
padding: 30rpx;
}
.content {
.title {
font-size: 36rpx;
font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 40rpx;
}
.article {
font-size: 28rpx;
color: #666;
line-height: 1.8;
}
}
</style>

View File

@@ -0,0 +1,75 @@
<template>
<view class="agreement-page">
<view class="agreement-list">
<view
v-for="(item, index) in agreementList"
:key="index"
class="agreement-item"
@click="viewAgreement(item)"
>
<text class="title">{{ item.title }}</text>
<text class="arrow"></text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
agreementList: [
{ title: '用户协议', type: 'user', url: '/pages/sub-pages/agreement/contract' },
{ title: '隐私政策', type: 'privacy', url: '/pages/sub-pages/agreement/contract1' },
{ title: '购买委托代卖协议', type: 'sale', url: '/pages/sub-pages/agreement/contract' },
{ title: '我的合同', type: 'my', url: '/pages/sub-pages/agreement/my-contract' }
]
}
},
methods: {
viewAgreement(item) {
uni.navigateTo({
url: `${item.url}?type=${item.type}`
});
}
}
}
</script>
<style lang="scss" scoped>
.agreement-page {
min-height: 100vh;
background-color: #f5f5f5;
padding: 20rpx 30rpx;
}
.agreement-list {
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
.agreement-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1px solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.title {
font-size: 28rpx;
color: #333;
}
.arrow {
font-size: 50rpx;
color: #ccc;
}
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<view class="my-contract-page">
<view class="contract-list">
<view
v-for="(contract, index) in contractList"
:key="index"
class="contract-item"
@click="viewContract(contract)"
>
<view class="contract-info">
<view class="title">{{ contract.title }}</view>
<view class="time">{{ contract.created_at }}</view>
</view>
<view class="status">{{ contract.status_text }}</view>
</view>
<!-- 空状态 -->
<view class="empty-state" v-if="contractList.length === 0 && !loading">
<text class="icon">📄</text>
<text class="text">暂无合同</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
contractList: [],
loading: false
}
},
onLoad() {
this.loadContractList();
},
methods: {
async loadContractList() {
this.loading = true;
try {
const res = await this.$http.get('/api/contract/list');
if (res.code === 0) {
this.contractList = res.data.list || [];
}
} catch (error) {
console.error('加载合同列表失败:', error);
} finally {
this.loading = false;
}
},
viewContract(contract) {
uni.navigateTo({
url: `/pages/sub-pages/webview/index?url=${encodeURIComponent(contract.url)}`
});
}
}
}
</script>
<style lang="scss" scoped>
.my-contract-page {
min-height: 100vh;
background-color: #f5f5f5;
padding: 20rpx 30rpx;
}
.contract-list {
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
.contract-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1px solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.contract-info {
flex: 1;
.title {
font-size: 28rpx;
color: #333;
margin-bottom: 10rpx;
}
.time {
font-size: 24rpx;
color: #999;
}
}
.status {
padding: 8rpx 20rpx;
background-color: #4CAF50;
color: #fff;
font-size: 22rpx;
border-radius: 20rpx;
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 200rpx 0;
.icon {
font-size: 120rpx;
margin-bottom: 20rpx;
}
.text {
font-size: 28rpx;
color: #999;
}
}
</style>