完善小程序和H5

main
yanzai 2 months ago
parent 14d5a50f73
commit a414d2160b

2
.gitignore vendored

@ -1,3 +1,5 @@
/xiaochengxu/unpackage
/xiaochengxu/unpackage
/xiaochengxu/unpackage/dist
/xiaochengxu/unpackage
/xiaochengxu/unpackage

@ -2,6 +2,7 @@
namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\API\SmsController;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use JWT;
@ -50,10 +51,12 @@ class LoginController
if(empty($member)){
return \Yz::echoError1('未找到有效用户');
}
// $code = DB::table('codes')->where(['tel'=>$info['tel'],'code'=>$info['code'],'type'=>1,'is_del'=>0])->first();
// if(empty($code)){
// return \Yz::echoError1('验证码错误');
// }
// 验证通过,处理业务逻辑
$sms=new SmsController();
$check=$sms->CheckCode($info['tel'],$info['code']);
if(!$check){
return \Yz::echoError1('验证码错误!');
}
$password = password_hash($info['password'], PASSWORD_DEFAULT);
$u= DB::table('members')->where(['id'=>$member->id])->update(['password'=>$password]);
// DB::table('codes')->where(['id'=>$code->id])->update(['is_del'=>1]);

@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers\API;
use Illuminate\Support\Facades\DB;
class LiuYanController
{
public function Mp_Create(){
$info = request('info');
if(empty($info['content'])){
return \Yz::echoError1('请输入留言内容');
}
$i=DB::table('liu_yan')->insert([
'content'=>$info['content'],
'openid'=>$info['openid'],
]);
if($i){
return \Yz::Return(true,'留言成功');
}
return \Yz::echoError1('留言失败');
}
}

@ -82,6 +82,7 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'H5'],function () {
});
Route::post('mp/wxGetOpenid','App\Http\Controllers\API\Mp\LoginController@wxGetOpenid');
Route::post('mp/LiuYanCreate','App\Http\Controllers\API\LiuYanController@Mp_Create')->middleware('log');

@ -17,7 +17,9 @@
<text class="label">短信验证码</text>
<view style="display: flex;">
<input class="input_code" type="number" placeholder="请输入验证码" v-model="form.code" />
<button style="width: 200rpx;height: 70rpx;line-height: 70rpx;margin-left: 10rpx;" size="mini" @tap="handleResetPwd('click')"></button>
<button style="width: 200rpx;height: 70rpx;line-height: 70rpx;margin-left: 10rpx;" size="mini" @tap="sendVerifyCode('click')">
{{ sending ? '发送中...' : '发送验证码' }}
</button>
</view>
</view>
@ -50,7 +52,7 @@
ref
} from "vue"
import {
ResetPassword
ResetPassword,SmsSendCode
} from "@/api"
import {
onLoad
@ -61,7 +63,7 @@
repassword: '' ,
code: ''
})
let sending = ref(false)
const handleResetPwd = (logintype='') => {
if(form.value.tel=='' || form.value.password=='' || form.value.repassword=='' || form.value.code==''){
uni.showToast({
@ -91,7 +93,32 @@
}
})
}
//
const sendVerifyCode = () => {
if (!form.value.tel) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
return;
}
sending.value = true;
//
SmsSendCode({
tel: form.value.tel
}).then(res => {
sending.value = false;
if (res.status) {
uni.showToast({
title: '验证码已发送',
icon: 'success'
});
}
})
}
const handleForget = () => {
//
uni.navigateTo({

@ -16,4 +16,7 @@ import {
export const Login = (data) => {
return sendRequest({url: BaseUrl+"mp/wxGetOpenid",method: 'POST',data:data});
}
export const LiuYan = (data) => {
return sendRequest({url: BaseUrl+"mp/LiuYanCreate",method: 'POST',data:data});
}

@ -18,8 +18,7 @@
"path" : "pages/contact",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
"navigationBarTitleText" : ""
}
},
{

@ -4,19 +4,25 @@
<text class="page-title">关于我们</text>
</view>
<view class="content">
<text class="paragraph">
秦皇岛安尔然营销策划有限公司成立于2020年致力于为客户提供营销策划会议服务商务咨询庆典服务礼仪服务
<text class="paragraph fadeInUp">
秦皇岛安尔然营销策划有限公司成立于2020年是一家专注于提供全方位营销解决方案的专业服务机构我们致力于为客户提供包括但不限于营销策划会议服务商务咨询庆典服务礼仪服务
</text>
<image src="/static/about.png" class="team-img" mode="widthFix" />
<text class="paragraph fadeInUp">
在过去的几年里我们成功地为众多客户提供了量身定制的营销策略和服务方案帮助他们提升了品牌形象扩大了市场份额我们的专业团队由一群经验丰富富有创意的年轻人组成他们不仅拥有深厚的行业知识还具备敏锐的市场洞察力
</text>
<text class="paragraph fadeInUp">
我们坚信通过精心策划和执行每一个项目能够为客户创造真正的价值无论是大型国际会议还是小型企业庆典我们都将全力以赴确保每一场活动都成为难忘的成功案例
</text>
<image src="/static/about.png" class="team-img fadeInUp" mode="widthFix" />
</view>
<view class="footer">
<text>秦皇岛安尔然营销策划有限公司</text>
<view class="footer fadeInUp">
<text>秦皇岛安尔然营销策划有限公司 - 您值得信赖的合作伙伴</text>
</view>
</view>
</template>
<script setup>
//
// 使
</script>
<style scoped>
@ -25,29 +31,40 @@
padding: 20rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
height: 100vh;
overflow: hidden;
}
.header {
text-align: center;
margin: 40rpx 0;
}
.page-title {
font-size: 44rpx;
font-weight: bold;
color: #fff;
}
.paragraph {
font-size: 30rpx;
line-height: 1.6;
color: #fff;
display: block;
margin-bottom: 30rpx;
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease;
}
.team-img {
width: 100%;
border-radius: 16rpx;
margin-top: 20rpx;
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease;
}
.footer {
text-align: center;
margin-top: 60rpx;
@ -56,6 +73,20 @@
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease;
}
/* 添加动画类 */
.fadeInUp {
animation: fadeInUp 1s forwards;
}
@keyframes fadeInUp {
to {
opacity: 1;
transform: translateY(0);
}
}
</style>

@ -1,51 +1,107 @@
<template>
<view class="container">
<text class="title">联系我们</text>
<view class="contact-info">
<view class="info-item">
<text>📞 电话0755-12345678</text>
</view>
<view class="info-item">
<text>📧 邮箱info@xxtech.com</text>
</view>
<view class="info-item">
<text>📍 地址深圳市南山区科技园XX大厦10楼</text>
</view>
<view class="form-box">
<text class="title">留言</text>
<textarea
v-model="message"
placeholder="请输入您的留言..."
class="input-area"
maxlength="500"
auto-height
/>
<button class="submit-btn" @click="submitMessage">
</button>
</view>
<button class="map-btn" @click="openMap"></button>
</view>
</template>
<script setup>
const openMap = () => {
// wx.openLocation
// H5 /
uni.showToast({ title: '地图功能待接入', icon: 'none' })
import { ref } from 'vue';
import { LiuYan } from "@/api"
//
const message = ref('');
//
const submitMessage = () => {
if (!message.value.trim()) {
uni.showToast({
title: '请输入留言内容',
icon: 'none'
});
return;
}
LiuYan({ info:{content: message.value,openid:uni.getStorageSync("openid")} }).then(res => {
uni.showToast({
title: '留言成功',
icon: 'success'
});
})
message.value = '';
};
</script>
<style scoped>
/* 全屏容器:用于居中 */
.container {
display: flex;
justify-content: center;
min-height: 100vh;
background-color: #f8fafc;
padding: 40rpx;
box-sizing: border-box;
}
/* 表单区域 */
.form-box {
width: 100%;
max-width: 600rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.title {
font-size: 44rpx;
font-weight: bold;
text-align: center;
color: #2d3748;
margin-bottom: 50rpx;
color: #1a365d;
}
.info-item {
.input-area {
width: 100%;
min-height: 200rpx;
padding: 30rpx;
border-radius: 24rpx;
background-color: white;
border: 1px solid #e2e8f0;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
font-size: 32rpx;
margin: 20rpx 0;
padding: 10rpx 0;
line-height: 1.5;
color: #333;
margin-bottom: 50rpx;
box-sizing: border-box;
}
.map-btn {
margin-top: 60rpx;
background: #1a365d;
.submit-btn {
width: 100%;
padding: 28rpx;
border-radius: 24rpx;
background: linear-gradient(135deg, #4a6cf7, #6366f1);
color: white;
font-size: 34rpx;
font-weight: 600;
border: none;
padding: 20rpx;
border-radius: 12rpx;
box-shadow: 0 6rpx 16rpx rgba(74, 108, 247, 0.3);
transition: transform 0.2s ease;
}
.submit-btn:active {
transform: scale(0.97);
}
</style>

@ -1,5 +1,6 @@
<template>
<view class="container">
<!-- Hero 区域 -->
<view class="hero">
<image src="/static/logo.png" class="logo" mode="aspectFit" />
<text class="title">秦皇岛安尔然营销策划有限公司</text>
@ -7,6 +8,7 @@
<button class="btn" @click="gotoAbout"></button>
</view>
<!-- 服务区域 -->
<view class="section">
<text class="section-title">我们的服务</text>
<view class="service-list">
@ -16,46 +18,46 @@
</view>
</view>
<!-- 联系我们模块 -->
<view class="contact-section">
<button class="contact-btn" @click="lianxi"></button>
</view>
<!-- 页脚 -->
<view class="footer">
<text>秦皇岛安尔然营销策划有限公司</text>
<text>© 2025 秦皇岛安尔然营销策划有限公司</text>
</view>
</view>
</template>
<script setup>
import {
ref
} from "vue"
import {
Login
} from "@/api"
import {
onLoad
} from "@dcloudio/uni-app"
import { ref } from "vue"
import { Login } from "@/api"
import { onLoad } from "@dcloudio/uni-app"
const services = ['营销策划', '会议服务', '商务咨询', '庆典服务', '礼仪服务']
const gotoAbout = () => {
uni.navigateTo({
url: '/pages/about'
})
uni.navigateTo({ url: '/pages/about' })
}
const lianxi = () => {
uni.navigateTo({ url: '/pages/contact' })
}
const handleLogin = async () => {
try {
// 1. code
const res = await wx.login()
if (res.code) {
// 2. code
console.log(res.code)
Login({
code: res.code
}).then(res => {
Login({ code: res.code }).then(res => {
if(res.status){
uni.setStorageSync("openid",res.data.openid)
if ( res.data.member !== null && res.data.url !== null) {
uni.navigateTo({
url:'/pages/h5?url='+res.data.url
})
uni.navigateTo({ url: '/pages/h5?url=' + res.data.url })
}
}
})
} else {
console.error('登录失败', res.errMsg)
@ -64,6 +66,7 @@
console.error('登录异常', error)
}
}
onLoad(() => {
handleLogin()
})
@ -72,20 +75,20 @@
<style scoped>
.container {
padding: 20rpx;
background: #fff;
background: #f9fafb;
box-sizing: border-box;
/* 关键! */
height: 100vh;
min-height: 100vh;
position: relative;
}
.hero {
text-align: center;
padding: 80rpx 40rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
background: linear-gradient(135deg, #1e40af, #3182ce);
color: white;
border-radius: 20rpx;
margin-bottom: 40rpx;
border-radius: 24rpx;
margin-bottom: 50rpx;
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
}
.logo {
@ -94,7 +97,8 @@
margin-bottom: 30rpx;
border-radius: 50%;
background: white;
padding: 10rpx;
padding: 12rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
}
.title {
@ -102,53 +106,84 @@
font-weight: bold;
display: block;
margin: 20rpx 0;
line-height: 1.3;
}
.subtitle {
font-size: 32rpx;
opacity: 0.9;
opacity: 0.95;
display: block;
margin-bottom: 40rpx;
}
.btn {
background: #3b82f6;
color: white;
background: #ffffff;
color: #1e40af;
border: none;
padding: 16rpx 60rpx;
padding: 18rpx 60rpx;
border-radius: 50rpx;
font-size: 32rpx;
font-weight: bold;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
transition: transform 0.2s;
}
.btn:active {
transform: scale(0.96);
}
.section-title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
margin-bottom: 24rpx;
color: #1e293b;
display: block;
}
.service-list {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
gap: 24rpx;
justify-content: center;
}
.service-item {
background: #f1f5f9;
padding: 20rpx 55rpx;
border-radius: 16rpx;
background: #ffffff;
padding: 24rpx 40rpx;
border-radius: 18rpx;
font-size: 28rpx;
color: #1e293b;
box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
min-width: 180rpx;
text-align: center;
}
/* 联系我们模块 */
.contact-section {
text-align: center;
margin: 50rpx 0;
}
.contact-btn {
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
color: white;
border: none;
padding: 20rpx 70rpx;
border-radius: 50rpx;
font-size: 32rpx;
font-weight: bold;
box-shadow: 0 6rpx 16rpx rgba(59, 130, 246, 0.4);
transition: transform 0.2s, box-shadow 0.2s;
}
.contact-btn:active {
transform: scale(0.97);
box-shadow: 0 4rpx 12rpx rgba(59, 130, 246, 0.3);
}
.footer {
text-align: center;
margin-top: 60rpx;
color: #94a3b8;
margin-top: 40rpx;
color: #64748b;
font-size: 24rpx;
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
padding-bottom: 40rpx;
}
</style>

@ -1 +1 @@
{"version":3,"file":"contact.js","sources":["pages/contact.vue","../../../../../soft/安装包/HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvY29udGFjdC52dWU"],"sourcesContent":["<template>\n <view class=\"container\">\n <text class=\"title\">联系我们</text>\n <view class=\"contact-info\">\n <view class=\"info-item\">\n <text>📞 电话0755-12345678</text>\n </view>\n <view class=\"info-item\">\n <text>📧 邮箱info@xxtech.com</text>\n </view>\n <view class=\"info-item\">\n <text>📍 地址深圳市南山区科技园XX大厦10楼</text>\n </view>\n </view>\n <button class=\"map-btn\" @click=\"openMap\">查看地图</button>\n </view>\n</template>\n\n<script setup>\nconst openMap = () => {\n // 微信小程序可用 wx.openLocation\n // H5 可跳转高德/百度地图\n uni.showToast({ title: '地图功能待接入', icon: 'none' })\n}\n</script>\n\n<style scoped>\n.container {\n padding: 40rpx;\n}\n.title {\n font-size: 44rpx;\n font-weight: bold;\n text-align: center;\n margin-bottom: 50rpx;\n color: #1a365d;\n}\n.info-item {\n font-size: 32rpx;\n margin: 20rpx 0;\n padding: 10rpx 0;\n}\n.map-btn {\n margin-top: 60rpx;\n background: #1a365d;\n color: white;\n border: none;\n padding: 20rpx;\n border-radius: 12rpx;\n}\n</style>","import MiniProgramPage from 'D:/Code/lanke/other/huisuo/xiaochengxu/pages/contact.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;;;;AAmBA,UAAM,UAAU,MAAM;AAGpBA,oBAAG,MAAC,UAAU,EAAE,OAAO,WAAW,MAAM,QAAQ;AAAA,IAClD;;;;;;;;;ACtBA,GAAG,WAAW,eAAe;"}
{"version":3,"file":"contact.js","sources":["pages/contact.vue","../../../../../soft/安装包/HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvY29udGFjdC52dWU"],"sourcesContent":["<template>\n <view class=\"container\">\n <view class=\"form-box\">\n <text class=\"title\">留言</text>\n\n <textarea\n v-model=\"message\"\n placeholder=\"请输入您的留言...\"\n class=\"input-area\"\n maxlength=\"500\"\n auto-height\n />\n\n <button class=\"submit-btn\" @click=\"submitMessage\">\n 留 言\n </button>\n </view>\n </view>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\nimport { LiuYan } from \"@/api\"\n// 响应式数据\nconst message = ref('');\n\n// 提交方法\nconst submitMessage = () => {\n if (!message.value.trim()) {\n uni.showToast({\n title: '请输入留言内容',\n icon: 'none'\n });\n return;\n }\nLiuYan({ info:{content: message.value,openid:uni.getStorageSync(\"openid\")} }).then(res => {\n\t\t\t uni.showToast({\r\n\t\t\t title: '留言成功',\r\n\t\t\t icon: 'success'\r\n\t\t\t });\r\n\t\t\t \n\t\t\t}) \n\n message.value = '';\n};\n</script>\n\n<style scoped>\n/* 全屏容器:用于居中 */\n.container {\n display: flex;\n justify-content: center;\n \n min-height: 100vh;\n background-color: #f8fafc;\n padding: 40rpx;\n box-sizing: border-box;\n}\n\n/* 表单区域 */\n.form-box {\n width: 100%;\n max-width: 600rpx;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.title {\n font-size: 44rpx;\n font-weight: bold;\n color: #2d3748;\n margin-bottom: 50rpx;\n}\n\n.input-area {\n width: 100%;\n min-height: 200rpx;\n padding: 30rpx;\n border-radius: 24rpx;\n background-color: white;\n border: 1px solid #e2e8f0;\n box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);\n font-size: 32rpx;\n line-height: 1.5;\n color: #333;\n margin-bottom: 50rpx;\n box-sizing: border-box;\n}\n\n.submit-btn {\n width: 100%;\n padding: 28rpx;\n border-radius: 24rpx;\n background: linear-gradient(135deg, #4a6cf7, #6366f1);\n color: white;\n font-size: 34rpx;\n font-weight: 600;\n border: none;\n box-shadow: 0 6rpx 16rpx rgba(74, 108, 247, 0.3);\n transition: transform 0.2s ease;\n}\n\n.submit-btn:active {\n transform: scale(0.97);\n}\n</style>","import MiniProgramPage from 'D:/Code/lanke/other/huisuo/xiaochengxu/pages/contact.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","uni","LiuYan"],"mappings":";;;;;;AAwBA,UAAM,UAAUA,cAAAA,IAAI,EAAE;AAGtB,UAAM,gBAAgB,MAAM;AAC1B,UAAI,CAAC,QAAQ,MAAM,QAAQ;AACzBC,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,QACZ,CAAK;AACD;AAAA,MACD;AACHC,gBAAM,OAAC,EAAE,MAAK,EAAC,SAAS,QAAQ,OAAM,QAAOD,oBAAI,eAAe,QAAQ,EAAC,EAAG,CAAA,EAAE,KAAK,SAAO;AACtFA,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,MAAM;AAAA,QACZ,CAAK;AAAA,MAEL,CAAI;AAEF,cAAQ,QAAQ;AAAA,IAClB;;;;;;;;;;;AC3CA,GAAG,WAAW,eAAe;"}

File diff suppressed because one or more lines are too long

@ -6916,9 +6916,9 @@ function isConsoleWritable() {
return isWritable;
}
function initRuntimeSocketService() {
const hosts = "192.168.0.102,127.0.0.1";
const hosts = "192.168.0.101,127.0.0.1";
const port = "8090";
const id = "mp-weixin_ChELGv";
const id = "mp-weixin__KJ8Nq";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();

@ -1 +1 @@
<view class="container data-v-b10942e8"><view class="header data-v-b10942e8"><text class="page-title data-v-b10942e8">关于我们</text></view><view class="content data-v-b10942e8"><text class="paragraph data-v-b10942e8"> 秦皇岛安尔然营销策划有限公司成立于2020年致力于为客户提供营销策划、会议服务、商务咨询、庆典服务、礼仪服务。 </text><image src="{{a}}" class="team-img data-v-b10942e8" mode="widthFix"/></view><view class="footer data-v-b10942e8"><text class="data-v-b10942e8">秦皇岛安尔然营销策划有限公司</text></view></view>
<view class="container data-v-b10942e8"><view class="header data-v-b10942e8"><text class="page-title data-v-b10942e8">关于我们</text></view><view class="content data-v-b10942e8"><text class="paragraph fadeInUp data-v-b10942e8"> 秦皇岛安尔然营销策划有限公司成立于2020年是一家专注于提供全方位营销解决方案的专业服务机构。我们致力于为客户提供包括但不限于营销策划、会议服务、商务咨询、庆典服务及礼仪服务。 </text><text class="paragraph fadeInUp data-v-b10942e8"> 在过去的几年里,我们成功地为众多客户提供了量身定制的营销策略和服务方案,帮助他们提升了品牌形象,扩大了市场份额。我们的专业团队由一群经验丰富、富有创意的年轻人组成,他们不仅拥有深厚的行业知识,还具备敏锐的市场洞察力。 </text><text class="paragraph fadeInUp data-v-b10942e8"> 我们坚信,通过精心策划和执行每一个项目,能够为客户创造真正的价值。无论是大型国际会议还是小型企业庆典,我们都将全力以赴,确保每一场活动都成为难忘的成功案例。 </text><image src="{{a}}" class="team-img fadeInUp data-v-b10942e8" mode="widthFix"/></view><view class="footer fadeInUp data-v-b10942e8"><text class="data-v-b10942e8">秦皇岛安尔然营销策划有限公司 - 您值得信赖的合作伙伴。</text></view></view>

@ -4,6 +4,7 @@
padding: 20rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
height: 100vh;
overflow: hidden;
}
.header.data-v-b10942e8 {
text-align: center;
@ -20,11 +21,17 @@
color: #fff;
display: block;
margin-bottom: 30rpx;
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease;
}
.team-img.data-v-b10942e8 {
width: 100%;
border-radius: 16rpx;
margin-top: 20rpx;
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease;
}
.footer.data-v-b10942e8 {
text-align: center;
@ -34,5 +41,18 @@
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
opacity: 0;
transform: translateY(20px);
transition: all 0.8s ease;
}
/* 添加动画类 */
.fadeInUp.data-v-b10942e8 {
animation: fadeInUp-b10942e8 1s forwards;
}
@keyframes fadeInUp-b10942e8 {
to {
opacity: 1;
transform: translateY(0);
}
}

@ -1,14 +1,31 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const api_index = require("../api/index.js");
const _sfc_main = {
__name: "contact",
setup(__props) {
const openMap = () => {
common_vendor.index.showToast({ title: "地图功能待接入", icon: "none" });
const message = common_vendor.ref("");
const submitMessage = () => {
if (!message.value.trim()) {
common_vendor.index.showToast({
title: "请输入留言内容",
icon: "none"
});
return;
}
api_index.LiuYan({ info: { content: message.value, openid: common_vendor.index.getStorageSync("openid") } }).then((res) => {
common_vendor.index.showToast({
title: "留言成功",
icon: "success"
});
});
message.value = "";
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(openMap)
a: message.value,
b: common_vendor.o(($event) => message.value = $event.detail.value),
c: common_vendor.o(submitMessage)
};
};
}

@ -1,5 +1,4 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"usingComponents": {}
}

@ -1 +1 @@
<view class="container data-v-10b9b775"><text class="title data-v-10b9b775">联系我们</text><view class="contact-info data-v-10b9b775"><view class="info-item data-v-10b9b775"><text class="data-v-10b9b775">📞 电话0755-12345678</text></view><view class="info-item data-v-10b9b775"><text class="data-v-10b9b775">📧 邮箱info@xxtech.com</text></view><view class="info-item data-v-10b9b775"><text class="data-v-10b9b775">📍 地址深圳市南山区科技园XX大厦10楼</text></view></view><button class="map-btn data-v-10b9b775" bindtap="{{a}}">查看地图</button></view>
<view class="container data-v-10b9b775"><view class="form-box data-v-10b9b775"><text class="title data-v-10b9b775">留言</text><block wx:if="{{r0}}"><textarea placeholder="请输入您的留言..." class="input-area data-v-10b9b775" maxlength="500" auto-height value="{{a}}" bindinput="{{b}}"/></block><button class="submit-btn data-v-10b9b775" bindtap="{{c}}"> 留 言 </button></view></view>

@ -1,24 +1,55 @@
/* 全屏容器:用于居中 */
.container.data-v-10b9b775 {
display: flex;
justify-content: center;
min-height: 100vh;
background-color: #f8fafc;
padding: 40rpx;
box-sizing: border-box;
}
/* 表单区域 */
.form-box.data-v-10b9b775 {
width: 100%;
max-width: 600rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.title.data-v-10b9b775 {
font-size: 44rpx;
font-weight: bold;
text-align: center;
color: #2d3748;
margin-bottom: 50rpx;
color: #1a365d;
}
.info-item.data-v-10b9b775 {
.input-area.data-v-10b9b775 {
width: 100%;
min-height: 200rpx;
padding: 30rpx;
border-radius: 24rpx;
background-color: white;
border: 1px solid #e2e8f0;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
font-size: 32rpx;
margin: 20rpx 0;
padding: 10rpx 0;
line-height: 1.5;
color: #333;
margin-bottom: 50rpx;
box-sizing: border-box;
}
.map-btn.data-v-10b9b775 {
margin-top: 60rpx;
background: #1a365d;
.submit-btn.data-v-10b9b775 {
width: 100%;
padding: 28rpx;
border-radius: 24rpx;
background: linear-gradient(135deg, #4a6cf7, #6366f1);
color: white;
font-size: 34rpx;
font-weight: 600;
border: none;
padding: 20rpx;
border-radius: 12rpx;
box-shadow: 0 6rpx 16rpx rgba(74, 108, 247, 0.3);
transition: transform 0.2s ease;
}
.submit-btn.data-v-10b9b775:active {
transform: scale(0.97);
}

@ -7,31 +7,29 @@ const _sfc_main = {
setup(__props) {
const services = ["营销策划", "会议服务", "商务咨询", "庆典服务", "礼仪服务"];
const gotoAbout = () => {
common_vendor.index.navigateTo({
url: "/pages/about"
});
common_vendor.index.navigateTo({ url: "/pages/about" });
};
const lianxi = () => {
common_vendor.index.navigateTo({ url: "/pages/contact" });
};
const handleLogin = async () => {
try {
const res = await common_vendor.wx$1.login();
if (res.code) {
common_vendor.index.__f__("log", "at pages/index/index.vue:48", res.code);
api_index.Login({
code: res.code
}).then((res2) => {
common_vendor.index.__f__("log", "at pages/index/index.vue:52", res.code);
api_index.Login({ code: res.code }).then((res2) => {
if (res2.status) {
common_vendor.index.setStorageSync("openid", res2.data.openid);
if (res2.data.member !== null && res2.data.url !== null) {
common_vendor.index.navigateTo({
url: "/pages/h5?url=" + res2.data.url
});
common_vendor.index.navigateTo({ url: "/pages/h5?url=" + res2.data.url });
}
}
});
} else {
common_vendor.index.__f__("error", "at pages/index/index.vue:61", "登录失败", res.errMsg);
common_vendor.index.__f__("error", "at pages/index/index.vue:63", "登录失败", res.errMsg);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:64", "登录异常", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:66", "登录异常", error);
}
};
common_vendor.onLoad(() => {
@ -46,7 +44,8 @@ const _sfc_main = {
a: common_vendor.t(item),
b: index
};
})
}),
d: common_vendor.o(lianxi)
};
};
}

@ -1 +1 @@
<view class="container data-v-1cf27b2a"><view class="hero data-v-1cf27b2a"><image src="{{a}}" class="logo data-v-1cf27b2a" mode="aspectFit"/><text class="title data-v-1cf27b2a">秦皇岛安尔然营销策划有限公司</text><text class="subtitle data-v-1cf27b2a">为您提供专业的营销策划服务</text><button class="btn data-v-1cf27b2a" bindtap="{{b}}">了解更多</button></view><view class="section data-v-1cf27b2a"><text class="section-title data-v-1cf27b2a">我们的服务</text><view class="service-list data-v-1cf27b2a"><view wx:for="{{c}}" wx:for-item="item" wx:key="b" class="service-item data-v-1cf27b2a">{{item.a}}</view></view></view><view class="footer data-v-1cf27b2a"><text class="data-v-1cf27b2a">秦皇岛安尔然营销策划有限公司</text></view></view>
<view class="container data-v-1cf27b2a"><view class="hero data-v-1cf27b2a"><image src="{{a}}" class="logo data-v-1cf27b2a" mode="aspectFit"/><text class="title data-v-1cf27b2a">秦皇岛安尔然营销策划有限公司</text><text class="subtitle data-v-1cf27b2a">为您提供专业的营销策划服务</text><button class="btn data-v-1cf27b2a" bindtap="{{b}}">了解更多</button></view><view class="section data-v-1cf27b2a"><text class="section-title data-v-1cf27b2a">我们的服务</text><view class="service-list data-v-1cf27b2a"><view wx:for="{{c}}" wx:for-item="item" wx:key="b" class="service-item data-v-1cf27b2a">{{item.a}}</view></view></view><view class="contact-section data-v-1cf27b2a"><button class="contact-btn data-v-1cf27b2a" bindtap="{{d}}">联系我们</button></view><view class="footer data-v-1cf27b2a"><text class="data-v-1cf27b2a">© 2025 秦皇岛安尔然营销策划有限公司</text></view></view>

@ -1,19 +1,19 @@
.container.data-v-1cf27b2a {
padding: 20rpx;
background: #fff;
background: #f9fafb;
box-sizing: border-box;
/* 关键! */
height: 100vh;
min-height: 100vh;
position: relative;
}
.hero.data-v-1cf27b2a {
text-align: center;
padding: 80rpx 40rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
background: linear-gradient(135deg, #1e40af, #3182ce);
color: white;
border-radius: 20rpx;
margin-bottom: 40rpx;
border-radius: 24rpx;
margin-bottom: 50rpx;
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
}
.logo.data-v-1cf27b2a {
width: 180rpx;
@ -21,53 +21,84 @@
margin-bottom: 30rpx;
border-radius: 50%;
background: white;
padding: 10rpx;
padding: 12rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
}
.title.data-v-1cf27b2a {
font-size: 48rpx;
font-weight: bold;
display: block;
margin: 20rpx 0;
line-height: 1.3;
}
.subtitle.data-v-1cf27b2a {
font-size: 32rpx;
opacity: 0.9;
opacity: 0.95;
display: block;
margin-bottom: 40rpx;
}
.btn.data-v-1cf27b2a {
background: #3b82f6;
color: white;
background: #ffffff;
color: #1e40af;
border: none;
padding: 16rpx 60rpx;
padding: 18rpx 60rpx;
border-radius: 50rpx;
font-size: 32rpx;
font-weight: bold;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
transition: transform 0.2s;
}
.btn.data-v-1cf27b2a:active {
transform: scale(0.96);
}
.section-title.data-v-1cf27b2a {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
margin-bottom: 24rpx;
color: #1e293b;
display: block;
}
.service-list.data-v-1cf27b2a {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
gap: 24rpx;
justify-content: center;
}
.service-item.data-v-1cf27b2a {
background: #f1f5f9;
padding: 20rpx 55rpx;
border-radius: 16rpx;
background: #ffffff;
padding: 24rpx 40rpx;
border-radius: 18rpx;
font-size: 28rpx;
color: #1e293b;
box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
min-width: 180rpx;
text-align: center;
}
/* 联系我们模块 */
.contact-section.data-v-1cf27b2a {
text-align: center;
margin: 50rpx 0;
}
.contact-btn.data-v-1cf27b2a {
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
color: white;
border: none;
padding: 20rpx 70rpx;
border-radius: 50rpx;
font-size: 32rpx;
font-weight: bold;
box-shadow: 0 6rpx 16rpx rgba(59, 130, 246, 0.4);
transition: transform 0.2s, box-shadow 0.2s;
}
.contact-btn.data-v-1cf27b2a:active {
transform: scale(0.97);
box-shadow: 0 4rpx 12rpx rgba(59, 130, 246, 0.3);
}
.footer.data-v-1cf27b2a {
text-align: center;
margin-top: 60rpx;
color: #94a3b8;
margin-top: 40rpx;
color: #64748b;
font-size: 24rpx;
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
padding-bottom: 40rpx;
}

Loading…
Cancel
Save