dev config
This commit is contained in:
@@ -33,37 +33,16 @@
|
|||||||
添加了.env.production .env.development 文件
|
添加了.env.production .env.development 文件
|
||||||
对vite.config.ts做了修改。
|
对vite.config.ts做了修改。
|
||||||
|
|
||||||
# 云服务器的那些坑
|
# 云服务器
|
||||||
// node.js
|
nginx as a veb server, i use the official image to build this app image.
|
||||||
nodejs 官网直接下载tar.gz 解压到/usr/local/lib/nodejs
|
|
||||||
|
|
||||||
// nginx
|
|
||||||
nginx 这个坑就多了 同样是官网 下载tar.gz 二进制版本 需要编译,但是可能是版本比较新的缘故吧,在make那部出了好多错,最后一查都是云服务器的环境太老了导致的。
|
|
||||||
|
|
||||||
// 首先是没有pcre 不用编译直接塞到 /usr/local/src/pcre-8.45
|
|
||||||
https://sourceforge.net/projects/pcre/files/pcre/8.45/
|
|
||||||
|
|
||||||
// 然后又提示 aclocal-1.16: command not found,结果一查就是automake和autoconf的版本问题了
|
|
||||||
|
|
||||||
// automake
|
|
||||||
https://ftp.gnu.org/gnu/automake/ 下载
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
/usr/bin/autoconf -V
|
|
||||||
|
|
||||||
http://ftp.gnu.org/gnu/autoconf/ 下载
|
|
||||||
./configure --prefix=/usr/
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
到这才把nginx装完
|
|
||||||
|
|
||||||
## 发布
|
## 发布
|
||||||
- npm run build 生成dist 文件夹
|
- npm run build 生成dist 文件夹
|
||||||
把这个文件夹放到nginx的html文件夹下改名ghome
|
把这个文件夹放到nginx的html文件夹下改名ghome
|
||||||
nginx那个 location /ghome 也要有。
|
nginx那个 location /ghome 也要有。
|
||||||
|
|
||||||
|
## 百度网盘开放平台
|
||||||
|
https://pan.baidu.com/union/home?menuKey=union-home
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@@ -5,7 +5,7 @@
|
|||||||
<el-form ref="ruleFormRef" :model="loginForm" :rules="loginRules" status-icon label-width="120px"
|
<el-form ref="ruleFormRef" :model="loginForm" :rules="loginRules" status-icon label-width="120px"
|
||||||
class="demo-ruleForm">
|
class="demo-ruleForm">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<h3>私人空间</h3>
|
<h3>秘密基地</h3>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-form-item label="用户名" prop="pass">
|
<!-- <el-form-item label="用户名" prop="pass">
|
||||||
<el-input v-model="loginForm.user_id" type="password" autocomplete="off" />
|
<el-input v-model="loginForm.user_id" type="password" autocomplete="off" />
|
||||||
@@ -13,13 +13,13 @@
|
|||||||
<el-form-item label="用户凭证" prop="checkPass">
|
<el-form-item label="用户凭证" prop="checkPass">
|
||||||
<el-input v-model="loginForm.password" type="password" autocomplete="off" />
|
<el-input v-model="loginForm.password" type="password" autocomplete="off" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<p class="tang-pass-qrcode-title">请使用<a class="pass-link" href="http://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=WksD0FOVAp8zSRV62qNKxtnCexArVPOf&
|
<p class="tang-pass-qrcode-title">百度网盘扫码登陆<a class="pass-link" :href="qrcode" target="new">请使用微信扫一扫登录</a></p>
|
||||||
redirect_uri=https://www.violin-home.cn/auth/api/v1/authorize/baidu&scope=basic,netdisk&device_id=26202308&qrcode=1"
|
<!-- <el-button @click="loginWithBaiDu">
|
||||||
target="new">百度App</a>扫码登录</p>
|
|
||||||
<el-button @click="loginWithBaiDu">
|
|
||||||
百度App
|
百度App
|
||||||
</el-button>
|
</el-button> -->
|
||||||
|
<el-avatar :size="28" :src="baiduCloudImage" />
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
其他登录方式
|
||||||
<!-- <el-button type="primary" @click="dologin(ruleFormRef)">login</el-button> -->
|
<!-- <el-button type="primary" @click="dologin(ruleFormRef)">login</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -36,8 +36,11 @@ import { reactive, ref } from 'vue'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import { useUserStore } from '../../store/user'
|
import { useUserStore } from '../../store/user'
|
||||||
import router from '../../router'
|
import router from '../../router'
|
||||||
|
import baiduCloudImage from "../../assets/baiducloud.png"
|
||||||
|
import config from '../../const/config'
|
||||||
import { getQrCode } from '../../api/login'
|
import { getQrCode } from '../../api/login'
|
||||||
|
|
||||||
|
let qrcode = config.BAIDU_CLOUD_URL + config.RESPONSE_TYPE + config.CLIENT_ID + config.REDIRECT_URI + config.SCOPE + config.DEVICE_ID + config.QR_CODE + config.DISPLAY
|
||||||
|
|
||||||
const user = useUserStore()
|
const user = useUserStore()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import { type } from "os";
|
||||||
|
|
||||||
|
// config/index.js
|
||||||
|
const env = process.env.NODE_ENV!;
|
||||||
|
|
||||||
|
const configObj: any = {
|
||||||
|
production: {
|
||||||
|
BAIDU_CLOUD_URL: 'http://openapi.baidu.com/oauth/2.0/authorize',
|
||||||
|
RESPONSE_TYPE: '?response_type=' + 'code',
|
||||||
|
CLIENT_ID: '&client_id=' + 'WksD0FOVAp8zSRV62qNKxtnCexArVPOf',
|
||||||
|
REDIRECT_URI: '&redirect_uri=' + 'https://www.violin-home.cn/auth/api/v1/authorize/baidu',
|
||||||
|
SCOPE: '&scope=basic,netdisk',
|
||||||
|
DEVICE_ID: '&device_id=26202308',
|
||||||
|
QR_CODE: '&qrcode=' + '1',
|
||||||
|
DISPLAY: '&display=popup'
|
||||||
|
},
|
||||||
|
development: {
|
||||||
|
BAIDU_CLOUD_URL: 'http://openapi.baidu.com/oauth/2.0/authorize',
|
||||||
|
RESPONSE_TYPE: '?response_type=' + 'code',
|
||||||
|
CLIENT_ID: '&client_id=' + 'BIukdHDXeNPmIXe96GA6OOXGgnP5GEhM',
|
||||||
|
REDIRECT_URI: '&redirect_uri=' + 'http://localhost:8080/auth/api/v1/authorize/baidu',
|
||||||
|
SCOPE: '&scope=basic,netdisk',
|
||||||
|
DEVICE_ID: '&device_id=26202308',
|
||||||
|
QR_CODE: '&qrcode=' + '1',
|
||||||
|
DISPLAY: '&display=popup'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default { ...configObj[env] };
|
||||||
Reference in New Issue
Block a user