diff --git a/src/api/system/file/index.ts b/src/api/system/file/index.ts
index fa78a8a..969fa0a 100644
--- a/src/api/system/file/index.ts
+++ b/src/api/system/file/index.ts
@@ -21,7 +21,7 @@ export async function uploadOssByPath(filePath: string) {
let stsExpired = Taro.getStorageSync('stsExpiredAt');
if (!sts || (stsExpired && dayjs().isBefore(dayjs(stsExpired)))) {
// @ts-ignore
- const {data: {data: {credentials}}} = await request.get(`https://server.gxwebsoft.com/api/oss/getSTSToken`)
+ const {data: {data: {credentials}}} = await request.get(`https://server.websoft.top/api/oss/getSTSToken`)
Taro.setStorageSync('sts', credentials)
Taro.setStorageSync('stsExpiredAt', credentials.expiration)
sts = credentials
@@ -66,7 +66,7 @@ export async function uploadFile() {
const tempFilePath = res.tempFilePaths[0];
// 上传图片到OSS
Taro.uploadFile({
- url: 'https://server.gxwebsoft.com/api/oss/upload',
+ url: 'https://server.websoft.top/api/oss/upload',
filePath: tempFilePath,
name: 'file',
header: {
diff --git a/src/app.config.ts b/src/app.config.ts
index 50f6d30..8407d4c 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -11,6 +11,7 @@ export default defineAppConfig({
{
"root": "passport",
"pages": [
+ "wxLogin",
"login",
"register",
"forget",
diff --git a/src/hjm/bx/bx-add.tsx b/src/hjm/bx/bx-add.tsx
index 44d6d04..adf2505 100644
--- a/src/hjm/bx/bx-add.tsx
+++ b/src/hjm/bx/bx-add.tsx
@@ -129,7 +129,7 @@ function BxAdd() {
const uploadSingleImage = (filePath: string, index: number) => {
Taro.uploadFile({
- url: 'https://server.gxwebsoft.com/api/oss/upload',
+ url: 'https://server.websoft.top/api/oss/upload',
filePath: filePath,
name: 'file',
header: {
diff --git a/src/hjm/query.tsx b/src/hjm/query.tsx
index 130f453..8d4a002 100644
--- a/src/hjm/query.tsx
+++ b/src/hjm/query.tsx
@@ -219,7 +219,7 @@ const Query = () => {
const uploadSingleImage = (filePath: any, index: number) => {
Taro.uploadFile({
- url: 'https://server.gxwebsoft.com/api/oss/upload',
+ url: 'https://server.websoft.top/api/oss/upload',
filePath: filePath,
name: 'file',
header: {
diff --git a/src/pages/index/Header.tsx b/src/pages/index/Header.tsx
index a0e20c0..d92046a 100644
--- a/src/pages/index/Header.tsx
+++ b/src/pages/index/Header.tsx
@@ -132,7 +132,7 @@ const Header = (props: any) => {
success: function () {
if (code) {
Taro.request({
- url: 'https://server.gxwebsoft.com/api/wx-login/loginByMpWxPhone',
+ url: 'https://server.websoft.top/api/wx-login/loginByMpWxPhone',
method: 'POST',
data: {
code,
@@ -177,16 +177,14 @@ const Header = (props: any) => {
}}
left={
!IsLogin ? (
-
-
+
Taro.navigateTo({url: '/passport/wxLogin'})}>
+
+
+ {props.user?.nickname}
+
) : (
diff --git a/src/pages/index/Login.tsx b/src/pages/index/Login.tsx
index a2528e6..fed790b 100644
--- a/src/pages/index/Login.tsx
+++ b/src/pages/index/Login.tsx
@@ -16,7 +16,7 @@ const Login = (props:any) => {
success: function () {
if (code) {
Taro.request({
- url: 'https://server.gxwebsoft.com/api/wx-login/loginByMpWxPhone',
+ url: 'https://server.websoft.top/api/wx-login/loginByMpWxPhone',
method: 'POST',
data: {
code,
@@ -60,7 +60,7 @@ const Login = (props:any) => {
env === 'WEAPP' && (
<>
-
diff --git a/src/pages/index/Menu.tsx b/src/pages/index/Menu.tsx
index dad48f8..69f3d70 100644
--- a/src/pages/index/Menu.tsx
+++ b/src/pages/index/Menu.tsx
@@ -25,7 +25,7 @@ const Page = () => {
success: function () {
if (code) {
Taro.request({
- url: 'https://server.gxwebsoft.com/api/wx-login/loginByMpWxPhone',
+ url: 'https://server.websoft.top/api/wx-login/loginByMpWxPhone',
method: 'POST',
data: {
code,
@@ -191,12 +191,10 @@ const Page = () => {
{item?.title}
:
-
-
-
+ Taro.navigateTo({url: '/passport/wxLogin'})}>
+
+ {item?.title}
+
}
))
diff --git a/src/pages/user/components/OrderIcon.tsx b/src/pages/user/components/OrderIcon.tsx
index 7abb516..1590079 100644
--- a/src/pages/user/components/OrderIcon.tsx
+++ b/src/pages/user/components/OrderIcon.tsx
@@ -25,7 +25,7 @@ const OrderIcon = () => {
success: function () {
if (code) {
Taro.request({
- url: 'https://server.gxwebsoft.com/api/wx-login/loginByMpWxPhone',
+ url: 'https://server.websoft.top/api/wx-login/loginByMpWxPhone',
method: 'POST',
data: {
code,
@@ -191,12 +191,10 @@ const OrderIcon = () => {
{item?.title}
:
-
-
-
+ Taro.navigateTo({url: '/passport/wxLogin'})}>
+
+ {item?.title}
+
}
))
diff --git a/src/pages/user/components/UserCard.tsx b/src/pages/user/components/UserCard.tsx
index 92013f0..b3ab824 100644
--- a/src/pages/user/components/UserCard.tsx
+++ b/src/pages/user/components/UserCard.tsx
@@ -107,7 +107,7 @@ function UserCard() {
success: function () {
if (code) {
Taro.request({
- url: 'https://server.gxwebsoft.com/api/wx-login/loginByMpWxPhone',
+ url: 'https://server.websoft.top/api/wx-login/loginByMpWxPhone',
method: 'POST',
data: {
code,
@@ -155,9 +155,9 @@ function UserCard() {
IsLogin ? (
) : (
-
+ Taro.navigateTo({url: '/passport/wxLogin'})}>
-
+
)
}
diff --git a/src/passport/agreement.scss b/src/passport/agreement.scss
new file mode 100644
index 0000000..aa0274d
--- /dev/null
+++ b/src/passport/agreement.scss
@@ -0,0 +1,4 @@
+.content{
+ padding: 32px;
+ line-height: 2.4rem;
+}
diff --git a/src/passport/agreement.tsx b/src/passport/agreement.tsx
index 5ce26d1..620a7d1 100644
--- a/src/passport/agreement.tsx
+++ b/src/passport/agreement.tsx
@@ -1,30 +1,43 @@
-import {useEffect, useState} from "react";
-import Taro from '@tarojs/taro'
+import {useEffect, useState} from 'react'
+import {CmsArticle} from "@/api/cms/cmsArticle/model"
+// import ReactMarkdown from 'react-markdown';
+// 显示html富文本
import {View, RichText} from '@tarojs/components'
+import Line from "@/components/Gap";
+import {wxParse} from "@/utils/common";
+import {getCmsArticle} from "@/api/cms/cmsArticle";
+import './agreement.scss'
-const Agreement = () => {
-
- const [content, setContent] = useState
('')
+function Detail() {
+ // 文章详情
+ const [item, setItem] = useState()
const reload = () => {
- Taro.hideTabBar()
- setContent('' +
- '欢迎使用' +
- ' ' +
- '【WebSoft】' +
- '服务协议 ' +
- '
')
+ getCmsArticle(10112).then(data => {
+ if(data){
+ data.content = wxParse(data.content)
+ setItem(data)
+ }
+ })
}
useEffect(() => {
- reload()
- }, [])
+ reload();
+ }, []);
return (
- <>
-
-
+
+
{item?.title}
+
{item?.createTime}
+
+ {
+ item?.editor === 1 ?
+ :
+ null
+ }
- >
+
+
)
}
-export default Agreement
+
+export default Detail
diff --git a/src/passport/wxLogin.config.ts b/src/passport/wxLogin.config.ts
new file mode 100644
index 0000000..eea58ef
--- /dev/null
+++ b/src/passport/wxLogin.config.ts
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '快捷登录',
+ navigationBarTextStyle: 'black'
+})
diff --git a/src/passport/wxLogin.tsx b/src/passport/wxLogin.tsx
new file mode 100644
index 0000000..df9f7c6
--- /dev/null
+++ b/src/passport/wxLogin.tsx
@@ -0,0 +1,44 @@
+import {useEffect, useState} from "react";
+import Taro from '@tarojs/taro'
+import {Radio, Button} from '@nutui/nutui-react-taro'
+
+const Login = () => {
+ const [isAgree, setIsAgree] = useState(false)
+ const reload = () => {
+ Taro.hideTabBar()
+ }
+
+ useEffect(() => {
+ reload()
+ }, [])
+
+ return (
+ <>
+
+
快捷登录
+
+ <>
+
+ 手机号一键登录
+
+ {/*
*/}
+ {/* Taro.navigateTo({url: '/passport/setting'})}>服务配置*/}
+ {/*
*/}
+ {/*
*/}
+ >
+
+
+
+ >
+ )
+}
+export default Login
diff --git a/src/user/profile/profile.tsx b/src/user/profile/profile.tsx
index cb141b5..0ea52d5 100644
--- a/src/user/profile/profile.tsx
+++ b/src/user/profile/profile.tsx
@@ -73,7 +73,7 @@ function Profile() {
avatar: `${detail.avatarUrl}`,
})
Taro.uploadFile({
- url: 'https://server.gxwebsoft.com/api/oss/upload',
+ url: 'https://server.websoft.top/api/oss/upload',
filePath: detail.avatarUrl,
name: 'file',
header: {
diff --git a/src/utils/server.ts b/src/utils/server.ts
index 710f85c..ebaadcd 100644
--- a/src/utils/server.ts
+++ b/src/utils/server.ts
@@ -4,7 +4,7 @@ import {User} from "@/api/system/user/model";
// 模版套餐ID
export const TEMPLATE_ID = 10398;
// 服务接口
-export const SERVER_API_URL = 'https://server.gxwebsoft.com/api';
+export const SERVER_API_URL = 'https://server.websoft.top/api';
// export const SERVER_API_URL = 'http://127.0.0.1:8000/api';
/**
* 保存用户信息到本地存储