Compare commits
11 Commits
04e2196942
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 54815f871f | |||
| cf9ef2e6dd | |||
| 2b0e339bc9 | |||
| 4df53c611b | |||
| 56772970e2 | |||
| 9e04533bdc | |||
| 77fedbe877 | |||
| 6c2811646a | |||
| 9e00409e5e | |||
| 1457a24cea | |||
| 34d6cfdf9e |
22
App.vue
22
App.vue
@@ -3,31 +3,9 @@
|
|||||||
import update from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
import update from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
import { useUserStore } from '@/stores/user'
|
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
const userStore = useUserStore()
|
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
// 保存原生 switchTab 方法
|
|
||||||
const originalSwitchTab = uni.switchTab;
|
|
||||||
uni.switchTab = (options) => {
|
|
||||||
if (options.url.includes('/pages/book/index') && !uni.getStorageSync('token')) {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '请先登录后访问该页面',
|
|
||||||
confirmText: '去登录',
|
|
||||||
success: (res) => {
|
|
||||||
console.log(res, 'res');
|
|
||||||
if (res.confirm) uni.navigateTo({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return; // 拦截跳转
|
|
||||||
}
|
|
||||||
// 已登录/非拦截页 → 执行原生跳转
|
|
||||||
originalSwitchTab.call(uni, options);
|
|
||||||
}
|
|
||||||
// 检测自动更新
|
// 检测自动更新
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development';
|
|||||||
*/
|
*/
|
||||||
const BASE_URL_MAP = {
|
const BASE_URL_MAP = {
|
||||||
development: {
|
development: {
|
||||||
// MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||||
MAIN: 'https://global.nuttyreading.com/', // 线上
|
// MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||||
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
||||||
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const bookHomeApi = {
|
|||||||
*/
|
*/
|
||||||
getRecommendBooks() {
|
getRecommendBooks() {
|
||||||
return skeletonClient.request<IRecommendBooksResponse>({
|
return skeletonClient.request<IRecommendBooksResponse>({
|
||||||
url: 'bookAbroad/home/getRecommendBooks',
|
url: uni.getStorageSync('token') ? 'bookAbroad/home/getRecommendBooks' : 'visitor/bookAbroad/getRecommendBooks',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
@@ -54,7 +54,7 @@ export const bookHomeApi = {
|
|||||||
*/
|
*/
|
||||||
getBookLabelList(type: number) {
|
getBookLabelList(type: number) {
|
||||||
return skeletonClient.request<ILabelListResponse>({
|
return skeletonClient.request<ILabelListResponse>({
|
||||||
url: 'bookAbroad/home/getBookAbroadLableList',
|
url: uni.getStorageSync('token') ? 'bookAbroad/home/getBookAbroadLableList' : 'visitor/bookAbroad//getBookAbroadLableList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { type }
|
data: { type }
|
||||||
})
|
})
|
||||||
@@ -66,7 +66,7 @@ export const bookHomeApi = {
|
|||||||
*/
|
*/
|
||||||
getSubLabelList(pid: number) {
|
getSubLabelList(pid: number) {
|
||||||
return skeletonClient.request<ILabelListResponse>({
|
return skeletonClient.request<ILabelListResponse>({
|
||||||
url: 'bookAbroad/home/getBookAbroadLableListByPid',
|
url: uni.getStorageSync('token') ? 'bookAbroad/home/getBookAbroadLableListByPid' : 'visitor/bookAbroad//getBookAbroadLableListByPid',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { pid }
|
data: { pid }
|
||||||
})
|
})
|
||||||
@@ -78,7 +78,7 @@ export const bookHomeApi = {
|
|||||||
*/
|
*/
|
||||||
getBooksByLabel(lableId: number) {
|
getBooksByLabel(lableId: number) {
|
||||||
return skeletonClient.request<IBookListResponse>({
|
return skeletonClient.request<IBookListResponse>({
|
||||||
url: 'bookAbroad/home/getAbroadBookListByLable',
|
url: uni.getStorageSync('token') ? 'bookAbroad/home/getAbroadBookListByLable' : 'visitor/bookAbroad/getAbroadBookListByLable',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { lableId }
|
data: { lableId }
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import { mainClient, skeletonClient } from '@/api/clients'
|
import { mainClient, skeletonClient } from '@/api/clients'
|
||||||
import type { IApiResponse } from '@/api/types'
|
import type { IApiResponse } from '@/api/types'
|
||||||
import type { IAgreement } from '@/types/user'
|
import type { IAgreement } from '@/types/user'
|
||||||
import { useUserStore } from '@/stores/user'
|
|
||||||
|
|
||||||
export const commonApi = {
|
export const commonApi = {
|
||||||
/**
|
/**
|
||||||
@@ -37,9 +36,8 @@ export const commonApi = {
|
|||||||
* @returns 消息列表
|
* @returns 消息列表
|
||||||
*/
|
*/
|
||||||
getMessageList(isBook: number, isMedical: number, isSociology: number) {
|
getMessageList(isBook: number, isMedical: number, isSociology: number) {
|
||||||
const userStore = useUserStore()
|
|
||||||
return skeletonClient.request<IApiResponse>({
|
return skeletonClient.request<IApiResponse>({
|
||||||
url: userStore.token ? 'common/message/listByPage' : '/visitor/listByPage',
|
url: uni.getStorageSync('token') ? 'common/message/listByPage' : '/visitor/listByPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { isBook, isMedical, isSociology }
|
data: { isBook, isMedical, isSociology }
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import type {
|
|||||||
} from '@/types/course'
|
} from '@/types/course'
|
||||||
import type { ISearchRequest, ISearchResponse } from '@/types/search'
|
import type { ISearchRequest, ISearchResponse } from '@/types/search'
|
||||||
import type { ICommentListResponse, IAddCommentResponse, IComment } from '@/types/comment'
|
import type { ICommentListResponse, IAddCommentResponse, IComment } from '@/types/comment'
|
||||||
import { useUserStore } from '@/stores/user'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程相关API
|
* 课程相关API
|
||||||
@@ -55,9 +54,8 @@ export const courseApi = {
|
|||||||
page: number,
|
page: number,
|
||||||
limit: number
|
limit: number
|
||||||
}) {
|
}) {
|
||||||
const userStore = useUserStore()
|
|
||||||
return skeletonClient.request<IMarketCourseListResponse>({
|
return skeletonClient.request<IMarketCourseListResponse>({
|
||||||
url: userStore.token ? 'medical/home/getMarketCourseList' : 'visitor/getMarketCourseList',
|
url: uni.getStorageSync('token') ? 'medical/home/getMarketCourseList' : 'visitor/getMarketCourseList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
// api/modules/course.ts
|
// api/modules/course.ts
|
||||||
import { createRequestClient } from '../request'
|
import { mainClient, skeletonClient } from '@/api/clients'
|
||||||
import { SERVICE_MAP } from '../config'
|
|
||||||
import type {
|
import type {
|
||||||
ICourseCategoryResponse,
|
ICourseCategoryResponse,
|
||||||
IUserLateCourseListResponse,
|
|
||||||
IMarketCourseListResponse,
|
IMarketCourseListResponse,
|
||||||
ICourseMedicalLabelsResponse
|
|
||||||
} from '@/types/course'
|
} from '@/types/course'
|
||||||
import { useUserStore } from '@/stores/user'
|
|
||||||
import { skeletonClient } from '../clients'
|
|
||||||
|
|
||||||
|
|
||||||
const client = createRequestClient({ baseURL: SERVICE_MAP.MAIN })
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程分类及分类下课程相关API
|
* 课程分类及分类下课程相关API
|
||||||
@@ -23,9 +15,8 @@ export const courseSubjectClassificationApi = {
|
|||||||
* @returns 分类数据
|
* @returns 分类数据
|
||||||
*/
|
*/
|
||||||
getCourseMedicalTree() {
|
getCourseMedicalTree() {
|
||||||
const userStore = useUserStore()
|
return mainClient.request<ICourseCategoryResponse>({
|
||||||
return client.request<ICourseCategoryResponse>({
|
url: uni.getStorageSync('token') ? 'medical/home/getCourseMedicalTree' : '/visitor/getCourseMedicalTree',
|
||||||
url: userStore.token ? 'medical/home/getCourseMedicalTree' : '/visitor/getCourseMedicalTree',
|
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
@@ -63,7 +54,7 @@ export const courseSubjectClassificationApi = {
|
|||||||
* @returns 分类数据
|
* @returns 分类数据
|
||||||
*/
|
*/
|
||||||
getCourseMedicalLabels(id: number) {
|
getCourseMedicalLabels(id: number) {
|
||||||
return client.request<ICourseCategoryResponse>({
|
return mainClient.request<ICourseCategoryResponse>({
|
||||||
url: 'medical/home/getMedicalLabels',
|
url: 'medical/home/getMedicalLabels',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { id }
|
data: { id }
|
||||||
@@ -76,7 +67,7 @@ export const courseSubjectClassificationApi = {
|
|||||||
* @returns 分类数据
|
* @returns 分类数据
|
||||||
*/
|
*/
|
||||||
getCourseMedicalChildLabels(id: number) {
|
getCourseMedicalChildLabels(id: number) {
|
||||||
return client.request<ICourseCategoryResponse>({
|
return mainClient.request<ICourseCategoryResponse>({
|
||||||
url: 'medical/home/getChildCourseMedicalTree',
|
url: 'medical/home/getChildCourseMedicalTree',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { id }
|
data: { id }
|
||||||
@@ -94,7 +85,7 @@ export const courseSubjectClassificationApi = {
|
|||||||
page: number, // 页码
|
page: number, // 页码
|
||||||
limit: number // 每页数量
|
limit: number // 每页数量
|
||||||
}) {
|
}) {
|
||||||
return client.request<IMarketCourseListResponse>({
|
return mainClient.request<IMarketCourseListResponse>({
|
||||||
url: 'medical/home/getMedicalCourseList',
|
url: 'medical/home/getMedicalCourseList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
@@ -107,7 +98,7 @@ export const courseSubjectClassificationApi = {
|
|||||||
* @returns 分类数据
|
* @returns 分类数据
|
||||||
*/
|
*/
|
||||||
getCourseSoulChildLabels(id: number) {
|
getCourseSoulChildLabels(id: number) {
|
||||||
return client.request<ICourseCategoryResponse>({
|
return mainClient.request<ICourseCategoryResponse>({
|
||||||
url: 'psyche/home/getChildCoursePsycheTree',
|
url: 'psyche/home/getChildCoursePsycheTree',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { id }
|
data: { id }
|
||||||
@@ -125,7 +116,7 @@ export const courseSubjectClassificationApi = {
|
|||||||
page: number, // 页码
|
page: number, // 页码
|
||||||
limit: number // 每页数量
|
limit: number // 每页数量
|
||||||
}) {
|
}) {
|
||||||
return client.request<IMarketCourseListResponse>({
|
return mainClient.request<IMarketCourseListResponse>({
|
||||||
url: 'psyche/home/getPsycheCourseList',
|
url: 'psyche/home/getPsycheCourseList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
@@ -143,7 +134,7 @@ export const courseSubjectClassificationApi = {
|
|||||||
page: number, // 页码
|
page: number, // 页码
|
||||||
limit: number // 每页数量
|
limit: number // 每页数量
|
||||||
}) {
|
}) {
|
||||||
return client.request<IMarketCourseListResponse>({
|
return mainClient.request<IMarketCourseListResponse>({
|
||||||
url: 'sociology/course/getSociologyCourseList',
|
url: 'sociology/course/getSociologyCourseList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ export async function migrateUserData(data: { tel: string, code: string, type: s
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
export async function getUserMigrateInfo() {
|
export async function getUserMigrateInfo() {
|
||||||
const res = await mainClient.request<IApiResponse>({
|
const res = await skeletonClient.request<IApiResponse>({
|
||||||
url: 'common/user/getMigrationList',
|
url: 'common/user/getMigrationList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
})
|
})
|
||||||
@@ -336,7 +336,7 @@ export async function getUserMigrateInfo() {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
export async function getUserContributionData() {
|
export async function getUserContributionData() {
|
||||||
const res = await mainClient.request<IApiResponse>({
|
const res = await skeletonClient.request<IApiResponse>({
|
||||||
url: 'common/userContribution/getUserContribution',
|
url: 'common/userContribution/getUserContribution',
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
@@ -370,7 +370,7 @@ export async function getUserContributionByTypeList(current : number, limit : nu
|
|||||||
*/
|
*/
|
||||||
export async function getIosPayment(transactionId : string, productId : string, orderId : string, receiptData : string, customerOid : string) {
|
export async function getIosPayment(transactionId : string, productId : string, orderId : string, receiptData : string, customerOid : string) {
|
||||||
const res = await mainClient.request<IApiResponse>({
|
const res = await mainClient.request<IApiResponse>({
|
||||||
url: 'Ipa/veri/',
|
url: 'Ipa/veri',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { transactionId, productId, orderId, receiptData, customerOid}
|
data: { transactionId, productId, orderId, receiptData, customerOid}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
"updateFailed": "Update Failed",
|
"updateFailed": "Update Failed",
|
||||||
"paymentMethod": "Payment Method",
|
"paymentMethod": "Payment Method",
|
||||||
"googlePay": "Google Pay",
|
"googlePay": "Google Pay",
|
||||||
"applePay": "Apple Pay",
|
"applePay": "In-App Purchase",
|
||||||
"agreeText": "I have agreed",
|
"agreeText": "I have agreed",
|
||||||
"agreement": "Recharge Agreement",
|
"agreement": "Recharge Agreement",
|
||||||
"agreeFirst": "Please agree to the recharge agreement first",
|
"agreeFirst": "Please agree to the recharge agreement first",
|
||||||
@@ -234,7 +234,9 @@
|
|||||||
"certificate": "My certificate",
|
"certificate": "My certificate",
|
||||||
"iHufen": "My lake",
|
"iHufen": "My lake",
|
||||||
"hufenRecord": "Lake division record",
|
"hufenRecord": "Lake division record",
|
||||||
"hufen": "Hufen"
|
"hufen": "Hufen",
|
||||||
|
"backEnd" : "Back-end recharge",
|
||||||
|
"cannotView" : "The recharge in the background cannot be viewed"
|
||||||
},
|
},
|
||||||
"book": {
|
"book": {
|
||||||
"title": "My Books",
|
"title": "My Books",
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
"updateFailed": "更新失败",
|
"updateFailed": "更新失败",
|
||||||
"paymentMethod": "支付方式",
|
"paymentMethod": "支付方式",
|
||||||
"googlePay": "Google Pay",
|
"googlePay": "Google Pay",
|
||||||
"applePay": "Apple Pay",
|
"applePay": "IAP 支付",
|
||||||
"agreeText": "我已同意",
|
"agreeText": "我已同意",
|
||||||
"agreement": "充值协议",
|
"agreement": "充值协议",
|
||||||
"agreeFirst": "请先同意充值协议",
|
"agreeFirst": "请先同意充值协议",
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
"migrateCodePlaceholder": "国内版账号获取的迁移验证码",
|
"migrateCodePlaceholder": "国内版账号获取的迁移验证码",
|
||||||
"migrateWarning": "迁移后不可恢复,请谨慎操作!",
|
"migrateWarning": "迁移后不可恢复,请谨慎操作!",
|
||||||
"migrateInstructions": "迁移说明",
|
"migrateInstructions": "迁移说明",
|
||||||
"instruction1": "请在吴门医述、心灵空间、众妙之门、疯子读书任意APP中获取迁移验证码,获取方式【我的】-【数据迁移】-【获取迁移验证码】。",
|
"instruction1": "请在吴门医述APP中获取迁移验证码,获取方式【我的】-【数据迁移】-【获取迁移验证码】。",
|
||||||
"instruction2": "数据迁移完成后,旧账号数据将被清空,已购买的天医币、积分、课程、电子书、VIP、证书、湖分将转移到当前账号。",
|
"instruction2": "数据迁移完成后,旧账号数据将被清空,已购买的天医币、积分、课程、电子书、VIP、证书、湖分将转移到当前账号。",
|
||||||
"instruction3": "迁移过程可能需要几分钟时间,请耐心等待。",
|
"instruction3": "迁移过程可能需要几分钟时间,请耐心等待。",
|
||||||
"instruction4": "如遇到问题,请联系客服获取帮助。",
|
"instruction4": "如遇到问题,请联系客服获取帮助。",
|
||||||
@@ -235,7 +235,9 @@
|
|||||||
"certificate": "我的证书",
|
"certificate": "我的证书",
|
||||||
"iHufen": "我的湖分",
|
"iHufen": "我的湖分",
|
||||||
"hufenRecord": "湖分记录",
|
"hufenRecord": "湖分记录",
|
||||||
"hufen": "湖分"
|
"hufen": "湖分",
|
||||||
|
"backEnd" : "后台充值",
|
||||||
|
"cannotView" : "后台充值无法查看"
|
||||||
},
|
},
|
||||||
"book": {
|
"book": {
|
||||||
"title": "我的书单",
|
"title": "我的书单",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "吴门国际",
|
"name" : "吴门国际",
|
||||||
"appid" : "__UNI__1250B39",
|
"appid" : "__UNI__1250B39",
|
||||||
"description" : "吴门国际",
|
"description" : "吴门国际",
|
||||||
"versionName" : "1.0.9",
|
"versionName" : "1.1.1",
|
||||||
"versionCode" : 109,
|
"versionCode" : 111,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
"platforms" : "Android",
|
"platforms" : "Android",
|
||||||
"url" : "https://ext.dcloud.net.cn/plugin?id=12608",
|
"url" : "https://ext.dcloud.net.cn/plugin?id=12608",
|
||||||
"android_package_name" : "com.amazinglimited",
|
"android_package_name" : "com.amazinglimited",
|
||||||
"ios_bundle_id" : "",
|
"ios_bundle_id" : "com.amazinglimited",
|
||||||
"isCloud" : true,
|
"isCloud" : true,
|
||||||
"bought" : 1,
|
"bought" : 1,
|
||||||
"pid" : "12608",
|
"pid" : "12608",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
/>
|
/>
|
||||||
<view class="icon-hua">
|
<view class="icon-hua">
|
||||||
<image
|
<image
|
||||||
src="../../static/home_icon.png"
|
src="../../static/book/home_icon.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
class="icon-hua-img"
|
class="icon-hua-img"
|
||||||
/>
|
/>
|
||||||
@@ -35,16 +35,16 @@
|
|||||||
<view class="mine-1">
|
<view class="mine-1">
|
||||||
<text class="mine-title">{{ $t('bookHome.block1') }}</text>
|
<text class="mine-title">{{ $t('bookHome.block1') }}</text>
|
||||||
<view
|
<view
|
||||||
v-if="data.page.records.length > 0"
|
v-if="data?.page?.records.length > 0"
|
||||||
class="mine-more"
|
class="mine-more"
|
||||||
@click="handleMoreClick"
|
@click="handleMoreClick"
|
||||||
>
|
>
|
||||||
{{ $t('bookHome.more') }}
|
{{ $t('bookHome.more') }}
|
||||||
<image src="@/static/icon/icon_right.png" />
|
<image src="@/static/icon/icon_right.png" />
|
||||||
</view>
|
</view>
|
||||||
<view v-if="data.page.records.length > 0" class="mine-1-list">
|
<view v-if="data?.page?.records.length > 0" class="mine-1-list">
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in data.page.records"
|
v-for="(item, index) in data?.page?.records"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="mine-item"
|
class="mine-item"
|
||||||
@click="handleMyBookClick(item.id)"
|
@click="handleMyBookClick(item.id)"
|
||||||
@@ -284,7 +284,7 @@ const vipInfo = computed(() => userStore.userInfo?.userEbookVip?.[0] || null)
|
|||||||
/**
|
/**
|
||||||
* 获取我的书单
|
* 获取我的书单
|
||||||
*/
|
*/
|
||||||
const getMyBooks = () => bookHomeApi.getMyBooks(1, 10)
|
const getMyBooks = () => uni.getStorageSync('token') ? bookHomeApi.getMyBooks(1, 10) : []
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取推荐图书
|
* 获取推荐图书
|
||||||
@@ -364,6 +364,8 @@ const handleMyBookClick = (bookId: number) => {
|
|||||||
* 处理图书点击
|
* 处理图书点击
|
||||||
*/
|
*/
|
||||||
const handleBookClick = (bookId: number) => {
|
const handleBookClick = (bookId: number) => {
|
||||||
|
getPrompt()
|
||||||
|
if(!uni.getStorageSync('token')) return
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/book/detail?id=${bookId}`
|
url: `/pages/book/detail?id=${bookId}`
|
||||||
})
|
})
|
||||||
@@ -382,6 +384,8 @@ const handleMoreClick = () => {
|
|||||||
* 处理活动标签点击
|
* 处理活动标签点击
|
||||||
*/
|
*/
|
||||||
const handleActivityLabelClick = async (labelId: number, index: number) => {
|
const handleActivityLabelClick = async (labelId: number, index: number) => {
|
||||||
|
getPrompt()
|
||||||
|
if(!uni.getStorageSync('token')) return
|
||||||
currentActivityIndex.value = index
|
currentActivityIndex.value = index
|
||||||
activityBooksSkeleton.value.reload()
|
activityBooksSkeleton.value.reload()
|
||||||
}
|
}
|
||||||
@@ -404,6 +408,25 @@ const handleCategoryLevel2Click = async (labelId: number, index: number) => {
|
|||||||
categoryBooksSkeleton.value.reload()
|
categoryBooksSkeleton.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录提示语
|
||||||
|
*/
|
||||||
|
const getPrompt = () => {
|
||||||
|
if(!uni.getStorageSync('token')) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '请先登录后访问该页面',
|
||||||
|
confirmText: '去登录',
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res , 'res');
|
||||||
|
if (res.confirm) uni.navigateTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面显示
|
* 页面显示
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ const handleFirstLevelClick = (item: string) => {
|
|||||||
if(!uni.getStorageSync('token')) return
|
if(!uni.getStorageSync('token')) return
|
||||||
selectedFirstLevel.value = item
|
selectedFirstLevel.value = item
|
||||||
if (item === '医学') {
|
if (item === '医学') {
|
||||||
medicineMenuSkeletonRef.value.reload()
|
medicineMenuSkeletonRef.value?.reload()
|
||||||
} else {
|
} else {
|
||||||
menuSkeletonRef.value?.reload()
|
menuSkeletonRef.value?.reload()
|
||||||
}
|
}
|
||||||
@@ -457,17 +457,16 @@ const requestAll = async () => {
|
|||||||
* 页面挂载
|
* 页面挂载
|
||||||
*/
|
*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if(!userStore.token) {
|
// 重置分类索引
|
||||||
|
currentIndex.value = 0
|
||||||
|
if(!uni.getStorageSync('state') && !uni.getStorageSync('token')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 重置分类索引
|
if(uni.getStorageSync('state')) uni.removeStorageSync('state')
|
||||||
currentIndex.value = 0
|
|
||||||
|
|
||||||
// 请求所有数据
|
// 请求所有数据
|
||||||
requestAll()
|
requestAll()
|
||||||
console.log('进来了2');
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -485,7 +484,7 @@ onShow(() => {
|
|||||||
|
|
||||||
// 刷新数据
|
// 刷新数据
|
||||||
// requestAll()
|
// requestAll()
|
||||||
if(userStore.token){
|
if(uni.getStorageSync('token')){
|
||||||
getLearnCourse()
|
getLearnCourse()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -692,7 +691,7 @@ $border-color: #eeeeee;
|
|||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-image: url("@/static/soul/cate_bg.png");
|
background-image: url("@/static/icon/cate_bg.png");
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -753,7 +752,7 @@ $border-color: #eeeeee;
|
|||||||
width: 65rpx;
|
width: 65rpx;
|
||||||
height: 78rpx;
|
height: 78rpx;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-image: url("@/static/soul/cate_bg.png");
|
background-image: url("@/static/icon/cate_bg.png");
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -401,6 +401,7 @@ const yszc = () => {
|
|||||||
* 页面跳转
|
* 页面跳转
|
||||||
*/
|
*/
|
||||||
const onPageSwitch = (url: string) => {
|
const onPageSwitch = (url: string) => {
|
||||||
|
uni.setStorageSync('state', 'true');
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: url,
|
url: url,
|
||||||
})
|
})
|
||||||
@@ -446,7 +447,6 @@ const getOS = () =>{
|
|||||||
const oprateOs = uni.getSystemInfoSync().platform
|
const oprateOs = uni.getSystemInfoSync().platform
|
||||||
console.log(oprateOs, 'oprateOs');
|
console.log(oprateOs, 'oprateOs');
|
||||||
isAndorid.value = oprateOs === "android" ? true : false
|
isAndorid.value = oprateOs === "android" ? true : false
|
||||||
console.log(isAndorid.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<!-- 应用信息 -->
|
<!-- 应用信息 -->
|
||||||
<view class="app-info">
|
<view class="app-info">
|
||||||
<image
|
<image
|
||||||
src="/static/icon/home_icon_logo.jpg"
|
src="/static/logo.png"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
class="app-logo"
|
class="app-logo"
|
||||||
/>
|
/>
|
||||||
@@ -52,11 +52,9 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { t } from '@/utils/i18n'
|
||||||
import { makePhoneCall } from '@/utils/index'
|
import { makePhoneCall } from '@/utils/index'
|
||||||
|
|
||||||
const { t } = useI18n()
|
|
||||||
|
|
||||||
// 导航栏高度
|
// 导航栏高度
|
||||||
const statusBarHeight = ref(0)
|
const statusBarHeight = ref(0)
|
||||||
const navbarHeight = ref('44px')
|
const navbarHeight = ref('44px')
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="user-page" :style="{ paddingTop: getNotchHeight() + 30 + 'px' }" v-if="userStore.token && uni.getStorageSync('token')">
|
<view class="user-page" :style="{ paddingTop: getNotchHeight() + 30 + 'px' }" v-if="tokenState">
|
||||||
<!-- 设置图标 -->
|
<!-- 设置图标 -->
|
||||||
<view class="settings-icon" :style="{ top: getNotchHeight() + 30 + 'px' }" @click="goSettings">
|
<view class="settings-icon" :style="{ top: getNotchHeight() + 30 + 'px' }" @click="goSettings">
|
||||||
<wd-icon name="setting1" size="24px" color="#666" />
|
<wd-icon name="setting1" size="24px" color="#666" />
|
||||||
@@ -142,13 +142,13 @@
|
|||||||
url: '/pages/user/feedback/index',
|
url: '/pages/user/feedback/index',
|
||||||
type: 'pageJump'
|
type: 'pageJump'
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// id: 6,
|
id: 6,
|
||||||
// name: t('user.dataMigrate'),
|
name: t('user.dataMigrate'),
|
||||||
// url: '/pages/user/migrate/index',
|
url: '/pages/user/migrate/index',
|
||||||
// desc: t('user.migrateSubtitle'),
|
desc: t('user.migrateSubtitle'),
|
||||||
// type: 'pageJump'
|
type: 'pageJump'
|
||||||
// }
|
},
|
||||||
// {
|
// {
|
||||||
// id: 7,
|
// id: 7,
|
||||||
// name: t('user.certificate'),
|
// name: t('user.certificate'),
|
||||||
@@ -165,6 +165,7 @@
|
|||||||
])
|
])
|
||||||
// 湖分
|
// 湖分
|
||||||
const hufenData = ref()
|
const hufenData = ref()
|
||||||
|
const tokenState = ref(false)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取平台信息
|
* 获取平台信息
|
||||||
@@ -190,7 +191,6 @@
|
|||||||
*/
|
*/
|
||||||
const getHufen = async () => {
|
const getHufen = async () => {
|
||||||
hufenData.value = await getUserContributionData()
|
hufenData.value = await getUserContributionData()
|
||||||
hufenData.value = await getUserContributionData()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -276,7 +276,9 @@
|
|||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
|
tokenState.value = true
|
||||||
getData()
|
getData()
|
||||||
|
getHufen()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const formData = ref({
|
|||||||
const getMigrateInfo = async () => {
|
const getMigrateInfo = async () => {
|
||||||
const res = await getUserMigrateInfo()
|
const res = await getUserMigrateInfo()
|
||||||
migrateInfo.value.alreadyMigration = res.alreadyMigration
|
migrateInfo.value.alreadyMigration = res.alreadyMigration
|
||||||
// migrateInfo.value.notMigration = res.notMigration
|
migrateInfo.value.notMigration = res.notMigration
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getMigrateInfo()
|
getMigrateInfo()
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="title">{{$t('order.pointsRecord')}}</view>
|
<view class="title">{{$t('order.pointsRecord')}}</view>
|
||||||
<view class="recharge-record-block" v-for="(item, index) in bookList" :key="index" @click="toDetails(item)">
|
<view class="recharge-record-block" v-for="(item, index) in bookList" :key="index" @click="toDetails(item)">
|
||||||
<view class="recharge-record-block-row">{{item.remark.slice(0, (item.remark.indexOf(',')))}}<text
|
<view class="recharge-record-block-row">{{item.relationId ? item.remark.slice(0, (item.remark.indexOf(','))) : $t('user.backEnd')}}<text
|
||||||
:class="item.actType === 1 ? 'text1' : 'text2'">{{item.actType === 1 ? '' : '+'}}{{item.changeAmount}}</text>
|
:class="item.actType === 1 ? 'text1' : 'text2'">{{item.actType === 1 ? '' : '+'}}{{item.changeAmount}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="time">{{item.createTime}}</view>
|
<view class="time">{{item.createTime}}</view>
|
||||||
<view style="font-size: 24rpx;">{{item.remark.slice((item.remark.indexOf(','))+1)}}<wd-icon name="file-copy"
|
<view style="font-size: 24rpx;" v-if="item.relationId">{{item.remark.slice((item.remark.indexOf(','))+1)}}<wd-icon name="file-copy"
|
||||||
size="14px" color="#65A1FA" style="margin-left: 10rpx;" @click="copyToClipboard()"></wd-icon></view>
|
size="14px" color="#65A1FA" style="margin-left: 10rpx;" @click="copyToClipboard()"></wd-icon></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -69,10 +69,14 @@
|
|||||||
* 跳转订单详情
|
* 跳转订单详情
|
||||||
*/
|
*/
|
||||||
const toDetails = (order: IOrder) => {
|
const toDetails = (order: IOrder) => {
|
||||||
console.log(order.relationId, "order");
|
if (order.relationId) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/user/order/details?orderId=' + order.relationId
|
url: '/pages/user/order/details?orderId=' + order.relationId
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: t('user.cannotView'), icon: 'none' });
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 自定义导航栏 -->
|
<!-- 自定义导航栏 -->
|
||||||
<nav-bar :title="$t('order.recharge')"></nav-bar>
|
<nav-bar :title="$t('order.recharge')"></nav-bar>
|
||||||
<!-- 活动充值金额 -->
|
<!-- 活动充值金额 -->
|
||||||
<view class="block" v-if="eventAmountList.length > 0">
|
<view class="block" v-if="eventAmountList?.length > 0">
|
||||||
<!-- <view class="text">{{$t('order.rechargeAmount')}}</view> -->
|
<!-- <view class="text">{{$t('order.rechargeAmount')}}</view> -->
|
||||||
<view class="text">活动充值金额</view>
|
<view class="text">活动充值金额</view>
|
||||||
<view class="recharge">
|
<view class="recharge">
|
||||||
@@ -39,13 +39,11 @@
|
|||||||
<view class="cha_fangsh">
|
<view class="cha_fangsh">
|
||||||
<view class="cf_title">{{$t('user.paymentMethod')}}</view>
|
<view class="cf_title">{{$t('user.paymentMethod')}}</view>
|
||||||
<view class="cf_radio">
|
<view class="cf_radio">
|
||||||
<radio-group v-for="item in iosPaylist">
|
<radio-group>
|
||||||
<view>
|
<view>
|
||||||
<view :class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'">
|
<view class="cf_xuanx">
|
||||||
<!-- <image class="pay_item_img" :src="item.imgUrl" mode="aspectFil">
|
<text>{{ isAndroid ? $t('user.googlePay') : $t('user.applePay')}}</text>
|
||||||
</image> -->
|
<radio checked="true;" @click="choseType(item.id)"></radio>
|
||||||
<text>{{ item.title }}</text>
|
|
||||||
<radio :checked="payType === item.id" @click="choseType(item.id)"></radio>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
@@ -88,14 +86,6 @@
|
|||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const payType = ref('1')
|
|
||||||
const iosPaylist = ref([
|
|
||||||
{
|
|
||||||
title: "Google Pay",
|
|
||||||
id: '1',
|
|
||||||
// imgUrl: "/static/icon/currency.png"
|
|
||||||
}
|
|
||||||
])
|
|
||||||
// 充值列表
|
// 充值列表
|
||||||
const rechargeList = ref([])
|
const rechargeList = ref([])
|
||||||
// 金额列表单独每项
|
// 金额列表单独每项
|
||||||
@@ -135,7 +125,7 @@
|
|||||||
const eventAmountList = ref([])
|
const eventAmountList = ref([])
|
||||||
//正常金额数据
|
//正常金额数据
|
||||||
const standardAmountList = ref([])
|
const standardAmountList = ref([])
|
||||||
|
// 声明ios实例
|
||||||
const iapChannel = ref(null)
|
const iapChannel = ref(null)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -148,7 +138,7 @@
|
|||||||
console.log('运行Android上')
|
console.log('运行Android上')
|
||||||
} else {
|
} else {
|
||||||
isAndroid.value = false;
|
isAndroid.value = false;
|
||||||
qudao.value = 'Google'
|
qudao.value = 'IOS'
|
||||||
console.log('运行iOS上')
|
console.log('运行iOS上')
|
||||||
}
|
}
|
||||||
getData()
|
getData()
|
||||||
@@ -257,10 +247,10 @@
|
|||||||
*/
|
*/
|
||||||
const getProductInfo = () => {
|
const getProductInfo = () => {
|
||||||
const id = String(aloneItem.value.priceTypeId)
|
const id = String(aloneItem.value.priceTypeId)
|
||||||
iapChannel.value.requestProduct([id], (res: any) => {
|
iapChannel.value.requestProduct([id], (res : any) => {
|
||||||
console.log(res, '查询苹果后台配置的商品id');
|
console.log(res, '查询苹果后台配置的商品id');
|
||||||
topay(id)
|
topay(id)
|
||||||
}, (err: any) => {
|
}, (err : any) => {
|
||||||
uni.showToast({ title: '未获取到产品信息,请联系管理员', icon: 'none' });
|
uni.showToast({ title: '未获取到产品信息,请联系管理员', icon: 'none' });
|
||||||
console.error('失败', err);
|
console.error('失败', err);
|
||||||
});
|
});
|
||||||
@@ -269,7 +259,7 @@
|
|||||||
/**
|
/**
|
||||||
* 准备支付-调出支付窗口
|
* 准备支付-调出支付窗口
|
||||||
*/
|
*/
|
||||||
const topay = (id: string) => {
|
const topay = (id : string) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
@@ -288,10 +278,7 @@
|
|||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.log('支付错误', err);
|
console.log('支付错误', err);
|
||||||
restoreComplateRequest()
|
restoreComplateRequest()
|
||||||
uni.showToast({
|
uni.showToast({ title: t('user.closeWindow'), icon: 'error' })
|
||||||
title: '关闭支付弹窗',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -307,9 +294,12 @@
|
|||||||
const obj = await getIosPayment(res.transactionIdentifier, res.payment.productid, res.payment.username, res.transactionReceipt, userStore.userInfo.id)
|
const obj = await getIosPayment(res.transactionIdentifier, res.payment.productid, res.payment.username, res.transactionReceipt, userStore.userInfo.id)
|
||||||
console.log(obj, '校验订单')
|
console.log(obj, '校验订单')
|
||||||
finishTransaction(res)
|
finishTransaction(res)
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/user/index'
|
||||||
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('校验订单失败:', error)
|
console.error('校验订单失败:', error)
|
||||||
// 也需要释放订单,防止再次提交支付窗口拉不起来
|
// 也需要释放订单,防止失败再次提交支付窗口拉不起来
|
||||||
finishTransaction(res)
|
finishTransaction(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,9 +312,9 @@
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
iapChannel.value.restoreCompletedTransactions({
|
iapChannel.value.restoreCompletedTransactions({
|
||||||
manualFinishTransaction: true,
|
manualFinishTransaction: true,
|
||||||
}, (res: unknown) => {
|
}, (res : unknown) => {
|
||||||
console.log(res, '成功-restoreCompletedTransactions');
|
console.log(res, '成功-restoreCompletedTransactions');
|
||||||
res.map((item: any) => {
|
res.map((item : any) => {
|
||||||
finishTransaction(item)
|
finishTransaction(item)
|
||||||
})
|
})
|
||||||
resolve(res);
|
resolve(res);
|
||||||
@@ -493,13 +483,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 切换支付方式
|
|
||||||
*/
|
|
||||||
const choseType = () => {
|
|
||||||
// payType.value = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDevName();
|
getDevName();
|
||||||
getActivityDescriptionData()
|
getActivityDescriptionData()
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
:class="item.orderType !== '充值' ? 'text1' : 'text2'">{{item.orderType !== '充值' ? '' : '+'}}{{item.changeAmount}}</text>
|
:class="item.orderType !== '充值' ? 'text1' : 'text2'">{{item.orderType !== '充值' ? '' : '+'}}{{item.changeAmount}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="recharge-record-block-row_">{{item.productName}}</view>
|
<view class="recharge-record-block-row_">{{item.productName}}</view>
|
||||||
<view class="recharge-record-block-row_">{{$t('user.orderSn')}}:{{item.payNo}}<wd-icon name="file-copy"
|
<view class="recharge-record-block-row_" v-if="item.relationId">{{$t('user.orderSn')}}:{{item.payNo}}<wd-icon name="file-copy"
|
||||||
size="14px" color="#65A1FA" style="margin-left: 10rpx;" @click="copyToClipboard()"></wd-icon>
|
size="14px" color="#65A1FA" style="margin-left: 10rpx;" @click="copyToClipboard()"></wd-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="time">{{item.createTime}}</view>
|
<view class="time">{{item.createTime}}</view>
|
||||||
@@ -75,10 +75,14 @@
|
|||||||
* 跳转订单详情
|
* 跳转订单详情
|
||||||
*/
|
*/
|
||||||
const toDetails = (order: IOrder) => {
|
const toDetails = (order: IOrder) => {
|
||||||
console.log(order.relationId, "order");
|
if (order.relationId) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/user/order/details?orderId=' + order.relationId
|
url: '/pages/user/order/details?orderId=' + order.relationId
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: t('user.cannotView'), icon: 'none' });
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const menuItems = ref([
|
const menuItems = ref([
|
||||||
{
|
// {
|
||||||
name: '分享APP'
|
// name: '分享APP'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: '关于我们',
|
name: '关于我们',
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
href: 'https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.medicine',
|
href: 'https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.medicine',
|
||||||
title: "吴门医述",
|
title: "吴门医述",
|
||||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||||
imageUrl: "static/icon/home_icon_logo.png",
|
imageUrl: "static/logo.png",
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
href: 'https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.medicine',
|
href: 'https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.medicine',
|
||||||
title: "吴门医述",
|
title: "吴门医述",
|
||||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||||
imageUrl: "static/icon/home_icon_logo.png",
|
imageUrl: "static/logo.png",
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -8,8 +8,6 @@
|
|||||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
||||||
"Courier New", monospace;
|
"Courier New", monospace;
|
||||||
--color-red-500: oklch(63.7% 0.237 25.331);
|
--color-red-500: oklch(63.7% 0.237 25.331);
|
||||||
--color-gray-300: oklch(87.2% 0.01 258.338);
|
|
||||||
--color-gray-500: oklch(55.1% 0.027 264.364);
|
|
||||||
--color-white: #fff;
|
--color-white: #fff;
|
||||||
--spacing: 0.25rem;
|
--spacing: 0.25rem;
|
||||||
--text-xs: 0.75rem;
|
--text-xs: 0.75rem;
|
||||||
@@ -214,54 +212,12 @@
|
|||||||
max-width: 96rem;
|
max-width: 96rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mt-2 {
|
|
||||||
margin-top: calc(var(--spacing) * 2);
|
|
||||||
}
|
|
||||||
.mt-2\! {
|
|
||||||
margin-top: calc(var(--spacing) * 2) !important;
|
|
||||||
}
|
|
||||||
.mt-2\.5\! {
|
|
||||||
margin-top: calc(var(--spacing) * 2.5) !important;
|
|
||||||
}
|
|
||||||
.mt-3 {
|
|
||||||
margin-top: calc(var(--spacing) * 3);
|
|
||||||
}
|
|
||||||
.mt-3\! {
|
|
||||||
margin-top: calc(var(--spacing) * 3) !important;
|
|
||||||
}
|
|
||||||
.mt-5 {
|
|
||||||
margin-top: calc(var(--spacing) * 5);
|
|
||||||
}
|
|
||||||
.mt-5\! {
|
.mt-5\! {
|
||||||
margin-top: calc(var(--spacing) * 5) !important;
|
margin-top: calc(var(--spacing) * 5) !important;
|
||||||
}
|
}
|
||||||
.mt-20 {
|
|
||||||
margin-top: calc(var(--spacing) * 20);
|
|
||||||
}
|
|
||||||
.mt-20\! {
|
|
||||||
margin-top: calc(var(--spacing) * 20) !important;
|
|
||||||
}
|
|
||||||
.mt-\[20rpx\]\! {
|
.mt-\[20rpx\]\! {
|
||||||
margin-top: 20rpx !important;
|
margin-top: 20rpx !important;
|
||||||
}
|
}
|
||||||
.mr-\[20rpx\] {
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
.mr-\[20rpx\]\! {
|
|
||||||
margin-right: 20rpx !important;
|
|
||||||
}
|
|
||||||
.mb-1 {
|
|
||||||
margin-bottom: calc(var(--spacing) * 1);
|
|
||||||
}
|
|
||||||
.mb-1\! {
|
|
||||||
margin-bottom: calc(var(--spacing) * 1) !important;
|
|
||||||
}
|
|
||||||
.mb-1\.5\! {
|
|
||||||
margin-bottom: calc(var(--spacing) * 1.5) !important;
|
|
||||||
}
|
|
||||||
.mb-2 {
|
|
||||||
margin-bottom: calc(var(--spacing) * 2);
|
|
||||||
}
|
|
||||||
.mb-2\! {
|
.mb-2\! {
|
||||||
margin-bottom: calc(var(--spacing) * 2) !important;
|
margin-bottom: calc(var(--spacing) * 2) !important;
|
||||||
}
|
}
|
||||||
@@ -271,24 +227,12 @@
|
|||||||
.mb-\[20rpx\]\! {
|
.mb-\[20rpx\]\! {
|
||||||
margin-bottom: 20rpx !important;
|
margin-bottom: 20rpx !important;
|
||||||
}
|
}
|
||||||
.ml-1 {
|
|
||||||
margin-left: calc(var(--spacing) * 1);
|
|
||||||
}
|
|
||||||
.ml-1\! {
|
.ml-1\! {
|
||||||
margin-left: calc(var(--spacing) * 1) !important;
|
margin-left: calc(var(--spacing) * 1) !important;
|
||||||
}
|
}
|
||||||
.ml-2 {
|
|
||||||
margin-left: calc(var(--spacing) * 2);
|
|
||||||
}
|
|
||||||
.ml-2\.5\! {
|
.ml-2\.5\! {
|
||||||
margin-left: calc(var(--spacing) * 2.5) !important;
|
margin-left: calc(var(--spacing) * 2.5) !important;
|
||||||
}
|
}
|
||||||
.ml-\[20rpx\] {
|
|
||||||
margin-left: 20rpx;
|
|
||||||
}
|
|
||||||
.ml-\[20rpx\]\! {
|
|
||||||
margin-left: 20rpx !important;
|
|
||||||
}
|
|
||||||
.block {
|
.block {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -325,9 +269,6 @@
|
|||||||
.flex-shrink {
|
.flex-shrink {
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
}
|
}
|
||||||
.border-collapse {
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
.transform {
|
.transform {
|
||||||
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
||||||
}
|
}
|
||||||
@@ -344,27 +285,12 @@
|
|||||||
border-style: var(--tw-border-style);
|
border-style: var(--tw-border-style);
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
.bg-gray-300 {
|
|
||||||
background-color: var(--color-gray-300);
|
|
||||||
}
|
|
||||||
.bg-gray-500 {
|
|
||||||
background-color: var(--color-gray-500);
|
|
||||||
}
|
|
||||||
.bg-white {
|
.bg-white {
|
||||||
background-color: var(--color-white);
|
background-color: var(--color-white);
|
||||||
}
|
}
|
||||||
.p-0 {
|
|
||||||
padding: calc(var(--spacing) * 0);
|
|
||||||
}
|
|
||||||
.p-0\! {
|
.p-0\! {
|
||||||
padding: calc(var(--spacing) * 0) !important;
|
padding: calc(var(--spacing) * 0) !important;
|
||||||
}
|
}
|
||||||
.p-2 {
|
|
||||||
padding: calc(var(--spacing) * 2);
|
|
||||||
}
|
|
||||||
.p-2\.5 {
|
|
||||||
padding: calc(var(--spacing) * 2.5);
|
|
||||||
}
|
|
||||||
.p-3 {
|
.p-3 {
|
||||||
padding: calc(var(--spacing) * 3);
|
padding: calc(var(--spacing) * 3);
|
||||||
}
|
}
|
||||||
@@ -374,9 +300,6 @@
|
|||||||
.p-\[20rpx\] {
|
.p-\[20rpx\] {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
}
|
}
|
||||||
.p-\[20rpx\]\! {
|
|
||||||
padding: 20rpx !important;
|
|
||||||
}
|
|
||||||
.p-\[30rpx\] {
|
.p-\[30rpx\] {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
}
|
}
|
||||||
@@ -389,9 +312,6 @@
|
|||||||
.pt-\[10rpx\] {
|
.pt-\[10rpx\] {
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
}
|
}
|
||||||
.pb-0 {
|
|
||||||
padding-bottom: calc(var(--spacing) * 0);
|
|
||||||
}
|
|
||||||
.pb-0\! {
|
.pb-0\! {
|
||||||
padding-bottom: calc(var(--spacing) * 0) !important;
|
padding-bottom: calc(var(--spacing) * 0) !important;
|
||||||
}
|
}
|
||||||
@@ -442,9 +362,6 @@
|
|||||||
--tw-ordinal: ordinal;
|
--tw-ordinal: ordinal;
|
||||||
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
||||||
}
|
}
|
||||||
.underline {
|
|
||||||
text-decoration-line: underline;
|
|
||||||
}
|
|
||||||
.shadow-\[0_4rpx_12rpx_rgba\(0\,0\,0\,0\.05\)\] {
|
.shadow-\[0_4rpx_12rpx_rgba\(0\,0\,0\,0\.05\)\] {
|
||||||
--tw-shadow: 0 4rpx 12rpx var(--tw-shadow-color, rgba(0,0,0,0.05));
|
--tw-shadow: 0 4rpx 12rpx var(--tw-shadow-color, rgba(0,0,0,0.05));
|
||||||
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
||||||
|
|||||||
@@ -232,6 +232,19 @@ export function useUpload(): UseUploadReturn {
|
|||||||
extension
|
extension
|
||||||
}: ChooseFileOption): Promise<ChooseFile[]> {
|
}: ChooseFileOption): Promise<ChooseFile[]> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
if(uni.getSystemInfoSync().platform === 'ios') {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: multiple ? maxCount : 1,
|
||||||
|
mediaType: ['image'],
|
||||||
|
sizeType,
|
||||||
|
sourceType,
|
||||||
|
extension,
|
||||||
|
success: (res) => resolve(formatImage(res)),
|
||||||
|
fail: reject
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('-9-9-9-');
|
||||||
switch (accept) {
|
switch (accept) {
|
||||||
case 'image':
|
case 'image':
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
|
|||||||
Reference in New Issue
Block a user