Commit e43e7e0f authored by liubinyu's avatar liubinyu

入口页

parents
/node_modules
/unpackage
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
* {
box-sizing: border-box;
}
page {
background-color: #0F0C29;
}
/*每个页面公共css */
.page {
width: 100vw;
min-height: 100vh;
background-image: url(@/static/bg.png);
background-size: 100% 100%;
}
.page.bg2 {
background-image: url(@/static/bg2.png);
}
@font-face {
font-family: HuXiaoBoZhenShuaiTi;
src: url(@/static/font/HuXiaoBoZhenShuaiTi-2.otf);
}
@font-face {
font-family: LianMengQiYiLuShuaiZhengRuiHeiTi;
src: url(@/static/font/LianMengQiYiLuShuaiZhengRuiHeiTi-2.ttf);
}
@font-face {
font-family: NotoSerif;
src: url(@/static/font/NotoSerif.ttf);
}
@font-face {
font-family: ZhanKuWenYiTi;
src: url(@/static/font/ZhanKuWenYiTi-2.ttf);
}
</style>
\ No newline at end of file
<template>
<view class="tabbar">
<view class="item" @click="go('/pages/home/home')">
<image class="icon" src="@/static/icon-home.png" mode="aspectFit"></image>
<view class="name">{{ $t('Home') }}</view>
</view>
<view class="item" @click="go('/pages/chat/chat')">
<image class="icon" src="@/static/icon-chat.png" mode="aspectFit"></image>
<view class="name">{{ $t('Astrologer') }}</view>
</view>
<view class="item">
<image class="icon" src="@/static/icon-user.png" mode="aspectFit"></image>
<view class="name">{{ $t('Profile') }}</view>
</view>
</view>
</template>
<script>
export default {
name: "tabbar",
data() {
return {
};
},
methods: {
go(url) {
const pages = getCurrentPages();
const page = pages[pages.length - 1].route;
if (url.indexOf(page) > -1) return;
uni.reLaunch({ url })
},
},
}
</script>
<style lang="scss" scoped>
.tabbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 140rpx;
background-color: rgba(255, 255, 255, 0.2);
display: flex;
justify-content: space-evenly;
align-items: center;
z-index: 100;
.item {
width: 90rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 12rpx;
.icon {
width: 46rpx;
height: 46rpx;
}
.name {
font-family: NotoSerif;
font-size: 20rpx;
color: #FFFFFF;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="xzzp" @touchstart="setRefresh(false)" @touchmove.stop.prevent="" @touchend="setRefresh(true)">
<image class="zhizhen" src="@/static/zhizhen.png" mode="widthFix" />
<view id="rotateDom" @touchstart="onTouchStart" @touchmove.stop.prevent="onTouchMove" @touchend="onTouchEnd">
<image class="zhuanpan" :style="containerStyle" src="@/static/zhuanpan.png" mode="widthFix" />
</view>
</view>
</template>
<script>
export default {
name: "xzzp",
data() {
return {
// 12星座
xzList: this.$_const.ConstellationList,
// 旋转相关
rotate: {
centerX: null, // 旋转的中心点 X 坐标
centerY: null, // 旋转的中心点 Y 坐标
containerA: 0, // 外层容器的旋转角度
startR: 0, // 触摸开始时的弧度
isTouching: false, // 是否正在触摸
},
currentWebview: null, // 当前页面
currentWebviewRefresh: false, // 当前页面是否可以刷新
};
},
computed: {
// 动态计算容器的旋转样式
containerStyle() {
return {
transform: `rotate(${this.rotate.containerA}deg)`,
transition: 'transform 0.1s linear', // 旋转动画
};
},
},
created() {
this.getDom();
// #ifdef APP
const pages = getCurrentPages();
const page = pages[pages.length - 1];
this.currentWebview = page.$getAppWebview();
this.currentWebviewRefresh = !!this.currentWebview.getStyle().pullToRefresh
// #endif
// 移动到第一个
this.rotate.containerA = this.xzList[0].angle
this.moveToXZ()
},
methods: {
// 获取dom信息
async getDom() {
if (this.rotate.centerX) return; // 不重复获取
await this.$nextTick()
const node = uni.createSelectorQuery().in(this).select('#rotateDom');
node.boundingClientRect(data => {
if (data) {
this.rotate.centerX = data.width / 2 + data.left
this.rotate.centerY = data.height / 2 + data.top
console.log('中心', this.rotate.centerX, this.rotate.centerY);
}
}).exec()
},
// 触摸开始事件
onTouchStart(e) {
this.rotate.isTouching = true;
const touch = e.touches[0];
// 按下点的角度
this.rotate.startR = this.calcAngleAsTop(touch.clientX, touch.clientY);
},
// 触摸移动事件
onTouchMove(e) {
if (!this.rotate.isTouching) return;
const touch = e.touches[0];
// 移动时点的角度
const r = this.calcAngleAsTop(touch.clientX, touch.clientY);
const angle = this.calculateAngle(this.rotate.startR, r);
this.rotate.containerA += angle * 180 / Math.PI; // 更新容器的旋转角度
this.rotate.startR = r; // 更新角度
},
// 触摸结束事件
onTouchEnd() {
this.rotate.isTouching = false;
this.moveToXZ()
},
// 计算需要旋转的弧度
calculateAngle(r1, r2) {
let r = r2 - r1; // 移动夹角
// 边界处理
if (r > 5) r = 2 * Math.PI - r
if (r < -5) r = -2 * Math.PI - r
return r;
},
// 计算某点和圆心的连线与正上方形成的夹角,返回顺时针的弧度值 0-2PI
calcAngleAsTop(x, y, ox, oy) {
// 如果没有传入圆心,默认使用地球圆心的绝对坐标
if (ox == undefined) {
if (!this.rotate.centerX) return 0; // 圆心不存在返回0
ox = this.rotate.centerX; // 圆心
oy = this.rotate.centerY;
}
let r;
if (oy === y) {
r = Math.PI / 2
} else {
r = Math.atan((x - ox) / (oy - y));
}
if (x > ox && y > oy) r += Math.PI; // 四象限
if (x < ox && y > oy) r += Math.PI; // 三象限
if (x < ox && y < oy) r += 2 * Math.PI; // 二象限
return r
},
// 移动到星座
moveToXZ() {
let a = this.rotate.containerA % 360;
if (a < 0) a = 360 + a;
let diff = 360;
let item;
this.xzList.forEach(xz => {
const d = xz.angle - a;
if (Math.abs(d) < Math.abs(diff)) {
diff = d;
item = xz;
}
})
this.rotate.containerA += diff;
this.$emit('change', item)
},
// 设置页面的下拉刷新
setRefresh(can) {
// #ifdef APP
if (can) can = this.currentWebviewRefresh
this.currentWebview?.setStyle({
pullToRefresh: {
support: can
}
});
// #endif
}
}
}
</script>
<style lang="scss" scoped>
.xzzp {
width: 100%;
position: relative;
.zhizhen {
width: 4.918%;
position: absolute;
top: 0;
left: 47.541%;
}
.zhuanpan {
width: 100%;
}
}
</style>
\ No newline at end of file
{
":": ":",
"(": "(",
")": ")",
"Aries": "白羊座",
"Taurus": "金牛座",
"Gemini": "双子座",
"Cancer": "巨蟹座",
"Leo": "狮子座",
"Virgo": "处女座",
"HLibra": "天秤座",
"Scorpio": "天蝎座",
"Sagittarius": "射手座",
"Capricornus": "摩羯座",
"Aquarius": "水瓶座",
"Pisces": "双鱼座",
"Please Choose": "请选择你的星座",
"Start": "开启",
"Today Horoscope": "今日运程",
"Exclusive Horoscope": "专属运程",
"Free": "免费",
"Share": "分享",
"Today Advice": "今日建议",
"Stargazer": "占星师",
"XiaoXi": "小汐",
"The astrological": "正在为你转动星盘",
"Enter your question": "输入你的问题",
"User": "用户",
"Home": "首页",
"Astrologer": "占星",
"Profile": "个人中心"
}
\ No newline at end of file
{
":": ": ",
"(": "(",
")": ")",
"Aries": "Aries",
"Taurus": "Taurus",
"Gemini": "Gemini",
"Cancer": "Cancer",
"Leo": "Leo",
"Virgo": "Virgo",
"HLibra": "HLibra",
"Scorpio": "Scorpio",
"Sagittarius": "Sagittarius",
"Capricornus": "Capricornus",
"Aquarius": "Aquarius",
"Pisces": "Pisces",
"Please Choose": "Please Choose Your Zodiac Sign",
"Start": "Start ",
"Today Horoscope": "Today's Horoscope",
"Exclusive Horoscope": "Exclusive Horoscope",
"Free": "Free",
"Share": "Share",
"Today Advice": "Today's Advice",
"Stargazer": "Stargazer",
"XiaoXi": "XiaoXi",
"The astrological": "The astrological chart is rotating for you",
"Enter your question": "Enter your question",
"User": "User",
"Home": "Home",
"Astrologer": "Astrologer",
"Profile": "Profile"
}
\ No newline at end of file
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import En from './en.json'
import Cn from './cn.json'
import Tc from './tc.json'
Vue.use(VueI18n)
const locale = uni.getStorageSync('locale') || 'Cn'
const i18n = new VueI18n({
locale,
messages: {
En,
Cn,
Tc,
}
})
export default i18n
\ No newline at end of file
{
":": ":",
"(": "(",
")": ")",
"Aries": "白羊座",
"Taurus": "金牛座",
"Gemini": "雙子座",
"Cancer": "巨蟹座",
"Leo": "獅子座",
"Virgo": "處女座",
"HLibra": "天秤座",
"Scorpio": "天蠍座",
"Sagittarius": "射手座",
"Capricornus": "摩羯座",
"Aquarius": "水瓶座",
"Pisces": "雙魚座",
"Please Choose": "請選擇你的星座",
"Start": "開啟",
"Today Horoscope": "今日運程",
"Exclusive Horoscope": "專屬運程",
"Free": "免費",
"Share": "分享",
"Today Advice": "今日建議",
"Stargazer": "占星師",
"XiaoXi": "小汐",
"The astrological": "正在為你轉動星盤",
"Enter your question": "輸入你的問題",
"User": "用戶",
"Home": "首頁",
"Astrologer": "占星",
"Profile": "個人中心"
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import * as _const from '@/utils/const'
import i18n from './i18n'
Vue.config.productionTip = false
Vue.prototype.$_const = _const
App.mpType = 'app'
const app = new Vue({
...App,
i18n
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif
\ No newline at end of file
{
"name" : "ai-astro-app",
"appid" : "__UNI__EC0BF56",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
}
{
"name": "ai-astro-app",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"vue-i18n": "^11.1.5"
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.27.1",
"resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.27.1",
"resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
"integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/parser": {
"version": "7.27.5",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.27.5.tgz",
"integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==",
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/types": "^7.27.3"
},
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@babel/types": {
"version": "7.27.3",
"resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.27.3.tgz",
"integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==",
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
"@babel/helper-validator-identifier": "^7.27.1"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@intlify/core-base": {
"version": "11.1.5",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.1.5.tgz",
"integrity": "sha512-xGRkISwV/2Trqb8yVQevlHm5roaQqy+75qwUzEQrviaQF0o4c5VDhjBW7WEGEoKFx09HSgq7NkvK/DAyuerTDg==",
"license": "MIT",
"dependencies": {
"@intlify/message-compiler": "11.1.5",
"@intlify/shared": "11.1.5"
},
"engines": {
"node": ">= 16"
},
"funding": {
"url": "https://github.com/sponsors/kazupon"
}
},
"node_modules/@intlify/message-compiler": {
"version": "11.1.5",
"resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-11.1.5.tgz",
"integrity": "sha512-YLSBbjD7qUdShe3ZAat9Hnf9E8FRpN6qmNFD/x5Xg5JVXjsks0kJ90Zj6aAuyoppJQA/YJdWZ8/bB7k3dg2TjQ==",
"license": "MIT",
"dependencies": {
"@intlify/shared": "11.1.5",
"source-map-js": "^1.0.2"
},
"engines": {
"node": ">= 16"
},
"funding": {
"url": "https://github.com/sponsors/kazupon"
}
},
"node_modules/@intlify/shared": {
"version": "11.1.5",
"resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-11.1.5.tgz",
"integrity": "sha512-+I4vRzHm38VjLr/CAciEPJhGYFzWWW4HMTm+6H3WqknXLh0ozNX9oC8ogMUwTSXYR/wGUb1/lTpNziiCH5MybQ==",
"license": "MIT",
"engines": {
"node": ">= 16"
},
"funding": {
"url": "https://github.com/sponsors/kazupon"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"license": "MIT",
"peer": true
},
"node_modules/@vue/compiler-core": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.16.tgz",
"integrity": "sha512-AOQS2eaQOaaZQoL1u+2rCJIKDruNXVBZSiUD3chnUrsoX5ZTQMaCvXlWNIfxBJuU15r1o7+mpo5223KVtIhAgQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/parser": "^7.27.2",
"@vue/shared": "3.5.16",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.2.1"
}
},
"node_modules/@vue/compiler-dom": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.16.tgz",
"integrity": "sha512-SSJIhBr/teipXiXjmWOVWLnxjNGo65Oj/8wTEQz0nqwQeP75jWZ0n4sF24Zxoht1cuJoWopwj0J0exYwCJ0dCQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/compiler-core": "3.5.16",
"@vue/shared": "3.5.16"
}
},
"node_modules/@vue/compiler-sfc": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.16.tgz",
"integrity": "sha512-rQR6VSFNpiinDy/DVUE0vHoIDUF++6p910cgcZoaAUm3POxgNOOdS/xgoll3rNdKYTYPnnbARDCZOyZ+QSe6Pw==",
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/parser": "^7.27.2",
"@vue/compiler-core": "3.5.16",
"@vue/compiler-dom": "3.5.16",
"@vue/compiler-ssr": "3.5.16",
"@vue/shared": "3.5.16",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.17",
"postcss": "^8.5.3",
"source-map-js": "^1.2.1"
}
},
"node_modules/@vue/compiler-ssr": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.16.tgz",
"integrity": "sha512-d2V7kfxbdsjrDSGlJE7my1ZzCXViEcqN6w14DOsDrUCHEA6vbnVCpRFfrc4ryCP/lCKzX2eS1YtnLE/BuC9f/A==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.5.16",
"@vue/shared": "3.5.16"
}
},
"node_modules/@vue/devtools-api": {
"version": "6.6.4",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
"integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==",
"license": "MIT"
},
"node_modules/@vue/reactivity": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.16.tgz",
"integrity": "sha512-FG5Q5ee/kxhIm1p2bykPpPwqiUBV3kFySsHEQha5BJvjXdZTUfmya7wP7zC39dFuZAcf/PD5S4Lni55vGLMhvA==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/shared": "3.5.16"
}
},
"node_modules/@vue/runtime-core": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.16.tgz",
"integrity": "sha512-bw5Ykq6+JFHYxrQa7Tjr+VSzw7Dj4ldR/udyBZbq73fCdJmyy5MPIFR9IX/M5Qs+TtTjuyUTCnmK3lWWwpAcFQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/reactivity": "3.5.16",
"@vue/shared": "3.5.16"
}
},
"node_modules/@vue/runtime-dom": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.16.tgz",
"integrity": "sha512-T1qqYJsG2xMGhImRUV9y/RseB9d0eCYZQ4CWca9ztCuiPj/XWNNN+lkNBuzVbia5z4/cgxdL28NoQCvC0Xcfww==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/reactivity": "3.5.16",
"@vue/runtime-core": "3.5.16",
"@vue/shared": "3.5.16",
"csstype": "^3.1.3"
}
},
"node_modules/@vue/server-renderer": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.16.tgz",
"integrity": "sha512-BrX0qLiv/WugguGsnQUJiYOE0Fe5mZTwi6b7X/ybGB0vfrPH9z0gD/Y6WOR1sGCgX4gc25L1RYS5eYQKDMoNIg==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/compiler-ssr": "3.5.16",
"@vue/shared": "3.5.16"
},
"peerDependencies": {
"vue": "3.5.16"
}
},
"node_modules/@vue/shared": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.16.tgz",
"integrity": "sha512-c/0fWy3Jw6Z8L9FmTyYfkpM5zklnqqa9+a6dz3DvONRKW2NEbh46BP0FHuLFSWi2TnQEtp91Z6zOWNrU6QiyPg==",
"license": "MIT",
"peer": true
},
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"license": "MIT",
"peer": true
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"license": "BSD-2-Clause",
"peer": true,
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT",
"peer": true
},
"node_modules/magic-string": {
"version": "0.30.17",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
"integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
"license": "MIT",
"peer": true,
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0"
}
},
"node_modules/nanoid": {
"version": "3.3.11",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"peer": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"license": "ISC",
"peer": true
},
"node_modules/postcss": {
"version": "8.5.4",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.4.tgz",
"integrity": "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/vue": {
"version": "3.5.16",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.16.tgz",
"integrity": "sha512-rjOV2ecxMd5SiAmof2xzh2WxntRcigkX/He4YFJ6WdRvVUrbt6DxC1Iujh10XLl8xCDRDtGKMeO3D+pRQ1PP9w==",
"license": "MIT",
"peer": true,
"dependencies": {
"@vue/compiler-dom": "3.5.16",
"@vue/compiler-sfc": "3.5.16",
"@vue/runtime-dom": "3.5.16",
"@vue/server-renderer": "3.5.16",
"@vue/shared": "3.5.16"
},
"peerDependencies": {
"typescript": "*"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/vue-i18n": {
"version": "11.1.5",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-11.1.5.tgz",
"integrity": "sha512-XCwuaEA5AF97g1frvH/EI1zI9uo1XKTf2/OCFgts7NvUWRsjlgeHPrkJV+a3gpzai2pC4quZ4AnOHFO8QK9hsg==",
"license": "MIT",
"dependencies": {
"@intlify/core-base": "11.1.5",
"@intlify/shared": "11.1.5",
"@vue/devtools-api": "^6.5.0"
},
"engines": {
"node": ">= 16"
},
"funding": {
"url": "https://github.com/sponsors/kazupon"
},
"peerDependencies": {
"vue": "^3.0.0"
}
}
}
}
{
"dependencies": {
"vue-i18n": "^11.1.5"
}
}
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/home/home",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/chat/chat",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "AI-astro",
"navigationBarBackgroundColor": "#0F0C29",
"backgroundColor": "#0F0C29",
"app-plus": {
"bounce": "none"
}
},
"uniIdRouter": {}
}
\ No newline at end of file
<template>
<view class="page bg2">
<tabbar />
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<view class="page">
<tabbar />
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<view class="page">
<view class="title">{{ $t('Please Choose') }}</view>
<view class="xz">
<view class="line1"></view>
<view>
<view class="name">{{ $t(xz.key) }}</view>
<view class="key">{{ xz.key }}</view>
</view>
<view class="line2"></view>
</view>
<xzzp class="xzzp" @change="changeXZ" />
<view class="btn" hover-class="btn-hover" @click="go">{{ $t('Start') }}{{ $t('Today Horoscope') }}</view>
</view>
</template>
<script>
export default {
data() {
return {
xz: {},
}
},
onLoad() {},
methods: {
changeXZ(xz) {
this.xz = xz
},
go() {
uni.reLaunch({
url: '/pages/home/home'
})
},
}
}
</script>
<style lang="scss" scoped>
.page {
padding-top: 192rpx;
text-align: center;
.title {
font-family: HuXiaoBoZhenShuaiTi;
font-size: 62rpx;
color: #fff;
margin-bottom: 44rpx;
}
.xz {
width: 666rpx;
height: 240rpx;
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-family: LianMengQiYiLuShuaiZhengRuiHeiTi;
font-size: 90rpx;
color: #EAE6FF;
}
.key {
font-family: NotoSerif;
font-size: 46rpx;
background-image: linear-gradient(to right, #A18FFF, #EBEBEC);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.line1 {
width: 100%;
height: 2rpx;
background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%);
}
.line2 {
width: 100%;
height: 2rpx;
background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%);
}
}
.xzzp {
width: 636rpx;
height: 636rpx;
margin: 8rpx auto;
}
.btn {
width: 534rpx;
height: 98rpx;
margin: 156rpx auto 0;
background-image: linear-gradient(to right, #0038F5, #9F03FF);
border-radius: 14rpx;
display: flex;
justify-content: center;
align-items: center;
font-family: ZhanKuWenYiTi;
font-size: 46rpx;
color: #FCFCFC;
}
.btn-hover {
filter: brightness(1.1);
}
}
</style>
\ No newline at end of file
uni.addInterceptor({
returnValue (res) {
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => {
if (!res) return resolve(res)
return res[0] ? reject(res[0]) : resolve(res[1])
});
});
},
});
\ No newline at end of file
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16px;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
\ No newline at end of file
export const ConstellationList = [
{ key: 'Aries', date: ['3.21', '4.19'], zodiacSignId: '1', angle: 330 },
{ key: 'Taurus', date: ['4.20', '5.20'], zodiacSignId: '2', angle: 300 },
{ key: 'Gemini', date: ['5.21', '6.21'], zodiacSignId: '3', angle: 270 },
{ key: 'Cancer', date: ['6.22', '7.22'], zodiacSignId: '4', angle: 240 },
{ key: 'Leo', date: ['7.23', '8.22'], zodiacSignId: '5', angle: 210 },
{ key: 'Virgo', date: ['8.23', '9.22'], zodiacSignId: '6', angle: 180 },
{ key: 'HLibra', date: ['9.23', '10.23'], zodiacSignId: '7', angle: 150 },
{ key: 'Scorpio', date: ['10.24', '11.22'], zodiacSignId: '8', angle: 120 },
{ key: 'Sagittarius', date: ['11.23', '12.21'], zodiacSignId: '9', angle: 90 },
{ key: 'Capricornus', date: ['12.22', '1.19'], zodiacSignId: '10', angle: 60 },
{ key: 'Aquarius', date: ['1.20', '2.18'], zodiacSignId: '11', angle: 30 },
{ key: 'Pisces', date: ['2.19', '3.20'], zodiacSignId: '12', angle: 0 },
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment