初始化参股

This commit is contained in:
2026-01-27 18:06:04 +08:00
commit 2774a539bf
254 changed files with 33255 additions and 0 deletions

View File

@@ -0,0 +1,276 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
if (!Array) {
const _easycom_section_header_1 = common_vendor.resolveComponent("section-header");
_easycom_section_header_1();
}
const _easycom_section_header = () => "../../components/section-header/section-header.js";
if (!Math) {
_easycom_section_header();
}
class ServiceType extends UTS.UTSType {
static get$UTSMetadata$() {
return {
kind: 2,
get fields() {
return {
id: { type: String, optional: false },
name: { type: String, optional: false },
desc: { type: String, optional: false },
emoji: { type: String, optional: false }
};
},
name: "ServiceType"
};
}
constructor(options, metadata = ServiceType.get$UTSMetadata$(), isJSONParse = false) {
super();
this.__props__ = UTS.UTSType.initProps(options, metadata, isJSONParse);
this.id = this.__props__.id;
this.name = this.__props__.name;
this.desc = this.__props__.desc;
this.emoji = this.__props__.emoji;
delete this.__props__;
}
}
class ProcessItem extends UTS.UTSType {
static get$UTSMetadata$() {
return {
kind: 2,
get fields() {
return {
step: { type: Number, optional: false },
title: { type: String, optional: false },
description: { type: String, optional: false }
};
},
name: "ProcessItem"
};
}
constructor(options, metadata = ProcessItem.get$UTSMetadata$(), isJSONParse = false) {
super();
this.__props__ = UTS.UTSType.initProps(options, metadata, isJSONParse);
this.step = this.__props__.step;
this.title = this.__props__.title;
this.description = this.__props__.description;
delete this.__props__;
}
}
class MaterialItem extends UTS.UTSType {
static get$UTSMetadata$() {
return {
kind: 2,
get fields() {
return {
name: { type: String, optional: false },
price: { type: String, optional: false },
desc: { type: String, optional: false },
tags: { type: UTS.UTSType.withGenerics(Array, [String]), optional: false }
};
},
name: "MaterialItem"
};
}
constructor(options, metadata = MaterialItem.get$UTSMetadata$(), isJSONParse = false) {
super();
this.__props__ = UTS.UTSType.initProps(options, metadata, isJSONParse);
this.name = this.__props__.name;
this.price = this.__props__.price;
this.desc = this.__props__.desc;
this.tags = this.__props__.tags;
delete this.__props__;
}
}
class FaqItem extends UTS.UTSType {
static get$UTSMetadata$() {
return {
kind: 2,
get fields() {
return {
question: { type: String, optional: false },
answer: { type: String, optional: false },
expanded: { type: Boolean, optional: false }
};
},
name: "FaqItem"
};
}
constructor(options, metadata = FaqItem.get$UTSMetadata$(), isJSONParse = false) {
super();
this.__props__ = UTS.UTSType.initProps(options, metadata, isJSONParse);
this.question = this.__props__.question;
this.answer = this.__props__.answer;
this.expanded = this.__props__.expanded;
delete this.__props__;
}
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
setup(__props) {
const serviceTypes = common_vendor.ref([
new ServiceType({ id: "repair", name: "局部修复", desc: "破损、划痕修复", emoji: "🔧" }),
new ServiceType({ id: "recolor", name: "改色翻新", desc: "皮面改色换新", emoji: "🎨" }),
new ServiceType({ id: "refurbish", name: "整体翻新", desc: "全面翻新升级", emoji: "✨" }),
new ServiceType({ id: "custom", name: "定制换皮", desc: "个性化定制", emoji: "💎" })
]);
const processList = common_vendor.ref([]);
const materials = common_vendor.ref([
new MaterialItem({
name: "头层牛皮",
price: "¥800-1500/平",
desc: "采用进口头层牛皮,质地柔软,透气性好,使用寿命长",
tags: ["进口原料", "透气舒适", "耐用耐磨"]
}),
new MaterialItem({
name: "二层牛皮",
price: "¥400-800/平",
desc: "经济实惠的选择,经过特殊处理后外观与头层相近",
tags: ["性价比高", "外观精美", "易打理"]
}),
new MaterialItem({
name: "科技布",
price: "¥200-500/平",
desc: "新型环保面料,防水防污,清洁方便,触感舒适",
tags: ["防水防污", "易清洁", "环保健康"]
}),
new MaterialItem({
name: "棉麻布艺",
price: "¥150-400/平",
desc: "天然面料,透气舒适,适合追求自然风格的客户",
tags: ["天然环保", "透气清爽", "风格多样"]
})
]);
const faqList = common_vendor.ref([
new FaqItem({
question: "翻新需要多长时间?",
answer: "根据沙发的大小和翻新程度不同一般需要3-10个工作日。局部修复1-3天整体翻新5-10天。",
expanded: false
}),
new FaqItem({
question: "翻新后能保证多久?",
answer: "我们提供2年质保服务质保期内如有非人为损坏免费维修。头层牛皮正常使用可达10年以上。",
expanded: false
}),
new FaqItem({
question: "可以上门取送吗?",
answer: "是的,我们提供免费上门取送服务(市区范围内),郊区会收取少量运输费用。",
expanded: false
}),
new FaqItem({
question: "如何报价?",
answer: "我们提供免费上门评估服务,师傅会根据沙发的实际情况给出详细报价,价格透明无隐形消费。",
expanded: false
}),
new FaqItem({
question: "定金和尾款如何支付?",
answer: "确认订单后支付30%定金,翻新完成验收满意后支付尾款。支持微信、支付宝、银行转账等多种方式。",
expanded: false
})
]);
const fetchServiceProcess = () => {
return common_vendor.__awaiter(this, void 0, void 0, function* () {
try {
const res = yield api_index.getServiceProcess();
const data = res.data;
processList.value = data.map((item) => {
return new ProcessItem({
step: item["step"],
title: item["title"],
description: item["description"]
});
});
} catch (e) {
common_vendor.index.__f__("error", "at pages/service/index.uvue:217", "获取服务流程失败", e);
}
});
};
const toggleFaq = (index) => {
faqList.value[index].expanded = !faqList.value[index].expanded;
};
const handleServiceClick = (item) => {
common_vendor.index.navigateTo({
url: "/pages/booking/index"
});
};
const goToBooking = () => {
common_vendor.index.navigateTo({
url: "/pages/booking/index"
});
};
common_vendor.onLoad(() => {
fetchServiceProcess();
});
return (_ctx, _cache) => {
"raw js";
const __returned__ = {
a: common_vendor.p({
title: "服务类型"
}),
b: common_vendor.f(common_vendor.unref(serviceTypes), (item, k0, i0) => {
return {
a: common_vendor.t(item.emoji),
b: common_vendor.t(item.name),
c: common_vendor.t(item.desc),
d: item.id,
e: common_vendor.o(($event) => {
return handleServiceClick();
}, item.id)
};
}),
c: common_vendor.p({
title: "服务流程"
}),
d: common_vendor.f(common_vendor.unref(processList), (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.step),
b: common_vendor.t(item.title),
c: common_vendor.t(item.description),
d: index < common_vendor.unref(processList).length - 1
}, index < common_vendor.unref(processList).length - 1 ? {} : {}, {
e: item.step
});
}),
e: common_vendor.p({
title: "材质说明"
}),
f: common_vendor.f(common_vendor.unref(materials), (item, k0, i0) => {
return {
a: common_vendor.t(item.name),
b: common_vendor.t(item.price),
c: common_vendor.t(item.desc),
d: common_vendor.f(item.tags, (tag, k1, i1) => {
return {
a: common_vendor.t(tag),
b: tag
};
}),
e: item.name
};
}),
g: common_vendor.p({
title: "常见问题"
}),
h: common_vendor.f(common_vendor.unref(faqList), (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.question),
b: common_vendor.t(item.expanded ? "" : "+"),
c: item.expanded
}, item.expanded ? {
d: common_vendor.t(item.answer)
} : {}, {
e: index,
f: common_vendor.o(($event) => {
return toggleFaq(index);
}, index)
});
}),
i: common_vendor.o(goToBooking),
j: common_vendor.sei(common_vendor.gei(_ctx, ""), "view")
};
return __returned__;
};
}
});
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/service/index.js.map

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "服务介绍",
"usingComponents": {
"section-header": "../../components/section-header/section-header"
}
}

View File

@@ -0,0 +1 @@
<view id="{{j}}" change:eS="{{uV.sS}}" eS="{{$eS[j]}}" change:eA="{{uV.sA}}" eA="{{$eA[j]}}" class="{{['page', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}"><scroll-view class="page-scroll" scroll-y enable-flex="true" enhanced="true"><view class="banner"><view class="banner-content"><text class="banner-title">专业沙发翻新服务</text><text class="banner-desc">让旧沙发焕发新生</text></view></view><view class="section"><section-header u-i="7558dcb8-0" bind:__l="__l" u-p="{{a||''}}"></section-header><view class="service-grid"><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="service-item" bindtap="{{item.e}}"><view class="service-icon-bg"><text class="service-icon">{{item.a}}</text></view><text class="service-name">{{item.b}}</text><text class="service-desc">{{item.c}}</text></view></view></view><view class="section"><section-header u-i="7558dcb8-1" bind:__l="__l" u-p="{{c||''}}"></section-header><view class="process-list"><view wx:for="{{d}}" wx:for-item="item" wx:key="e" class="process-item"><view class="process-step"><text class="step-num">{{item.a}}</text></view><view class="process-content"><text class="process-title">{{item.b}}</text><text class="process-desc">{{item.c}}</text></view><view wx:if="{{item.d}}" class="process-line"></view></view></view></view><view class="section"><section-header u-i="7558dcb8-2" bind:__l="__l" u-p="{{e||''}}"></section-header><view class="material-list"><view wx:for="{{f}}" wx:for-item="item" wx:key="e" class="material-item"><view class="material-header"><text class="material-name">{{item.a}}</text><text class="material-price">{{item.b}}</text></view><text class="material-desc">{{item.c}}</text><view class="material-tags"><text wx:for="{{item.d}}" wx:for-item="tag" wx:key="b" class="material-tag">{{tag.a}}</text></view></view></view></view><view class="section"><section-header u-i="7558dcb8-3" bind:__l="__l" u-p="{{g||''}}"></section-header><view class="faq-list"><view wx:for="{{h}}" wx:for-item="item" wx:key="e" class="faq-item" bindtap="{{item.f}}"><view class="faq-header"><text class="faq-question">{{item.a}}</text><text class="faq-arrow">{{item.b}}</text></view><view wx:if="{{item.c}}" class="faq-answer"><text class="faq-answer-text">{{item.d}}</text></view></view></view></view><view class="bottom-space"></view></scroll-view><view class="bottom-bar"><view class="bar-info"><text class="bar-title">免费上门评估</text><text class="bar-desc">专业师傅为您量身定制方案</text></view><view class="bar-btn" bindtap="{{i}}"><text class="bar-btn-text">立即预约</text></view></view></view><wxs src="/common/uniView.wxs" module="uV"/>

View File

@@ -0,0 +1,281 @@
@import "../../uvue.wxss";
:host{display:flex;flex-direction:column}
/**
* 优艺家沙发翻新 - 全局样式变量
*/
/* ========== 项目主题色 ========== */
/* 辅助色 */
/* 文字颜色 */
/* 背景色 */
/* 边框颜色 */
/* 间距 */
/* 圆角 */
/* 阴影 */
/* ========== uni-app 内置变量 ========== */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page {
flex: 1;
background-color: #f5f5f5;
}
.page-scroll {
flex: 1;
}
/* 顶部横幅 */
.banner {
height: 280rpx;
background: linear-gradient(135deg, #D4A574 0%, #B8895A 100%);
justify-content: center;
align-items: center;
}
.banner-content {
align-items: center;
}
.banner-title {
font-size: 40rpx;
font-weight: 600;
color: #ffffff;
margin-bottom: 16rpx;
}
.banner-desc {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.8);
}
/* 通用section */
.section {
padding: 0 24rpx;
margin-bottom: 24rpx;
}
/* 服务类型 */
.service-grid {
flex-direction: row;
flex-wrap: wrap;
background-color: #ffffff;
border-radius: 16rpx;
padding: 16rpx;
}
.service-item {
width: 50%;
padding: 24rpx;
align-items: center;
}
.service-icon-bg {
width: 100rpx;
height: 100rpx;
background-color: #FDF6EE;
border-radius: 50%;
align-items: center;
justify-content: center;
margin-bottom: 16rpx;
}
.service-icon {
font-size: 48rpx;
}
.service-name {
font-size: 30rpx;
font-weight: 600;
color: #333333;
margin-bottom: 8rpx;
}
.service-desc {
font-size: 24rpx;
color: #909399;
}
/* 服务流程 */
.process-list {
background-color: #ffffff;
border-radius: 16rpx;
padding: 32rpx;
}
.process-item {
flex-direction: row;
position: relative;
padding-bottom: 32rpx;
}
.process-step {
width: 48rpx;
height: 48rpx;
background-color: #D4A574;
border-radius: 50%;
align-items: center;
justify-content: center;
margin-right: 24rpx;
z-index: 1;
}
.step-num {
font-size: 24rpx;
font-weight: 600;
color: #ffffff;
}
.process-content {
flex: 1;
}
.process-title {
font-size: 30rpx;
font-weight: 600;
color: #333333;
margin-bottom: 8rpx;
}
.process-desc {
font-size: 26rpx;
color: #909399;
}
.process-line {
position: absolute;
left: 22rpx;
top: 56rpx;
width: 4rpx;
height: 60rpx;
background-color: #E8C9A8;
}
/* 材质说明 */
.material-list {
background-color: #ffffff;
border-radius: 16rpx;
}
.material-item {
padding: 32rpx;
border-bottom-width: 1rpx;
border-bottom-style: solid;
border-bottom-color: #EBEEF5;
}
.material-item:last-child {
border-bottom-width: 0;
}
.material-header {
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
.material-name {
font-size: 30rpx;
font-weight: 600;
color: #333333;
}
.material-price {
font-size: 28rpx;
color: #D4A574;
font-weight: 600;
}
.material-desc {
font-size: 26rpx;
color: #606266;
margin-bottom: 16rpx;
line-height: 40rpx;
}
.material-tags {
flex-direction: row;
flex-wrap: wrap;
}
.material-tag {
font-size: 22rpx;
color: #D4A574;
background-color: #FDF6EE;
padding: 8rpx 16rpx;
border-radius: 8rpx;
margin-right: 16rpx;
margin-bottom: 8rpx;
}
/* 常见问题 */
.faq-list {
background-color: #ffffff;
border-radius: 16rpx;
}
.faq-item {
padding: 32rpx;
border-bottom-width: 1rpx;
border-bottom-style: solid;
border-bottom-color: #EBEEF5;
}
.faq-item:last-child {
border-bottom-width: 0;
}
.faq-header {
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.faq-question {
font-size: 28rpx;
font-weight: 600;
color: #333333;
flex: 1;
}
.faq-arrow {
font-size: 36rpx;
color: #909399;
margin-left: 16rpx;
}
.faq-answer {
margin-top: 16rpx;
padding-top: 16rpx;
border-top-width: 1rpx;
border-top-style: dashed;
border-top-color: #EBEEF5;
}
.faq-answer-text {
font-size: 26rpx;
color: #606266;
line-height: 44rpx;
}
/* 底部间距 */
.bottom-space {
height: 160rpx;
}
/* 底部操作栏 */
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
padding: 20rpx 32rpx;
padding-bottom: 40rpx;
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.08);
}
.bar-info {
flex: 1;
}
.bar-title {
font-size: 30rpx;
font-weight: 600;
color: #333333;
}
.bar-desc {
font-size: 24rpx;
color: #909399;
margin-top: 4rpx;
}
.bar-btn {
background-color: #D4A574;
padding: 24rpx 56rpx;
border-radius: 999rpx;
}
.bar-btn-text {
font-size: 30rpx;
font-weight: 600;
color: #ffffff;
}