小程序登录

main
yanzai 1 week ago
parent 627e56f9fc
commit 14d5a50f73

3
.gitignore vendored

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

@ -0,0 +1,34 @@
<?php
namespace App\Http\Controllers\API\Mp;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use JWT;
class LoginController
{
//微信登录授权获取openid
public function wxGetOpenid()
{
$code = request('code');
$url = "https://api.weixin.qq.com/sns/jscode2session?appid=" . config('app.globals.WxAppid') . "&secret=" . config('app.globals.WxAppSecret') . "&js_code=" . $code . "&grant_type=authorization_code";
$response = Http::get($url);
if ($response->successful()) {
$data = $response->json(); // 获取响应的 JSON 数据
// var_dump($data);
if (isset($data['openid'])) {
$openid = $data['openid'];
$member = DB::table('members')->where('openid', $openid)->first();
$url="https://www.baidu.com";
return \Yz::Return(true, '获取openid成功', ['openid' => $openid, 'member' => $member,'url'=>$url]);
} else {
return \Yz::echoError1('获取openid失败');
}
} else {
return \Yz::echoError1('获取openid失败');
}
}
}

@ -2,8 +2,8 @@
return [
'globals' => [
'WxAppid' => 'wx526430047d34c85c', //岚科公众号
'WxAppSecret' => '975b8a8b627b1bde71bbe49149134549', //岚科公众号
'WxAppid' => 'wx9ba939d2590a8103', //岚科小程序
'WxAppSecret' => 'c03df7f14c206d619f41d4558bf3be9f', //岚科小程序
// 'WxAppid' => 'wx8f83ab76a99ba560',//测试
// 'WxAppSecret' => 'eebc53a9e94f676bd680d3a09eb20303',//测试

@ -65,6 +65,7 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'v1'],function () {
});
Route::any('auto/SetCutDay','App\Http\Controllers\API\Admin\YeWu\DayCutController@SetCutDay')->middleware('log'); //自动日切操作
Route::any('SmsSendCode','App\Http\Controllers\API\SmsController@SendCode')->middleware('log'); //自动日切操作
Route::group(['middleware'=>['log'],'prefix'=>'H5'],function () { //路由分组,不鉴权
Route::post('Member/Register','App\Http\Controllers\API\H5\MemberController@Register'); //会员注册
@ -80,6 +81,8 @@ Route::group(['middleware'=>['checktoken','log'],'prefix'=>'H5'],function () {
Route::post('Loan/Loan','App\Http\Controllers\API\H5\LoanController@Loan'); //借款
});
Route::post('mp/wxGetOpenid','App\Http\Controllers\API\Mp\LoginController@wxGetOpenid');

@ -0,0 +1,19 @@
import {
useHttp
} from '@/tools/http';
const {
isLoading,
sendRequest
} = useHttp();
//let Url='https://mbmg.yuluo.online/Laravel/public'
let Url='http://huisuo-local';
let BaseUrl=Url+'/api/'
export const BaseFileUrl=()=>{
return Url;
}
//登录授权
export const Login = (data) => {
return sendRequest({url: BaseUrl+"mp/wxGetOpenid",method: 'POST',data:data});
}

@ -9,16 +9,25 @@
{
"path" : "pages/about",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/contact",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path" : "pages/contact",
"path" : "pages/h5",
"style" :
{
"navigationBarTitleText" : ""
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
}],
"globalStyle": {

@ -0,0 +1,22 @@
<template>
<view>
<web-view :webview-styles="webviewStyles" :src="url"></web-view>
</view>
</template>
<script setup>
import {
ref
} from "vue"
import {
onLoad
} from "@dcloudio/uni-app"
let url=ref('')
onLoad((e)=>{
url.value=e.url
})
</script>
<style>
</style>

@ -1,108 +1,154 @@
<template>
<view class="container">
<view class="hero">
<image src="/static/logo.png" class="logo" mode="aspectFit" />
<text class="title">秦皇岛安尔然营销策划有限公司</text>
<text class="subtitle">为您提供专业的营销策划服务</text>
<button class="btn" @click="gotoAbout"></button>
</view>
<view class="container">
<view class="hero">
<image src="/static/logo.png" class="logo" mode="aspectFit" />
<text class="title">秦皇岛安尔然营销策划有限公司</text>
<text class="subtitle">为您提供专业的营销策划服务</text>
<button class="btn" @click="gotoAbout"></button>
</view>
<view class="section">
<text class="section-title">我们的服务</text>
<view class="service-list">
<view class="service-item" v-for="(item, index) in services" :key="index">
{{ item }}
</view>
</view>
</view>
<view class="section">
<text class="section-title">我们的服务</text>
<view class="service-list">
<view class="service-item" v-for="(item, index) in services" :key="index">
{{ item }}
</view>
</view>
</view>
<view class="footer">
<text>秦皇岛安尔然营销策划有限公司</text>
</view>
</view>
<view class="footer">
<text>秦皇岛安尔然营销策划有限公司</text>
</view>
</view>
</template>
<script setup>
import {
ref
} from "vue"
const services = ['营销策划', '会议服务', '商务咨询', '庆典服务', '礼仪服务']
import {
Login
} from "@/api"
import {
onLoad
} from "@dcloudio/uni-app"
const services = ['营销策划', '会议服务', '商务咨询', '庆典服务', '礼仪服务']
const gotoAbout = () => {
uni.navigateTo({ url: '/pages/about' })
}
const gotoAbout = () => {
uni.navigateTo({
url: '/pages/about'
})
}
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 => {
if (res.status) {
if(res.data.member!==null && res.data.url!==null){
uni.navigateTo({
url:'/pages/h5?url='+res.data.url
})
}
}
})
} else {
console.error('登录失败', res.errMsg)
}
} catch (error) {
console.error('登录异常', error)
}
}
onLoad(()=>{
handleLogin()
})
</script>
<style scoped>
.container {
padding: 20rpx;
background: #fff;
box-sizing: border-box; /* 关键! */
height: 100vh;
}
.hero {
text-align: center;
padding: 80rpx 40rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
color: white;
border-radius: 20rpx;
margin-bottom: 40rpx;
}
.logo {
width: 180rpx;
height: 180rpx;
margin-bottom: 30rpx;
border-radius: 50%;
background: white;
padding: 10rpx;
}
.title {
font-size: 48rpx;
font-weight: bold;
display: block;
margin: 20rpx 0;
}
.subtitle {
font-size: 32rpx;
opacity: 0.9;
display: block;
margin-bottom: 40rpx;
}
.btn {
background: #3b82f6;
color: white;
border: none;
padding: 16rpx 60rpx;
border-radius: 50rpx;
font-size: 32rpx;
}
.section-title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
display: block;
}
.service-list {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.service-item {
background: #f1f5f9;
padding: 20rpx 55rpx;
border-radius: 16rpx;
font-size: 28rpx;
color: #1e293b;
}
.footer {
text-align: center;
margin-top: 60rpx;
color: #94a3b8;
font-size: 24rpx;
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
}
.container {
padding: 20rpx;
background: #fff;
box-sizing: border-box;
/* 关键! */
height: 100vh;
}
.hero {
text-align: center;
padding: 80rpx 40rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
color: white;
border-radius: 20rpx;
margin-bottom: 40rpx;
}
.logo {
width: 180rpx;
height: 180rpx;
margin-bottom: 30rpx;
border-radius: 50%;
background: white;
padding: 10rpx;
}
.title {
font-size: 48rpx;
font-weight: bold;
display: block;
margin: 20rpx 0;
}
.subtitle {
font-size: 32rpx;
opacity: 0.9;
display: block;
margin-bottom: 40rpx;
}
.btn {
background: #3b82f6;
color: white;
border: none;
padding: 16rpx 60rpx;
border-radius: 50rpx;
font-size: 32rpx;
}
.section-title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
display: block;
}
.service-list {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.service-item {
background: #f1f5f9;
padding: 20rpx 55rpx;
border-radius: 16rpx;
font-size: 28rpx;
color: #1e293b;
}
.footer {
text-align: center;
margin-top: 60rpx;
color: #94a3b8;
font-size: 24rpx;
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
}
</style>

@ -0,0 +1,78 @@
// http.js
import { ref } from 'vue';
// 封装请求拦截器
function requestInterceptor(options) {
// 在请求发送之前做一些处理
// 比如添加请求头、修改请求参数等
options.header = {
'Authorization': 'Bearer ' + uni.getStorageSync("access_token"), // 假设需要添加 token
'Content-Type': 'application/json' // 设置请求头
};
return options;
}
// 封装响应拦截器
function responseInterceptor(response) {
// 对响应数据进行处理
// 比如根据响应状态码进行不同的操作
if (response.statusCode === 200) {
// 请求成功
if(response.data.status==false){
uni.showToast({
title: response.data.msg ,
icon: 'none'
});
}
return response.data;
} else {
// 请求失败
uni.showToast({
title: '请求失败,请稍后重试',
icon: 'none'
});
return Promise.reject(response.data);
}
}
// 发送请求的方法,内部使用拦截器
export function useHttp() {
const isLoading = ref(false);
function sendRequest(options) {
// 请求发送之前,先经过请求拦截器处理
let processedOptions = requestInterceptor(options);
isLoading.value = true;
uni.showLoading({
title: '加载中',
mask:true
});
return new Promise((resolve, reject) => {
uni.request({
...processedOptions,
success: (res) => {
// 请求成功后,经过响应拦截器处理
let processedResponse = responseInterceptor(res);
isLoading.value = false;
uni.hideLoading();
resolve(processedResponse);
},
fail: (err) => {
// 请求失败
isLoading.value = false;
uni.hideLoading();
reject(err);
}
});
});
}
return {
isLoading,
sendRequest
};
}

@ -1 +1 @@
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\n\t\t\tconsole.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t/*每个页面公共css */\n\t@import '@/uni_modules/uni-scss/index.scss';\n\t/* #ifndef APP-NVUE */\n\t@import '@/static/customicons.css';\n\t// 设置整个项目的背景色\n\tpage {\n\t\tbackground-color: #f5f5f5;\n\t}\n\n\t/* #endif */\n\t.example-info {\n\t\tfont-size: 14px;\n\t\tcolor: #333;\n\t\tpadding: 10px;\n\t}\r\n</style>\n","\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport App from './App'\r\n\r\nVue.config.productionTip = false\r\n\r\nApp.mpType = 'app'\r\n\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\n\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\nimport App from './App.vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,QAAA,gBAAa,uDAAuD;AACpEA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACMM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\n\t\t\tconsole.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t/*每个页面公共css */\n\t@import '@/uni_modules/uni-scss/index.scss';\n\t/* #ifndef APP-NVUE */\n\t@import '@/static/customicons.css';\n\t// 设置整个项目的背景色\n\tpage {\n\t\tbackground-color: #f5f5f5;\n\t}\n\n\t/* #endif */\n\t.example-info {\n\t\tfont-size: 14px;\n\t\tcolor: #333;\n\t\tpadding: 10px;\n\t}\r\n</style>\n","\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport App from './App'\r\n\r\nVue.config.productionTip = false\r\n\r\nApp.mpType = 'app'\r\n\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\n\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\nimport App from './App.vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,QAAA,gBAAa,uDAAuD;AACpEA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACMM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"index.js","sources":["pages/index/index.vue","../../../../../soft/安装包/HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<template>\n <view class=\"container\">\n <view class=\"hero\">\n <image src=\"/static/logo.png\" class=\"logo\" mode=\"aspectFit\" />\n <text class=\"title\">秦皇岛安尔然营销策划有限公司</text>\n <text class=\"subtitle\">为您提供专业的营销策划服务</text>\n <button class=\"btn\" @click=\"gotoAbout\">了解更多</button>\n </view>\n\n <view class=\"section\">\n <text class=\"section-title\">我们的服务</text>\n <view class=\"service-list\">\n <view class=\"service-item\" v-for=\"(item, index) in services\" :key=\"index\">\n {{ item }}\n </view>\n </view>\n </view>\n\n <view class=\"footer\">\n <text>秦皇岛安尔然营销策划有限公司</text>\n </view>\n </view>\n</template>\n\n<script setup>\r\n\timport {\r\n\t\tref\r\n\t} from \"vue\"\nconst services = ['营销策划', '会议服务', '商务咨询', '庆典服务', '礼仪服务']\n\nconst gotoAbout = () => {\n uni.navigateTo({ url: '/pages/about' })\n}\n</script>\n\n<style scoped>\n.container {\n padding: 20rpx;\n background: #fff;\r\n box-sizing: border-box; /* 关键! */\r\n \r\n height: 100vh;\n}\n.hero {\n text-align: center;\n padding: 80rpx 40rpx;\n background: linear-gradient(to bottom, #1a365d, #2c5282);\n color: white;\n border-radius: 20rpx;\n margin-bottom: 40rpx;\n}\n.logo {\n width: 180rpx;\n height: 180rpx;\n margin-bottom: 30rpx;\n border-radius: 50%;\n background: white;\n padding: 10rpx;\n}\n.title {\n font-size: 48rpx;\n font-weight: bold;\n display: block;\n margin: 20rpx 0;\n}\n.subtitle {\n font-size: 32rpx;\n opacity: 0.9;\n display: block;\n margin-bottom: 40rpx;\n}\n.btn {\n background: #3b82f6;\n color: white;\n border: none;\n padding: 16rpx 60rpx;\n border-radius: 50rpx;\n font-size: 32rpx;\n}\n.section-title {\n font-size: 36rpx;\n font-weight: bold;\n margin-bottom: 20rpx;\n display: block;\n}\n.service-list {\n display: flex;\n flex-wrap: wrap;\n gap: 20rpx;\n}\n.service-item {\n background: #f1f5f9;\n padding: 20rpx 55rpx;\n border-radius: 16rpx;\n font-size: 28rpx;\n color: #1e293b;\n}\n.footer {\n text-align: center;\n margin-top: 60rpx;\n color: #94a3b8;\n font-size: 24rpx;\r\n position: absolute;\r\n bottom: 60rpx;\r\n width: 100%;\r\n text-align: center;\n}\n</style>","import MiniProgramPage from 'D:/Code/lanke/other/huisuo/xiaochengxu/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;;;;;AA4BA,UAAM,WAAW,CAAC,QAAQ,QAAQ,QAAQ,QAAQ,MAAM;AAExD,UAAM,YAAY,MAAM;AACtBA,oBAAAA,MAAI,WAAW,EAAE,KAAK,eAAc,CAAE;AAAA,IACxC;;;;;;;;;;;;;;;;AC/BA,GAAG,WAAW,eAAe;"}
{"version":3,"file":"index.js","sources":["pages/index/index.vue","../../../../../soft/安装包/HBuilderX.3.8.12.20230817/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<template>\r\n\t<view class=\"container\">\r\n\t\t<view class=\"hero\">\r\n\t\t\t<image src=\"/static/logo.png\" class=\"logo\" mode=\"aspectFit\" />\r\n\t\t\t<text class=\"title\">秦皇岛安尔然营销策划有限公司</text>\r\n\t\t\t<text class=\"subtitle\">为您提供专业的营销策划服务</text>\r\n\t\t\t<button class=\"btn\" @click=\"gotoAbout\">了解更多</button>\r\n\t\t</view>\r\n\r\n\t\t<view class=\"section\">\r\n\t\t\t<text class=\"section-title\">我们的服务</text>\r\n\t\t\t<view class=\"service-list\">\r\n\t\t\t\t<view class=\"service-item\" v-for=\"(item, index) in services\" :key=\"index\">\r\n\t\t\t\t\t{{ item }}\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\r\n\t\t<view class=\"footer\">\r\n\t\t\t<text>秦皇岛安尔然营销策划有限公司</text>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script setup>\r\n\timport {\r\n\t\tref\r\n\t} from \"vue\"\r\n\timport {\r\n\t\tLogin\r\n\t} from \"@/api\"\r\n\timport {\r\n\t\tonLoad\r\n\t} from \"@dcloudio/uni-app\"\r\n\tconst services = ['营销策划', '会议服务', '商务咨询', '庆典服务', '礼仪服务']\r\n\r\n\tconst gotoAbout = () => {\r\n\t\tuni.navigateTo({\r\n\t\t\turl: '/pages/about'\r\n\t\t})\r\n\t}\r\n\tconst handleLogin = async () => {\r\n\t\ttry {\r\n\t\t\t// 1. 调用微信登录接口获取 code\r\n\t\t\tconst res = await wx.login()\r\n\t\t\tif (res.code) {\r\n\t\t\t\t// 2. 将 code 发送给后端\r\n\t\t\t\t console.log(res.code)\r\n\t\t\t\t Login({\r\n\t\t\t\t \tcode: res.code\r\n\t\t\t\t }).then(res => {\r\n\t\t\t\t \tif (res.status) {\r\n\t\t\t\t \t if(res.data.member!==null && res.data.url!==null){\r\n\t\t\t\t\t\t uni.navigateTo({\r\n\t\t\t\t\t\t \turl:'/pages/h5?url='+res.data.url\r\n\t\t\t\t\t\t })\r\n\t\t\t\t\t }\r\n\t\t\t\t \t}\r\n\t\t\t\t })\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error('登录失败', res.errMsg)\r\n\t\t\t}\r\n\t\t} catch (error) {\r\n\t\t\tconsole.error('登录异常', error)\r\n\t\t}\r\n\t}\r\n\tonLoad(()=>{\r\n\t\thandleLogin()\r\n\t})\r\n</script>\r\n\r\n<style scoped>\r\n\t.container {\r\n\t\tpadding: 20rpx;\r\n\t\tbackground: #fff;\r\n\t\tbox-sizing: border-box;\r\n\t\t/* 关键! */\r\n\r\n\t\theight: 100vh;\r\n\t}\r\n\r\n\t.hero {\r\n\t\ttext-align: center;\r\n\t\tpadding: 80rpx 40rpx;\r\n\t\tbackground: linear-gradient(to bottom, #1a365d, #2c5282);\r\n\t\tcolor: white;\r\n\t\tborder-radius: 20rpx;\r\n\t\tmargin-bottom: 40rpx;\r\n\t}\r\n\r\n\t.logo {\r\n\t\twidth: 180rpx;\r\n\t\theight: 180rpx;\r\n\t\tmargin-bottom: 30rpx;\r\n\t\tborder-radius: 50%;\r\n\t\tbackground: white;\r\n\t\tpadding: 10rpx;\r\n\t}\r\n\r\n\t.title {\r\n\t\tfont-size: 48rpx;\r\n\t\tfont-weight: bold;\r\n\t\tdisplay: block;\r\n\t\tmargin: 20rpx 0;\r\n\t}\r\n\r\n\t.subtitle {\r\n\t\tfont-size: 32rpx;\r\n\t\topacity: 0.9;\r\n\t\tdisplay: block;\r\n\t\tmargin-bottom: 40rpx;\r\n\t}\r\n\r\n\t.btn {\r\n\t\tbackground: #3b82f6;\r\n\t\tcolor: white;\r\n\t\tborder: none;\r\n\t\tpadding: 16rpx 60rpx;\r\n\t\tborder-radius: 50rpx;\r\n\t\tfont-size: 32rpx;\r\n\t}\r\n\r\n\t.section-title {\r\n\t\tfont-size: 36rpx;\r\n\t\tfont-weight: bold;\r\n\t\tmargin-bottom: 20rpx;\r\n\t\tdisplay: block;\r\n\t}\r\n\r\n\t.service-list {\r\n\t\tdisplay: flex;\r\n\t\tflex-wrap: wrap;\r\n\t\tgap: 20rpx;\r\n\t}\r\n\r\n\t.service-item {\r\n\t\tbackground: #f1f5f9;\r\n\t\tpadding: 20rpx 55rpx;\r\n\t\tborder-radius: 16rpx;\r\n\t\tfont-size: 28rpx;\r\n\t\tcolor: #1e293b;\r\n\t}\r\n\r\n\t.footer {\r\n\t\ttext-align: center;\r\n\t\tmargin-top: 60rpx;\r\n\t\tcolor: #94a3b8;\r\n\t\tfont-size: 24rpx;\r\n\t\tposition: absolute;\r\n\t\tbottom: 60rpx;\r\n\t\twidth: 100%;\r\n\t\ttext-align: center;\r\n\t}\r\n</style>","import MiniProgramPage from 'D:/Code/lanke/other/huisuo/xiaochengxu/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","wx","Login","res","onLoad"],"mappings":";;;;;;;AAkCC,UAAM,WAAW,CAAC,QAAQ,QAAQ,QAAQ,QAAQ,MAAM;AAExD,UAAM,YAAY,MAAM;AACvBA,oBAAAA,MAAI,WAAW;AAAA,QACd,KAAK;AAAA,MACR,CAAG;AAAA,IACD;AACD,UAAM,cAAc,YAAY;AAC/B,UAAI;AAEH,cAAM,MAAM,MAAMC,cAAE,KAAC,MAAO;AAC5B,YAAI,IAAI,MAAM;AAEZD,wBAAAA,kDAAY,IAAI,IAAI;AACpBE,0BAAM;AAAA,YACL,MAAM,IAAI;AAAA,UAChB,CAAM,EAAE,KAAK,CAAAC,SAAO;AACd,gBAAIA,KAAI,QAAQ;AACf,kBAAGA,KAAI,KAAK,WAAS,QAAQA,KAAI,KAAK,QAAM,MAAK;AACjDH,8BAAAA,MAAI,WAAW;AAAA,kBACd,KAAI,mBAAiBG,KAAI,KAAK;AAAA,gBACtC,CAAQ;AAAA,cACD;AAAA,YACA;AAAA,UACP,CAAM;AAAA,QACN,OAAU;AACNH,wBAAA,MAAA,MAAA,SAAA,+BAAc,QAAQ,IAAI,MAAM;AAAA,QAChC;AAAA,MACD,SAAQ,OAAO;AACfA,sBAAAA,MAAA,MAAA,SAAA,+BAAc,QAAQ,KAAK;AAAA,MAC3B;AAAA,IACD;AACDI,kBAAAA,OAAO,MAAI;AACV,kBAAa;AAAA,IACf,CAAE;;;;;;;;;;;;;;;;ACnEF,GAAG,WAAW,eAAe;"}

@ -5,6 +5,7 @@ if (!Math) {
"./pages/index/index.js";
"./pages/about.js";
"./pages/contact.js";
"./pages/h5.js";
}
const _sfc_main = {
onLaunch: function() {

@ -2,7 +2,8 @@
"pages": [
"pages/index/index",
"pages/about",
"pages/contact"
"pages/contact",
"pages/h5"
],
"window": {
"navigationBarTextStyle": "black",

@ -7864,10 +7864,22 @@ const createSubpackageApp = initCreateSubpackageApp();
wx.createPluginApp = global.createPluginApp = createPluginApp;
wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
}
const createLifeCycleHook = (lifecycle, flag = 0) => (hook, target = getCurrentInstance()) => {
!isInSSRComponentSetup && injectHook(lifecycle, hook, target);
};
const onLoad = /* @__PURE__ */ createLifeCycleHook(
ON_LOAD,
2
/* HookFlags.PAGE */
);
exports._export_sfc = _export_sfc;
exports.createSSRApp = createSSRApp;
exports.f = f;
exports.index = index;
exports.o = o;
exports.onLoad = onLoad;
exports.ref = ref;
exports.t = t;
exports.unref = unref;
exports.wx$1 = wx$1;
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map

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

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

@ -1,13 +1,42 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const _sfc_main = {
__name: "index",
setup(__props) {
const services = ["营销策划", "会议服务", "商务咨询", "庆典服务", "礼仪服务"];
const gotoAbout = () => {
common_vendor.index.navigateTo({ url: "/pages/about" });
common_vendor.index.navigateTo({
url: "/pages/about"
});
};
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) => {
if (res2.status) {
if (res2.data.member !== null && res2.data.url !== null) {
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);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:64", "登录异常", error);
}
};
common_vendor.onLoad(() => {
handleLogin();
});
return (_ctx, _cache) => {
return {
a: common_assets._imports_0,

@ -1,72 +1,73 @@
.container.data-v-1cf27b2a {
padding: 20rpx;
background: #fff;
box-sizing: border-box; /* 关键! */
height: 100vh;
padding: 20rpx;
background: #fff;
box-sizing: border-box;
/* 关键! */
height: 100vh;
}
.hero.data-v-1cf27b2a {
text-align: center;
padding: 80rpx 40rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
color: white;
border-radius: 20rpx;
margin-bottom: 40rpx;
text-align: center;
padding: 80rpx 40rpx;
background: linear-gradient(to bottom, #1a365d, #2c5282);
color: white;
border-radius: 20rpx;
margin-bottom: 40rpx;
}
.logo.data-v-1cf27b2a {
width: 180rpx;
height: 180rpx;
margin-bottom: 30rpx;
border-radius: 50%;
background: white;
padding: 10rpx;
width: 180rpx;
height: 180rpx;
margin-bottom: 30rpx;
border-radius: 50%;
background: white;
padding: 10rpx;
}
.title.data-v-1cf27b2a {
font-size: 48rpx;
font-weight: bold;
display: block;
margin: 20rpx 0;
font-size: 48rpx;
font-weight: bold;
display: block;
margin: 20rpx 0;
}
.subtitle.data-v-1cf27b2a {
font-size: 32rpx;
opacity: 0.9;
display: block;
margin-bottom: 40rpx;
font-size: 32rpx;
opacity: 0.9;
display: block;
margin-bottom: 40rpx;
}
.btn.data-v-1cf27b2a {
background: #3b82f6;
color: white;
border: none;
padding: 16rpx 60rpx;
border-radius: 50rpx;
font-size: 32rpx;
background: #3b82f6;
color: white;
border: none;
padding: 16rpx 60rpx;
border-radius: 50rpx;
font-size: 32rpx;
}
.section-title.data-v-1cf27b2a {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
display: block;
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
display: block;
}
.service-list.data-v-1cf27b2a {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.service-item.data-v-1cf27b2a {
background: #f1f5f9;
padding: 20rpx 55rpx;
border-radius: 16rpx;
font-size: 28rpx;
color: #1e293b;
background: #f1f5f9;
padding: 20rpx 55rpx;
border-radius: 16rpx;
font-size: 28rpx;
color: #1e293b;
}
.footer.data-v-1cf27b2a {
text-align: center;
margin-top: 60rpx;
color: #94a3b8;
font-size: 24rpx;
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
text-align: center;
margin-top: 60rpx;
color: #94a3b8;
font-size: 24rpx;
position: absolute;
bottom: 60rpx;
width: 100%;
text-align: center;
}

Loading…
Cancel
Save