Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
yanghang
2025-07-24 09:16:34 +08:00
89 changed files with 1357 additions and 258 deletions
+2 -1
View File
@@ -17,4 +17,5 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址
VITE_APP_BASE_H5_API_Url = 'http://aitstest.jlbank.com.cn:7001'
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
+1 -1
View File
@@ -2,4 +2,4 @@
ENV = 'uat'
# base api
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7003'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7003'
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
;(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/course/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/courseDetail/index","meta":{"titleNView":false,"navigationBar":{"titleText":"课程详情","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/courseDetail/submit","meta":{"titleNView":false,"navigationBar":{"titleText":"提交评价","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/setting/index","meta":{"titleNView":false,"navigationBar":{"titleText":"设置","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/welcome/index","meta":{"titleNView":false,"navigationBar":{"titleText":"欢迎","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/test/index","meta":{"titleNView":false,"navigationBar":{"titleText":"测试","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/study/index","meta":{"titleNView":false,"navigationBar":{"titleText":"学习","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/intelligentAnswering/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}},{"path":"pages/search/search","meta":{"titleNView":false,"navigationBar":{"titleText":"","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/course/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":1,"titleNView":false,"navigationBar":{"titleText":"课程中心","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/course/study","meta":{"titleNView":false,"navigationBar":{"titleText":"课程学习","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/index/dialog","meta":{"titleNView":false,"navigationBar":{"titleText":"AI问答","type":"default","style":"custom"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
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/course/index"},{"text":"场景","pagePath":"pages/scene/index"},{"text":"我的","pagePath":"pages/me/index"}],"borderColor":"#ffffff","midButton":{"iconPath":"/static/images/icon/fawn-1.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/courseDetail/index","meta":{"titleNView":false,"navigationBar":{"titleText":"课程详情","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/courseDetail/submit","meta":{"titleNView":false,"navigationBar":{"titleText":"提交评价","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/setting/index","meta":{"titleNView":false,"navigationBar":{"titleText":"设置","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/welcome/index","meta":{"titleNView":false,"navigationBar":{"titleText":"欢迎","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/test/index","meta":{"titleNView":false,"navigationBar":{"titleText":"测试","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/study/index","meta":{"titleNView":false,"navigationBar":{"titleText":"学习","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/intelligentAnswering/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}},{"path":"pages/search/search","meta":{"titleNView":false,"navigationBar":{"titleText":"","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/mascot/mascot_select_list","meta":{"titleNView":false,"navigationBar":{"titleText":"","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/course/index","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":1,"titleNView":false,"navigationBar":{"titleText":"课程中心","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/course/study","meta":{"titleNView":false,"navigationBar":{"titleText":"课程学习","type":"default","style":"custom"},"isNVue":false}},{"path":"pages/index/dialog","meta":{"titleNView":false,"navigationBar":{"titleText":"AI问答","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()})}});
File diff suppressed because one or more lines are too long
@@ -33,7 +33,7 @@
"splashscreen": {
"target": "id:1",
"autoclose": true,
"waiting": true,
"waiting": false,
"delay": 0
},
"popGesture": "close",
@@ -48,9 +48,9 @@
"splashscreen": {
"androidStyle": "default",
"android": {
"hdpi": "C:/Users/ty/Desktop/新建文件夹 (2)/启动页/启动页/mipmap-hdpi/splash.png",
"xhdpi": "C:/Users/ty/Desktop/新建文件夹 (2)/启动页/启动页/mipmap-xhdpi/splash.png",
"xxhdpi": "C:/Users/ty/Desktop/新建文件夹 (2)/启动页/启动页/mipmap-xxhdpi/splash.png"
"hdpi": "src/static/images/login/open.9.png",
"xhdpi": "src/static/images/login/open.9.png",
"xxhdpi": "src/static/images/login/open.9.png"
}
},
"google": {
@@ -140,7 +140,7 @@
],
"borderColor": "#ffffff",
"midButton": {
"iconPath": "/static/images/icon/fawn.png",
"iconPath": "/static/images/icon/fawn-1.png",
"width": "86px",
"height": "86px",
"iconWidth": "90px"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.uv-overlay[data-v-c913fd43]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7)}.overlay-box[data-v-de693c21]{position:relative;height:100%}.overlay-box .detail-img[data-v-de693c21]{position:absolute;left:50%;top:50%;width:100vw;max-height:100%;transform:translate(-50%,-50%)}.title_div[data-v-d0634458]{width:60vw;text-shadow:.3125rem 0 .9375rem #3c3c3c}.title_div .img[data-v-d0634458]{width:100%}.tip_div[data-v-d0634458]{text-shadow:0 0 .625rem #ceceea}.tip_div .tip_msg[data-v-d0634458]{font-family:PingFangSC;font-weight:400;font-size:.9375rem;color:#fff;line-height:1.25rem;text-align:center;font-style:normal}.mascot_div[data-v-d0634458]{width:100%;height:100%;display:flex;align-items:center;position:relative}.mascot_div .swiper[data-v-d0634458]{white-space:nowrap;height:120vw;flex:1}.mascot_div .swiper-item-div[data-v-d0634458]{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;height:120vw}.mascot_div .swiper-item-div .img[data-v-d0634458]{width:80vw;height:100%}.mascot_div .doct_icon[data-v-d0634458]{padding:0%;position:absolute;width:3.125rem;display:flex;align-items:center;flex-direction:column}.mascot_div .doct_icon .doct_icon_div[data-v-d0634458]{width:100%;display:flex;align-items:center;justify-content:center;padding:1.25rem 0}.mascot_div .doct_icon.left[data-v-d0634458]{top:40%;left:2%;z-index:10}.mascot_div .doct_icon.right[data-v-d0634458]{top:40%;right:2%}.mascot_div .doct_icon .img[data-v-d0634458]{width:40%}.button_div[data-v-d0634458]{margin-top:.625rem;width:80%;height:3.75rem;position:relative}.button_div .img[data-v-d0634458]{position:absolute;width:100%;height:100%}.bg_img[data-v-d0634458]{position:absolute;top:-2%;left:-1%;width:102%;height:104%;z-index:-1}.bg_img .img[data-v-d0634458]{width:100%;height:100%}.main_div[data-v-d0634458]{display:flex;flex-direction:column;position:relative;max-width:100vh;align-items:center;overflow:hidden}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
.nav-bar[data-v-e7a2d2df]{width:100%;height:var(--status-bar-height);position:fixed}.nav-bar-seat[data-v-e7a2d2df]{width:100%;height:var(--status-bar-height)}.nav-bar-div[data-v-e7a2d2df]{z-index:1900;width:100%;position:relative}uni-view[data-v-843a5998],uni-scroll-view[data-v-843a5998],uni-swiper-item[data-v-843a5998]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}@font-face{font-family:uvicon-iconfont;src:url(../../assets/uvicons.04d281cc.ttf) format("truetype")}.uv-icon[data-v-843a5998]{display:flex;align-items:center}.uv-icon--left[data-v-843a5998]{flex-direction:row-reverse;align-items:center}.uv-icon--right[data-v-843a5998]{flex-direction:row;align-items:center}.uv-icon--top[data-v-843a5998]{flex-direction:column-reverse;justify-content:center}.uv-icon--bottom[data-v-843a5998]{flex-direction:column;justify-content:center}.uv-icon__icon[data-v-843a5998]{font-family:uvicon-iconfont;position:relative;display:flex;flex-direction:row;align-items:center}.uv-icon__icon--primary[data-v-843a5998]{color:#06f}.uv-icon__icon--success[data-v-843a5998]{color:#5ac725}.uv-icon__icon--error[data-v-843a5998]{color:#f56c6c}.uv-icon__icon--warning[data-v-843a5998]{color:#f9ae3d}.uv-icon__icon--info[data-v-843a5998]{color:#909399}.uv-icon__img[data-v-843a5998]{height:auto;will-change:transform}.uv-icon__label[data-v-843a5998]{line-height:1}.uv-border[data-v-1b8a7a55]{border-width:.5px!important;border-color:#dadbde!important;border-style:solid}.uv-border-bottom[data-v-1b8a7a55]{border-bottom-width:.5px!important;border-color:#dadbde!important;border-bottom-style:solid}uni-view[data-v-1b8a7a55],uni-scroll-view[data-v-1b8a7a55],uni-swiper-item[data-v-1b8a7a55]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.uv-input[data-v-1b8a7a55]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex:1}.uv-input--radius[data-v-1b8a7a55],.uv-input--square[data-v-1b8a7a55]{border-radius:4px}.uv-input--no-radius[data-v-1b8a7a55]{border-radius:0}.uv-input--circle[data-v-1b8a7a55]{border-radius:100px}.uv-input__content[data-v-1b8a7a55]{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.uv-input__content__field-wrapper[data-v-1b8a7a55]{position:relative;display:flex;flex-direction:row;margin:0;flex:1}.uv-input__content__field-wrapper__field[data-v-1b8a7a55]{line-height:26px;text-align:left;color:#303133;height:24px;font-size:15px;flex:1}.uv-input__content__clear[data-v-1b8a7a55]{width:20px;height:20px;border-radius:100px;background-color:#c6c7cb;display:flex;flex-direction:row;align-items:center;justify-content:center;transform:scale(.82);margin-left:15px}.uv-input__content__subfix-icon[data-v-1b8a7a55]{margin-left:4px}.uv-input__content__prefix-icon[data-v-1b8a7a55]{margin-right:4px}.search_content[data-v-fe6f59dd]{background-color:#fff;min-height:12.5rem;margin-top:-.1875rem;border-radius:.375rem .375rem 0 0;display:flex;flex-direction:column;align-items:center}.search_content .bg_img[data-v-fe6f59dd]{width:84%;margin:.625rem auto}.fixed_search_div[data-v-fe6f59dd]{padding:calc(.3125rem + var(--status-bar-height)) .46875rem .75rem .9375rem;background:linear-gradient(90deg,#f1f7ff,#d8edff,#c3e6ff);display:flex;align-items:center}.fixed_search_div .back_div[data-v-fe6f59dd]{margin-right:.3125rem}.fixed_search_div .back_div .back-icon[data-v-fe6f59dd]{position:relative;width:1.25rem;height:1.25rem;cursor:pointer}.fixed_search_div .back_div .back-icon[data-v-fe6f59dd]:before,.fixed_search_div .back_div .back-icon[data-v-fe6f59dd]:after{content:"";position:absolute;transition:all .3s ease}.fixed_search_div .back_div .back-icon[data-v-fe6f59dd]:after{top:25%;left:25%;width:40%;height:40%;border-top:.125rem solid #2B2C2E;border-left:.125rem solid #2B2C2E;transform:rotate(-45deg)}.main_div[data-v-fe6f59dd]{display:flex;flex-direction:column}
.nav-bar[data-v-e7a2d2df]{width:100%;height:var(--status-bar-height);position:fixed}.nav-bar-seat[data-v-e7a2d2df]{width:100%;height:var(--status-bar-height)}.nav-bar-div[data-v-e7a2d2df]{z-index:1900;width:100%;position:relative}uni-view[data-v-843a5998],uni-scroll-view[data-v-843a5998],uni-swiper-item[data-v-843a5998]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}@font-face{font-family:uvicon-iconfont;src:url(../../assets/uvicons.04d281cc.ttf) format("truetype")}.uv-icon[data-v-843a5998]{display:flex;align-items:center}.uv-icon--left[data-v-843a5998]{flex-direction:row-reverse;align-items:center}.uv-icon--right[data-v-843a5998]{flex-direction:row;align-items:center}.uv-icon--top[data-v-843a5998]{flex-direction:column-reverse;justify-content:center}.uv-icon--bottom[data-v-843a5998]{flex-direction:column;justify-content:center}.uv-icon__icon[data-v-843a5998]{font-family:uvicon-iconfont;position:relative;display:flex;flex-direction:row;align-items:center}.uv-icon__icon--primary[data-v-843a5998]{color:#06f}.uv-icon__icon--success[data-v-843a5998]{color:#5ac725}.uv-icon__icon--error[data-v-843a5998]{color:#f56c6c}.uv-icon__icon--warning[data-v-843a5998]{color:#f9ae3d}.uv-icon__icon--info[data-v-843a5998]{color:#909399}.uv-icon__img[data-v-843a5998]{height:auto;will-change:transform}.uv-icon__label[data-v-843a5998]{line-height:1}.uv-border[data-v-1b8a7a55]{border-width:.5px!important;border-color:#dadbde!important;border-style:solid}.uv-border-bottom[data-v-1b8a7a55]{border-bottom-width:.5px!important;border-color:#dadbde!important;border-bottom-style:solid}uni-view[data-v-1b8a7a55],uni-scroll-view[data-v-1b8a7a55],uni-swiper-item[data-v-1b8a7a55]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.uv-input[data-v-1b8a7a55]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex:1}.uv-input--radius[data-v-1b8a7a55],.uv-input--square[data-v-1b8a7a55]{border-radius:4px}.uv-input--no-radius[data-v-1b8a7a55]{border-radius:0}.uv-input--circle[data-v-1b8a7a55]{border-radius:100px}.uv-input__content[data-v-1b8a7a55]{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.uv-input__content__field-wrapper[data-v-1b8a7a55]{position:relative;display:flex;flex-direction:row;margin:0;flex:1}.uv-input__content__field-wrapper__field[data-v-1b8a7a55]{line-height:26px;text-align:left;color:#303133;height:24px;font-size:15px;flex:1}.uv-input__content__clear[data-v-1b8a7a55]{width:20px;height:20px;border-radius:100px;background-color:#c6c7cb;display:flex;flex-direction:row;align-items:center;justify-content:center;transform:scale(.82);margin-left:15px}.uv-input__content__subfix-icon[data-v-1b8a7a55]{margin-left:4px}.uv-input__content__prefix-icon[data-v-1b8a7a55]{margin-right:4px}.search_content[data-v-f066861c]{background-color:#fff;min-height:12.5rem;margin-top:-.1875rem;border-radius:.375rem .375rem 0 0;display:flex;flex-direction:column;align-items:center}.search_content .bg_img[data-v-f066861c]{width:84%;margin:.625rem auto}.fixed_search_div[data-v-f066861c]{padding:calc(.3125rem + var(--status-bar-height)) .46875rem .75rem .3125rem;background:linear-gradient(90deg,#f1f7ff,#d8edff,#c3e6ff);display:flex;align-items:center}.fixed_search_div .back_div[data-v-f066861c]{padding:.3125rem .3125rem .3125rem .625rem}.fixed_search_div .back_div .back-icon[data-v-f066861c]{position:relative;width:1.25rem;height:1.25rem;cursor:pointer}.fixed_search_div .back_div .back-icon[data-v-f066861c]:before,.fixed_search_div .back_div .back-icon[data-v-f066861c]:after{content:"";position:absolute;transition:all .3s ease}.fixed_search_div .back_div .back-icon[data-v-f066861c]:after{top:25%;left:25%;width:40%;height:40%;border-top:.125rem solid #2B2C2E;border-left:.125rem solid #2B2C2E;transform:rotate(-45deg)}.main_div[data-v-f066861c]{display:flex;flex-direction:column}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
.nav-bar[data-v-e7a2d2df]{width:100%;height:var(--status-bar-height);position:fixed}.nav-bar-seat[data-v-e7a2d2df]{width:100%;height:var(--status-bar-height)}.nav-bar-div[data-v-e7a2d2df]{z-index:1900;width:100%;position:relative}uni-view[data-v-843a5998],uni-scroll-view[data-v-843a5998],uni-swiper-item[data-v-843a5998]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}@font-face{font-family:uvicon-iconfont;src:url(../../assets/uvicons.04d281cc.ttf) format("truetype")}.uv-icon[data-v-843a5998]{display:flex;align-items:center}.uv-icon--left[data-v-843a5998]{flex-direction:row-reverse;align-items:center}.uv-icon--right[data-v-843a5998]{flex-direction:row;align-items:center}.uv-icon--top[data-v-843a5998]{flex-direction:column-reverse;justify-content:center}.uv-icon--bottom[data-v-843a5998]{flex-direction:column;justify-content:center}.uv-icon__icon[data-v-843a5998]{font-family:uvicon-iconfont;position:relative;display:flex;flex-direction:row;align-items:center}.uv-icon__icon--primary[data-v-843a5998]{color:#06f}.uv-icon__icon--success[data-v-843a5998]{color:#5ac725}.uv-icon__icon--error[data-v-843a5998]{color:#f56c6c}.uv-icon__icon--warning[data-v-843a5998]{color:#f9ae3d}.uv-icon__icon--info[data-v-843a5998]{color:#909399}.uv-icon__img[data-v-843a5998]{height:auto;will-change:transform}.uv-icon__label[data-v-843a5998]{line-height:1}.uv-line[data-v-37b2eb6f]{vertical-align:middle}uni-view[data-v-97e65963],uni-scroll-view[data-v-97e65963],uni-swiper-item[data-v-97e65963]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.uv-cell__body[data-v-97e65963]{display:flex;flex-direction:row;box-sizing:border-box;padding:10px 15px;font-size:15px;color:#303133}.uv-cell__body__content[data-v-97e65963]{display:flex;flex-direction:row;align-items:center;flex:1}.uv-cell__body--large[data-v-97e65963]{padding-top:13px;padding-bottom:13px}.uv-cell__left-icon-wrap[data-v-97e65963],.uv-cell__right-icon-wrap[data-v-97e65963]{display:flex;flex-direction:row;align-items:center;font-size:16px}.uv-cell__left-icon-wrap[data-v-97e65963]{margin-right:4px}.uv-cell__right-icon-wrap[data-v-97e65963]{margin-left:4px;transition:transform .3s}.uv-cell__right-icon-wrap--up[data-v-97e65963]{transform:rotate(-90deg)}.uv-cell__right-icon-wrap--down[data-v-97e65963]{transform:rotate(90deg)}.uv-cell__title[data-v-97e65963]{flex:1}.uv-cell__title-text[data-v-97e65963]{font-size:15px;line-height:22px;color:#303133}.uv-cell__title-text--large[data-v-97e65963]{font-size:16px}.uv-cell__label[data-v-97e65963]{margin-top:5px;font-size:12px;color:#909193;line-height:18px}.uv-cell__label--large[data-v-97e65963]{font-size:14px}.uv-cell__value[data-v-97e65963]{text-align:right;font-size:14px;line-height:24px;color:#606266}.uv-cell__value--large[data-v-97e65963]{font-size:15px}.uv-cell--clickable[data-v-97e65963]{background-color:#f3f4f6}.uv-cell--disabled[data-v-97e65963]{color:#c8c9cc;cursor:not-allowed}.uv-cell--center[data-v-97e65963]{align-items:center}uni-view[data-v-c010df49],uni-scroll-view[data-v-c010df49],uni-swiper-item[data-v-c010df49]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.uv-cell-group[data-v-c010df49]{flex:1}.uv-cell-group__title[data-v-c010df49]{padding:16px 16px 8px}.uv-cell-group__title__text[data-v-c010df49]{font-size:15px;line-height:16px;color:#303133}.uv-cell-group__wrapper[data-v-c010df49]{position:relative}.detail-body[data-v-ff7eaa8f]{margin:.9375rem 1.5625rem 0;background:#fff;border-radius:.46875rem;z-index:101;overflow:hidden}.detail-body[data-v-ff7eaa8f] .uv-line{width:calc(100% - 1.5rem)!important;margin:0 .75rem!important}.detail-body[data-v-ff7eaa8f] .uv-cell__body{padding:12px 15px}.detail-body[data-v-ff7eaa8f] .uv-cell__title{flex:none!important}.detail-main[data-v-ff7eaa8f]{background-color:#f6f8ff}.title[data-v-ff7eaa8f]{color:#000;font-size:1.0625rem;height:1.0625rem;font-weight:600;line-height:1.0625rem}.fixed_search_div[data-v-ff7eaa8f]{padding:calc(.3125rem + var(--status-bar-height)) .46875rem .75rem .9375rem;display:flex;align-items:center;background-color:#f6f7f8}.fixed_search_div .back_div[data-v-ff7eaa8f]{margin-right:.3125rem}.fixed_search_div .back_div .back-icon[data-v-ff7eaa8f]{position:relative;width:1.25rem;height:1.25rem;cursor:pointer;display:flex;align-items:center}.fixed_search_div .back_div .back-icon[data-v-ff7eaa8f]:before,.fixed_search_div .back_div .back-icon[data-v-ff7eaa8f]:after{content:"";position:absolute;transition:all .3s ease}.fixed_search_div .back_div .back-icon[data-v-ff7eaa8f]:after{top:25%;left:25%;width:40%;height:40%;border-top:.125rem solid #2b2c2e;border-left:.125rem solid #2b2c2e;transform:rotate(-45deg)}
.container{padding:20px;display:flex;flex-direction:column;align-items:center}.download-btn{padding:10px 20px;background-color:#007aff;color:#fff;border-radius:5px;margin-bottom:20px}.image-container{width:100%;height:300px;background-color:#f5f5f5;border-radius:5px;margin-bottom:20px;display:flex;justify-content:center;align-items:center}.preview-image{max-width:100%;max-height:100%}.status-text{color:#666;font-size:14px}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="@drawable/launch_screen" />
</LinearLayout>
@@ -6,4 +6,7 @@
<item name="android:windowBackground">@color/ime_background</item>
<item name="android:forceDarkAllowed">false</item>
</style>
<!-- <style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">-->
<!-- <item name="android:windowBackground">@drawable/open</item>-->
<!-- </style>-->
</resources>
+10 -1
View File
@@ -12,7 +12,7 @@ export const getCourseDetailApi = (data) => {
};
// AITS-A-4007--APP课程评价列表数据查询
// AITS-A-4007--APP课程评价列表数据查询20250723预计废弃)
export const qryTraCrsBbsDataByCrsNum = (data) => {
return request({
url: module_url + '/traCrsBbsInfo/qryTraCrsBbsDataByCrsNum',
@@ -21,6 +21,15 @@ export const qryTraCrsBbsDataByCrsNum = (data) => {
});
};
//王洋新写
export const queryTraCrsBbsInfoByCrsId = (data) => {
return request({
url: module_url + '/traCrsBbsInfo/queryTraCrsBbsInfoByCrsId',
method: 'post',
data
});
};
// AITS-A-4008--APP课程评价下回复评论时刷新二级评论列表数据接口
export const qryChildTraCrsBbsInfo = (data) => {
return request({
+101 -41
View File
@@ -119,51 +119,111 @@ export const queryCurrentUser = (data) => request({
const base_url = get_base_url()
// 预加载头像
// #ifdef APP-PLUS
// 更新用户信息中的头像路径
const updateUserAvatar = (imagePath) => {
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
'imagePath': imagePath
})
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
'imagePath': imagePath
})
}
try {
const pathName = res.body.imageAddr
const url = base_url + pathName
// 生成唯一文件名,避免冲突
const filename = pathName.split('/').pop()
const localFilePath = '_downloads/' + filename
console.log('localFilePath', localFilePath, url);
// 先检查是否存在
uni.getFileInfo({
filePath: localFilePath,
success: () => {
console.log('头像已存在,无需下载');
updateUserAvatar(localFilePath)
},
fail: () => {
console.log('开始下载头像:', url);
const dtask = plus.downloader.createDownload(
url, {
method: 'GET',
filename: '_downloads/' + filename
},
(download, status) => {
if (status === 200) {
console.log('头像下载成功:', download.filename);
updateUserAvatar(download.filename)
}
}
)
dtask.start();
}
})
} catch (error) {
console.error('头像预加载过程发生错误:', error);
// 确保目录存在
const ensureDirectoryExists = (dirPath) => {
return new Promise((resolve) => {
plus.io.requestFileSystem(plus.io.PRIVATE_DOC, (fs) => {
fs.root.getDirectory(dirPath, { create: true }, resolve, resolve)
})
})
}
// 生成唯一文件名
const generateUniqueFilename = (pathName) => {
if (!pathName || typeof pathName !== 'string') {
throw new Error('无效的路径');
}
// 直接使用原始文件名(带扩展名)
const filename = pathName.split('/').pop();
if (!filename) {
throw new Error('无法从路径中提取文件名');
}
// 确保文件扩展名为.png (可选,根据实际需求)
const ext = filename.split('.').pop().toLowerCase();
if (ext === 'png' || ext === 'jpg' || ext === 'jpeg' || ext === 'webp') {
return filename;
}
// 如果没有有效扩展名,添加.png
return `${filename}.png`;
};
// 下载并保存头像
const downloadAndSaveAvatar = async (fileUrl, localFilePath) => {
try {
await ensureDirectoryExists('avatar')
return new Promise((resolve, reject) => {
console.log('开始下载头像:', fileUrl)
const dtask = plus.downloader.createDownload(fileUrl, {
filename: localFilePath
}, (d, status) => {
if (status === 200) {
console.log("保存路径:", d.filename)
resolve(d.filename)
} else {
console.error("文件下载失败:", status)
reject(new Error(`下载失败,状态码: ${status}`))
}
})
dtask.start()
})
} catch (error) {
console.error('创建目录失败:', error)
throw error
}
}
// 检查文件是否存在
const checkFileExists = (filePath) => {
return new Promise((resolve) => {
uni.getFileInfo({
filePath,
success: () => resolve(true),
fail: () => resolve(false)
})
})
}
// 主逻辑
(async () => {
try {
const pathName = res.body.imageAddr
const fileUrl = base_url + pathName
// 生成保存路径
const filename = generateUniqueFilename(pathName)
const localFilePath = '_doc/avatar/' + filename
// 检查文件是否存在
const exists = await checkFileExists(localFilePath)
if (exists) {
console.log('头像已存在,无需下载')
updateUserAvatar(localFilePath)
} else {
const savedPath = await downloadAndSaveAvatar(fileUrl, localFilePath)
updateUserAvatar(savedPath)
}
} catch (error) {
console.error('头像预加载过程发生错误:', error)
}
})()
// #endif
return res.body
})
+41 -14
View File
@@ -42,6 +42,17 @@ export const setTraMascotInfo = (data) => {
};
// 查询当前已经选择的吉祥物
// 检查文件是否存在
const checkFileExists = (filePath) => {
return new Promise((resolve) => {
uni.getFileInfo({
filePath,
success: () => resolve(true),
fail: () => resolve(false)
})
})
}
/**
* 查询当前已经选择的吉祥物
* 出参:
@@ -64,21 +75,37 @@ export const queryCurrentValidMascotInfo = (data) => {
body
}) => {
if (body.imgAddr) {
// setTimeout(() => {
// const base_url = get_base_url()
// const url = base_url + body.imgAddr
// const img = new Image(); // 创建Image对象
// img.onload = () => {
// console.log(`图片缓存成功: ${url}`);
// };
// // 图片加载失败
// img.onerror = () => {
// console.error(`图片缓存失败: ${url}`);
// };
// img.src = url; // 开始加载图片(设置src触发请求,浏览器会自动缓存)
// })
console.log('body.imgAddrmascotNo');
const base_url = get_base_url()
const pathName = body.imgAddr
const fileUrl = base_url + pathName
const localFilePath = '_doc/mascot/' + body.mascotNo + '.png'
console.log('fileUrl', fileUrl);
// 将 Promise 回调函数声明为 async
return new Promise(async (resolve, reject) => {
// 现在可以在这里使用 await 了
const exists = await checkFileExists(localFilePath)
if (exists) {
console.log('已存在,无需下载')
resolve({...body, imgAddr:localFilePath})
} else {
console.log('开始下载吉祥物:', fileUrl)
const dtask = plus.downloader.createDownload(fileUrl, {
filename: localFilePath
}, (d, status) => {
if (status === 200) {
console.log("保存路径:", d.filename)
resolve({...body, imgAddr:d.filename})
} else {
console.error("文件下载失败:", status)
reject(new Error(`下载失败,状态码: ${status}`))
}
})
dtask.start()
}
})
}
return body
})
};
+35 -15
View File
@@ -1,3 +1,4 @@
import showDialog from '@/common/dialogMessage'
function msg(title, duration = 1000) {
uni.showToast({
@@ -9,21 +10,40 @@ function msg(title, duration = 1000) {
}
function show(title, msg, showCancel = true, cancelText = '取消', confirmText = '确定') {
return new Promise((resolve, reject) => {
uni.showModal({
title: title,
content: msg,
showCancel: showCancel,
cancelText: cancelText,
confirmText: confirmText,
success: function(res) {
resolve(res.confirm)
},
fail: function(res) {
reject(res)
},
});
})
return new Promise((resolve, reject) => {
// 创建通用参数对象
const dialogOptions = {
title,
content: msg,
showCancel,
cancelText,
confirmText,
success: (res) => {
// 统一处理成功回调,解析为布尔值
console.log('res.confirm', res.confirm);
resolve(!!res.confirm);
}
};
if (getPhoneEnvBool('AND')) {
// 安卓环境使用showDialog,补充cancel回调
showDialog({
...dialogOptions,
cancel: () => {
console.log('用户点击取消');
resolve(false); // 取消时也返回Promise结果
}
});
} else {
// 其他环境使用uni.showModal,补充fail回调
uni.showModal({
...dialogOptions,
fail: (res) => {
reject(res);
}
});
}
});
}
const loading = (title = '加载中', mask = true) => uni.showLoading({
+4 -4
View File
@@ -12,7 +12,7 @@
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"waiting" : false,
"autoclose" : true,
"delay" : 0
},
@@ -52,9 +52,9 @@
"splashscreen" : {
"androidStyle" : "default",
"android" : {
"hdpi" : "C:/Users/ty/Desktop/新建文件夹 (2)/启动页/启动页/mipmap-hdpi/splash.png",
"xhdpi" : "C:/Users/ty/Desktop/新建文件夹 (2)/启动页/启动页/mipmap-xhdpi/splash.png",
"xxhdpi" : "C:/Users/ty/Desktop/新建文件夹 (2)/启动页/启动页/mipmap-xxhdpi/splash.png"
"hdpi" : "src/static/images/login/open.9.png",
"xhdpi" : "src/static/images/login/open.9.png",
"xxhdpi" : "src/static/images/login/open.9.png"
}
}
}
+2 -1
View File
@@ -341,7 +341,8 @@ const pgrphNum = ref(1)
const showOrder = ref(0)
const isLastPgrph = ref(false)
const backRouter = ()=>{
common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
// common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
common.navigateBack()
}
const answerOnlyVoice = computed(()=>{
+95 -36
View File
@@ -1,9 +1,5 @@
<template>
<view class="comment_div">
<view class="empty_message_div" v-if="message_list.length == 0">
<image class="img" src="@/static/images/courseDetail/empty_message.png"></image>
</view>
<!-- message_list -->
<view class="message_div" v-for="(item,index) in message_list">
<view class="head_div">
<image-preview v-if="item.userIconImgId" class="img-box img" :src="item.userIconImgId"></image-preview>
@@ -18,7 +14,8 @@
{{item.bbsContent}}
</view>
<view class="img_div pic-cell">
<image-preview v-for="img in item.imgIdList" :imgId="img" class="pic-item" mode="scaleToFill"></image-preview>
<image-preview v-for="img in item.imgIdList" @click="showPicture(item.imgIdList, img)" :src="img"
class="pic-item" mode="scaleToFill"></image-preview>
</view>
<view class="time_and_reply">
<view class="time">{{item.bbsTm.substr(0,16)}}</view>
@@ -42,7 +39,7 @@
<view class="message_div" v-for="childrenItem in item.children">
<view class="head_div">
<image-preview v-if="childrenItem.userIconImgId" class="img-box img"
:src="childrenItem.userIconImgId" ></image-preview>
:src="childrenItem.userIconImgId"></image-preview>
<image v-else src="/static/images/me/default_user_avatar.png" class="img"></image>
</view>
<view class="msg_content">
@@ -62,23 +59,20 @@
<view class="reply" @click="click_reply(childrenItem, childrenItem.parentId, index)">回复
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="send_evaluate_div">
<uv-button type="primary" class="send_evaluate"
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+props.crsNum+'&imgId='+props.imgId)">发布评价</uv-button>
<view class="empty_message_div" v-if="status=='nomore' && total == 0">
<image class="img" src="@/static/images/courseDetail/empty_message.png"></image>
</view>
<uni-popup ref="popup">
<view class="bottom_reply_input_div">
<uv-input v-model="reply_data.bbsContent" placeholderStyle='color:#999999;font-size:26rpx'
:placeholder="reply_data.placeholder" :focus="true" :maxlength="100">
<uv-load-more :status="status" loadmore-text="轻轻上拉加载"></uv-load-more>
<uni-popup ref="popup" class="popup">
<view class="bottom_reply_input_div" :style="{marginBottom:popup_input_bottom}">
<uv-input v-model="reply_data.bbsContent" :adjustPosition="false"
placeholderStyle='color:#999999;font-size:26rpx' :placeholder="reply_data.placeholder" :focus="true"
:maxlength="100">
</uv-input>
<view class="" style="display: flex;flex-direction: column; margin:10rpx 20rpx;">
<view class="fl1"></view>
@@ -87,28 +81,37 @@
<view class="fl1"></view>
</view>
</view>
</uni-popup>
</view>
</template>
<script setup>
import {
ref,
reactive,
onMounted
onMounted,
nextTick
} from 'vue'
import {
qryTraCrsBbsDataByCrsNum,
queryTraCrsBbsInfoByCrsId,
replyTraCrsBbsInfo,
qryChildTraCrsBbsInfo
} from '@/api/courseDetail.js';
import common from '@/common/common.js'
import {
get_base_url
} from '@/api/request.js'
const popup = ref(null)
const popup_input_bottom = ref('0px')
const inputValue = ref('')
const placeholder = ref('')
const message_list = reactive([])
const status = ref('') // loadmore - loading - nomore -
const limit = 15
const total = ref(-1)
const page = ref(0)
const reply_data_init = {
"index": null,
"parentBbsId": null,
@@ -121,20 +124,27 @@
})
const props = defineProps({
crsId: String,
crsNum: String,
imgId: String
})
const click_reply = ({
userName,
bbsId
}, parentBbsId, index) => {
popup.value.open('bottom')
reply_data.placeholder = '回复 ' + userName + ""
const click_reply = (item, parentBbsId, index) => {
popup.value.open('bottom');
reply_data.placeholder = '回复 ' + item.userName + ""
reply_data.parentBbsId = parentBbsId
reply_data.bbsId = bbsId
reply_data.bbsId = item.bbsId
reply_data.index = index
nextTick(() => {
uni.onKeyboardHeightChange(res => {
popup_input_bottom.value = `${res.height}px`;
console.log(res);
});
})
}
const reply_send = async () => {
if (reply_data.bbsContent === '') {
return common.msg('回复内容不能为空')
}
try {
popup.value.close()
common.loading('发送中...')
@@ -156,15 +166,52 @@
common.hideLoading()
}
}
const getData = () => {
qryTraCrsBbsDataByCrsNum({
crsNum: props.crsNum
}).then(({
body
}) => {
Object.assign(message_list, body)
if (status.value !== 'loadmore' && status.value !== '') return
status.value = 'loading'
page.value++
queryTraCrsBbsInfoByCrsId({
crsId: props.crsId,
page: page.value,
limit: limit
}).then(res => {
total.value = res.total
message_list.push(...res.body)
}).finally(() => {
if (message_list.length >= total.value) {
status.value = 'nomore'
} else {
status.value = 'loadmore'
}
})
}
//
const showPicture = (urls, item) => {
const base_url = get_base_url()
const current = urls.findIndex(res => item === res)
if (current === -1) {
return false
}
const urlsList = urls.map(res => base_url + res)
console.log(urlsList, current);
uni.previewImage({
current: current || 0,
urls: urlsList,
longPressActions: {
// itemList: ['', '', ''],
itemList: ['保存图片'],
success: function(data) {
uni.saveImageToPhotosAlbum({
filePath: urlsList[data.index],
success: function() {}
});
},
fail: function(err) {}
}
});
}
defineExpose({
getData
})
@@ -174,15 +221,21 @@
</script>
<style lang="scss" scoped>
.empty_message_div{
.popup {
z-index: 1200;
}
.empty_message_div {
display: flex;
justify-content: center;
padding: 80rpx 0;
.img{
.img {
width: 288rpx;
height: 276rpx;
}
}
.pic-cell {
width: 100%;
display: flex;
@@ -230,6 +283,7 @@
height: 100%;
background-color: #FFFFFF;
display: flex;
bottom: 40vh;
align-items: center;
padding: 10rpx 10rpx;
@@ -404,11 +458,16 @@
}
}
.comment_scroll {
height: calc(100vh - 92rpx - 22rpx - 187rpx);
}
.comment_div {
padding: 20rpx 0 20rpx 0;
background-color: #ffffff;
border-radius: 24rpx;
position: relative;
// height: calc(100vh - 88rpx - 162rpx - 256rpx - 70rpx);
// overflow: hidden;
}
@@ -23,7 +23,6 @@
import {computed} from "vue"
import common from '@/common/common';
const emit = defineEmits(['toStudyPrgh'])
const props = defineProps({
modelValue: Object
})
+88 -43
View File
@@ -1,17 +1,18 @@
<template>
<view class="max_page ">
<nav-bar :is_seat="false" :backgroundColor="bgOpacity"></nav-bar>
<scroll-view :scroll-y="tabAct!=4" class="scroll detail-main" @scroll="scroll_fun">
<scroll-view :scroll-y="true" class="scroll detail-main" @scroll="scroll_fun" @scrolltolower="scrolltolower">
<view class="bg_div">
<image-preview class="img_100 " :imgId="form.imgId" mode="widthFix"></image-preview>
<!-- <image :src="form.imgId" mode="widthFix" class="back-image"></image> -->
</view>
<view class="back_div" @click="common.navigateBack()">
<view class="back-icon"></view>
</view>
<view class="detail-body">
<view class="head-title font_pf">
<view class="title-text">{{ form.crsName || '' }}</view>
<view class="title-text">
{{ form.crsName || '' }}
</view>
<view class="title-num">
<view class="num-item">
<image class="title-icon" src="/src/static/images/courseDetail/zhishidian.png"
@@ -20,47 +21,58 @@
<view class="c-000">{{ form.pgrphNum || 0 }}</view>
</view>
<view class="num-item">
<image class="title-icon" src="/src/static/images/courseDetail/yixue.png"
mode="widthFix"></image>
<image class="title-icon" src="/src/static/images/courseDetail/yixue.png" mode="widthFix">
</image>
<view class="mr-10">已学</view>
<view class="c-000">{{ form.styParaGraphNum || 0 }}</view>
</view>
</view>
</view>
<view class="body-box">
<view class="body-tab">
<uv-tabs class="font_pf" :current="tabAct" :list="tabList" @change="tabSwitch"
:scrollable="false" line-color="#0066FF"
:active-style="{ color: '#323E57', 'font-weight': 600, 'font-size': '30rpx' }"
:inactive-style="{ color: '#666666', 'font-size': '30rpx' }"></uv-tabs>
</view>
<uv-sticky :customNavHeight="statusBarHeight" id='tabsDiv' class="sticky">
<view class="body-tab">
<uv-tabs class="font_pf" :current="tabAct" :list="tabList" @change="tabSwitch"
:scrollable="false" line-color="#0066FF"
:active-style="{ color: '#323E57', 'font-weight': 600, 'font-size': '30rpx' }"
:inactive-style="{ color: '#666666', 'font-size': '30rpx' }"></uv-tabs>
</view>
</uv-sticky>
<!-- <swiper class="body-swiper" @change="swiper_change" :current="tabAct">
<swiper-item> -->
<view class="course-info" v-if="tabAct == 0">
<introduceVue v-model="form"></introduceVue>
</view>
<!-- </swiper-item>
<swiper-item> -->
<view class="point" v-if="tabAct == 1">
<knowledge v-model="form" @toStudyPrgh="toStudyPrgh"></knowledge>
</view>
<view class="evaluate" v-if="tabAct == 2">
<comment ref="commentRef" :crsNum="form.crsNum" :imgId="form.imgId"></comment>
<!-- </swiper-item>
<swiper-item> -->
<view class="evaluate" v-if="tabAct == 2 && form">
<comment ref="commentRef" :crsNum="form.crsNum" :crsId="form.crsId" :imgId="form.imgId">
</comment>
</view>
<!-- </swiper-item>
</swiper> -->
</view>
</view>
</scroll-view>
<view class="btn-box btn-box-height font_pf" v-if="[0,1].includes(tabAct)">
<uv-button type="primary"
@click="common.navigateTo('/pages/course/study?crsNum='+crsNum+'&crsId='+form.crsId + '&imgId=' + form.imgId)">去学习</uv-button>
<uv-button type="primary">去练习</uv-button>
<uv-button type="primary">去考试</uv-button>
<!-- <template v-if="tabAct == 2">
<uv-button type="primary" class="send_evaluate"
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum)">发布评价</uv-button>
</template> -->
<view class="btn-box btn-box-height font_pf">
<template v-if="[0,1].includes(tabAct)">
<uv-button type="primary"
@click="common.navigateTo('/pages/course/study?crsNum='+crsNum+'&crsId='+form.crsId + '&imgId=' + form.imgId)">去学习</uv-button>
<uv-button type="primary">去练习</uv-button>
<uv-button type="primary">去考试</uv-button>
</template>
<template v-if="tabAct == 2">
<uv-button type="primary" class="send_evaluate"
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum+'&imgId='+form.imgId)">发布评价</uv-button>
</template>
</view>
</view>
@@ -71,10 +83,10 @@
import {
reactive,
ref,
computed,
computed,
onMounted
} from 'vue';
import {
onShow,
onLoad,
@@ -83,12 +95,12 @@
import {
getCourseDetailApi
} from '@/api/courseDetail.js';
import common from '@/common/common';
import introduceVue from './components/introduce.vue';
import knowledge from './components/knowledge.vue';
import comment from './components/comment.vue';
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
// tab
const tabList = ref([{
name: '课程介绍'
@@ -97,8 +109,9 @@
}, {
name: '评价'
}]);
const commentRef = ref(null);
const tabsDiv = ref(null);
const form = ref({});
const crsNum = ref('');
const tabAct = ref(0);
@@ -106,6 +119,13 @@
const tabSwitch = (item) => {
tabAct.value = item.index;
};
// / scrolltolower
const scrolltolower = (item) => {
if (tabAct.value == 2) {
commentRef.value?.getData();
}
};
const getData = async () => {
const {
body
@@ -116,18 +136,40 @@
};
const toStudyPrgh = (info) => {
common.navigateTo('/pages/course/study?crsNum=' + crsNum.value + '&crsId=' + form.value.crsId + '&pgrphId=' +
info.pgrphId+ '&imgId=' + form.imgId)
info.pgrphId + '&imgId=' + form.imgId)
}
const bgOpacity = computed(() => {
if (scrollTop.value <= 20) return `rgba(255,255,255,0)`;
const opacity = Math.min(1, (scrollTop.value - 20) / 80);
const opacity = Math.min(1, (scrollTop.value - 20) / 80);
return `rgba(255,255,255,${opacity})`;
});
//
const childScrollStatus = ref(false)
const scroll_fun = (e) => {
scrollTop.value = e.detail.scrollTop
// getElementPosition().then(res => {
// childScrollStatus.value = statusBarHeight === res.top
// })
}
onMounted(() => {
const swiper_change = (res) => {
tabAct.value = res.detail.current
}
// const getElementPosition = () => {
// return new Promise((resolve) => {
// uni.createSelectorQuery()
// .select('#tabsDiv')
// .boundingClientRect(rect => {
// if (rect) {
// resolve(rect) //
// }
// }).exec()
// })
// }
onMounted(async () => {
uni.$on('refresh_comment_data', () => {
commentRef.value?.getData();
tabAct.value = 2
@@ -136,7 +178,7 @@
onLoad((params) => {
crsNum.value = params.crsNum;
});
onShow(()=>{
onShow(() => {
getData();
})
onUnload(() => {
@@ -154,6 +196,7 @@
// width: 60rpx;
// height: 60rpx;
padding: 20rpx;
.back-icon {
position: relative;
width: 40rpx;
@@ -213,6 +256,7 @@
width: 100%;
width: calc(100% + 4rpx);
left: -4rpx;
.back-image {
width: 100%;
@@ -255,20 +299,23 @@
padding-right: 16rpx;
padding-top: 20rpx;
padding-bottom: 245rpx;
}
.body-tab {
background-color: #ffffff;
border-radius: 22rpx;
height: 92rpx;
// padding-top: 22rpx;
padding-bottom: 22rpx;
margin-bottom: 24rpx;
// :deep(.uv-tabs__wrapper__nav__line) {
// bottom: 10rpx;
// }
}
.course-info,
.point,
.evaluate {
min-height: calc(100vh - 92rpx - 22rpx - 245rpx - var(--status-bar-height));
}
.btn-box-height {
height: 187rpx;
}
@@ -281,8 +328,8 @@
padding-top: 37rpx;
justify-content: space-around;
background-color: #ffffff;
// background-color: red;
border: 2rpx solid #E5E5E5;
z-index: 1000;
:deep(.uv-button-wrapper) {
flex: 1;
@@ -311,9 +358,7 @@
color: #666666;
}
.point {
width: 100%;
}
.learn {
color: #1dd17a;
+4 -4
View File
@@ -16,7 +16,7 @@
<view class="ai-info">
<!-- <image src="@/static/images/dialog/pet-3.png" alt="" class="image-pet-bg"></image> -->
<image src="@/static/images/dialog/pet-bg-base.png" alt="" class="image-pet-bg"></image>
<image-preview :src="userInfo.mascotInfo?.imgAddr ||''" alt="" class="image-pet"></image-preview>
<image :src="userInfo.mascotInfo?.imgAddr ||''" alt="" class="image-pet" mode="widthFix"></image>
<view class="ai-info-bg-box">
<view class="hello-text">Hi我是{{ userInfo.mascotInfo?.mascotName || ''}}</view>
<view class="info-text">工作学习我都能帮你</view>
@@ -612,13 +612,13 @@
.image-pet {
width: 230rpx;
height: 235rpx;
// height: 235rpx;
position: absolute;
right: 24rpx;
top: 15rpx;
top: -20rpx;
z-index: 2;
}
.image-pet-bg {
position: absolute;
padding: 0 24rpx;
+24 -13
View File
@@ -46,7 +46,7 @@
<view class="study_duration_and_profile_div">
<!-- 飞天兔子 -->
<view class="profile_div">
<image-preview :src="mascotInfo?.imgAddr ||''" alt="" class="profile"></image-preview>
<image :src="mascotInfo?.imgAddr ||''" alt="" class="profile"></image>
<!-- <image src="/static/images/index/fttz.png" class="profile"></image> -->
</view>
<!-- 学习时长 -->
@@ -225,9 +225,9 @@
</template>
<script setup>
import {
computed,
nextTick,
onBeforeMount,
onMounted,
reactive,
@@ -236,7 +236,8 @@
import {
onShow,
onPageScroll,
onLoad
onLoad,
onHide
} from '@dcloudio/uni-app'
import {
customStyles,
@@ -249,15 +250,18 @@
} from '@/common/common';
import common from '@/common/common'
import {setMascot} from "@/common/mascot.js"
import {
setMascot
} from "@/common/mascot.js"
import {
getStatisticsData,
queryCrsInfoByLastnew,
queryCrsInfoByPopular,
queryCrsInfoByRecmd,
} from '@/api/index.js'
const scrollTop = ref(0);
const mascotShow = ref(false);
const stdtTmLenRef = ref(null);
const accmPracticeCntRef = ref(null);
const accmExamCntRef = ref(null);
@@ -272,14 +276,14 @@
const bgOpacity = computed(() => {
return `rgba(246,248,255,${opacity.value})`;
});
//
onPageScroll((e) => {
scrollTop.value = e.scrollTop
})
//
const notice_text = ref(['绿色金融政策解析与商业银行绿色水水水水水水水水水水水水水', '绿色金融政策解析与商业银行红色'])
const init_class_data = [{
@@ -386,10 +390,10 @@
common.navigateTo('/pages/login/login')
return
}
setMascot()
const userInfo = getUserInfo()
if(userInfo) {
if (userInfo) {
mascotInfo.value = userInfo?.mascotInfo
}
statistics_data['get_statistics_data']() //
@@ -403,6 +407,9 @@
recommend_class_list.value = res.body
})
})
onHide(() => {
})
</script>
@@ -603,6 +610,7 @@
color: #ffffff;
}
.message_num_font {
width: 22rpx;
height: 22rpx;
@@ -661,6 +669,7 @@
color: #ffffff;
}
.message_num_font {
width: 22rpx;
height: 22rpx;
@@ -729,18 +738,20 @@
.study_duration_div {
height: 162rpx;
background: linear-gradient(180deg, rgba(238, 246, 255, 0.65) 0%, #C5DFFD 4%, #FFFFFF 100%);
border-radius: 23rpx;
display: flex;
justify-content: space-around;
z-index: 20;
opacity: .9;
.item {
flex: 1;
// background-color: red;
display: flex;
flex-direction: column;
justify-content: center;
.top {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
@@ -877,4 +888,4 @@
flex-direction: column;
background-color: #F6F8FF;
}
</style>
</style>
+5 -2
View File
@@ -67,8 +67,10 @@
} from 'vue';
import {
queryValidTraMascotInfo,
queryCurrentValidMascotInfo,
setTraMascotInfo
} from "@/api/mascot.js"
import common from '@/common/common.js'
import {
setUserInfo,
@@ -105,11 +107,12 @@
common.loading()
setTraMascotInfo({
mascotId: item.mascotId
}).then(res => {
}).then(async(res) => {
const mascotInfo = await queryCurrentValidMascotInfo()
const userInfo = getUserInfo()
setUserInfo({
...userInfo,
'mascotInfo': item
'mascotInfo': mascotInfo
})
common.hideLoading()
common.msg('设置成功')
+36 -12
View File
@@ -8,9 +8,9 @@
<view class="personal_information">
<view class="profile" @click="click_update_avatar()">
<!-- <image-preview v-if="user_info.imageAddr" class="img_100" :src="user_info.imageAddr"></image-preview> -->
<image class="img_100" :src="user_info.imagePath"></image>
<!-- <image-preview v-else-if="user_info.imageAddr" class="img_100" :src="user_info.imageAddr"></image-preview>
<image v-else class="img_100" src="/static/images/me/default_user_avatar.png"></image> -->
<image class="img_100" v-if='user_info.imagePath' :src="user_info.imagePath"></image>
<image-preview v-else-if="user_info.imageAddr" class="img_100" :src="user_info.imageAddr"></image-preview>
<image v-else class="img_100" src="/static/images/me/default_user_avatar.png"></image>
</view>
<view class="personal_information_data">
<view class="name_sex_div">
@@ -136,6 +136,35 @@
} from '@/api/common'
import {setMascot} from "@/common/mascot.js"
import { queryCurrentUser} from '@/api/login.js';
const badgeList = [{
"name": "黑铁",
"png": "badge_1.png",
},
{
"name": "青铜",
"png": "badge_2.png",
},
{
"name": "白银",
"png": "badge_3.png",
},
{
"name": "黄金",
"png": "badge_4.png",
},
{
"name": "铂金",
"png": "badge_5.png",
},
{
"name": "钻石",
"png": "badge_6.png",
},
{
"name": "王者",
"png": "badge_7.png",
}
]
const socketStore = useSocketStore()
const accmTaskCntRef = ref(null);
const accmPointRef = ref(null);
@@ -192,7 +221,6 @@
}
}
});
const user_info = reactive({
userName: '',
userId: '',
@@ -220,10 +248,7 @@
};
onShow(() => {
setMascot()
const user_info_cache = getUserInfo();
Object.assign(user_info, user_info_cache);
console.log('user_info', user_info);
Object.assign(user_info, getUserInfo());
statistics_data['get_statistics_data'](); //
});
onPullDownRefresh(() => {
@@ -266,11 +291,10 @@
await updateDfSysUserExtandInfoImageAddr({imageAddr : res.thumbFileId})
//
const userData = await queryCurrentUser()
console.log('userData', );
console.log('userData', userData);
common.msg('修改成功')
user_info.imageAddr = getUserInfo('imageAddr')
user_info.imagePath = getUserInfo('imagePath')
user_info.imageAddr = userData.imageAddr
user_info.imagePath = ''
} catch {
common.msg('修改失败')
}
+2 -2
View File
@@ -151,8 +151,8 @@
//
const userData = await queryCurrentUser()
common.msg('修改成功')
userInfo.value.imageAddr = getUserInfo('imageAddr')
userInfo.value.imagePath = getUserInfo('imagePath')
userInfo.value.imageAddr = userData.imageAddr
userInfo.value.imagePath = ''
} catch {
common.msg('修改失败')
}
+153 -30
View File
@@ -1,46 +1,169 @@
<template>
<view class="max_page detail-main" style="overflow: hidden">
<view class="max_page detail-main">
<nav-bar :is_seat="false"></nav-bar>
<view class="cell_div">
<uv-cell-group>
<uv-cell title="根域名" :value="url" ></uv-cell>
<uv-cell title="版本号" ></uv-cell>
<uv-cell title="版本名称" ></uv-cell>
<uv-cell title="当前环境:" :value="ENV.MODE"></uv-cell>
<!-- <uv-cell title="竞赛记录" :clickable="false" :border="false"></uv-cell> -->
<view class="fixed_search_div">
<view class="back_div" @click="common.navigateBack()">
<view class="back-icon"></view>
</view>
<view class="title font_pf">系统参数</view>
</view>
<view class="detail-body">
<uv-cell-group :border="false">
<uv-cell title="根域名" :value="url"></uv-cell>
<uv-cell title="当前环境:" :value="ENV.MODE"></uv-cell>
<uv-cell title="版本名称" :value="appBaseInfo.appVersion"></uv-cell>
<uv-cell title="版本号" :value="appBaseInfo.appVersionCode"></uv-cell>
<uv-cell title="点击1:" @click="aaaa"></uv-cell>
<uv-cell title="点击2:" :border="false" @click="bbbb"></uv-cell>
</uv-cell-group>
</view>
</view>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import common from '@/common/common';
import { get_base_url } from '../../api/request';
const url = get_base_url();
const ENV = import.meta.env
import common from '@/common/common';
import {
get_base_url
} from '../../api/request';
const url = get_base_url();
const ENV = import.meta.env
const appBaseInfo = uni.getAppBaseInfo()
console.log('appBaseInfo', appBaseInfo);
import showDialog from '@/common/dialogMessage'
const bbbb = () => {
// showDialog({
// title: '',
// content: '退',
// confirmText: '',
// showCancel: false,
// cancelText: '',
// success: (res) => {
// if (res.confirm) {
// console.log('');
// }
// },
// cancel: () => {
// console.log('');
// }
// });
showDialog({
title: '提示',
content: '检测到您已存在学习记录,要继续学习吗?',
confirmText: '重新学习',
showCancel: true,
cancelText: '继续学习',
success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
}
},
cancel: () => {
console.log('用户点击取消');
}
});
}
const aaaa = () => {
common.show('提示','检测到您已存在学习记录,要继续学习吗?','继续学习', '重新学习').then(res => {
})
// function show(title, msg, showCancel = true, cancelText = '', confirmText = '') {
// showDialog({
// title: '',
// content: '',
// confirmText: '',
// showCancel: true,
// cancelText: '',
// success: (res) => {
// if (res.confirm) {
// console.log('');
// }
// },
// cancel: () => {
// console.log('');
// }
// });
}
</script>
<style lang="scss" scoped>
$bg-margin-left: 50rpx;
//
.cell_div {
margin: 30rpx $bg-margin-left 0 $bg-margin-left;
background: #ffffff;
border-radius: 15rpx;
z-index: 101;
overflow: hidden;
$bg-margin-left: 50rpx;
// 线24
:deep(.uv-line) {
width: calc(100% - 48rpx) !important;
margin: 0 24rpx !important;
.detail-body {
margin: 30rpx $bg-margin-left 0 $bg-margin-left;
background: #ffffff;
border-radius: 15rpx;
z-index: 101;
overflow: hidden;
// 线24
:deep(.uv-line) {
width: calc(100% - 48rpx) !important;
margin: 0 24rpx !important;
}
:deep(.uv-cell__body) {
padding: 12px 15px;
}
:deep(.uv-cell__title) {
flex: none !important;
}
}
:deep(.uv-cell__body) {
padding: 12px 15px;
.detail-main {
background-color: #F6F8FF;
}
}
</style>
.title {
color: #000000;
font-size: 34rpx;
height: 34rpx;
font-weight: 600;
// margin-bottom: 30rpx;
line-height: 34rpx;
}
.fixed_search_div {
padding: calc(10rpx + var(--status-bar-height)) 15rpx 24rpx 30rpx;
display: flex;
align-items: center;
background-color: #f6f7f8;
.back_div {
margin-right: 10rpx;
.back-icon {
position: relative;
width: 40rpx;
height: 40rpx;
cursor: pointer;
display: flex;
align-items: center;
}
.back-icon::before,
.back-icon::after {
content: '';
position: absolute;
transition: all 0.3s ease;
}
.back-icon::after {
top: 25%;
left: 25%;
width: 40%;
height: 40%;
border-top: 4rpx solid #2b2c2e;
border-left: 4rpx solid #2b2c2e;
transform: rotate(-45deg);
}
}
}
</style>
-1
View File
@@ -46,7 +46,6 @@
// cancel: () => {
// console.log('');
// }
// });
showDialog({
Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

@@ -0,0 +1,7 @@
## 1.0.22023-06-21
1. 优化customStyle属性
## 1.0.12023-05-16
1. 优化组件依赖,修改后无需全局引入,组件导入即可使用
2. 优化部分功能
## 1.0.02023-05-10
uv-load-more 加载更多
@@ -0,0 +1,95 @@
export default {
props: {
// 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
status: {
type: String,
default: 'loadmore'
},
// 组件背景色
bgColor: {
type: String,
default: 'transparent'
},
// 是否显示加载中的图标
icon: {
type: Boolean,
default: true
},
// 字体大小
fontSize: {
type: [String, Number],
default: 14
},
// 图标大小
iconSize: {
type: [String, Number],
default: 16
},
// 字体颜色
color: {
type: String,
default: '#606266'
},
// 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
loadingIcon: {
type: String,
default: 'spinner'
},
// 加载前的提示语
loadmoreText: {
type: String,
default: '加载更多'
},
// 加载中提示语
loadingText: {
type: String,
default: '正在加载...'
},
// 没有更多的提示语
nomoreText: {
type: String,
default: '没有更多了'
},
// 在“没有更多”状态下,是否显示粗点
isDot: {
type: Boolean,
default: false
},
// 加载中图标的颜色
iconColor: {
type: String,
default: '#b7b7b7'
},
// 上边距
marginTop: {
type: [String, Number],
default: 10
},
// 下边距
marginBottom: {
type: [String, Number],
default: 10
},
// 高度,单位px
height: {
type: [String, Number],
default: 'auto'
},
// 是否显示左边分割线
line: {
type: Boolean,
default: false
},
// 线条颜色
lineColor: {
type: String,
default: '#E6E8EB'
},
// 是否虚线,true-虚线,false-实线
dashed: {
type: Boolean,
default: false
},
...uni.$uv?.props?.loadmore
}
}
@@ -0,0 +1,152 @@
<template>
<view
class="uv-loadmore"
:style="[{
backgroundColor: bgColor,
marginBottom: $uv.addUnit(marginBottom),
marginTop: $uv.addUnit(marginTop),
height: $uv.addUnit(height),
},
$uv.addStyle(customStyle)]"
>
<uv-line
length="140rpx"
:color="lineColor"
:hairline="false"
:dashed="dashed"
v-if="line"
></uv-line>
<!-- 加载中和没有更多的状态才显示两边的横线 -->
<view
:class="status == 'loadmore' || status == 'nomore' ? 'uv-more' : ''"
class="uv-loadmore__content"
>
<view
class="uv-loadmore__content__icon-wrap"
v-if="status === 'loading' && icon"
>
<uv-loading-icon
:color="iconColor"
:size="iconSize"
:mode="loadingIcon"
></uv-loading-icon>
</view>
<!-- 如果没有更多的状态下显示内容为dot粗点加载特定样式 -->
<text
class="uv-line-1"
:style="[loadTextStyle]"
:class="[(status == 'nomore' && isDot == true) ? 'uv-loadmore__content__dot-text' : 'uv-loadmore__content__text']"
@tap="loadMore"
>{{ showText }}</text>
</view>
<uv-line
length="140rpx"
:color="lineColor"
:hairline="false"
:dashed="dashed"
v-if="line"
></uv-line>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
import props from './props.js';
/**
* loadmore 加载更多
* @description 此组件一般用于标识页面底部加载数据时的状态
* @tutorial https://www.uvui.cn/components/loadMore.html
* @property {String} status 组件状态默认 'loadmore'
* @property {String} bgColor 组件背景颜色在页面是非白色时会用到默认 'transparent'
* @property {Boolean} icon 加载中时是否显示图标默认 true
* @property {String | Number} fontSize 字体大小默认 14
* @property {String | Number} iconSize 图标大小默认 17
* @property {String} color 字体颜色默认 '#606266'
* @property {String} loadingIcon 加载图标默认 'circle'
* @property {String} loadmoreText 加载前的提示语默认 '加载更多'
* @property {String} loadingText 加载中提示语默认 '正在加载...'
* @property {String} nomoreText 没有更多的提示语默认 '没有更多了'
* @property {Boolean} isDot 到上一个相邻元素的距离 默认 false
* @property {String} iconColor 加载中图标的颜色 默认 '#b7b7b7'
* @property {String} lineColor 线条颜色默认 #E6E8EB
* @property {String | Number} marginTop 上边距 默认 10
* @property {String | Number} marginBottom 下边距 默认 10
* @property {String | Number} height 高度单位px 默认 'auto'
* @property {Boolean} line 是否显示左边分割线 默认 false
* @property {Boolean} dashed // 线true-线false-线 false
* @event {Function} loadmore status为loadmore时点击组件会发出此事件
* @example <uv-loadmore :status="status" icon-type="iconType" load-text="loadText" />
*/
export default {
name: "uv-loadmore",
mixins: [mpMixin, mixin,props],
data() {
return {
//
dotText: "●"
}
},
computed: {
//
loadTextStyle() {
return {
color: this.color,
fontSize: this.$uv.addUnit(this.fontSize),
lineHeight: this.$uv.addUnit(this.fontSize),
backgroundColor: this.bgColor,
}
},
//
showText() {
let text = '';
if (this.status == 'loadmore') text = this.loadmoreText
else if (this.status == 'loading') text = this.loadingText
else if (this.status == 'nomore' && this.isDot) text = this.dotText;
else text = this.nomoreText;
return text;
}
},
methods: {
loadMore() {
//
if (this.status == 'loadmore') this.$emit('loadmore');
}
}
}
</script>
<style lang="scss" scoped>
$show-lines: 1;
@import '@/uni_modules/uv-ui-tools/libs/css/variable.scss';
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
@import '@/uni_modules/uv-ui-tools/libs/css/color.scss';
.uv-loadmore {
@include flex(row);
align-items: center;
justify-content: center;
flex: 1;
&__content {
margin: 0 15px;
@include flex(row);
align-items: center;
justify-content: center;
&__icon-wrap {
margin-right: 8px;
}
&__text {
font-size: 14px;
color: $uv-content-color;
}
&__dot-text {
font-size: 15px;
color: $uv-tips-color;
}
}
}
</style>
+89
View File
@@ -0,0 +1,89 @@
{
"id": "uv-load-more",
"displayName": "uv-load-more 加载更多 全面兼容小程序、nvue、vue2、vue3等多端",
"version": "1.0.2",
"description": "uv-load-more 此组件一般用于标识页面底部加载数据时的状态,共有三种状态:加载前、加载中、加载后。",
"keywords": [
"uv-load-more",
"uvui",
"uv-ui",
"more",
"加载更多"
],
"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",
"uv-line",
"uv-loading-icon"
],
"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"
}
}
}
}
}
+11
View File
@@ -0,0 +1,11 @@
## LoadMore 加载更多
> **组件名:uv-load-more**
此组件一般用于标识页面底部加载数据时的状态,共有三种状态:加载前、加载中、加载后。
### <a href="https://www.uvui.cn/components/loadMore.html" target="_blank">查看文档</a>
### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui)
#### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a>
+11
View File
@@ -0,0 +1,11 @@
## 1.0.42023-12-20
1. 优化
## 1.0.32023-10-13
1. unmounted兼容vue3
## 1.0.22023-08-27
1. 优化
## 1.0.12023-05-16
1. 优化组件依赖,修改后无需全局引入,组件导入即可使用
2. 优化部分功能
## 1.0.02023-05-10
uv-sticky 吸顶
@@ -0,0 +1,41 @@
export default {
props: {
// 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
offsetTop: {
type: [String, Number],
default: 0
},
// 自定义导航栏的高度
customNavHeight: {
type: [String, Number],
// #ifdef H5
// H5端的导航栏属于“自定义”导航栏的范畴,因为它是非原生的,与普通元素一致
default: 44,
// #endif
// #ifndef H5
default: 0
// #endif
},
// 是否禁用吸顶功能
disabled: {
type: Boolean,
default: false
},
// 吸顶区域的背景颜色
bgColor: {
type: String,
default: 'transparent'
},
// z-index值
zIndex: {
type: [String, Number],
default: ''
},
// 列表中的索引值
index: {
type: [String, Number],
default: ''
},
...uni.$uv?.props?.sticky
}
}
@@ -0,0 +1,223 @@
<template>
<view
class="uv-sticky"
:id="elId"
:style="[style]"
>
<view
:style="[stickyContent]"
class="uv-sticky__content"
>
<slot />
</view>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
import props from './props.js';
/**
* sticky 吸顶
* @description 该组件与CSS中position: sticky属性实现的效果一致当组件达到预设的到顶部距离时 就会固定在指定位置组件位置大于预设的顶部距离时会重新按照正常的布局排列
* @tutorial https://www.uvui.cn/components/sticky.html
* @property {String Number} offsetTop 吸顶时与顶部的距离单位px默认 0
* @property {String Number} customNavHeight 自定义导航栏的高度 h5 默认44 其他默认 0
* @property {Boolean} disabled 是否开启吸顶功能 默认 false
* @property {String} bgColor 组件背景颜色默认 '#ffffff'
* @property {String Number} zIndex 吸顶时的z-index值
* @property {String Number} index 自定义标识用于区分是哪一个组件
* @property {Object} customStyle 组件的样式对象形式
* @example <uv-sticky offsetTop="200"><view>塞下秋来风景异衡阳雁去无留意</view></uv-sticky>
*/
export default {
name: 'uv-sticky',
mixins: [mpMixin, mixin, props],
data() {
return {
cssSticky: false, // 使csssticky
stickyTop: 0, // topoffsetTop
elId: '',
left: 0, // jspostition: fixedleftheightwidth
width: 'auto',
height: 'auto',
fixed: false, // js
}
},
computed: {
style() {
const style = {}
if(!this.disabled) {
if (this.cssSticky) {
style.position = 'sticky'
style.zIndex = this.uZindex
style.top = this.$uv.addUnit(this.stickyTop)
} else {
style.height = this.fixed ? this.height + 'px' : 'auto'
}
} else {
// relative(nvue)nvuestatic
// #ifdef APP-NVUE
style.position = 'relative'
// #endif
// #ifndef APP-NVUE
style.position = 'static'
// #endif
}
style.backgroundColor = this.bgColor
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle))
},
//
stickyContent() {
const style = {}
if (!this.cssSticky) {
style.position = this.fixed ? 'fixed' : 'static'
style.top = this.stickyTop + 'px'
style.left = this.left + 'px'
style.width = this.width == 'auto' ? 'auto' : this.width + 'px'
style.zIndex = this.uZindex
}
return style
},
uZindex() {
return this.zIndex ? this.zIndex : 970
}
},
created() {
this.elId = this.$uv.guid();
},
mounted() {
this.init()
},
methods: {
init() {
this.getStickyTop()
// 使
this.checkSupportCssSticky()
// css sticky使jscss
if (!this.cssSticky) {
!this.disabled && this.initObserveContent()
}
},
initObserveContent() {
// js""
this.$uvGetRect('#' + this.elId).then((res) => {
this.height = res.height
this.left = res.left
this.width = res.width
this.$nextTick(() => {
this.observeContent()
})
})
},
observeContent() {
//
this.disconnectObserver('contentObserver')
const contentObserver = uni.createIntersectionObserver({
//
thresholds: [0.95, 0.98, 1]
})
//
contentObserver.relativeToViewport({
top: -this.stickyTop
})
//
contentObserver.observe(`#${this.elId}`, res => {
this.setFixed(res.boundingClientRect.top)
})
this.contentObserver = contentObserver
},
setFixed(top) {
//
const fixed = top <= this.stickyTop
this.fixed = fixed
},
disconnectObserver(observerName) {
//
const observer = this[observerName]
observer && observer.disconnect()
},
getStickyTop() {
this.stickyTop = this.$uv.getPx(this.offsetTop) + this.$uv.getPx(this.customNavHeight)
},
async checkSupportCssSticky() {
// #ifdef H5
// H5css sticky使
if (this.checkCssStickyForH5()) {
this.cssSticky = true
}
// #endif
// 8.0css sticky(7sticky)
if (this.$uv.os() === 'android' && Number(this.$uv.sys().system) > 8) {
this.cssSticky = true
}
// APP-VuecomputedStylecss sticky
// #ifdef APP-VUE || MP-WEIXIN
this.cssSticky = await this.checkComputedStyle()
// #endif
// iosios6css sticky
if (this.$uv.os() === 'ios') {
this.cssSticky = true
}
// nvuecss sticky
// #ifdef APP-NVUE
this.cssSticky = true
// #endif
},
// APPuni.createSelectorQuerycss sticky
checkComputedStyle() {
//
// #ifdef APP-VUE || MP-WEIXIN
return new Promise(resolve => {
uni.createSelectorQuery().in(this).select('.uv-sticky').fields({
computedStyle: ["position"]
}).exec(e => {
resolve('sticky' === e[0].position)
})
})
// #endif
},
// H5css sticky
// sticky
checkCssStickyForH5() {
//
// #ifdef H5
const vendorList = ['', '-webkit-', '-ms-', '-moz-', '-o-'],
vendorListLength = vendorList.length,
stickyElement = document.createElement('div')
for (let i = 0; i < vendorListLength; i++) {
stickyElement.style.position = vendorList[i] + 'sticky'
if (stickyElement.style.position !== '') {
return true
}
}
return false;
// #endif
}
},
// #ifdef VUE2
beforeDestroy() {
this.disconnectObserver('contentObserver')
},
// #endif
// #ifdef VUE3
unmounted() {
this.disconnectObserver('contentObserver')
}
// #endif
}
</script>
<style lang="scss" scoped>
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
.uv-sticky {
/* #ifdef APP-VUE || MP-WEIXIN */
// stickyAPPuni.createSelectorQuerycss sticky使
position: sticky;
/* #endif */
}
</style>
+87
View File
@@ -0,0 +1,87 @@
{
"id": "uv-sticky",
"displayName": "uv-sticky 吸顶 全面兼容小程序、nvue、vue2、vue3等多端",
"version": "1.0.4",
"description": "吸顶组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。",
"keywords": [
"uv-sticky",
"uvui",
"uv-ui",
"sticky",
"吸顶"
],
"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"
}
}
}
}
}
+11
View File
@@ -0,0 +1,11 @@
## Sticky 吸顶
> **组件名:uv-sticky**
该组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。
### <a href="https://www.uvui.cn/components/sticky.html" target="_blank">查看文档</a>
### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui)
#### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a>