初始化项目

parents
# 环境标识
VITE_APP_ENV = 'development'
# URL路径
VITE_APP_BASE_URL = '/practice-jiaxiu-mobile/'
# API地址
VITE_APP_BASE_API = '/dev-api'
#组织标识
VITE_APP_VISITOR_CODE = 'practice-mediaCatalog'
#文件路径
VITE_APP_FILE_URL = '/download'
#kkfile地址
VITE_APP_PREVIEW_URL = 'http://jiaxiu.gyntv.com.cn:8012/onlinePreview?url='
#打包文件名称
VITE_APP_OUTDIR_FILENAME = 'practice-jiaxiu-mobile-html'
#systemCode
VITE_APP_SYSTEM_CODE = 'jiaxiu-centre'
\ No newline at end of file
# 环境标识
VITE_APP_ENV = 'production'
# URL路径
VITE_APP_BASE_URL = '/practice-jiaxiu-mobile/'
# API地址
VITE_APP_BASE_API = '/back/ty-visit/ty-visit'
#组织标识
VITE_APP_VISITOR_CODE = 'practice-mediaCatalog'
#文件路径
VITE_APP_FILE_URL = '/download'
#kkfile地址
VITE_APP_PREVIEW_URL = 'http://jiaxiu.gyntv.com.cn:8012/onlinePreview?url='
#打包文件名称
VITE_APP_OUTDIR_FILENAME = 'practice-jiaxiu-mobile-html'
#systemCode
VITE_APP_SYSTEM_CODE = 'ty-centre'
\ No newline at end of file
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
build
*.local
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.rexma
// .npmrc
public-hoist-pattern[]=@vue*
// or
// shamefully-hoist = true
# 小程序平台模板 vue3
## 安装依赖
```
yarn install
```
### 本地服务
```
yarn start
```
### 小程序平台打包
```
yarn build
```
## 默认安装的 UI 库
[wot-design-uni](https://wot-design-uni.netlify.app/component/button.html)
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
VanButton: typeof import('vant/es')['Button']
VanCascader: typeof import('vant/es')['Cascader']
VanEmpty: typeof import('vant/es')['Empty']
VanIcon: typeof import('vant/es')['Icon']
VanList: typeof import('vant/es')['List']
VanPopup: typeof import('vant/es')['Popup']
VanPullRefresh: typeof import('vant/es')['PullRefresh']
VanSearch: typeof import('vant/es')['Search']
VanSticky: typeof import('vant/es')['Sticky']
VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
VanTextEllipsis: typeof import('vant/es')['TextEllipsis']
}
}
<!DOCTYPE html>
<html>
<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="/src/main.ts"></script>
</body>
</html>
{
"name": "rexma-temp-vue3",
"version": "0.0.0",
"scripts": {
"start": "rexma start-rexma",
"build": "rexma build-rexma",
"start:platform": "rexma start",
"build:platform": "rexma build"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4000720240327002",
"@dcloudio/uni-app-plus": "3.0.0-4000720240327002",
"@dcloudio/uni-components": "3.0.0-4000720240327002",
"@dcloudio/uni-h5": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-alipay": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-baidu": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-jd": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-lark": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-qq": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-toutiao": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-weixin": "3.0.0-4000720240327002",
"@dcloudio/uni-mp-xhs": "3.0.0-4000720240327002",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000720240327002",
"axios": "^1.7.2",
"dayjs": "^1.11.11",
"pinia": "2.0.36",
"vant": "^4.9.1",
"vue": "^3.3.11",
"vue-i18n": "^9.1.9",
"vue-router": "4",
"wot-design-uni": "^1.2.26",
"xinhua-sdk": "^1.6.0"
},
"devDependencies": {
"@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-4000720240327002",
"@dcloudio/uni-cli-shared": "3.0.0-4000720240327002",
"@dcloudio/uni-stacktracey": "3.0.0-4000720240327002",
"@dcloudio/vite-plugin-uni": "3.0.0-4000720240327002",
"@types/node": "^20.14.5",
"@vant/auto-import-resolver": "^1.2.1",
"@vitejs/plugin-legacy": "4.1.1",
"@vue/runtime-core": "^3.3.11",
"@vue/tsconfig": "^0.1.3",
"rexma-cli": "^1.8.0",
"sass": "^1.77.6",
"typescript": "^4.9.4",
"unplugin-auto-import": "^0.17.6",
"unplugin-vue-components": "^0.27.2",
"vite": "4.3.5",
"vue-tsc": "^1.0.24"
}
}
<script setup lang="ts">
onLaunch(() => {
console.log('App Launch');
});
onShow(() => {
console.log('App Show');
});
onHide(() => {
console.log('App Hide');
});
</script>
<style></style>
import request from '@/utils/request'
/**
* @description 上传图片
* @param {File} file File对象
* @param {Function} handleUploadProgress 上传进度回调
* @returns
*/
export const uploadFile = (file, handleUploadProgress) => {
const formData = new FormData()
formData.append("file", file)
formData.append("systemCode", import.meta.env.VITE_APP_SYSTEM_CODE)
return request({
url: '/html/htmlMediaInsert/htmlSingleUpload',
method: 'post',
data: formData,
onUploadProgress: handleUploadProgress,
headers: {
'Content-Type': 'multipart/form-data'
}
})
}
/**
* @description 查询类型数据
* @returns
*/
export const selectTypeList = () => {
const data = {
materialType: 3
}
return request({
url: '/html/htmlMediaSelect/selectHtmlClassifyList',
method: 'post',
data: data
})
}
/**
* @description 查询来源数据
* @param {Number} sourceType 1.来源类型 2.来源渠道
* @returns
*/
export const selectSourceList = (sourceType) => {
const data = { sourceType }
return request({
url: '/html/htmlMediaSelect/selectHtmlSourceList',
method: 'post',
data: data
})
}
/**
* @description 查询标签数据
* @returns
*/
export const selectTagsList = () => {
const data = {}
return request({
url: `/html/htmlMediaSelect/treeHtmlTagData/${import.meta.env.VITE_APP_SYSTEM_CODE}`,
method: 'post',
data: data
})
}
/**
* @description 精细查询图组列表
* @param {Any} page 分页对象
* @param {Any} data 图组对象
* @returns
*/
export const selectFinePictureList = (page, data) => {
return request({
url: `/app/appMediaSelect/selectAppFineCatalogList/${page.pageNum}/${page.pageSize}`,
method: 'post',
data: data
})
}
/**
* @description 广泛查询图组列表
* @param {Any} page 分页对象
* @param {Any} data 图组对象
* @returns
*/
export const selectCoarsePictureList = (page, data) => {
return request({
url: `/app/appMediaSelect/selectAppCatalogList/${page.pageNum}/${page.pageSize}`,
method: 'post',
data: data
})
}
/**
* @description 我的图组列表
* @param {Any} page 分页对象
* @param {Any} data 图组对象
* @returns
*/
export const selectMinePictureList = (page, data) => {
return request({
url: `/app/appMediaSelect/selectAppMaterialRetrievalList/${page.pageNum}/${page.pageSize}`,
method: 'post',
data: data
})
}
/**
* @description 我的收藏列表
* @param {Any} page 分页对象
* @param {Any} data 图组对象
* @returns
*/
export const selectCollectPictureList = (page, data) => {
return request({
url: `/app/appMediaSelect/selectAppPersonMaterialList/${page.pageNum}/${page.pageSize}`,
method: 'post',
data: data
})
}
/**
* @description 发布图组
* @param {Any} data 图组对象
* @returns
*/
export const publishPicture = ( data) => {
return request({
url: '/app/appMediaUpdate/updateAppCollect',
method: 'post',
data: data
})
}
/**
* @description 新增图组
* @param {Any} data 图组对象
* @returns
*/
export const insertPicture = (data) => {
return request({
url: '/html/htmlMediaInsert/htmlInsertImageCatalog',
method: 'post',
data: data
})
}
/**
* @description 新增图组地址
* @param {Any} data 图组地址列表
* @returns
*/
export const insertPictureUrl = (data) => {
return request({
url: '/html/htmlMediaInsert/htmlBatchInsertEnclosure',
method: 'post',
data: data
})
}
/**
* @description 查询图组详情
* @param {Number} id 图组id
* @returns
*/
export const selectPictureById = (id) => {
return request({
url: `/app/appMediaSelect/selectAppByMaterialId/${id}`,
method: 'post',
data: {}
})
}
/**
* @description 查询组织
* @param {Any} data 组织对象
* @returns
*/
export const selectOrganizeList = (data) => {
data.moduleCode = import.meta.env.VITE_APP_VISITOR_CODE
return request({
url: '/html/htmlMediaSelect/selectHtmlOrganizeList',
method: 'post',
data: data
})
}
\ No newline at end of file
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1604623478709'); /* IE9 */
src: url('iconfont.eot?t=1604623478709#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABkMAAsAAAAALdgAABi8AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHWgrGJLgiATYCJAOBBAtEAAQgBYRtB4NLG8klVUaGjQMQ2+YrjKjS9LL/PyTQQ4QtLfsTQhnhiUm74WRlJW0FMey0lSYo/Q74FpkwPXFkj6oazj3Kj/KnWik/djrfxa7cMLcNpeTha+/Pc3f3FUov6oPvCoVCSBTKJ0JF2TiRmZs2PD+33vt/Y5kMlNFp1BgbPRkII9UFC5hBDyw2OYyiD2cjd4dRaIMRiVFYAVh1/E2dlWH6zfd7iX4inHD9cx3FUc6RAnZpMqclFQ6kwEewREnpCMCwgHj52F/77idI4rSL4V1uu0BkmLkXpXnS+bz7tf16V1Vt2yEiVbzeSiBB6dCg8ZiUCvxD2+QdYv/AJ+Z5qayF0QMAFpl7oIG6PPz/czWd3YcCyp7AnFFt/92Wd6LR0nj3mFeMvOMRYn8/V9rdA1KAspQSCsPsanTnv+zR3xwsHKUp5TiH+cfZKyApZGGS3aNcKSlxCqQAbStUhSUlqitcpWt1LsmCPvYa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bXxzSR8RKmOFUe5hhcpIFm1U4+gde6zgMKIv3Or4fr6X4DmGFIasNBLn39AKoNnLoQKEhLB/MJQpIXyIi11oM2VrVifkOdMsYgQu2KBeRYxoYj2FAKKNWZKIMRuBK9WZojKjPNPisYNo/ct8vE2Hw1gcPHwCQiJiElIEZaMnIKSipqGlh59BgwZMWbClBlzFixhcw1I1u1R8nw6u7oEQDpxcJSkDItSXjPpahY43bq6MpzBCM5Q7+a6IwuZbZ4lxRJFcl6KMN03s4BdiIHkSNbSLUuQdD0bAyq+pMBhLURJlt2sGyLt0cDZSUJW1LUhyEuA1qF2srrihbLFriBpeeOGBJj6OtDzASgYHHoSDV4CO3xhjDu5Zt1Y70JC3rAXdPPMrgg4cZOzmg90wm1Sq0DEv8dHquYO1bXPqmHogiXV2CGzwi7RSLjH4XT7n31i25roNln5JQAAAA==') format('woff2'),
url('iconfont.woff?t=1604623478709') format('woff'),
url('iconfont.ttf?t=1604623478709') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1604623478709#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-tubiao201:before {
content: "\e638";
}
.icon-zhengquewanchengchenggong:before {
content: "\e75c";
}
.icon-shanchu:before {
content: "\e612";
}
.icon-close-eye:before {
content: "\e79c";
}
.icon-icon-test:before {
content: "\e640";
}
.icon-yanzhengma2:before {
content: "\e656";
}
.icon-mima:before {
content: "\e633";
}
.icon-shoujihaoma:before {
content: "\e6da";
}
.icon-biaoqing:before {
content: "\e60c";
}
.icon-chenggong:before {
content: "\e75a";
}
.icon-fanhui:before {
content: "\e600";
}
.icon-jiantou1:before {
content: "\e60d";
}
.icon-jinbileyuaniocn:before {
content: "\e614";
}
.icon-tongzhituiguang:before {
content: "\e611";
}
.icon-dianpu:before {
content: "\e895";
}
.icon-denglu:before {
content: "\e66b";
}
.icon-neirongziduanguanli:before {
content: "\e6b2";
}
.icon-dailizhanghaoguanli:before {
content: "\e642";
}
.icon-zhanghao:before {
content: "\e678";
}
.icon-zizhanghaoguanli:before {
content: "\e610";
}
.icon-fafang:before {
content: "\e749";
}
.icon-youhuiquan1:before {
content: "\e659";
}
.icon-fenxiang:before {
content: "\e687";
}
.icon-jiantou_down:before {
content: "\e61a";
}
.icon-tuichu1:before {
content: "\e64b";
}
.icon-huiyuan:before {
content: "\e632";
}
.icon-huiyuan1:before {
content: "\e658";
}
.icon-94:before {
content: "\e75b";
}
.icon-youhuiquan:before {
content: "\e69b";
}
.icon-08_zizhanghaoguanli:before {
content: "\e630";
}
.icon-zhanghuguanli:before {
content: "\e60b";
}
.icon-4:before {
content: "\e623";
}
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
const onBackPress: typeof import('@dcloudio/uni-app')['onBackPress']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onError: typeof import('@dcloudio/uni-app')['onError']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onHide: typeof import('@dcloudio/uni-app')['onHide']
const onLaunch: typeof import('@dcloudio/uni-app')['onLaunch']
const onLoad: typeof import('@dcloudio/uni-app')['onLoad']
const onMounted: typeof import('vue')['onMounted']
const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']
const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']
const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']
const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']
const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']
const onPageNotFound: typeof import('@dcloudio/uni-app')['onPageNotFound']
const onPageScroll: typeof import('@dcloudio/uni-app')['onPageScroll']
const onPullDownRefresh: typeof import('@dcloudio/uni-app')['onPullDownRefresh']
const onReachBottom: typeof import('@dcloudio/uni-app')['onReachBottom']
const onReady: typeof import('@dcloudio/uni-app')['onReady']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onResize: typeof import('@dcloudio/uni-app')['onResize']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onShareAppMessage: typeof import('@dcloudio/uni-app')['onShareAppMessage']
const onShareTimeline: typeof import('@dcloudio/uni-app')['onShareTimeline']
const onShow: typeof import('@dcloudio/uni-app')['onShow']
const onTabItemTap: typeof import('@dcloudio/uni-app')['onTabItemTap']
const onThemeChange: typeof import('@dcloudio/uni-app')['onThemeChange']
const onUnhandledRejection: typeof import('@dcloudio/uni-app')['onUnhandledRejection']
const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useLink: typeof import('vue-router')['useLink']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
const xma: typeof import('rexma-cli')['xma']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
import('vue')
}
/// <reference types='@dcloudio/types' />
import 'vue'
declare module '@vue/runtime-core' {
type Hooks = App.AppInstance & Page.PageInstance;
interface ComponentCustomOptions extends Hooks {
}
}
/// <reference types="vite/client" />
declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
export function useInitScroll() {
// 记录离开时导航条的位置
let scrollY = ref();
// 离开路由时的钩子函数
onBeforeRouteLeave((to, from, next) => {
// 记录当前的滚动条位置
scrollY.value =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
next()
})
onActivated(() => {
nextTick(() => { }).then(() => {
window.scroll(0, scrollY.value);
})
})
}
\ No newline at end of file
import { createSSRApp } from 'vue';
import App from './App.vue';
import store from './store';
import router from './router'
export function createApp() {
const app = createSSRApp(App);
app.use(router)
app.use(store);
return {
app,
};
}
{
"name" : "",
"appid" : "",
"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" : "3",
"h5" : {
"router" : {
"base" : "./",
"mode" : "hash"
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
}
}
}
{
"easycom": {
"autoscan": true,
"custom": {
"^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
}
},
"pages": [ // pages 数组中第一项表示应用启动页
{
"path": "pages/index",
"style": {
"navigationBarTitleText": "小程序平台"
}
}
],
"globalStyle": {
"navigationStyle": "custom"
}
}
<template>
<van-popup v-model:show="show" position="bottom" :close-on-click-overlay="false" safe-area-inset-bottom @close="handleClose">
<div class="container">
<div class="header-placeholder">
<div class="header">
<span class="reset" @click="handleReset">重置</span>
<span class="confirm" @click="handleConfirm">确认</span>
</div>
</div>
<div class="content">
<div class="item" v-for="(item, index) in dataList" :key="index"
:class="{ active: selectItemIndex == index }" @click="selectItemIndex = index">
<span>{{ item.sourceName }}</span>
</div>
</div>
</div>
</van-popup>
</template>
<script setup>
import { selectSourceList } from '@/api/publish';
const emits = defineEmits(["confirm", "close"])
const dataList = ref([])
const getList = async () => {
const res = await selectSourceList(2)
dataList.value = res.data
}
getList()
const selectItemIndex = ref(null)
const handleConfirm = () => {
emits('confirm', dataList.value[selectItemIndex.value])
show.value = false
}
const handleReset = () => {
selectItemIndex.value = null
}
const handleClose = () => {
emits('close')
}
const show = ref(false)
const open = () => {
show.value = true
}
const close = () => {
show.value = false
}
defineExpose({
open,
close
})
</script>
<style lang="scss" scoped>
.container {
max-height: 50vh;
padding: 0 20px;
.header-placeholder {
height: 55px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
position: fixed;
width: calc(100vw - 40px);
height: 55px;
background-color: #ffffff;
color: #545454;
.confirm {
color: #0e7ce3;
}
}
}
.content {
display: flex;
flex-wrap: wrap;
gap: 15px;
padding-bottom: 15px;
.item {
background-color: #eef1f3;
flex: 0 0 calc((100vw - 70px) / 3);
padding: 15px 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
color: #676767;
font-size: 15px;
span {
max-width: 80%;
}
}
.active {
background-color: #0e7ce3;
color: #ffffff;
}
}
}
</style>
\ No newline at end of file
<template>
<van-popup v-model:show="show" position="bottom" :close-on-click-overlay="false" safe-area-inset-bottom @close="handleClose">
<div class="container">
<div class="header-placeholder">
<div class="header">
<span class="reset" @click="handleReset">重置</span>
<span class="confirm" @click="handleConfirm">确认</span>
</div>
</div>
<div class="content">
<div class="item" v-for="(item, index) in dataList" :key="index"
:class="{ active: selectItemIndex == index }" @click="selectItemIndex = index">
<span>{{ item.sourceName }}</span>
</div>
</div>
</div>
</van-popup>
</template>
<script setup>
import { selectSourceList } from '@/api/publish';
const emits = defineEmits(["confirm", "close"])
const dataList = ref([])
const getList = async () => {
const res = await selectSourceList(1)
dataList.value = res.data
}
getList()
const selectItemIndex = ref(null)
const handleConfirm = () => {
emits('confirm', dataList.value[selectItemIndex.value])
show.value = false
}
const handleReset = () => {
selectItemIndex.value = null
}
const handleClose = () => {
emits('close')
}
const show = ref(false)
const open = () => {
show.value = true
}
const close = () => {
show.value = false
}
defineExpose({
open,
close
})
</script>
<style lang="scss" scoped>
.container {
max-height: 50vh;
padding: 0 20px;
.header-placeholder {
height: 55px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
position: fixed;
width: calc(100vw - 40px);
height: 55px;
background-color: #ffffff;
color: #545454;
.confirm {
color: #0e7ce3;
}
}
}
.content {
display: flex;
flex-wrap: wrap;
gap: 15px;
padding-bottom: 15px;
.item {
background-color: #eef1f3;
flex: 0 0 calc((100vw - 70px) / 3);
padding: 15px 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
color: #676767;
font-size: 15px;
span {
max-width: 80%;
}
}
.active {
background-color: #0e7ce3;
color: #ffffff;
}
}
}
</style>
\ No newline at end of file
<template>
<van-popup v-model:show="show" position="bottom" :close-on-click-overlay="false" safe-area-inset-bottom @close="handleClose">
<div class="container">
<div class="header-placeholder">
<div class="header">
<span class="reset" @click="handleReset">重置</span>
<span class="confirm" @click="handleConfirm">确认</span>
</div>
</div>
<van-cascader v-model="activeId" :show-header="false" :options="treeList" :field-names="fieldNames" />
</div>
</van-popup>
</template>
<script setup>
import { selectTagsList } from '@/api/publish'
const emits = defineEmits(["confirm", "close"])
const activeId = ref(null)
const fieldNames = {
text: 'title',
value: 'id',
children: 'children'
}
const treeList = ref([])
const dataList=ref([])
const getList = async () => {
const res = await selectTagsList()
treeList.value = res.data
dataList.value=dealTreeData(res.data)
}
getList()
const dealTreeData = (data) => {
let arrTree = []
data.forEach((ele) => {
let obj = { ...ele }
delete obj.children
arrTree.push(obj)
if (ele?.children?.length) {
arrTree.push(...dealTreeData(ele.children))
}
});
return arrTree;
}
const handleConfirm = () => {
const item = dataList.value.filter(item => item.id == activeId.value)[0]
emits('confirm', item)
show.value = false
}
const handleReset = () => {
activeId.value = null
}
const handleClose = () => {
emits('close')
}
const show = ref(false)
const open = () => {
show.value = true
}
const close = () => {
show.value = false
}
defineExpose({
open,
close
})
</script>
<style lang="scss" scoped>
.container {
max-height: 50vh;
.header-placeholder {
height: 55px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
position: fixed;
width: calc(100vw - 40px);
height: 55px;
background-color: #ffffff;
color: #545454;
padding: 0 20px;
.confirm {
color: #0e7ce3;
}
}
}
::v-deep(.van-sidebar-item) {
text-align: center;
}
}
</style>
\ No newline at end of file
<template>
<van-popup v-model:show="show" position="bottom" :close-on-click-overlay="false" safe-area-inset-bottom @close="handleClose">
<div class="container">
<div class="header-placeholder">
<div class="header">
<span class="reset" @click="handleReset">重置</span>
<span class="confirm" @click="handleConfirm">确认</span>
</div>
</div>
<div class="content">
<div class="item" v-for="(item, index) in dataList" :key="index"
:class="{ active: selectItemIndex == index }" @click="selectItemIndex = index">
<span>{{ item.classifyType }}</span>
</div>
</div>
</div>
</van-popup>
</template>
<script setup>
import { selectTypeList } from '@/api/publish'
const emits = defineEmits(["confirm", "close"])
const dataList = ref([])
const getList = async () => {
const res = await selectTypeList()
dataList.value = res.data
}
getList()
const selectItemIndex = ref(null)
const handleConfirm = () => {
emits('confirm', dataList.value[selectItemIndex.value])
show.value = false
}
const handleReset = () => {
selectItemIndex.value = null
}
const handleClose = () => {
emits('close')
}
const show = ref(false)
const open = () => {
show.value = true
}
const close = () => {
show.value = false
}
defineExpose({
open,
close
})
</script>
<style lang="scss" scoped>
.container {
max-height: 50vh;
padding: 0 20px;
.header-placeholder {
height: 55px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
position: fixed;
width: calc(100vw - 40px);
height: 55px;
background-color: #ffffff;
color: #545454;
.confirm {
color: #0e7ce3;
}
}
}
.content {
display: flex;
flex-wrap: wrap;
gap: 15px;
padding-bottom: 15px;
.item {
background-color: #eef1f3;
flex: 0 0 calc((100vw - 70px) / 3);
padding: 15px 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
color: #676767;
font-size: 15px;
span {
max-width: 80%;
}
}
.active {
background-color: #0e7ce3;
color: #ffffff;
}
}
}
</style>
\ No newline at end of file
<template>
<van-sticky>
<div class="header">
<div class="tools">
<van-search v-model="catalog.materialTitle" shape="round" placeholder="请输入搜索关键词" @search="handleRefresh"
@clear="handleRefresh" />
<div class="right" @click="router.push({ name: 'publish' })">
<van-icon name="add" size="26" color="#0E7CE3" />
<span>新建</span>
</div>
</div>
<div class="menu">
<van-tabs v-model:active="tabsActive" line-width="20" title-active-color="#0E7CE3"
title-inactive-color="#82868E" @change="handleRefresh">
<van-tab title="推荐"></van-tab>
<van-tab title="最新"></van-tab>
</van-tabs>
<div class="filtrate">
<div class="item" @click="openTypePopup" :class="{ active: typeActive }">
<span>类型</span>
<van-icon :name="typeActive ? 'arrow-up' : 'arrow-down'" size="13" />
</div>
<div class="item" @click="openCatalogPopup" :class="{ active: tagsActive }">
<span>标签</span>
<van-icon :name="tagsActive ? 'arrow-up' : 'arrow-down'" size="13" />
</div>
<div class="item" @click="openSourcePopup" :class="{ active: sourceChannelActive }">
<span>来源</span>
<van-icon :name="sourceChannelActive ? 'arrow-up' : 'arrow-down'" size="13" />
</div>
</div>
</div>
</div>
</van-sticky>
<div class="content">
<van-pull-refresh v-model="refreshing" @refresh="handleRefresh">
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" :offset="50" @load="getList"
v-if="dataList.length">
<div class="list">
<div class="item" v-for="(item, index) in dataList" :key="index"
@click="router.push({ name: 'home-content', query: { id: item.materialId } })">
<img :src="fileDomain + item.coverpicture">
<div class="desc">
<span class="title">
<van-text-ellipsis :content="item.materialTitle" />
</span>
<div class="tag">
<span v-for="(tagName, index) in item.tagName.split(',')" :key="index">{{ tagName
}}</span>
</div>
<div class="info">
<div class="user">
<img src="../../assets/image/avatar.png">
<span>{{ item.author }}</span>
</div>
<div class="collect">
<van-icon name="star-o" color="#9F9F9F" v-if="index < 5" />
<van-icon name="star" color="#F1C13E" v-else />
<span>收藏</span>
</div>
</div>
</div>
</div>
</div>
</van-list>
<van-empty description="暂无数据" v-else />
</van-pull-refresh>
</div>
<type-popup ref="typePopupRef" @confirm="confirmTypePopup" @close="typeActive = false"></type-popup>
<source-channel-popup ref="sourceChannelPopupRef" @confirm="confirmSourceChannelPopup"
@close="sourceChannelActive = false"></source-channel-popup>
<tags-popup ref="tagsPopupRef" @confirm="confirmTagsPopup" @close="tagsActive = false"></tags-popup>
</template>
<script setup>
import TypePopup from '../components/TypePopup/index.vue'
import SourceChannelPopup from '../components/SourceChannelPopup/index.vue'
import TagsPopup from '../components/TagsPopup/index.vue'
import { selectFinePictureList, selectCoarsePictureList } from '@/api/publish'
import dayjs from 'dayjs'
import { useInitScroll } from '@/hooks/useScroll'
useInitScroll()
const router = useRouter()
const tabsActive = ref(0)
const refreshing = ref(false)
const loading = ref(false)
const finished = ref(true)
const fileDomain = import.meta.env.VITE_APP_FILE_URL
const page = reactive({
pageNum: 0,
pageSize: 10
})
const catalog = reactive({
materialTitle: '',
collect: 1,
materialType: 3,
typeClassify: '',
sourceName: '',
organizeInt: [0],
tagId: '',
beginTime: '',
endTime: ''
})
const dataList = ref([])
const handleSelectFindList = async () => {
const res = await selectFinePictureList(page, catalog)
setDataList(res)
}
const handleSelectCoarseList = async () => {
const currentDate = new Date()
const sevenDaysAgo = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000)
catalog.beginTime = dayjs(sevenDaysAgo).format('YYYY-MM-DD HH:mm:ss')
catalog.endTime = dayjs(currentDate).format('YYYY-MM-DD HH:mm:ss')
const res = await selectCoarsePictureList(page, catalog)
setDataList(res)
}
const getList = () => {
page.pageNum++
loading.value = true
if (tabsActive.value == 0) {
handleSelectFindList()
} else {
handleSelectCoarseList()
}
}
getList()
const handleRefresh = () => {
window.scroll(0,0)
refreshing.value = true
page.pageNum = 0
getList()
}
const setDataList = (res) => {
if (refreshing.value) {
dataList.value = res.data.list
} else {
dataList.value.push(...res.data.list)
}
loading.value = false
finished.value = dataList.value.length >= res.data.total
refreshing.value = false
}
const typeActive = ref(false)
const typePopupRef = ref()
const openTypePopup = () => {
typeActive.value = true
typePopupRef.value.open()
}
const confirmTypePopup = (e) => {
page.pageNum = 0
catalog.typeClassify = e?.classifyType ?? ''
refreshing.value = true
getList()
}
const sourceChannelActive = ref(false)
const sourceChannelPopupRef = ref()
const openSourcePopup = () => {
sourceChannelActive.value = true
sourceChannelPopupRef.value.open()
}
const confirmSourceChannelPopup = (e) => {
page.pageNum = 0
catalog.sourceName = e?.sourceName ?? ''
refreshing.value = true
getList()
}
const tagsActive = ref(false)
const tagsPopupRef = ref()
const openCatalogPopup = () => {
tagsActive.value = true
tagsPopupRef.value.open()
}
const confirmTagsPopup = (e) => {
page.pageNum = 0
catalog.tagId = e?.id.toString() ?? ''
refreshing.value = true
getList()
}
</script>
<style lang="scss" scoped>
.header {
padding: 10px;
background-color: #ffffff;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.1);
.tools {
display: flex;
gap: 10px;
:deep(.van-search) {
flex: 1;
padding: 0;
.van-search__content {
height: 100%;
.van-search__field {
height: 100%;
}
}
}
.right {
width: 35px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
span {
font-size: 13px;
color: #0E7CE3;
}
}
}
.menu {
display: flex;
justify-content: space-between;
padding-top: 10px;
:deep(.van-tabs__nav) {
gap: 30px;
padding-bottom: 0;
.van-tab {
font-size: 15px;
padding: 0;
flex: initial;
}
.van-tabs__line {
bottom: 5px;
background: #0E7CE3;
}
}
.filtrate {
display: flex;
align-items: center;
height: 44px;
gap: 10px;
.item {
display: flex;
gap: 2px;
align-items: center;
justify-content: center;
font-size: 14px;
background-color: #e7e8e9;
width: 60px;
height: 24px;
border-radius: 4px;
}
}
}
}
.header-placeholder {
height: 117px;
}
.content {
background-color: #f3f3f3;
padding: 10px 10px 0 10px;
min-height: 100vh;
.list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.item {
break-inside: avoid;
background-color: #ffffff;
border-radius: 5px;
margin-bottom: 10px;
width: 49%;
img {
width: 100%;
height: 150px;
object-fit: cover;
}
.desc {
padding: 5px 10px;
display: flex;
flex-direction: column;
gap: 5px;
.title {
font-size: 16px;
}
.tag {
display: flex;
flex-wrap: wrap;
gap: 3px;
span {
font-size: 14px;
padding: 0 5px;
background-color: #F3F8FF;
color: #4C70AC;
font-size: 12PX;
border-radius: 3px;
}
}
.info {
display: flex;
justify-content: space-between;
padding: 5px 0;
.user {
display: flex;
gap: 7px;
align-items: center;
img {
width: 23px;
height: 23px;
border-radius: 50%;
}
span {
color: #9F9F9F;
font-size: 12px;
}
}
}
.collect {
display: flex;
align-items: center;
gap: 3px;
span {
color: #9F9F9F;
font-size: 12px;
}
}
}
}
}
}
.active {
background-color: #0e7ce3 !important;
color: #ffffff !important;
}
</style>@/utils/useScroll@/hooks/useScroll
\ No newline at end of file
<template>
<router-view v-slot="{ Component, route }">
<keep-alive>
<component :is="Component" :key="route.meta.usePathKey ? route.path : undefined" />
</keep-alive>
</router-view>
<van-tabbar v-model="active" :placeholder="true" active-color="#0E7CE3" route>
<van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
<van-tabbar-item icon="apps-o" to="/prefecture">专区</van-tabbar-item>
<van-tabbar-item icon="send-gift-o" to="/subject">专题</van-tabbar-item>
<van-tabbar-item icon="user-o" to="/mine">我的</van-tabbar-item>
</van-tabbar>
</template>
<script setup>
import { ref } from 'vue'
const active = ref('/home')
</script>
<style scoped></style>
\ No newline at end of file
import { createRouter, createWebHistory } from 'vue-router'
// import useUserStore from '@/stores/user'
// import useCoreStore from '@/stores/core'
import Index from '../pages/index'
import HomeIndex from '../pages/home/index'
// import HomeContent from '../views/home/content'
// import PublishIndex from '../views/publish/index'
// import PublishResult from '../views/publish/result'
// import MineIndex from '../views/mine/index'
// import AccountLogin from '../views/account/login'
// import AccountUserinfo from '../views/account/userinfo'
// import SubjectIndex from '../views/subject/index'
// import SubjectList from '../views/subject/list'
// import PrefectureIndex from '../views/prefecture/index'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'index',
component: Index,
redirect: '/home',
meta: {
keepAlive: true
},
children: [{
path: '/home',
name: 'home',
component: HomeIndex
},
// {
// path: '/mine',
// name: 'mine',
// component: MineIndex,
// meta: {
// requireAuth: true
// }
// },
// {
// path: '/prefecture',
// name: 'prefecture',
// component: PrefectureIndex,
// meta: {
// requireAuth: true
// }
// },
// {
// path: '/subject',
// name: 'subject',
// component: SubjectIndex,
// meta: {
// requireAuth: true
// }
// }
]
},
// {
// path: '/home/content',
// name: 'home-content',
// component: HomeContent
// },
// {
// path: '/publish',
// name: 'publish',
// component: PublishIndex,
// meta: {
// requireAuth: true
// }
// },
// {
// path: '/publish/result',
// name: 'publish-result',
// component: PublishResult,
// meta: {
// requireAuth: true
// }
// },
// {
// path: '/account/login',
// name: 'account-login',
// component: AccountLogin
// },
// {
// path: '/account/userinfo',
// name: 'account-userinfo',
// component: AccountUserinfo,
// meta: {
// requireAuth: true
// }
// },
// {
// path: '/subject/list',
// name: 'subject-list',
// component: SubjectList,
// meta: {
// requireAuth: true,
// keepAlive: true
// }
// }
]
})
// router.beforeEach((to, from, next) => {
// const coreStore = useCoreStore()
// const userStore = useUserStore()
// if (to.meta.keepAlive) {
// coreStore.setCacheRouteNames(to.matched[0].name)
// }
// if (to.meta.requireAuth) {
// if (userStore.isLogin()) {
// next()
// } else {
// next({ name: 'account-login' })
// }
// } else {
// next()
// }
// })
export default router
import request from '@/services/request';
export function getList(params) {
return request.get('/api/queryList', params);
}
import * as foo from './foo';
const api = {
foo,
};
export default api;
type RequestConfig = UniApp.RequestOptions;
type IInterceptors = {
request?: {
onFulfilled?: (config: RequestConfig) => RequestConfig;
onRejected?: (error: any) => any;
};
response?: {
onFulfilled?: (result: UniApp.RequestSuccessCallbackResult) => any;
onRejected?: (error: any) => any;
};
};
class Request {
// 拦截器
private readonly interceptors?: IInterceptors;
constructor(config: { interceptors?: IInterceptors } = {}) {
this.interceptors = config.interceptors;
}
/**
* @description 统一结果处理
*/
private resultHandle(res: Promise<any>) {
return res.then((r) => [r, null]).catch((e) => [null, e]);
}
http(_config: RequestConfig): Promise<any> {
const requestOnFulfilled = this.interceptors?.request?.onFulfilled;
const requestOnRejected = this.interceptors?.request?.onRejected;
const responseOnFulfilled = this.interceptors?.response?.onFulfilled;
const responseOnRejected = this.interceptors?.response?.onRejected;
let config: RequestConfig = { ..._config, header: _config.header || {} };
if (requestOnFulfilled) {
try {
config = requestOnFulfilled(config);
} catch (e) {
requestOnRejected?.(e);
}
}
return new Promise((resolve, reject) => {
xma.request({
...config,
success: (result) => {
if (`${result.statusCode}`.startsWith('2')) {
resolve(responseOnFulfilled?.(result) || result);
} else {
reject(responseOnRejected?.(result) || result);
}
},
fail: (error) => {
reject(responseOnRejected?.(error) || error);
},
});
});
}
post(url: string, data: any = {}, config?: RequestConfig) {
return this.resultHandle(
this.http({
method: 'POST',
url,
data,
...config,
}),
);
}
get(url: string, data: any = {}, config?: RequestConfig) {
return this.resultHandle(
this.http({
method: 'GET',
url,
data,
...config,
}),
);
}
}
const request = new Request({
interceptors: {
request: {
onFulfilled(config) {
return config;
},
},
response: {
onFulfilled(result) {
return result.data;
},
onRejected(error) {
return error;
},
},
},
});
export default request;
export {}
declare module "vue" {
type Hooks = App.AppInstance & Page.PageInstance;
interface ComponentCustomOptions extends Hooks {}
}
\ No newline at end of file
import { defineStore } from 'pinia';
import { ref } from 'vue';
type ICountStore = {
count: number;
};
const initState: ICountStore = {
count: 0,
};
export const useCountStore = defineStore('user', () => {
const countInfo = ref<ICountStore>({ ...initState });
const addCount = (count: number = 1) => {
countInfo.value.count += count;
};
return {
countInfo,
addCount,
};
});
import { createPinia } from 'pinia';
const store = createPinia();
export default store;
// 模块统一导出
export * from './count';
/**
* 这里是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: #fff;
$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: 16;
/* 图片尺寸 */
$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: #555; // 二级标题颜色
$uni-font-size-subtitle: 18px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
\ No newline at end of file
import axios from 'axios'
import { showToast } from 'vant'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: import.meta.env.VITE_APP_BASE_API,
// 超时
timeout: 100000
})
// request拦截器
service.interceptors.request.use(config => {
if (config.headers['Content-Type'] == 'application/json;charset=utf-8') {
config.data.systemCode = import.meta.env.VITE_APP_SYSTEM_CODE
if (config.requireAuth) {
const user = JSON.parse(localStorage.getItem('user'))
config.data.token = user.token
}
}
return config
}, error => {
Promise.reject(error)
})
// 响应拦截器
service.interceptors.response.use(res => {
// 未设置状态码则默认成功状态
const code = res.data.code;
// 获取错误信息
const message = res.data.message
if (code !== 1 && code !== 200) {
showToast(message)
return Promise.reject(message)
} else {
return res.data
}
},
error => {
let { message, response } = error;
if (message == "Network Error") {
message = "后端接口连接异常";
}
else if (message.includes("timeout")) {
message = "系统接口请求超时";
}
else if (message.includes("Request failed with status code")) {
if (response.data.code == 401) {
errorHandlerBy401()
} else {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
}
showToast(message)
return Promise.reject(error)
}
)
export default service
{
"extends": "@vue/tsconfig/tsconfig.json",
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"noImplicitThis": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"sourceMap": true,
"noImplicitAny": false,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"outDir": "dist",
"lib": ["esnext", "dom"],
"types": ["@dcloudio/types", "wot-design-uni/global.d.ts"]
},
"vueCompilerOptions": {
"target": 3,
"nativeTags": ["block", "template", "component", "slot"]
},
"exclude": ["node_modules"],
"include": [
"src/**/*",
"src/**/*.ts",
"src/**/*.js",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.jsx",
"src/**/*.vue",
"src/**/*.json"
],
"files": ["src/**/*", "useScroll.js"]
}
import { defineConfig, loadEnv } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from '@vant/auto-import-resolver';
import legacy from '@vitejs/plugin-legacy';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
const { VITE_APP_ENV, VITE_APP_BASE_URL, VITE_APP_OUTDIR_FILENAME } = env
const fileName = VITE_APP_OUTDIR_FILENAME ?? 'dist'
return {
base: VITE_APP_BASE_URL,
plugins: [
uni(),
AutoImport({
imports: [
'vue',
'uni-app',
'vue-router',
{
'rexma-cli': ['xma'],
},
],
dts: 'src/declaration/auto-imports.d.ts',
resolvers: [VantResolver()],
}),
Components({
resolvers: [VantResolver()],
}),
process.env.UNI_PLATFORM === 'h5' &&
legacy({
targets: ['defaults', 'not IE 11'],
}),
].filter(Boolean),
server: {
host: '0.0.0.0',
proxy: {
'/dev-api': {
target: 'http://192.168.108.100:9758/jiaxiu-visit',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/dev-api/, ""),
bypass: (req, res, options) => res.setHeader("x-req-proxyUr1", options.target + req.url.replace('/dev-api', ''))
},
'/back/ty-visit/ty-visit': {
target: 'https://info.gyntv.com.cn',
changeOrigin: true,
bypass: (req, res, options) => res.setHeader("x-req-proxyUr1", options.target + req.url)
},
'/download': {
target: VITE_APP_ENV === 'production' ? 'https://info.gyntv.com.cn/' : 'http://192.168.98.43:88',
changeOrigin: true,
bypass: (req, res, options) => res.setHeader("x-req-proxyUr1", options.target + req.url)
}
}
},
build: {
outDir: fileName,
sourcemap: false,
minify: 'terser',
chunkSizeWarningLimit: 1500,
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
},
}
}
});
This source diff could not be displayed because it is too large. You can view the blob instead.
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