Compare commits
18 Commits
V1.0.0
...
aee82283b9
| Author | SHA1 | Date | |
|---|---|---|---|
| aee82283b9 | |||
|
|
6c35146b36 | ||
|
|
11268d5be9 | ||
|
|
93bf65eb65 | ||
| 7a117a3b46 | |||
| b97c836f97 | |||
|
|
b5f5bc646a | ||
|
|
07251f7676 | ||
| f1e009d656 | |||
| 017289c694 | |||
| 28d26fb894 | |||
|
|
03f49a5b48 | ||
|
|
4b14ea4f08 | ||
| 0b39a9507b | |||
|
|
851bfe149c | ||
|
|
52975fe514 | ||
| 621d5d4c57 | |||
| 2abce21c49 |
@@ -16,6 +16,7 @@ onHide(() => {
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/static/fonts/iconfont.css";
|
||||
@import "@/static/scss/index.scss";
|
||||
|
||||
/* 添加全局样式 */
|
||||
page,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { loginAuth, bindPhone } from "@/manager/LoginManager";
|
||||
import { loginAuth, bindPhone, checkPhone } from "@/manager/LoginManager";
|
||||
import { clientId } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
|
||||
@@ -10,16 +10,28 @@ export const goBack = () => uni.navigateBack({ delta: 1 });
|
||||
|
||||
// 登录逻辑
|
||||
export const onLogin = async (e) => {
|
||||
console.info("onLogin code: ", e.detail);
|
||||
console.info("onLogin code: ", e);
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
// 判断用户拒绝
|
||||
if (e.detail.errno === 104) {
|
||||
if (e !== undefined && e && e.detail && e.detail.errno === 104) {
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
|
||||
await loginAuth(e).then(async () => {
|
||||
// 检查手机号是否绑定
|
||||
const checkRes = await checkPhone();
|
||||
if (checkRes.data) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (e === undefined) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
const { code } = e.detail;
|
||||
|
||||
// 绑定手机号
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import App from "./App";
|
||||
import share from "./utils/share";
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from "vue";
|
||||
@@ -21,6 +22,7 @@ export function createApp() {
|
||||
|
||||
pinia.use(createUnistorage());
|
||||
app.use(pinia);
|
||||
app.use(share);
|
||||
|
||||
return {
|
||||
app,
|
||||
|
||||
@@ -11,7 +11,10 @@ export const getWeChatAuthCode = (e) => {
|
||||
// #endif
|
||||
|
||||
// 判断用户拒绝授权
|
||||
if (e.detail.errMsg === "getPhoneNumber:fail user deny") {
|
||||
if (
|
||||
e !== undefined &&
|
||||
e.detail.errMsg === "getPhoneNumber:fail user deny"
|
||||
) {
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,13 +48,9 @@ const bindPhone = async (params) => {
|
||||
}
|
||||
};
|
||||
|
||||
const checkPhone = async (phone) => {
|
||||
try {
|
||||
const response = await checkUserPhone(phone);
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw err;
|
||||
}
|
||||
const checkPhone = async () => {
|
||||
const response = await checkUserPhone();
|
||||
return response;
|
||||
};
|
||||
|
||||
export { loginAuth, bindPhone, checkPhone };
|
||||
|
||||
@@ -5,15 +5,10 @@
|
||||
overflow-x: hidden; // ✅ 防止横向撑开
|
||||
|
||||
.chat-ai {
|
||||
margin: 6px 12px;
|
||||
padding: 0 12px;
|
||||
max-width: 100%; // ✅ 限制最大宽度
|
||||
margin: 6px 0;
|
||||
padding: 0 20px; // 消息内容的内边距 左右20px
|
||||
min-width: 100px;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px 20px 20px 20px;
|
||||
border: 1px solid;
|
||||
border-color: #ffffff;
|
||||
max-width: 100%; // ✅ 限制最大宽度
|
||||
overflow: hidden; // ✅ 超出内容被切掉
|
||||
word-wrap: break-word; // ✅ 长单词自动换行
|
||||
word-break: break-all; // ✅ 强制换行
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="chat-mine">
|
||||
<view class="chat-mine bg-17294E">
|
||||
<text>{{ text }}</text>
|
||||
<slot></slot>
|
||||
</view>
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
.chat-mine {
|
||||
margin: 6px 12px;
|
||||
margin: 6px 20px;
|
||||
padding: 8px 16px;
|
||||
|
||||
background-color: #00a6ff;
|
||||
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 20px 4px 20px 20px;
|
||||
border: 1px solid;
|
||||
border-color: #ffffff;
|
||||
border-radius: 15px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="chat-other">
|
||||
<view class="chat-other pl-20">
|
||||
<text>{{ text }}</text>
|
||||
<slot></slot>
|
||||
</view>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
.chat-other {
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 100%; // ✅ 限制最大宽度
|
||||
overflow-x: hidden; // ✅ 防止横向撑开
|
||||
padding-left: 20px;
|
||||
|
||||
text {
|
||||
font-size: $uni-font-size-base;
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<image
|
||||
class="voice-icon"
|
||||
v-if="!isVoiceMode"
|
||||
src="https://oss.nianxx.cn/mp/static/input_voice_icon.png"
|
||||
src="https://oss.nianxx.cn/mp/static/version_101/home/input_voice_icon.png"
|
||||
/>
|
||||
<image
|
||||
class="voice-icon"
|
||||
v-else
|
||||
src="https://oss.nianxx.cn/mp/static/input_keyboard_icon.png"
|
||||
src="https://oss.nianxx.cn/mp/static/version_101/home/input_keyboard_icon.png"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@@ -53,20 +53,20 @@
|
||||
|
||||
<view class="input-container-send">
|
||||
<view class="input-container-send-btn" @click="sendMessage">
|
||||
<image
|
||||
v-if="props.isSessionActive"
|
||||
class="send-icon"
|
||||
src="https://oss.nianxx.cn/mp/static/input_stop_icon.png"
|
||||
/>
|
||||
<view v-if="props.isSessionActive" class="send-stop"> </view>
|
||||
<image
|
||||
v-else
|
||||
class="send-icon"
|
||||
src="https://oss.nianxx.cn/mp/static/input_send_icon.png"
|
||||
src="https://oss.nianxx.cn/mp/static/version_101/home/input_send_icon.png"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="color-99A0AE font-size-9 text-center text-gray-400">
|
||||
内容由AI大模型生成,请仔细鉴别
|
||||
</view>
|
||||
|
||||
<!-- 录音按钮 -->
|
||||
<RecordingWaveBtn v-if="visibleWaveBtn" ref="recordingWaveBtnRef" />
|
||||
</view>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
.area-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 22px;
|
||||
border-radius: 24px;
|
||||
background-color: $uni-bg-color;
|
||||
box-shadow: 0px 0px 20px 0px rgba(52, 25, 204, 0.05);
|
||||
margin: 0 12px;
|
||||
margin: 0 20px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.input-container-voice {
|
||||
@@ -12,12 +12,12 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-self: flex-end;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
.voice-icon {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,20 +45,39 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-self: flex-end;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
.input-container-send-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(
|
||||
39% 39% at 97% 81%,
|
||||
#79dffb 0%,
|
||||
rgba(138, 227, 252, 0) 100%
|
||||
),
|
||||
radial-gradient(
|
||||
54% 54% at 3% 70%,
|
||||
#8afcf8 0%,
|
||||
rgba(138, 252, 248, 0) 100%
|
||||
),
|
||||
#2d91ff;
|
||||
}
|
||||
|
||||
.send-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.send-stop {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,145 +1,121 @@
|
||||
<template>
|
||||
<view class="chat-container" @touchend="handleTouchEnd">
|
||||
<!-- 顶部的背景 -->
|
||||
<ChatTopBgImg class="chat-container-bg"></ChatTopBgImg>
|
||||
<view class="flex flex-col h-screen" @touchend="handleTouchEnd">
|
||||
<!-- 顶部自定义导航栏 -->
|
||||
<view class="header" :style="{ paddingTop: statusBarHeight + 'px' }">
|
||||
<ChatTopNavBar @openDrawer="openDrawer" />
|
||||
</view>
|
||||
|
||||
<!-- 消息列表(可滚动区域) -->
|
||||
<scroll-view
|
||||
class="main flex-full overflow-hidden scroll-y"
|
||||
scroll-y
|
||||
:scroll-top="scrollTop"
|
||||
:scroll-with-animation="true"
|
||||
@scroll="handleScroll"
|
||||
@scrolltolower="handleScrollToLower"
|
||||
>
|
||||
<!-- welcome栏 -->
|
||||
<ChatTopWelcome :mainPageDataModel="mainPageDataModel" />
|
||||
|
||||
<view class="chat-content">
|
||||
<!-- 顶部自定义导航栏 -->
|
||||
<view
|
||||
class="nav-bar-container"
|
||||
:style="{
|
||||
paddingTop: statusBarHeight + 'px',
|
||||
}"
|
||||
class="area-msg-list-content"
|
||||
v-for="item in chatMsgList"
|
||||
:key="item.msgId"
|
||||
:id="item.msgId"
|
||||
>
|
||||
<ChatTopNavBar @openDrawer="openDrawer"></ChatTopNavBar>
|
||||
</view>
|
||||
<template v-if="item.msgType === MessageRole.AI">
|
||||
<ChatCardAI
|
||||
class="message-item-ai"
|
||||
:key="`ai-${item.msgId}-${item.msg ? item.msg.length : 0}`"
|
||||
:text="item.msg || ''"
|
||||
:isLoading="item.isLoading"
|
||||
>
|
||||
<template #content v-if="item.toolCall">
|
||||
<QuickBookingComponent
|
||||
v-if="item.toolCall.componentName === CompName.quickBookingCard"
|
||||
/>
|
||||
<DiscoveryCardComponent
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.discoveryCard
|
||||
"
|
||||
/>
|
||||
<CreateServiceOrder
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.createWorkOrderCard
|
||||
"
|
||||
/>
|
||||
<Feedback
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.feedbackCard
|
||||
"
|
||||
:toolCall="item.toolCall"
|
||||
/>
|
||||
<DetailCardCompontent
|
||||
v-else-if="
|
||||
item.toolCall.componentName ===
|
||||
CompName.pictureAndCommodityCard
|
||||
"
|
||||
:toolCall="item.toolCall"
|
||||
/>
|
||||
<AddCarCrad
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.enterLicensePlateCard
|
||||
"
|
||||
:toolCall="item.toolCall"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<!-- 消息列表(可滚动区域) -->
|
||||
<scroll-view
|
||||
:scroll-top="scrollTop"
|
||||
scroll-y
|
||||
:scroll-with-animation="true"
|
||||
class="area-msg-list"
|
||||
@scroll="handleScroll"
|
||||
@scrolltolower="handleScrollToLower"
|
||||
>
|
||||
<!-- welcome栏 -->
|
||||
<ChatTopWelcome
|
||||
class="chat-container-top-bannar"
|
||||
:initPageImages="mainPageDataModel.initPageImages"
|
||||
:welcomeContent="mainPageDataModel.welcomeContent"
|
||||
>
|
||||
</ChatTopWelcome>
|
||||
|
||||
<view
|
||||
class="area-msg-list-content"
|
||||
v-for="item in chatMsgList"
|
||||
:key="item.msgId"
|
||||
:id="item.msgId"
|
||||
>
|
||||
<template v-if="item.msgType === MessageRole.AI">
|
||||
<ChatCardAI
|
||||
class="message-item-ai"
|
||||
:key="`ai-${item.msgId}-${item.msg ? item.msg.length : 0}`"
|
||||
:text="item.msg || ''"
|
||||
:isLoading="item.isLoading"
|
||||
>
|
||||
<template #content v-if="item.toolCall">
|
||||
<QuickBookingComponent
|
||||
v-if="
|
||||
item.toolCall.componentName === CompName.quickBookingCard
|
||||
"
|
||||
/>
|
||||
<DiscoveryCardComponent
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.discoveryCard
|
||||
"
|
||||
/>
|
||||
<CreateServiceOrder
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.createWorkOrderCard
|
||||
"
|
||||
/>
|
||||
<Feedback
|
||||
v-else-if="
|
||||
item.toolCall.componentName === CompName.feedbackCard
|
||||
"
|
||||
:toolCall="item.toolCall"
|
||||
/>
|
||||
<DetailCardCompontent
|
||||
v-else-if="
|
||||
item.toolCall.componentName ===
|
||||
CompName.pictureAndCommodityCard
|
||||
"
|
||||
:toolCall="item.toolCall"
|
||||
/>
|
||||
<AddCarCrad
|
||||
v-else-if="
|
||||
item.toolCall.componentName ===
|
||||
CompName.enterLicensePlateCard
|
||||
"
|
||||
:toolCall="item.toolCall"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<!-- 这个是底部 -->
|
||||
<AttachListComponent
|
||||
v-if="item.question"
|
||||
:question="item.question"
|
||||
@replySent="handleReply"
|
||||
/>
|
||||
</template>
|
||||
</ChatCardAI>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.msgType === MessageRole.ME">
|
||||
<ChatCardMine class="message-item-mine" :text="item.msg">
|
||||
</ChatCardMine>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<ChatCardOther class="message-item-other" :text="item.msg">
|
||||
<ChatMoreTips
|
||||
<template #footer>
|
||||
<!-- 这个是底部 -->
|
||||
<AttachListComponent
|
||||
v-if="item.question"
|
||||
:question="item.question"
|
||||
@replySent="handleReply"
|
||||
:itemList="mainPageDataModel.guideWords"
|
||||
/>
|
||||
</template>
|
||||
</ChatCardAI>
|
||||
</template>
|
||||
|
||||
<ActivityListComponent
|
||||
v-if="
|
||||
mainPageDataModel.activityList &&
|
||||
mainPageDataModel.activityList.length > 0
|
||||
"
|
||||
:activityList="mainPageDataModel.activityList"
|
||||
/>
|
||||
<template v-else-if="item.msgType === MessageRole.ME">
|
||||
<ChatCardMine class="message-item-mine" :text="item.msg" />
|
||||
</template>
|
||||
|
||||
<RecommendPostsComponent
|
||||
v-if="
|
||||
mainPageDataModel.recommendTheme &&
|
||||
mainPageDataModel.recommendTheme.length > 0
|
||||
"
|
||||
:recommendThemeList="mainPageDataModel.recommendTheme"
|
||||
/>
|
||||
</ChatCardOther>
|
||||
</template>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<template v-else>
|
||||
<ChatCardOther class="message-item-other" :text="item.msg">
|
||||
<ActivityListComponent
|
||||
v-if="
|
||||
mainPageDataModel.activityList &&
|
||||
mainPageDataModel.activityList.length > 0
|
||||
"
|
||||
:activityList="mainPageDataModel.activityList"
|
||||
/>
|
||||
|
||||
<!-- 输入框区域 -->
|
||||
<view class="footer-area">
|
||||
<ChatQuickAccess @replySent="handleReplyInstruct" />
|
||||
<ChatInputArea
|
||||
ref="inputAreaRef"
|
||||
v-model="inputMessage"
|
||||
:holdKeyboard="holdKeyboard"
|
||||
:is-session-active="isSessionActive"
|
||||
:stop-request="stopRequest"
|
||||
@send="sendMessageAction"
|
||||
@noHideKeyboard="handleNoHideKeyboard"
|
||||
@keyboardShow="handleKeyboardShow"
|
||||
@keyboardHide="handleKeyboardHide"
|
||||
/>
|
||||
<RecommendPostsComponent
|
||||
v-if="
|
||||
mainPageDataModel.recommendTheme &&
|
||||
mainPageDataModel.recommendTheme.length > 0
|
||||
"
|
||||
:recommendThemeList="mainPageDataModel.recommendTheme"
|
||||
/>
|
||||
</ChatCardOther>
|
||||
</template>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 输入框区域 -->
|
||||
<view class="footer">
|
||||
<ChatQuickAccess @replySent="handleReplyInstruct" />
|
||||
<ChatInputArea
|
||||
ref="inputAreaRef"
|
||||
v-model="inputMessage"
|
||||
:holdKeyboard="holdKeyboard"
|
||||
:is-session-active="isSessionActive"
|
||||
:stop-request="stopRequest"
|
||||
@send="sendMessageAction"
|
||||
@noHideKeyboard="handleNoHideKeyboard"
|
||||
@keyboardShow="handleKeyboardShow"
|
||||
@keyboardHide="handleKeyboardHide"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -157,13 +133,11 @@ import {
|
||||
import { WSS_URL } from "@/request/base/baseUrl";
|
||||
import { MessageRole, MessageType, CompName } from "@/model/ChatModel";
|
||||
import ChatTopWelcome from "../ChatTopWelcome/index.vue";
|
||||
import ChatTopBgImg from "../ChatTopBgImg/index.vue";
|
||||
import ChatTopNavBar from "../ChatTopNavBar/index.vue";
|
||||
import ChatCardAI from "../ChatCardAi/index.vue";
|
||||
import ChatCardMine from "../ChatCardMine/index.vue";
|
||||
import ChatCardOther from "../ChatCardOther/index.vue";
|
||||
import ChatQuickAccess from "../ChatQuickAccess/index.vue";
|
||||
import ChatMoreTips from "../ChatMoreTips/index.vue";
|
||||
import ChatInputArea from "../ChatInputArea/index.vue";
|
||||
import QuickBookingComponent from "../../module/QuickBookingComponent/index.vue";
|
||||
import DiscoveryCardComponent from "../../module/DiscoveryCardComponent/index.vue";
|
||||
|
||||
@@ -1,106 +1,3 @@
|
||||
.chat-container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #e9f3f7;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden !important;
|
||||
position: relative;
|
||||
/* 确保在键盘弹起时布局正确 */
|
||||
box-sizing: border-box;
|
||||
|
||||
.chat-container-bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 0;
|
||||
height: 270px;
|
||||
background: linear-gradient(180deg, #42adf9 0%, #6cd1ff 51%, #e9f3f7 99%);
|
||||
}
|
||||
|
||||
.chat-content {
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chat-container-top-bannar {
|
||||
width: 100vw;
|
||||
flex-shrink: 0;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.area-msg-list {
|
||||
width: 100vw;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
height: 0;
|
||||
padding: 4px 0 0;
|
||||
overscroll-behavior: contain; /* 阻止滚动穿透 */
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.message-item-ai {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.message-item-mine {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.message-item-other {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer-area {
|
||||
width: 100vw;
|
||||
flex-shrink: 0;
|
||||
padding: 4px 0 20px 0; /* 直接设置20px底部安全距离 */
|
||||
background-color: #e9f3f7;
|
||||
touch-action: pan-x;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
min-height: fit-content;
|
||||
/* 安卓键盘适配 - 使用相对定位配合adjustPan */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
transition: padding-bottom 0.3s ease;
|
||||
/* 确保输入区域始终可见 */
|
||||
// transform: translateZ(0);
|
||||
// -webkit-transform: translateZ(0);
|
||||
}
|
||||
|
||||
// 打字机光标闪烁动画
|
||||
.typing-cursor {
|
||||
display: inline-block;
|
||||
color: #42adf9;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
animation: blink 1s infinite;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%,
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
51%,
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
.footer {
|
||||
padding-bottom: Max(env(safe-area-inset-bottom), 12px);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<template>
|
||||
<view class="more-tips">
|
||||
<view class="more-tips-scroll">
|
||||
<view class="more-tips bg-white border-box">
|
||||
<view class="font-size-0 whitesspace-nowrap scroll-x">
|
||||
<view
|
||||
class="more-tips-item"
|
||||
v-for="(item, index) in itemList"
|
||||
class="more-tips-item border-box inline-block mr-8"
|
||||
v-for="(item, index) in guideWords"
|
||||
:key="index"
|
||||
>
|
||||
<view class="more-tips-item-title" @click="sendReply(item)">
|
||||
<text
|
||||
class="font-500 font-size-12 line-height-24 text-center"
|
||||
@click="sendReply(item)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -16,10 +19,11 @@
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from "vue";
|
||||
|
||||
const emits = defineEmits(["replySent"]);
|
||||
|
||||
defineProps({
|
||||
itemList: {
|
||||
guideWords: {
|
||||
type: Array,
|
||||
default: [
|
||||
"定温泉票",
|
||||
|
||||
@@ -1,35 +1,15 @@
|
||||
.more-tips {
|
||||
width: 100%;
|
||||
|
||||
&-scroll {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
box-shadow: 0px -1px 10px 0px rgba(0, 0, 0, 0.03);
|
||||
border-radius: 0px 0px 20px 20px;
|
||||
padding: 12px 0 12px 12px;
|
||||
|
||||
.more-tips-item {
|
||||
border-radius: 8px;
|
||||
margin: 4px;
|
||||
box-shadow: 0 2px 5px 0px rgba(0, 0, 0, 0.1);
|
||||
background-color: $uni-bg-color;
|
||||
padding: 2px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
background: #f7f7f7;
|
||||
border-radius: 5px;
|
||||
padding: 6px 8px;
|
||||
|
||||
.more-tips-item-title {
|
||||
font-weight: 500;
|
||||
font-size: $uni-font-size-sm;
|
||||
color: #00a6ff;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
&:last-child {
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
<template>
|
||||
<view class="quick-access">
|
||||
<view class="quick-access-scroll">
|
||||
<view
|
||||
class="quick-access-item"
|
||||
v-for="(item, index) in itemList"
|
||||
:key="index"
|
||||
@click="sendReply(item)"
|
||||
>
|
||||
<image
|
||||
class="quick-access-item-bg"
|
||||
src="https://oss.nianxx.cn/mp/static/quick/quick_icon_bg.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="quick-access-item-title">
|
||||
<image class="quick-access-item-icon" :src="item.icon" />
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
<text class="quick-access-item-content">{{ item.content }}</text>
|
||||
<view
|
||||
class="quick-access border-box flex flex-nowrap items-center ml-20 pt-8 pb-8"
|
||||
>
|
||||
<view
|
||||
class="item border-box rounded-50 flex flex-row items-center"
|
||||
v-for="(item, index) in itemList"
|
||||
:key="index"
|
||||
@click="sendReply(item)"
|
||||
>
|
||||
<view class="flex items-center justify-center">
|
||||
<image v-if="item.icon" class="icon" :src="item.icon" />
|
||||
<text class="font-size-14 color-2D91FF line-height-20">
|
||||
{{ item.title }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -25,7 +21,25 @@
|
||||
<script setup>
|
||||
import { onMounted, ref } from "vue";
|
||||
import { currentClientType, ClientType } from "@/constant/base";
|
||||
const itemList = ref([]);
|
||||
|
||||
const itemList = ref([
|
||||
{
|
||||
icon: "",
|
||||
title: "快速预定",
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
title: "探索发现",
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
title: "反馈意见",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/version_101/home/more.png",
|
||||
title: "更多",
|
||||
},
|
||||
]);
|
||||
|
||||
const emits = defineEmits(["replySent"]);
|
||||
|
||||
@@ -33,9 +47,9 @@ const sendReply = (item) => {
|
||||
emits("replySent", item); // 向父组件传递数据
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
initData();
|
||||
});
|
||||
// onMounted(() => {
|
||||
// initData();
|
||||
// });
|
||||
|
||||
const initData = () => {
|
||||
itemList.value =
|
||||
@@ -43,24 +57,28 @@ const initData = () => {
|
||||
? [
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_yuding.png",
|
||||
showIcon: false,
|
||||
title: "快速预定",
|
||||
content: "预定门票、房间、餐食",
|
||||
type: "Command.quickBooking",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_find.png",
|
||||
showIcon: false,
|
||||
title: "探索发现",
|
||||
content: "探索玩法、出片佳地",
|
||||
type: "Command.discovery",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_call.png",
|
||||
showIcon: false,
|
||||
title: "反馈意见",
|
||||
content: "有意见告诉沐沐",
|
||||
type: "Command.feedbackCard",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_order.png",
|
||||
showIcon: false,
|
||||
title: "订单/工单",
|
||||
content: "我的订单/工单",
|
||||
type: "MyOrder",
|
||||
@@ -69,24 +87,28 @@ const initData = () => {
|
||||
: [
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_yuding.png",
|
||||
showIcon: false,
|
||||
title: "快速预定",
|
||||
content: "预定门票、房间、餐食",
|
||||
type: "Command.quickBooking",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_find.png",
|
||||
showIcon: false,
|
||||
title: "探索发现",
|
||||
content: "探索玩法、出片佳地",
|
||||
type: "Command.discovery",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_order.png",
|
||||
showIcon: false,
|
||||
title: "订单/工单",
|
||||
content: "我的订单/工单",
|
||||
type: "MyOrder",
|
||||
},
|
||||
{
|
||||
icon: "https://oss.nianxx.cn/mp/static/quick/quick_icon_call.png",
|
||||
showIcon: false,
|
||||
title: "反馈意见",
|
||||
content: "有意见告诉朵朵",
|
||||
type: "Command.feedbackCard",
|
||||
|
||||
@@ -1,67 +1,15 @@
|
||||
.quick-access {
|
||||
width: 100%;
|
||||
|
||||
&-scroll {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.quick-access-item {
|
||||
flex: 0 0 104px;
|
||||
border-radius: 8px;
|
||||
margin: 4px 4px 8px 4px;
|
||||
box-shadow: 0 2px 5px 0px rgba(0, 0, 0, 0.1);
|
||||
padding: 12px;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.quick-access-item-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
border-radius: 8px;
|
||||
width: 128px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.quick-access-item-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 1;
|
||||
|
||||
.quick-access-item-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 500;
|
||||
font-size: $uni-font-size-sm;
|
||||
color: #201f32;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.quick-access-item-content {
|
||||
z-index: 1;
|
||||
margin-top: 4px;
|
||||
font-size: 10px;
|
||||
color: #678cad;
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
gap: 0 9px;
|
||||
}
|
||||
|
||||
.item {
|
||||
border: 1px solid #fff;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<template>
|
||||
<view class="top-bg"> </view>
|
||||
</template>
|
||||
|
||||
<script></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
@@ -1,11 +0,0 @@
|
||||
.top-bg {
|
||||
width: 100%;
|
||||
height: 270px;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(180deg, #42adf9 0%, #6cd1ff 51%, #e9f3f7 99%);
|
||||
|
||||
.top-bg-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +1,59 @@
|
||||
<template>
|
||||
<view class="top-bg-content">
|
||||
<view class="top-item">
|
||||
<!-- :style="backgroundStyle" -->
|
||||
<image
|
||||
class="top-item-left"
|
||||
:src="initPageImages.welcomeImageUrl"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<image
|
||||
class="top-item-right"
|
||||
:src="initPageImages.logoImageUrl"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
<view class="welcome-content border-box p-20">
|
||||
<view class="wrap rounded-20">
|
||||
<view
|
||||
class="flex flex-items-center flex-justify-between border-box pl-12 pr-12"
|
||||
>
|
||||
<image
|
||||
class="ip relative"
|
||||
:src="initPageImages.logoImageUrl"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view
|
||||
class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24"
|
||||
>
|
||||
{{ welcomeContent }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<ChatMoreTips :guideWords="guideWords" @replySent="handleReply" />
|
||||
</view>
|
||||
<ChatCardAI v-if="welcomeContent.length" :text="welcomeContent" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps, computed } from "vue";
|
||||
import ChatCardAI from "../ChatCardAi/index.vue";
|
||||
import ChatMoreTips from "../ChatMoreTips/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
initPageImages: {
|
||||
mainPageDataModel: {
|
||||
type: Object,
|
||||
default: {
|
||||
backgroundImageUrl: "",
|
||||
logoImageUrl: "",
|
||||
welcomeImageUrl: "",
|
||||
default: () => {
|
||||
return {
|
||||
initPageImages: {
|
||||
backgroundImageUrl: "",
|
||||
logoImageUrl: "",
|
||||
welcomeImageUrl: "",
|
||||
},
|
||||
welcomeContent:
|
||||
"查信息、预定下单、探索玩法、呼叫服务、我通通可以满足,快试试问我问题吧!",
|
||||
guideWords: [
|
||||
"定温泉票",
|
||||
"定酒店",
|
||||
"优惠套餐",
|
||||
"亲子玩法",
|
||||
"了解交通",
|
||||
"看看酒店",
|
||||
"看看美食",
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
welcomeContent: {
|
||||
type: String,
|
||||
default:
|
||||
"查信息、预定下单、探索玩法、呼叫服务、我通通可以满足,快试试问我问题吧!",
|
||||
},
|
||||
});
|
||||
|
||||
// 计算背景样式
|
||||
const backgroundStyle = computed(() => {
|
||||
return {
|
||||
backgroundImage: `url(${props.initPageImages.backgroundImageUrl})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
backgroundRepeat: "no-repeat",
|
||||
};
|
||||
});
|
||||
const initPageImages = computed(() => props.mainPageDataModel.initPageImages);
|
||||
const welcomeContent = computed(() => props.mainPageDataModel.welcomeContent);
|
||||
const guideWords = computed(() => props.mainPageDataModel.guideWords);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,25 +1,10 @@
|
||||
.top-bg-content {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
.wrap {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.top-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 32px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
|
||||
.top-item-left {
|
||||
width: 118px;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.top-item-right {
|
||||
width: 130px;
|
||||
height: 130px;
|
||||
.ip {
|
||||
flex: 0 0 123px;
|
||||
width: 123px;
|
||||
height: 166px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,7 @@ const handleLogout = () => {
|
||||
if (res.confirm) {
|
||||
uni.clearStorageSync();
|
||||
appStore.setHasToken(false);
|
||||
appStore.setTokenExpired(true);
|
||||
emits("closeDrawer");
|
||||
uni.$emit(NOTICE_EVENT_LOGOUT);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
<view class="container-scroll">
|
||||
|
||||
<view class="container-scroll font-size-0 scroll-x whitescape-nowrap">
|
||||
<view
|
||||
class="card-item bg-white inline-block rounded-20 mr-8"
|
||||
v-for="(item, index) in recommendTheme.recommendPostsList"
|
||||
:key="index"
|
||||
@click="sendReply(item)"
|
||||
>
|
||||
<view class="mk-card-item" @click="sendReply(item)">
|
||||
<image class="card-img" :src="item.coverPhoto" mode="aspectFill" />
|
||||
<view class="m-4 relative">
|
||||
<image
|
||||
class="card-img rounded-16 relative z-10"
|
||||
:src="item.coverPhoto"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
|
||||
<view class="overlay-gradient">
|
||||
<text class="overlay-text">{{ item.topic }}</text>
|
||||
</view>
|
||||
<view class="shadow absolute rounded-16"></view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="card-text color-171717 font-size-14 line-height-20 border-box"
|
||||
>
|
||||
{{ item.topic }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,53 +1,27 @@
|
||||
.container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container-scroll {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow-x: auto;
|
||||
margin: 4px 0 6px;
|
||||
}
|
||||
|
||||
.mk-card-item {
|
||||
flex-shrink: 0; /* 关键:防止 flex 布局压缩子元素宽度 */
|
||||
width: 142px;
|
||||
height: 126px;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
|
||||
.card-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 渐变背景层 */
|
||||
.overlay-gradient {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 50px; /* 渐变层高度,可调 */
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
rgba(0, 0, 0, 0.001) 0%,
|
||||
rgba(0, 0, 0, 0.5) 100%
|
||||
);
|
||||
display: flex;
|
||||
align-items: flex-end; /* 文字贴近底部 */
|
||||
padding: 0 8px 6px; /* 内边距让文字与边缘保持距离 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 渐变层上的文字 */
|
||||
.overlay-text {
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: $uni-font-size-sm;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
.card-item {
|
||||
width: 128px;
|
||||
height: 164px;
|
||||
}
|
||||
|
||||
.card-img {
|
||||
height: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
background-color: #e5e8ee;
|
||||
height: 96px;
|
||||
width: 96px;
|
||||
bottom: -4px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.card-text {
|
||||
padding: 4px 8px 8px;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="w-full h-screen bg-liner">
|
||||
<ChatMainList />
|
||||
</view>
|
||||
|
||||
@@ -61,10 +61,4 @@ onUnmounted(() => {
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: $uni-bg-color;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -29,15 +29,25 @@
|
||||
>
|
||||
微信一键登录
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="isAgree"
|
||||
v-if="isAgree && !appStore.tokenExpired"
|
||||
class="login-btn"
|
||||
open-type="getPhoneNumber"
|
||||
type="primary"
|
||||
open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber"
|
||||
>
|
||||
微信一键登录
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="isAgree && appStore.tokenExpired"
|
||||
class="login-btn"
|
||||
type="primary"
|
||||
@click="handleLogin"
|
||||
>
|
||||
微信一键登录
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<!-- 协议勾选 -->
|
||||
@@ -79,6 +89,8 @@ import CheckBox from "@/components/CheckBox/index.vue";
|
||||
import AgreePopup from "./components/AgreePopup/index.vue";
|
||||
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||
import { getCurrentConfig } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
const appStore = useAppStore();
|
||||
|
||||
const isAgree = ref(false);
|
||||
const visible = ref(false);
|
||||
@@ -113,6 +125,20 @@ const getPhoneNumber = (e) => {
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
const handleLogin = () => {
|
||||
console.log("handleLogin");
|
||||
onLogin()
|
||||
.then(() => {
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "success",
|
||||
});
|
||||
appStore.setTokenExpired(false);
|
||||
goBack();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 处理同意协议点击事件
|
||||
const handleAgreeClick = (type) => {
|
||||
visible.value = true;
|
||||
|
||||
@@ -60,6 +60,7 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
|
||||
uni.setStorageSync("token", "");
|
||||
const appStore = useAppStore();
|
||||
appStore.setHasToken(false);
|
||||
appStore.setTokenExpired(true);
|
||||
uni.$emit(NOTICE_EVENT_LOGOUT);
|
||||
goLogin();
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 966 B |
23
src/static/scss/background.scss
Normal file
23
src/static/scss/background.scss
Normal file
@@ -0,0 +1,23 @@
|
||||
// 背景颜色
|
||||
.bg-white {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.bg-gray {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.bg-17294E {
|
||||
background-color: #17294e;
|
||||
}
|
||||
|
||||
.bg-liner {
|
||||
background: linear-gradient(205deg, #8ae3fc 0%, rgba(138, 227, 252, 0) 20%),
|
||||
linear-gradient(155deg, #fef7e1 0%, rgba(254, 247, 225, 0) 20%),
|
||||
radial-gradient(
|
||||
48% 48% at 61% 118%,
|
||||
#ffffff 0%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
),
|
||||
linear-gradient(180deg, rgba(238, 248, 255, 0) 0%, #eef8ff 50%), #eef8ff;
|
||||
}
|
||||
4
src/static/scss/border.scss
Normal file
4
src/static/scss/border.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
// 边框
|
||||
.border {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
49
src/static/scss/colors.scss
Normal file
49
src/static/scss/colors.scss
Normal file
@@ -0,0 +1,49 @@
|
||||
// 字体颜色
|
||||
|
||||
.color-white {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.color-00 {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.color-33 {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.color-66 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.color-99 {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.color-525866 {
|
||||
color: #525866;
|
||||
}
|
||||
|
||||
.color-171717 {
|
||||
color: #171717;
|
||||
}
|
||||
|
||||
.color-99A0AE {
|
||||
color: #99a0ae;
|
||||
}
|
||||
|
||||
.color-FF3D60 {
|
||||
color: #ff3d60;
|
||||
}
|
||||
|
||||
.color-2D91FF {
|
||||
color: #2d91ff;
|
||||
}
|
||||
|
||||
.color-43669A {
|
||||
color: #43669a;
|
||||
}
|
||||
|
||||
.color-21B466 {
|
||||
color: #21b466;
|
||||
}
|
||||
16
src/static/scss/display.scss
Normal file
16
src/static/scss/display.scss
Normal file
@@ -0,0 +1,16 @@
|
||||
// 显示类型
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
}
|
||||
13
src/static/scss/ellipsis.scss
Normal file
13
src/static/scss/ellipsis.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
// 省略号
|
||||
.ellipsis-1 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ellipsis-2 {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
36
src/static/scss/flex.scss
Normal file
36
src/static/scss/flex.scss
Normal file
@@ -0,0 +1,36 @@
|
||||
// 弹性布局
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flex-justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.flex-nowrap {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.flex-full {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.flex-shrink-0 {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
8
src/static/scss/font-family.scss
Normal file
8
src/static/scss/font-family.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
// 字体-family
|
||||
.font-family-sans-serif {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.font-family-misans-vf {
|
||||
font-family: MiSans VF, MiSans VF;
|
||||
}
|
||||
36
src/static/scss/font-size.scss
Normal file
36
src/static/scss/font-size.scss
Normal file
@@ -0,0 +1,36 @@
|
||||
// 字体-size
|
||||
.font-size-0 {
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
.font-size-9 {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.font-size-10 {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.font-size-12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.font-size-14 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.font-size-16 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.font-size-17 {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.font-size-18 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.font-size-20 {
|
||||
font-size: 20px;
|
||||
}
|
||||
20
src/static/scss/font-weight.scss
Normal file
20
src/static/scss/font-weight.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
// 字体-weight
|
||||
.font-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.font-400 {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.font-500 {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.font-600 {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.font-700 {
|
||||
font-weight: 700;
|
||||
}
|
||||
3
src/static/scss/height.scss
Normal file
3
src/static/scss/height.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.h-screen {
|
||||
height: 100vh;
|
||||
}
|
||||
21
src/static/scss/index.scss
Normal file
21
src/static/scss/index.scss
Normal file
@@ -0,0 +1,21 @@
|
||||
@import "./background.scss";
|
||||
@import "./border.scss";
|
||||
@import "./colors.scss";
|
||||
@import "./display.scss";
|
||||
@import "./flex.scss";
|
||||
@import "./font-weight.scss";
|
||||
@import "./height.scss";
|
||||
@import "./line-height.scss";
|
||||
@import "./margin.scss";
|
||||
@import "./padding.scss";
|
||||
@import "./font-size.scss";
|
||||
@import "./font-family.scss";
|
||||
@import "./text-align.scss";
|
||||
@import "./rounded.scss";
|
||||
@import "./ellipsis.scss";
|
||||
@import "./position.scss";
|
||||
@import "./scroll.scss";
|
||||
@import "./overflow.scss";
|
||||
@import "./width.scss";
|
||||
@import "./z-index.scss";
|
||||
@import "./white-space.scss";
|
||||
20
src/static/scss/line-height.scss
Normal file
20
src/static/scss/line-height.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
// 行高
|
||||
.line-height-17 {
|
||||
line-height: 17px;
|
||||
}
|
||||
|
||||
.line-height-18 {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.line-height-20 {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.line-height-21 {
|
||||
line-height: 21px;
|
||||
}
|
||||
|
||||
.line-height-22 {
|
||||
line-height: 22px;
|
||||
}
|
||||
24
src/static/scss/margin.scss
Normal file
24
src/static/scss/margin.scss
Normal file
@@ -0,0 +1,24 @@
|
||||
// 外边距-bottom
|
||||
.m-4 {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.mr-8 {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mb-12 {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.ml-20 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
4
src/static/scss/overflow.scss
Normal file
4
src/static/scss/overflow.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
// 溢出
|
||||
.overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
60
src/static/scss/padding.scss
Normal file
60
src/static/scss/padding.scss
Normal file
@@ -0,0 +1,60 @@
|
||||
// 内边距
|
||||
.p-8 {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.pt-8 {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.pb-8 {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.p-12 {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.pt-12 {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.pr-12 {
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.pb-12 {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.pl-12 {
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.pl-16 {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.pr-16 {
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.p-20 {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.pt-20 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.pl-20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.pr-20 {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.pb-20 {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
8
src/static/scss/position.scss
Normal file
8
src/static/scss/position.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
// 定位
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
position: absolute;
|
||||
}
|
||||
28
src/static/scss/rounded.scss
Normal file
28
src/static/scss/rounded.scss
Normal file
@@ -0,0 +1,28 @@
|
||||
// 圆角
|
||||
.rounded-4 {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.rounded-8 {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.rounded-12 {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.rounded-16 {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.rounded-20 {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.rounded-50 {
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.rounded-full {
|
||||
border-radius: 50%;
|
||||
}
|
||||
8
src/static/scss/scroll.scss
Normal file
8
src/static/scss/scroll.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
// 滚动条
|
||||
.scroll-y {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.scroll-x {
|
||||
overflow-x: auto;
|
||||
}
|
||||
12
src/static/scss/text-align.scss
Normal file
12
src/static/scss/text-align.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
// 文本-align
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
3
src/static/scss/white-space.scss
Normal file
3
src/static/scss/white-space.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.whitesspace-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
7
src/static/scss/width.scss
Normal file
7
src/static/scss/width.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.w-50 {
|
||||
width: 50%;
|
||||
}
|
||||
15
src/static/scss/z-index.scss
Normal file
15
src/static/scss/z-index.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
.z-0 {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.z-10 {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.z-20 {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.z-30 {
|
||||
z-index: 30;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ export const useAppStore = defineStore("app", {
|
||||
title: "",
|
||||
sceneId: "",
|
||||
hasToken: false,
|
||||
tokenExpired: false,
|
||||
};
|
||||
},
|
||||
getters: {},
|
||||
@@ -17,8 +18,11 @@ export const useAppStore = defineStore("app", {
|
||||
setSceneId(data) {
|
||||
this.sceneId = data;
|
||||
},
|
||||
setHasToken(data) {
|
||||
this.hasToken = data;
|
||||
setHasToken(status) {
|
||||
this.hasToken = status;
|
||||
},
|
||||
setTokenExpired(status) {
|
||||
this.tokenExpired = status;
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
15
src/utils/share.js
Normal file
15
src/utils/share.js
Normal file
@@ -0,0 +1,15 @@
|
||||
export default {
|
||||
install(app) {
|
||||
app.mixin({
|
||||
onLoad() {
|
||||
const page = getCurrentPages().pop();
|
||||
if (page) {
|
||||
uni.showShareMenu({
|
||||
withShareTicket: true,
|
||||
menus: ["shareAppMessage", "shareTimeline"],
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user