初始化参股
This commit is contained in:
181
前端/unpackage/dist/dev/mp-weixin/pages/about/index.js
vendored
Normal file
181
前端/unpackage/dist/dev/mp-weixin/pages/about/index.js
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
"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 FeatureItem extends UTS.UTSType {
|
||||
static get$UTSMetadata$() {
|
||||
return {
|
||||
kind: 2,
|
||||
get fields() {
|
||||
return {
|
||||
title: { type: String, optional: false },
|
||||
desc: { type: String, optional: false }
|
||||
};
|
||||
},
|
||||
name: "FeatureItem"
|
||||
};
|
||||
}
|
||||
constructor(options, metadata = FeatureItem.get$UTSMetadata$(), isJSONParse = false) {
|
||||
super();
|
||||
this.__props__ = UTS.UTSType.initProps(options, metadata, isJSONParse);
|
||||
this.title = this.__props__.title;
|
||||
this.desc = this.__props__.desc;
|
||||
delete this.__props__;
|
||||
}
|
||||
}
|
||||
class CompanyInfo extends UTS.UTSType {
|
||||
static get$UTSMetadata$() {
|
||||
return {
|
||||
kind: 2,
|
||||
get fields() {
|
||||
return {
|
||||
name: { type: String, optional: false },
|
||||
slogan: { type: String, optional: false },
|
||||
description: { type: String, optional: false },
|
||||
phone: { type: String, optional: false },
|
||||
wechat: { type: String, optional: false },
|
||||
address: { type: String, optional: false },
|
||||
workTime: { type: String, optional: false },
|
||||
features: { type: UTS.UTSType.withGenerics(Array, [FeatureItem]), optional: false }
|
||||
};
|
||||
},
|
||||
name: "CompanyInfo"
|
||||
};
|
||||
}
|
||||
constructor(options, metadata = CompanyInfo.get$UTSMetadata$(), isJSONParse = false) {
|
||||
super();
|
||||
this.__props__ = UTS.UTSType.initProps(options, metadata, isJSONParse);
|
||||
this.name = this.__props__.name;
|
||||
this.slogan = this.__props__.slogan;
|
||||
this.description = this.__props__.description;
|
||||
this.phone = this.__props__.phone;
|
||||
this.wechat = this.__props__.wechat;
|
||||
this.address = this.__props__.address;
|
||||
this.workTime = this.__props__.workTime;
|
||||
this.features = this.__props__.features;
|
||||
delete this.__props__;
|
||||
}
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const companyInfo = common_vendor.ref(new CompanyInfo({
|
||||
name: "优艺家沙发翻新",
|
||||
slogan: "让旧沙发焕发新生",
|
||||
description: "",
|
||||
phone: "400-888-8888",
|
||||
wechat: "youyijia2026",
|
||||
address: "",
|
||||
workTime: "",
|
||||
features: []
|
||||
}));
|
||||
const fetchCompanyInfo = () => {
|
||||
return common_vendor.__awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const res = yield api_index.getCompanyInfo();
|
||||
const data = res.data;
|
||||
const featuresData = data["features"];
|
||||
const features = featuresData.map((item) => {
|
||||
return new FeatureItem({
|
||||
title: item["title"],
|
||||
desc: item["desc"]
|
||||
});
|
||||
});
|
||||
companyInfo.value = new CompanyInfo({
|
||||
name: data["name"],
|
||||
slogan: data["slogan"],
|
||||
description: data["description"],
|
||||
phone: data["phone"],
|
||||
wechat: data["wechat"],
|
||||
address: data["address"],
|
||||
workTime: data["workTime"],
|
||||
features
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/about/index.uvue:148", "获取公司信息失败", e);
|
||||
}
|
||||
});
|
||||
};
|
||||
const callPhone = () => {
|
||||
common_vendor.index.makePhoneCall({
|
||||
phoneNumber: companyInfo.value.phone,
|
||||
fail: () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "拨打电话失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const copyWechat = () => {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: companyInfo.value.wechat,
|
||||
success: () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "微信号已复制",
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const openLocation = () => {
|
||||
common_vendor.index.openLocation({
|
||||
latitude: 31.2,
|
||||
longitude: 121.5,
|
||||
name: companyInfo.value.name,
|
||||
address: companyInfo.value.address,
|
||||
fail: () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "无法打开地图",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad(() => {
|
||||
fetchCompanyInfo();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
"raw js";
|
||||
const __returned__ = {
|
||||
a: common_vendor.t(common_vendor.unref(companyInfo).name),
|
||||
b: common_vendor.t(common_vendor.unref(companyInfo).slogan),
|
||||
c: common_vendor.p({
|
||||
title: "公司简介"
|
||||
}),
|
||||
d: common_vendor.t(common_vendor.unref(companyInfo).description),
|
||||
e: common_vendor.p({
|
||||
title: "我们的优势"
|
||||
}),
|
||||
f: common_vendor.f(common_vendor.unref(companyInfo).features, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.desc),
|
||||
c: item.title
|
||||
};
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
title: "联系我们"
|
||||
}),
|
||||
h: common_vendor.t(common_vendor.unref(companyInfo).phone),
|
||||
i: common_vendor.o(callPhone),
|
||||
j: common_vendor.t(common_vendor.unref(companyInfo).wechat),
|
||||
k: common_vendor.o(copyWechat),
|
||||
l: common_vendor.t(common_vendor.unref(companyInfo).address),
|
||||
m: common_vendor.o(openLocation),
|
||||
n: common_vendor.t(common_vendor.unref(companyInfo).workTime),
|
||||
o: common_vendor.sei(common_vendor.gei(_ctx, ""), "view")
|
||||
};
|
||||
return __returned__;
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createPage(_sfc_main);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/about/index.js.map
|
||||
6
前端/unpackage/dist/dev/mp-weixin/pages/about/index.json
vendored
Normal file
6
前端/unpackage/dist/dev/mp-weixin/pages/about/index.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "关于我们",
|
||||
"usingComponents": {
|
||||
"section-header": "../../components/section-header/section-header"
|
||||
}
|
||||
}
|
||||
1
前端/unpackage/dist/dev/mp-weixin/pages/about/index.wxml
vendored
Normal file
1
前端/unpackage/dist/dev/mp-weixin/pages/about/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view id="{{o}}" change:eS="{{uV.sS}}" eS="{{$eS[o]}}" change:eA="{{uV.sA}}" eA="{{$eA[o]}}" class="{{['page', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}"><scroll-view class="page-scroll" scroll-y enable-flex="true" enhanced="true"><view class="header-section"><view class="company-logo"><text class="logo-text">优艺家</text></view><text class="company-name">{{a}}</text><text class="company-slogan">{{b}}</text></view><view class="section"><section-header u-i="00470dc0-0" bind:__l="__l" u-p="{{c||''}}"></section-header><view class="intro-card"><text class="intro-text">{{d}}</text></view></view><view class="section"><section-header u-i="00470dc0-1" bind:__l="__l" u-p="{{e||''}}"></section-header><view class="features-grid"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="feature-item"><view class="feature-icon-bg"><text class="feature-icon">✓</text></view><text class="feature-title">{{item.a}}</text><text class="feature-desc">{{item.b}}</text></view></view></view><view class="section"><section-header u-i="00470dc0-2" bind:__l="__l" u-p="{{g||''}}"></section-header><view class="contact-card"><view class="contact-item" bindtap="{{i}}"><view class="contact-icon-bg"><text class="contact-icon">📞</text></view><view class="contact-info"><text class="contact-label">客服电话</text><text class="contact-value">{{h}}</text></view><text class="contact-arrow">›</text></view><view class="contact-item" bindtap="{{k}}"><view class="contact-icon-bg"><text class="contact-icon">💬</text></view><view class="contact-info"><text class="contact-label">微信号</text><text class="contact-value">{{j}}</text></view><text class="contact-arrow">›</text></view><view class="contact-item" bindtap="{{m}}"><view class="contact-icon-bg"><text class="contact-icon">📍</text></view><view class="contact-info"><text class="contact-label">公司地址</text><text class="contact-value">{{l}}</text></view><text class="contact-arrow">›</text></view><view class="contact-item"><view class="contact-icon-bg"><text class="contact-icon">🕐</text></view><view class="contact-info"><text class="contact-label">营业时间</text><text class="contact-value">{{n}}</text></view></view></view></view><view class="bottom-space"></view></scroll-view></view><wxs src="/common/uniView.wxs" module="uV"/>
|
||||
169
前端/unpackage/dist/dev/mp-weixin/pages/about/index.wxss
vendored
Normal file
169
前端/unpackage/dist/dev/mp-weixin/pages/about/index.wxss
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
@import "../../uvue.wxss";
|
||||
:host{display:flex;flex-direction:column}
|
||||
/**
|
||||
* 优艺家沙发翻新 - 全局样式变量
|
||||
*/
|
||||
/* ========== 项目主题色 ========== */
|
||||
/* 辅助色 */
|
||||
/* 文字颜色 */
|
||||
/* 背景色 */
|
||||
/* 边框颜色 */
|
||||
/* 间距 */
|
||||
/* 圆角 */
|
||||
/* 阴影 */
|
||||
/* ========== uni-app 内置变量 ========== */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page {
|
||||
flex: 1;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.page-scroll {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* 头部区域 */
|
||||
.header-section {
|
||||
background: linear-gradient(135deg, #D4A574 0%, #B8895A 100%);
|
||||
padding: 60rpx 32rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.company-logo {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 50%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.logo-text {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #D4A574;
|
||||
}
|
||||
.company-name {
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.company-slogan {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
/* 通用section */
|
||||
.section {
|
||||
padding: 0 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
/* 公司介绍 */
|
||||
.intro-card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx;
|
||||
}
|
||||
.intro-text {
|
||||
font-size: 28rpx;
|
||||
color: #606266;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
/* 优势 */
|
||||
.features-grid {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
.feature-item {
|
||||
width: 50%;
|
||||
padding: 24rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.feature-icon-bg {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-color: #D4A574;
|
||||
border-radius: 50%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.feature-icon {
|
||||
font-size: 40rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.feature-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.feature-desc {
|
||||
font-size: 24rpx;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
/* 联系方式 */
|
||||
.contact-card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.contact-item {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 32rpx;
|
||||
border-bottom-width: 1rpx;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #EBEEF5;
|
||||
}
|
||||
.contact-item:last-child {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
.contact-icon-bg {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
background-color: #FDF6EE;
|
||||
border-radius: 50%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
.contact-icon {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.contact-info {
|
||||
flex: 1;
|
||||
}
|
||||
.contact-label {
|
||||
font-size: 24rpx;
|
||||
color: #909399;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.contact-value {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.contact-arrow {
|
||||
font-size: 36rpx;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
/* 底部间距 */
|
||||
.bottom-space {
|
||||
height: 60rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user