From 900ee24f6c9ff983b04b5704dac2bde92abb55d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Fri, 13 Jun 2025 20:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5UI=E5=AE=8C=E6=88=9080%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 12 + api/{login => }/login.js | 6 +- api/request.js | 16 +- api/{user => }/user.js | 0 pages/index/index.vue | 120 +++- pages/login/login.vue | 9 +- pages/login/ysxy.vue | 3 +- uni_modules/uv-count-to/changelog.md | 13 + .../components/uv-count-to/props.js | 60 ++ .../components/uv-count-to/uv-count-to.vue | 187 +++++ uni_modules/uv-count-to/package.json | 87 +++ uni_modules/uv-count-to/readme.md | 11 + .../dist/dev/app-plus/app-config-service.js | 2 +- unpackage/dist/dev/app-plus/app-service.js | 671 +++++++++++++----- .../dist/dev/app-plus/pages/index/index.css | 56 +- .../dist/dev/app-plus/pages/login/ysxy.css | 0 .../dev/app-plus/pages/web_view/web_view.css | 38 - 17 files changed, 1031 insertions(+), 260 deletions(-) create mode 100644 api/index.js rename api/{login => }/login.js (90%) rename api/{user => }/user.js (100%) create mode 100644 uni_modules/uv-count-to/changelog.md create mode 100644 uni_modules/uv-count-to/components/uv-count-to/props.js create mode 100644 uni_modules/uv-count-to/components/uv-count-to/uv-count-to.vue create mode 100644 uni_modules/uv-count-to/package.json create mode 100644 uni_modules/uv-count-to/readme.md create mode 100644 unpackage/dist/dev/app-plus/pages/login/ysxy.css delete mode 100644 unpackage/dist/dev/app-plus/pages/web_view/web_view.css diff --git a/api/index.js b/api/index.js new file mode 100644 index 00000000..5b9738f1 --- /dev/null +++ b/api/index.js @@ -0,0 +1,12 @@ +import request from '@/api/request' + + +// 获取首页统计数据方法 +export const getStatisticsData = (data) => { + return request({ + url: '/plappro/process/queryProcessList', + method: 'post', + data, + suppressErrors:true + }); +}; \ No newline at end of file diff --git a/api/login/login.js b/api/login.js similarity index 90% rename from api/login/login.js rename to api/login.js index 941f4ff5..bc20076c 100644 --- a/api/login/login.js +++ b/api/login.js @@ -1,5 +1,5 @@ import request from '@/api/request' -import common from "../../common/common"; +import common from "@/common/common"; const setToken = data => uni.setStorageSync('token', data) const setUserInfo = data => uni.setStorageSync('userInfo', data) @@ -14,11 +14,11 @@ export const useAccountLoginApp = (data) => request({ setToken(body) // deptId: "" // deptName: null - // loginName: "ADMIN" + // loginName: "ADMIN" // todo id // orgId: "00E200" // orgName: "金融科技部" // userId: "USER001" - // userName: "ADMIN" + // userName: "ADMIN" / todo name // userStatus: "01" const user_data = await queryCurrentUser() setUserInfo(user_data.body) diff --git a/api/request.js b/api/request.js index 3d36ff65..82f92dd1 100644 --- a/api/request.js +++ b/api/request.js @@ -21,6 +21,7 @@ export default function request({ data, meta, isStream, + suppressErrors }) { const base_url = get_base_url(url); @@ -43,17 +44,23 @@ export default function request({ if (isStream) { // 流式传输,直接返回 return resolve(response); } + // 0005 QQ0005 登录已过期 + // suppressErrors // 模拟拦截器功能 const res = response.data + if (res?.rtnCode === '0000'){ + return resolve(res) + } + //到这里全是异常情况 + if(suppressErrors){ // 静默的接口,报错也不处理,因为下面有公共处理 + return reject() + } if (!res) { common.msg("系统异常.") return reject() } - if (res.rtnCode === '0000'){ - return resolve(res) - } if (res.rtnCode === '0005' || res.rtnCode === 'QQ0005'){ common.hideLoading() common.show('未登录','现在去登录').then(() => { @@ -61,6 +68,9 @@ export default function request({ }) } return reject(res) + }, + fail() { + console.log('131231'); } }); }) diff --git a/api/user/user.js b/api/user.js similarity index 100% rename from api/user/user.js rename to api/user.js diff --git a/pages/index/index.vue b/pages/index/index.vue index e3acb307..9dfcfd53 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -25,7 +25,7 @@ + color="rgba(255,255,255,0.7)" :speed="40" direction="column"> @@ -37,16 +37,19 @@ - 累计学习时长 - 256h + 年度学习时长 + + h + 累计训练时长 - 224h + + h 累计考试次数 - 25 + @@ -120,7 +123,7 @@ - + @@ -153,7 +156,7 @@ - + @@ -190,7 +193,7 @@ - + @@ -200,7 +203,13 @@ onMounted, ref } from 'vue' - import common from '../../common/common' + import { + onShow + } from '@dcloudio/uni-app' + import common from '@/common/common' + import { + getStatisticsData + } from '@/api/index.js' // 静态样式配置 const customStyles = { @@ -226,6 +235,31 @@ date: '', num: '' }]) + const statistics_data = { + 'study': 0, // 学习 + 'train': 0, // 训练 + 'exam': 0, //考试 + 'start_tudy': 0, // 起始学习 + 'start_train': 0, // 起始训练 + 'start_exam': 0, //起始考试 + 'request_time': 0, //上次请求时间 + } + + // 获取首页统计数据方法 + const get_statistics_data = async () => { + if (!common.isLogin()) return + const time_now = Date.now() + // 暂时设置10分钟 + if (time_now - statistics_data['request_time'] > 600 * 1000) { + statistics_data['request_time'] = time_now + const data = await getStatisticsData() + + } + } + onShow(() => { + get_statistics_data() // 获取首页统计数据 + console.log('onShow'); + }) onMounted(() => { setTimeout(() => { @@ -249,24 +283,25 @@ diff --git a/uni_modules/uv-count-to/package.json b/uni_modules/uv-count-to/package.json new file mode 100644 index 00000000..1ed07dc7 --- /dev/null +++ b/uni_modules/uv-count-to/package.json @@ -0,0 +1,87 @@ +{ + "id": "uv-count-to", + "displayName": "uv-count-to 数字滚动 全面兼容小程序、nvue、vue2、vue3等多端", + "version": "1.0.4", + "description": "该数字滚动组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值,一种数字上升的视觉冲击效果。", + "keywords": [ + "countTo", + "uvui", + "uv-ui", + "数字滚动", + "数字变化" +], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "type": "component-vue", + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "插件不采集任何数据", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [ + "uv-ui-tools" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "Vue": { + "vue2": "y", + "vue3": "y" + }, + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "钉钉": "u", + "快手": "u", + "飞书": "u", + "京东": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uv-count-to/readme.md b/uni_modules/uv-count-to/readme.md new file mode 100644 index 00000000..5d5f9961 --- /dev/null +++ b/uni_modules/uv-count-to/readme.md @@ -0,0 +1,11 @@ +## CountTo 数字滚动 + +> **组件名:uv-count-to** + +该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。 + +### 查看文档 + +### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui) + +#### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:uv-ui官方QQ群 diff --git a/unpackage/dist/dev/app-plus/app-config-service.js b/unpackage/dist/dev/app-plus/app-config-service.js index ea86aa41..9ca0b384 100644 --- a/unpackage/dist/dev/app-plus/app-config-service.js +++ b/unpackage/dist/dev/app-plus/app-config-service.js @@ -2,7 +2,7 @@ ;(function(){ let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[]; const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","titleView":false,"bounce":"none","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"AI智能培训","style":"custom","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"tra-app","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.66","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"tabBar":{"position":"bottom","color":"#666666","selectedColor":"#0066FF","borderStyle":"white","blurEffect":"none","fontSize":"16px","iconWidth":"24px","spacing":"10px","height":"70px","list":[{"text":"首页","pagePath":"pages/index/index"},{"text":"学习","pagePath":"pages/study/index"},{"text":"场景","pagePath":"pages/scene/index"},{"text":"我的","pagePath":"pages/me/index"}],"borderColor":"#ffffff","midButton":{"iconPath":"/static/images/icon/fawn.png","width":"86px","height":"86px","iconWidth":"90px"},"selectedIndex":0,"shown":true},"locales":{},"darkmode":false,"themeConfig":{}}; - const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"isTabBar":true,"tabBarIndex":0,"titleNView":false,"navigationBar":{"titleText":"首页","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/study/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":1,"titleNView":false,"navigationBar":{"titleText":"学习","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/intelligent_answering/index","meta":{"titleNView":false,"navigationBar":{"titleText":"智能问答","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/scene/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":2,"titleNView":false,"navigationBar":{"titleText":"场景","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/me/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":3,"titleNView":false,"navigationBar":{"titleText":"我的","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/login/login","meta":{"titleNView":false,"navigationBar":{"titleText":"登录","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/other/web_view","meta":{"titleNView":false,"navigationBar":{"titleText":"","type":"default","style":"custom"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); + const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"isTabBar":true,"tabBarIndex":0,"titleNView":false,"navigationBar":{"titleText":"首页","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/study/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":1,"titleNView":false,"navigationBar":{"titleText":"学习","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/intelligent_answering/index","meta":{"titleNView":false,"navigationBar":{"titleText":"智能问答","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/scene/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":2,"titleNView":false,"navigationBar":{"titleText":"场景","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/me/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":3,"titleNView":false,"navigationBar":{"titleText":"我的","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/login/login","meta":{"titleNView":false,"navigationBar":{"titleText":"登录","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/other/web_view","meta":{"titleNView":false,"navigationBar":{"titleText":"","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/login/ysxy","meta":{"titleNView":false,"navigationBar":{"titleText":"","type":"default","style":"custom"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); __uniConfig.styles=[];//styles __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js index 95e997bb..d6ef9aea 100644 --- a/unpackage/dist/dev/app-plus/app-service.js +++ b/unpackage/dist/dev/app-plus/app-service.js @@ -31,7 +31,22 @@ if (uni.restoreGlobal) { } (function(vue) { "use strict"; - var _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B; + var _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D; + const ON_SHOW = "onShow"; + function formatAppLog(type, filename, ...args) { + if (uni.__log__) { + uni.__log__(type, filename, ...args); + } else { + console[type].apply(console, [...args, filename]); + } + } + function resolveEasycom(component, easycom) { + return typeof component === "string" ? easycom : component; + } + const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { + !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); + }; + const onShow = /* @__PURE__ */ createHook(ON_SHOW); const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { @@ -39,7 +54,7 @@ if (uni.restoreGlobal) { } return target; }; - const _sfc_main$l = { + const _sfc_main$n = { name: "nav-bar", props: { isEnabled: { @@ -65,7 +80,7 @@ if (uni.restoreGlobal) { }, methods: {} }; - function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { return $props.isEnabled ? (vue.openBlock(), vue.createElementBlock( "view", { @@ -80,17 +95,7 @@ if (uni.restoreGlobal) { /* STYLE */ )) : vue.createCommentVNode("v-if", true); } - const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-e9345f2e"], ["__file", "E:/jlyh/tra-app/components/nav-bar/nav-bar.vue"]]); - function formatAppLog(type, filename, ...args) { - if (uni.__log__) { - uni.__log__(type, filename, ...args); - } else { - console[type].apply(console, [...args, filename]); - } - } - function resolveEasycom(component, easycom) { - return typeof component === "string" ? easycom : component; - } + const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-e9345f2e"], ["__file", "E:/jlyh/tra-app/components/nav-bar/nav-bar.vue"]]); const mpMixin = {}; function email(value) { return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); @@ -1259,7 +1264,7 @@ if (uni.restoreGlobal) { "uvicon-twitte": "e607", "uvicon-twitter-circle-fill": "e6cf" }; - const props$b = { + const props$c = { props: { // 图标类名 name: { @@ -1349,10 +1354,10 @@ if (uni.restoreGlobal) { ...(_f = (_e = uni.$uv) == null ? void 0 : _e.props) == null ? void 0 : _f.icon } }; - const _sfc_main$k = { + const _sfc_main$m = { name: "uv-icon", emits: ["click"], - mixins: [mpMixin, mixin, props$b], + mixins: [mpMixin, mixin, props$c], data() { return { colorType: [ @@ -1410,7 +1415,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { @@ -1454,8 +1459,8 @@ if (uni.restoreGlobal) { /* CLASS */ ); } - const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]); - const props$a = { + const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]); + const props$b = { props: { value: { type: [String, Number], @@ -1630,9 +1635,9 @@ if (uni.restoreGlobal) { ...(_h = (_g = uni.$uv) == null ? void 0 : _g.props) == null ? void 0 : _h.input } }; - const _sfc_main$j = { + const _sfc_main$l = { name: "uv-input", - mixins: [mpMixin, mixin, props$a], + mixins: [mpMixin, mixin, props$b], data() { return { // 输入框的值 @@ -1771,7 +1776,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock( "view", @@ -1853,8 +1858,8 @@ if (uni.restoreGlobal) { /* CLASS, STYLE */ ); } - const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-651602aa"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-input/components/uv-input/uv-input.vue"]]); - const props$9 = { + const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-651602aa"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-input/components/uv-input/uv-input.vue"]]); + const props$a = { props: { // 显示的内容,字符串 text: { @@ -1915,9 +1920,9 @@ if (uni.restoreGlobal) { ...(_j = (_i = uni.$uv) == null ? void 0 : _i.props) == null ? void 0 : _j.columnNotice } }; - const _sfc_main$i = { + const _sfc_main$k = { emits: ["click", "close", "change"], - mixins: [mpMixin, mixin, props$9], + mixins: [mpMixin, mixin, props$a], watch: { text: { immediate: true, @@ -1969,7 +1974,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock("view", { class: "uv-notice", @@ -2041,8 +2046,8 @@ if (uni.restoreGlobal) { ])) : vue.createCommentVNode("v-if", true) ]); } - const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-243b8fd9"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue"]]); - const props$8 = { + const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-243b8fd9"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue"]]); + const props$9 = { props: { // 显示的内容,字符串 text: { @@ -2082,10 +2087,10 @@ if (uni.restoreGlobal) { ...(_l = (_k = uni.$uv) == null ? void 0 : _k.props) == null ? void 0 : _l.rowNotice } }; - const _sfc_main$h = { + const _sfc_main$j = { name: "uv-row-notice", emits: ["click", "close"], - mixins: [mpMixin, mixin, props$8], + mixins: [mpMixin, mixin, props$9], data() { return { animationDuration: "0", @@ -2188,7 +2193,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock("view", { class: "uv-notice", @@ -2267,8 +2272,8 @@ if (uni.restoreGlobal) { ])) : vue.createCommentVNode("v-if", true) ]); } - const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-8e15132c"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue"]]); - const props$7 = { + const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-8e15132c"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue"]]); + const props$8 = { props: { // 显示的内容,数组 text: { @@ -2344,10 +2349,10 @@ if (uni.restoreGlobal) { ...(_n = (_m = uni.$uv) == null ? void 0 : _m.props) == null ? void 0 : _n.noticeBar } }; - const _sfc_main$g = { + const _sfc_main$i = { name: "uv-notice-bar", emits: ["click", "close", "change"], - mixins: [mpMixin, mixin, props$7], + mixins: [mpMixin, mixin, props$8], data() { return { show: true @@ -2372,7 +2377,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_column_notice = resolveEasycom(vue.resolveDynamicComponent("uv-column-notice"), __easycom_0$2); const _component_uv_row_notice = resolveEasycom(vue.resolveDynamicComponent("uv-row-notice"), __easycom_1$1); return $data.show ? (vue.openBlock(), vue.createElementBlock( @@ -2419,7 +2424,231 @@ if (uni.restoreGlobal) { /* STYLE */ )) : vue.createCommentVNode("v-if", true); } - const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-ecf69ee0"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-notice-bar/uv-notice-bar.vue"]]); + const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-ecf69ee0"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-notice-bar/uv-notice-bar.vue"]]); + const props$7 = { + props: { + // 开始的数值,默认从0增长到某一个数 + startVal: { + type: [String, Number], + default: 0 + }, + // 要滚动的目标数值,必须 + endVal: { + type: [String, Number], + default: 0 + }, + // 滚动到目标数值的动画持续时间,单位为毫秒(ms) + duration: { + type: [String, Number], + default: 2e3 + }, + // 设置数值后是否自动开始滚动 + autoplay: { + type: Boolean, + default: true + }, + // 要显示的小数位数 + decimals: { + type: [String, Number], + default: 0 + }, + // 是否在即将到达目标数值的时候,使用缓慢滚动的效果 + useEasing: { + type: Boolean, + default: true + }, + // 十进制分割 + decimal: { + type: [String, Number], + default: "." + }, + // 字体颜色 + color: { + type: String, + default: "#606266" + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: 22 + }, + // 是否加粗字体 + bold: { + type: Boolean, + default: false + }, + // 千位分隔符,类似金额的分割(¥23,321.05中的",") + separator: { + type: String, + default: "" + }, + ...(_p = (_o = uni.$uv) == null ? void 0 : _o.props) == null ? void 0 : _p.countTo + } + }; + const _sfc_main$h = { + name: "uv-count-to", + data() { + return { + localStartVal: this.startVal, + displayValue: this.formatNumber(this.startVal), + printVal: null, + paused: false, + // 是否暂停 + localDuration: Number(this.duration), + startTime: null, + // 开始的时间 + timestamp: null, + // 时间戳 + remaining: null, + // 停留的时间 + rAF: null, + lastTime: 0 + // 上一次的时间 + }; + }, + mixins: [mpMixin, mixin, props$7], + computed: { + countDown() { + return this.startVal > this.endVal; + } + }, + watch: { + startVal() { + this.autoplay && this.start(); + }, + endVal() { + this.autoplay && this.start(); + } + }, + mounted() { + this.autoplay && this.start(); + }, + methods: { + easingFn(t, b, c, d) { + return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b; + }, + requestAnimationFrame(callback) { + const currTime = (/* @__PURE__ */ new Date()).getTime(); + const timeToCall = Math.max(0, 16 - (currTime - this.lastTime)); + const id = setTimeout(() => { + callback(currTime + timeToCall); + }, timeToCall); + this.lastTime = currTime + timeToCall; + return id; + }, + cancelAnimationFrame(id) { + clearTimeout(id); + }, + // 开始滚动数字 + start() { + this.localStartVal = this.startVal; + this.startTime = null; + this.localDuration = this.duration; + this.paused = false; + this.rAF = this.requestAnimationFrame(this.count); + }, + // 暂定状态,从暂停状态开始滚动;或者滚动状态下,暂停 + restart() { + if (this.paused) { + this.resume(); + this.paused = false; + } else { + this.stop(); + this.paused = true; + } + }, + // 暂停 + stop() { + this.cancelAnimationFrame(this.rAF); + this.paused = true; + }, + // 重新开始(暂停的情况下) + resume() { + if (!this.remaining) + return; + this.startTime = 0; + this.localDuration = this.remaining; + this.localStartVal = this.printVal; + this.requestAnimationFrame(this.count); + }, + // 重置 + reset() { + this.startTime = null; + this.cancelAnimationFrame(this.rAF); + this.displayValue = this.formatNumber(this.startVal); + }, + count(timestamp) { + if (!this.startTime) + this.startTime = timestamp; + this.timestamp = timestamp; + const progress = timestamp - this.startTime; + this.remaining = this.localDuration - progress; + if (this.useEasing) { + if (this.countDown) { + this.printVal = this.localStartVal - this.easingFn(progress, 0, this.localStartVal - this.endVal, this.localDuration); + } else { + this.printVal = this.easingFn(progress, this.localStartVal, this.endVal - this.localStartVal, this.localDuration); + } + } else { + if (this.countDown) { + this.printVal = this.localStartVal - (this.localStartVal - this.endVal) * (progress / this.localDuration); + } else { + this.printVal = this.localStartVal + (this.endVal - this.localStartVal) * (progress / this.localDuration); + } + } + if (this.countDown) { + this.printVal = this.printVal < this.endVal ? this.endVal : this.printVal; + } else { + this.printVal = this.printVal > this.endVal ? this.endVal : this.printVal; + } + this.displayValue = this.formatNumber(this.printVal) || 0; + if (progress < this.localDuration) { + this.rAF = this.requestAnimationFrame(this.count); + } else { + this.$emit("end"); + } + }, + // 判断是否数字 + isNumber(val) { + return !isNaN(parseFloat(val)); + }, + formatNumber(num) { + num = Number(num); + num = num.toFixed(Number(this.decimals)); + num += ""; + const x = num.split("."); + let x1 = x[0]; + const x2 = x.length > 1 ? `${this.decimal}${x[1]}` : ""; + const rgx = /(\d+)(\d{3})/; + if (this.separator && !this.isNumber(this.separator)) { + while (rgx.test(x1)) { + x1 = x1.replace(rgx, "$1" + this.separator + "$2"); + } + } + return x1 + x2; + }, + destroyed() { + this.cancelAnimationFrame(this.rAF); + } + } + }; + function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { + return vue.openBlock(), vue.createElementBlock( + "text", + { + class: "uv-count-num", + style: vue.normalizeStyle([{ + fontSize: _ctx.$uv.addUnit(_ctx.fontSize), + fontWeight: _ctx.bold ? "bold" : "normal", + color: _ctx.color + }, _ctx.$uv.addStyle(_ctx.customStyle)]) + }, + vue.toDisplayString($data.displayValue), + 5 + /* TEXT, STYLE */ + ); + } + const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-8f2e1838"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-count-to/components/uv-count-to/uv-count-to.vue"]]); const props$6 = { props: { // 是否展示骨架组件 @@ -2482,10 +2711,10 @@ if (uni.restoreGlobal) { type: String, default: "circle" }, - ...(_p = (_o = uni.$uv) == null ? void 0 : _o.props) == null ? void 0 : _p.skeleton + ...(_r = (_q = uni.$uv) == null ? void 0 : _q.props) == null ? void 0 : _r.skeleton } }; - const _sfc_main$f = { + const _sfc_main$g = { name: "uv-skeleton", mixins: [mpMixin, mixin, props$6], data() { @@ -2546,7 +2775,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uv-skeleton" }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock( "view", @@ -2627,7 +2856,7 @@ if (uni.restoreGlobal) { )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) ]); } - const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-0b5f3d7f"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.vue"]]); + const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-0b5f3d7f"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.vue"]]); const props$5 = { props: { color: { @@ -2659,10 +2888,10 @@ if (uni.restoreGlobal) { type: Boolean, default: false }, - ...(_r = (_q = uni.$uv) == null ? void 0 : _q.props) == null ? void 0 : _r.line + ...(_t = (_s = uni.$uv) == null ? void 0 : _s.props) == null ? void 0 : _t.line } }; - const _sfc_main$e = { + const _sfc_main$f = { name: "uv-line", mixins: [mpMixin, mixin, props$5], computed: { @@ -2687,7 +2916,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { @@ -2699,7 +2928,7 @@ if (uni.restoreGlobal) { /* STYLE */ ); } - const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-dcf8cb8f"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-line/components/uv-line/uv-line.vue"]]); + const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-dcf8cb8f"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-line/components/uv-line/uv-line.vue"]]); const props$4 = { props: { // 是否虚线 @@ -2742,10 +2971,10 @@ if (uni.restoreGlobal) { type: String, default: "#dcdfe6" }, - ...(_t = (_s = uni.$uv) == null ? void 0 : _s.props) == null ? void 0 : _t.divider + ...(_v = (_u = uni.$uv) == null ? void 0 : _u.props) == null ? void 0 : _v.divider } }; - const _sfc_main$d = { + const _sfc_main$e = { name: "uv-divider", mixins: [mpMixin, mixin, props$4], emits: ["click"], @@ -2784,7 +3013,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_line = resolveEasycom(vue.resolveDynamicComponent("uv-line"), __easycom_0$1); return vue.openBlock(), vue.createElementBlock( "view", @@ -2825,19 +3054,19 @@ if (uni.restoreGlobal) { /* STYLE */ ); } - const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-222d1a38"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-divider/components/uv-divider/uv-divider.vue"]]); - const _sfc_main$c = { + const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-222d1a38"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-divider/components/uv-divider/uv-divider.vue"]]); + const _sfc_main$d = { name: "tabbar-shadow", data() { return {}; } }; - function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", null, [ vue.createElementVNode("view", { class: "tabbar-shadow" }) ]); } - const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-d22390bb"], ["__file", "E:/jlyh/tra-app/components/tabbar-shadow/tabbar-shadow.vue"]]); + const __easycom_6 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-d22390bb"], ["__file", "E:/jlyh/tra-app/components/tabbar-shadow/tabbar-shadow.vue"]]); function msg(title, duration = 1e3) { uni.showToast({ title, @@ -2961,6 +3190,72 @@ if (uni.restoreGlobal) { switchTab, dateToTime }; + var define_import_meta_env_default = { VITE_APP_BASE_API_Url: "http://25.18.122.66:9786", VITE_CJS_IGNORE_WARNING: "true", VITE_ROOT_DIR: "E:/jlyh/tra-app", VITE_USER_NODE_ENV: "development", BASE_URL: "/", MODE: "development", DEV: true, PROD: false, SSR: false }; + const ENV = define_import_meta_env_default; + const get_base_url = (url2) => { + { + return ENV.VITE_APP_BASE_API_Url + "/traapp"; + } + }; + function request({ + url: url2, + method, + data, + meta, + isStream, + suppressErrors + }) { + const base_url = get_base_url(); + const header = { + "content-type": "application/x-www-form-urlencoded; charset=UTF-8" + }; + let token = getToken(); + if (token) { + header["summary"] = token; + } + return new Promise((resolve, reject) => { + uni.request({ + url: `${base_url}${url2}`, + data, + method, + header, + success: (response) => { + if (isStream) { + return resolve(response); + } + const res = response.data; + if ((res == null ? void 0 : res.rtnCode) === "0000") { + return resolve(res); + } + if (suppressErrors) { + return reject(); + } + if (!res) { + common.msg("系统异常."); + return reject(); + } + if (res.rtnCode === "0005" || res.rtnCode === "QQ0005") { + common.hideLoading(); + common.show("未登录", "现在去登录").then(() => { + common.navigateTo("/pages/login/login"); + }); + } + return reject(res); + }, + fail() { + formatAppLog("log", "at api/request.js:73", "131231"); + } + }); + }); + } + const getStatisticsData = (data) => { + return request({ + url: "/plappro/process/queryProcessList", + method: "post", + data, + suppressErrors: true + }); + }; const _imports_0$2 = "/static/images/index/bg.png"; const _imports_1$1 = "/static/images/index/logo_text.png"; const _imports_2$1 = "/static/images/index/message.png"; @@ -2978,7 +3273,7 @@ if (uni.restoreGlobal) { const _imports_14 = "/static/images/index/recommend.png"; const _imports_15 = "/static/images/index/new.png"; const placeholderStyle = "color:#76A3EB;font-size:26rpx"; - const _sfc_main$b = { + const _sfc_main$c = { __name: "index", setup(__props, { expose: __expose }) { __expose(); @@ -3004,6 +3299,35 @@ if (uni.restoreGlobal) { date: "", num: "" }]); + const statistics_data = { + "study": 0, + // 学习 + "train": 0, + // 训练 + "exam": 0, + //考试 + "start_tudy": 0, + // 起始学习 + "start_train": 0, + // 起始训练 + "start_exam": 0, + //起始考试 + "request_time": 0 + //上次请求时间 + }; + const get_statistics_data = async () => { + if (!common.isLogin()) + return; + const time_now = Date.now(); + if (time_now - statistics_data["request_time"] > 600 * 1e3) { + statistics_data["request_time"] = time_now; + await getStatisticsData(); + } + }; + onShow(() => { + get_statistics_data(); + formatAppLog("log", "at pages/index/index.vue:261", "onShow"); + }); vue.onMounted(() => { setTimeout(() => { hot_class_list.value = [ @@ -3022,20 +3346,25 @@ if (uni.restoreGlobal) { ]; }, 1e3); }); - const __returned__ = { customStyles, placeholderStyle, suffixIconStyle, notice_text, hot_class_list, onMounted: vue.onMounted, ref: vue.ref, get common() { + const __returned__ = { customStyles, placeholderStyle, suffixIconStyle, notice_text, hot_class_list, statistics_data, get_statistics_data, onMounted: vue.onMounted, ref: vue.ref, get onShow() { + return onShow; + }, get common() { return common; + }, get getStatisticsData() { + return getStatisticsData; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; - function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { const _component_nav_bar = resolveEasycom(vue.resolveDynamicComponent("nav-bar"), __easycom_0$5); const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_0$3); const _component_uv_notice_bar = resolveEasycom(vue.resolveDynamicComponent("uv-notice-bar"), __easycom_2$1); - const _component_uv_skeleton = resolveEasycom(vue.resolveDynamicComponent("uv-skeleton"), __easycom_3$1); - const _component_uv_divider = resolveEasycom(vue.resolveDynamicComponent("uv-divider"), __easycom_4); - const _component_tabbar_shadow = resolveEasycom(vue.resolveDynamicComponent("tabbar-shadow"), __easycom_5); + const _component_uv_count_to = resolveEasycom(vue.resolveDynamicComponent("uv-count-to"), __easycom_3$1); + const _component_uv_skeleton = resolveEasycom(vue.resolveDynamicComponent("uv-skeleton"), __easycom_4); + const _component_uv_divider = resolveEasycom(vue.resolveDynamicComponent("uv-divider"), __easycom_5); + const _component_tabbar_shadow = resolveEasycom(vue.resolveDynamicComponent("tabbar-shadow"), __easycom_6); return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [ vue.createVNode(_component_nav_bar), vue.createElementVNode("view", { class: "bg_div" }, [ @@ -3080,7 +3409,6 @@ if (uni.restoreGlobal) { text: $setup.notice_text, bgColor: null, color: "rgba(255,255,255,0.7)", - fontSize: "10px", speed: 40, direction: "column" }, null, 8, ["text"]), [ @@ -3099,16 +3427,37 @@ if (uni.restoreGlobal) { vue.createCommentVNode(" 学习时长 "), vue.createElementVNode("view", { class: "study_duration_div" }, [ vue.createElementVNode("view", { class: "item" }, [ - vue.createElementVNode("view", { class: "top" }, "累计学习时长"), - vue.createElementVNode("view", { class: "bottom" }, "256h") + vue.createElementVNode("view", { class: "top" }, "年度学习时长"), + vue.createElementVNode("view", { class: "bottom" }, [ + vue.createVNode(_component_uv_count_to, { + startVal: 0, + endVal: 256, + useEasing: true, + decimals: 0 + }), + vue.createTextVNode("h ") + ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "top" }, "累计训练时长"), - vue.createElementVNode("view", { class: "bottom" }, "224h") + vue.createElementVNode("view", { class: "bottom" }, [ + vue.createVNode(_component_uv_count_to, { + startVal: 0, + endVal: 224, + useEasing: true + }), + vue.createTextVNode("h") + ]) ]), vue.createElementVNode("view", { class: "item" }, [ vue.createElementVNode("view", { class: "top" }, "累计考试次数"), - vue.createElementVNode("view", { class: "bottom" }, "25") + vue.createElementVNode("view", { class: "bottom" }, [ + vue.createVNode(_component_uv_count_to, { + startVal: 0, + endVal: 25, + useEasing: true + }) + ]) ]) ]) ]), @@ -3404,26 +3753,39 @@ if (uni.restoreGlobal) { vue.createVNode(_component_tabbar_shadow) ]); } - const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/jlyh/tra-app/pages/index/index.vue"]]); + const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/jlyh/tra-app/pages/index/index.vue"]]); const _imports_0$1 = "/static/images/common/default_img.png"; - const _sfc_main$a = {}; - function _sfc_render$9(_ctx, _cache) { + const _sfc_main$b = {}; + function _sfc_render$a(_ctx, _cache) { return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [ vue.createElementVNode("view", { class: "empty_div" }, [ vue.createElementVNode("image", { class: "img", src: _imports_0$1 }), - vue.createElementVNode("view", { class: "text" }, " 页面建设中,敬请期待… ") + vue.createElementVNode("view", { class: "text" }, " 学习功能建设中,敬请期待… ") ]) ]); } - const PagesStudyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-ffedcc8e"], ["__file", "E:/jlyh/tra-app/pages/study/index.vue"]]); - const _sfc_main$9 = {}; - function _sfc_render$8(_ctx, _cache) { + const PagesStudyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-ffedcc8e"], ["__file", "E:/jlyh/tra-app/pages/study/index.vue"]]); + const _sfc_main$a = {}; + function _sfc_render$9(_ctx, _cache) { return vue.openBlock(), vue.createElementBlock("view", { class: "" }, " 智能问答页面,开发中,敬请期待... "); } - const PagesIntelligentAnsweringIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/jlyh/tra-app/pages/intelligent_answering/index.vue"]]); + const PagesIntelligentAnsweringIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/jlyh/tra-app/pages/intelligent_answering/index.vue"]]); + const _sfc_main$9 = {}; + function _sfc_render$8(_ctx, _cache) { + return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [ + vue.createElementVNode("view", { class: "empty_div" }, [ + vue.createElementVNode("image", { + class: "img", + src: _imports_0$1 + }), + vue.createElementVNode("view", { class: "text" }, " 场景功能建设中,敬请期待… ") + ]) + ]); + } + const PagesSceneIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-e48602d7"], ["__file", "E:/jlyh/tra-app/pages/scene/index.vue"]]); const _sfc_main$8 = {}; function _sfc_render$7(_ctx, _cache) { return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [ @@ -3436,20 +3798,7 @@ if (uni.restoreGlobal) { ]) ]); } - const PagesSceneIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-e48602d7"], ["__file", "E:/jlyh/tra-app/pages/scene/index.vue"]]); - const _sfc_main$7 = {}; - function _sfc_render$6(_ctx, _cache) { - return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [ - vue.createElementVNode("view", { class: "empty_div" }, [ - vue.createElementVNode("image", { - class: "img", - src: _imports_0$1 - }), - vue.createElementVNode("view", { class: "text" }, " 页面建设中,敬请期待… ") - ]) - ]); - } - const PagesMeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-c8e26b33"], ["__file", "E:/jlyh/tra-app/pages/me/index.vue"]]); + const PagesMeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-c8e26b33"], ["__file", "E:/jlyh/tra-app/pages/me/index.vue"]]); function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { const startRGB = hexToRgb(startColor, false); const startR = startRGB[0]; @@ -3598,10 +3947,10 @@ if (uni.restoreGlobal) { type: String, default: "" }, - ...(_v = (_u = uni.$uv) == null ? void 0 : _u.props) == null ? void 0 : _v.loadingIcon + ...(_x = (_w = uni.$uv) == null ? void 0 : _w.props) == null ? void 0 : _x.loadingIcon } }; - const _sfc_main$6 = { + const _sfc_main$7 = { name: "uv-loading-icon", mixins: [mpMixin, mixin, props$3], data() { @@ -3661,7 +4010,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { @@ -3724,7 +4073,7 @@ if (uni.restoreGlobal) { /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } - const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-29b619ea"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]); + const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-29b619ea"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]); const props$2 = { props: { // 是否细边框 @@ -3885,10 +4234,10 @@ if (uni.restoreGlobal) { type: [Object, String], default: "" }, - ...(_x = (_w = uni.$uv) == null ? void 0 : _w.props) == null ? void 0 : _x.button + ...(_z = (_y = uni.$uv) == null ? void 0 : _y.props) == null ? void 0 : _z.button } }; - const _sfc_main$5 = { + const _sfc_main$6 = { name: "uv-button", mixins: [mpMixin, mixin, props$2], emits: ["click"], @@ -4002,7 +4351,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_loading_icon = resolveEasycom(vue.resolveDynamicComponent("uv-loading-icon"), __easycom_0); const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock( @@ -4093,7 +4442,7 @@ if (uni.restoreGlobal) { /* STYLE */ ); } - const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-ae8e42c7"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-button/components/uv-button/uv-button.vue"]]); + const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-ae8e42c7"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-button/components/uv-button/uv-button.vue"]]); const props$1 = { props: { // checkbox的名称 @@ -4161,10 +4510,10 @@ if (uni.restoreGlobal) { type: [String, Boolean], default: "" }, - ...(_z = (_y = uni.$uv) == null ? void 0 : _y.props) == null ? void 0 : _z.checkbox + ...(_B = (_A = uni.$uv) == null ? void 0 : _A.props) == null ? void 0 : _B.checkbox } }; - const _sfc_main$4 = { + const _sfc_main$5 = { name: "uv-checkbox", mixins: [mpMixin, mixin, props$1], data() { @@ -4336,7 +4685,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock( "view", @@ -4391,7 +4740,7 @@ if (uni.restoreGlobal) { /* CLASS, STYLE */ ); } - const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-a311a468"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-checkbox/components/uv-checkbox/uv-checkbox.vue"]]); + const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-a311a468"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-checkbox/components/uv-checkbox/uv-checkbox.vue"]]); const props = { props: { // 绑定的值 @@ -4473,10 +4822,10 @@ if (uni.restoreGlobal) { type: Boolean, default: false }, - ...(_B = (_A = uni.$uv) == null ? void 0 : _A.props) == null ? void 0 : _B.checkboxGroup + ...(_D = (_C = uni.$uv) == null ? void 0 : _C.props) == null ? void 0 : _D.checkboxGroup } }; - const _sfc_main$3 = { + const _sfc_main$4 = { name: "uv-checkbox-group", mixins: [mpMixin, mixin, props], computed: { @@ -4539,7 +4888,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { @@ -4553,57 +4902,7 @@ if (uni.restoreGlobal) { /* CLASS, STYLE */ ); } - const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-0735f505"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-checkbox/components/uv-checkbox-group/uv-checkbox-group.vue"]]); - var define_import_meta_env_default = { VITE_APP_BASE_API_Url: "http://25.18.122.66:9786", VITE_CJS_IGNORE_WARNING: "true", VITE_ROOT_DIR: "E:/jlyh/tra-app", VITE_USER_NODE_ENV: "development", BASE_URL: "/", MODE: "development", DEV: true, PROD: false, SSR: false }; - const ENV = define_import_meta_env_default; - const get_base_url = (url2) => { - { - return ENV.VITE_APP_BASE_API_Url + "/traapp"; - } - }; - function request({ - url: url2, - method, - data, - meta, - isStream - }) { - const base_url = get_base_url(); - const header = { - "content-type": "application/x-www-form-urlencoded; charset=UTF-8" - }; - let token = getToken(); - if (token) { - header["summary"] = token; - } - return new Promise((resolve, reject) => { - uni.request({ - url: `${base_url}${url2}`, - data, - method, - header, - success: (response) => { - if (isStream) { - return resolve(response); - } - const res = response.data; - if (!res) { - common.msg("系统异常."); - return reject(); - } - if (res.rtnCode === "0000") { - return resolve(res); - } - if (res.rtnCode === "0005" || res.rtnCode === "QQ0005") { - common.show("未登录", "现在去登录").then(() => { - common.navigateTo("/pages/login/login"); - }); - } - return reject(res); - } - }); - }); - } + const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-0735f505"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-checkbox/components/uv-checkbox-group/uv-checkbox-group.vue"]]); const setToken = (data) => uni.setStorageSync("token", data); const setUserInfo = (data) => uni.setStorageSync("userInfo", data); const useAccountLoginApp = (data) => request({ @@ -4624,6 +4923,11 @@ if (uni.restoreGlobal) { method: "post", data }); + const getYsxy = (data) => request({ + url: "/dfAgtInfo/queryValidDfAgt", + method: "post", + data + }); var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; @@ -6714,15 +7018,15 @@ if (uni.restoreGlobal) { } })(commonjsGlobal, function(CryptoJS2) { /** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. + (c) 2012 by Cédric Mesnil. All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ (function(Math2) { var C = CryptoJS2; var C_lib = C.lib; @@ -9840,7 +10144,7 @@ if (uni.restoreGlobal) { }); return encrypted.ciphertext.toString(CryptoJS.enc.Base64); } - const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({ + const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({ __name: "login", setup(__props, { expose: __expose }) { __expose(); @@ -9874,17 +10178,14 @@ if (uni.restoreGlobal) { if (res.rtnCode === "0002") { common.msg("账号或密码错误,如忘记密码,请去统一身份认证平台修改。"); } else if (res.rtnCode !== "0005") { - common.msg("其他错误"); + common.msg("登录出错,请稍后再试"); } }); } catch (e) { common.hideLoading(); } }; - const aaa = () => { - formatAppLog("log", "at pages/login/login.vue:117", "111"); - }; - const __returned__ = { show_password, account, password, read_text_state, login_button_status, login_fun, aaa, get common() { + const __returned__ = { show_password, account, password, read_text_state, login_button_status, login_fun, get common() { return common; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); @@ -9897,7 +10198,7 @@ if (uni.restoreGlobal) { const _imports_3 = "/static/images/login/clap.png"; const _imports_4 = "/static/images/login/show.png"; const _imports_5 = "/static/images/login/no_show.png"; - function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_0$3); const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_1); const _component_uv_checkbox = resolveEasycom(vue.resolveDynamicComponent("uv-checkbox"), __easycom_2); @@ -10003,7 +10304,7 @@ if (uni.restoreGlobal) { vue.createTextVNode(" 已阅读并同意 "), vue.createElementVNode("span", { class: "ysxy_term", - onClick: _cache[4] || (_cache[4] = ($event) => $setup.common.navigateTo("/pages/web_view/web_view?url=http://www.baidu.com")) + onClick: _cache[4] || (_cache[4] = ($event) => $setup.common.navigateTo("/pages/login/ysxy")) }, "《服务条款》"), vue.createTextVNode(" 与 "), vue.createElementVNode("span", { class: "ysxy_term" }, "《隐私权政策》") @@ -10012,8 +10313,8 @@ if (uni.restoreGlobal) { ]) ]); } - const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/jlyh/tra-app/pages/login/login.vue"]]); - const _sfc_main$1 = { + const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/jlyh/tra-app/pages/login/login.vue"]]); + const _sfc_main$2 = { data() { return { this_url: "" @@ -10031,7 +10332,7 @@ if (uni.restoreGlobal) { }, methods: {} }; - function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "bg" }, [ vue.createElementVNode("web-view", { src: $data.this_url, @@ -10039,7 +10340,34 @@ if (uni.restoreGlobal) { }, null, 8, ["src"]) ]); } - const PagesOtherWebView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/jlyh/tra-app/pages/other/web_view.vue"]]); + const PagesOtherWebView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/jlyh/tra-app/pages/other/web_view.vue"]]); + const _sfc_main$1 = { + __name: "ysxy", + setup(__props, { expose: __expose }) { + __expose(); + const ysxi_text = vue.ref(""); + vue.onMounted(() => { + common.loading(); + getYsxy().then((res) => { + ysxi_text.value = res.body.agtContt; + common.hideLoading(); + }); + }); + const __returned__ = { ysxi_text, ref: vue.ref, onMounted: vue.onMounted, get common() { + return common; + }, get getYsxy() { + return getYsxy; + } }; + Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); + return __returned__; + } + }; + function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [ + vue.createElementVNode("view", { innerHTML: $setup.ysxi_text }, null, 8, ["innerHTML"]) + ]); + } + const PagesLoginYsxy = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/jlyh/tra-app/pages/login/ysxy.vue"]]); __definePage("pages/index/index", PagesIndexIndex); __definePage("pages/study/index", PagesStudyIndex); __definePage("pages/intelligent_answering/index", PagesIntelligentAnsweringIndex); @@ -10047,6 +10375,7 @@ if (uni.restoreGlobal) { __definePage("pages/me/index", PagesMeIndex); __definePage("pages/login/login", PagesLoginLogin); __definePage("pages/other/web_view", PagesOtherWebView); + __definePage("pages/login/ysxy", PagesLoginYsxy); const _sfc_main = { onLaunch: function() { }, diff --git a/unpackage/dist/dev/app-plus/pages/index/index.css b/unpackage/dist/dev/app-plus/pages/index/index.css index e0259d87..dcc88aef 100644 --- a/unpackage/dist/dev/app-plus/pages/index/index.css +++ b/unpackage/dist/dev/app-plus/pages/index/index.css @@ -460,6 +460,44 @@ uni-view[data-v-ecf69ee0], uni-scroll-view[data-v-ecf69ee0], uni-swiper-item[dat /* 垂直间距 */ /* 透明度 */ /* 文章场景相关 */ +uni-view[data-v-8f2e1838], uni-scroll-view[data-v-8f2e1838], uni-swiper-item[data-v-8f2e1838] { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.uv-count-num[data-v-8f2e1838] { + display: inline-flex; + text-align: center; +} +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ uni-view[data-v-0b5f3d7f], uni-scroll-view[data-v-0b5f3d7f], uni-swiper-item[data-v-0b5f3d7f] { display: flex; flex-direction: column; @@ -800,12 +838,14 @@ uni-view[data-v-222d1a38], uni-scroll-view[data-v-222d1a38], uni-swiper-item[dat display: flex; align-items: center; } -.bg_div .notice_div[data-v-1cf27b2a] .u-notice-bar { - padding: 0.4375rem 0; - font-size: 0.6875rem; +.bg_div .notice_div[data-v-1cf27b2a] .uv-notice-bar { + padding: 9px 2px; } -.bg_div .notice_div[data-v-1cf27b2a] .u-notice__left-icon { - margin-right: 0.15625rem; +.bg_div .notice_div[data-v-1cf27b2a] .uv-notice__swiper__item__text { + font-size: 0.625rem !important; +} +.bg_div .notice_div[data-v-1cf27b2a] .uv-notice__left-icon .uv-icon__icon { + font-size: 0.75rem !important; } .bg_div .study_duration_and_profile_div[data-v-1cf27b2a] { margin: 0 1.5625rem; @@ -830,6 +870,7 @@ uni-view[data-v-222d1a38], uni-scroll-view[data-v-222d1a38], uni-swiper-item[dat z-index: 20; } .bg_div .study_duration_and_profile_div .study_duration_div .item[data-v-1cf27b2a] { + flex: 1; display: flex; flex-direction: column; justify-content: center; @@ -853,6 +894,11 @@ uni-view[data-v-222d1a38], uni-scroll-view[data-v-222d1a38], uni-swiper-item[dat font-style: normal; text-align: center; } +.bg_div .study_duration_and_profile_div .study_duration_div .item .bottom[data-v-1cf27b2a] .uv-count-num { + font-weight: bold !important; + font-size: 1.5625rem !important; + color: #000000 !important; +} .bg_div .navigation_div[data-v-1cf27b2a] { margin: 0.5rem 1.5625rem 0 1.5625rem; height: 10.5625rem; diff --git a/unpackage/dist/dev/app-plus/pages/login/ysxy.css b/unpackage/dist/dev/app-plus/pages/login/ysxy.css new file mode 100644 index 00000000..e69de29b diff --git a/unpackage/dist/dev/app-plus/pages/web_view/web_view.css b/unpackage/dist/dev/app-plus/pages/web_view/web_view.css deleted file mode 100644 index 4e731ee3..00000000 --- a/unpackage/dist/dev/app-plus/pages/web_view/web_view.css +++ /dev/null @@ -1,38 +0,0 @@ - -.bg { - display: flex; - flex-direction: column; -} -.titletopbg { - width: 100%; - background: #F8F8F8; - height: 1.5625rem; -} -.titlebg { - width: 100%; - height: 3.125rem; - background: #F8F8F8; - display: flex; - flex-direction: row; - align-items: center; - position: relative; -} -.arrowleft { - width: 1.40625rem; - height: 1.40625rem; - position: absolute; - left: 0.625rem; -} -.txt { - width: 100%; - height: 100%; - color: #000000; - font-weight: 600; - font-size: 1.1875rem; - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; -} -.webbg { -}