不知道改什么了

This commit is contained in:
田岩
2025-07-23 19:50:42 +08:00
parent 41015eb0d7
commit c7c20f5406
76 changed files with 1057 additions and 152 deletions
+1 -1
View File
@@ -17,4 +17,4 @@ 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 = 'http://25.18.122.66:9786'
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-751a74a5]{width:60vw;text-shadow:.3125rem 0 .9375rem #3c3c3c}.title_div .img[data-v-751a74a5]{width:100%}.tip_div[data-v-751a74a5]{text-shadow:0 0 .625rem #ceceea}.tip_div .tip_msg[data-v-751a74a5]{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-751a74a5]{width:100%;height:100%;display:flex;align-items:center;position:relative}.mascot_div .swiper[data-v-751a74a5]{white-space:nowrap;height:120vw;flex:1}.mascot_div .swiper-item-div[data-v-751a74a5]{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;height:120vw}.mascot_div .swiper-item-div .img[data-v-751a74a5]{width:80vw;height:100%}.mascot_div .doct_icon[data-v-751a74a5]{padding:0%;position:absolute;width:3.125rem;display:flex;align-items:center;flex-direction:column}.mascot_div .doct_icon .doct_icon_div[data-v-751a74a5]{width:100%;display:flex;align-items:center;justify-content:center;padding:1.25rem 0}.mascot_div .doct_icon.left[data-v-751a74a5]{top:40%;left:2%;z-index:10}.mascot_div .doct_icon.right[data-v-751a74a5]{top:40%;right:2%}.mascot_div .doct_icon .img[data-v-751a74a5]{width:40%}.button_div[data-v-751a74a5]{margin-top:.625rem;width:80%;height:3.75rem;position:relative}.button_div .img[data-v-751a74a5]{position:absolute;width:100%;height:100%}.bg_img[data-v-751a74a5]{position:absolute;top:-2%;left:-1%;width:102%;height:104%;z-index:-1}.bg_img .img[data-v-751a74a5]{width:100%;height:100%}.main_div[data-v-751a74a5]{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)}
.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-0925a3e8]{margin:.9375rem 1.5625rem 0;background:#fff;border-radius:.46875rem;z-index:101;overflow:hidden}.detail-body[data-v-0925a3e8] .uv-line{width:calc(100% - 1.5rem)!important;margin:0 .75rem!important}.detail-body[data-v-0925a3e8] .uv-cell__body{padding:12px 15px}.detail-body[data-v-0925a3e8] .uv-cell__title{flex:none!important}.detail-main[data-v-0925a3e8]{background-color:#f6f8ff}.title[data-v-0925a3e8]{color:#000;font-size:1.0625rem;height:1.0625rem;font-weight:600;line-height:1.0625rem}.fixed_search_div[data-v-0925a3e8]{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-0925a3e8]{margin-right:.3125rem}.fixed_search_div .back_div .back-icon[data-v-0925a3e8]{position:relative;width:1.25rem;height:1.25rem;cursor:pointer;display:flex;align-items:center}.fixed_search_div .back_div .back-icon[data-v-0925a3e8]:before,.fixed_search_div .back_div .back-icon[data-v-0925a3e8]:after{content:"";position:absolute;transition:all .3s ease}.fixed_search_div .back_div .back-icon[data-v-0925a3e8]:after{top:25%;left:25%;width:40%;height:40%;border-top:.125rem solid #2b2c2e;border-left:.125rem solid #2b2c2e;transform:rotate(-45deg)}
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: 1.3 MiB

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: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

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({
+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(()=>{
+120 -74
View File
@@ -1,80 +1,83 @@
<template>
<view class="comment_div">
<view class="empty_message_div" v-if="message_list.length == 0">
<uv-load-more :status="status" loadmore-text="轻轻上拉加载" ></uv-load-more>
<!-- <view class="empty_message_div" v-if="message_list.length == 0">
<image class="img" src="@/static/images/courseDetail/empty_message.png"></image>
</view>
</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>
<image v-else src="/static/images/me/default_user_avatar.png" class="img"></image>
</view>
<view class="msg_content">
<view class="title_div">
<view class="name">{{item.userName}}</view>
<view class="title_tip">{{item.bbsTagDesc}}</view>
<!-- <scroll-view :scroll-y="true" class="comment_scroll"> -->
<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>
<image v-else src="/static/images/me/default_user_avatar.png" class="img"></image>
</view>
<view class="title">
{{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>
</view>
<view class="time_and_reply">
<view class="time">{{item.bbsTm.substr(0,16)}}</view>
<view class="reply" @click="click_reply(item, item.bbsId, index)">回复</view>
</view>
<view class="show_close_div" v-if="item.children?.length" @click="item.show = !item.show">
<template v-if="item.show">
<view>收起</view>
<view class="back_div">
<view class="back-icon"></view>
</view>
</template>
<template v-else>
<view>展开{{item.children?.length}}条回复</view>
<view class="back_div">
<view class="back-icon"></view>
</view>
</template>
</view>
<view class="children" v-if="item.show">
<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>
<image v-else src="/static/images/me/default_user_avatar.png" class="img"></image>
</view>
<view class="msg_content">
<view class="title_div">
<view class="name">{{childrenItem.userName}}</view>
<view class="arrow"></view>
<view class="name">{{childrenItem.rtnUName}}</view>
<view class="msg_content">
<view class="title_div">
<view class="name">{{item.userName}}</view>
<view class="title_tip">{{item.bbsTagDesc}}</view>
</view>
<view class="title">
{{item.bbsContent}}
</view>
<view class="img_div pic-cell">
<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>
<view class="reply" @click="click_reply(item, item.bbsId, index)">回复</view>
</view>
<view class="show_close_div" v-if="item.children?.length" @click="item.show = !item.show">
<template v-if="item.show">
<view>收起</view>
<view class="back_div">
<view class="back-icon"></view>
</view>
</template>
<template v-else>
<view>展开{{item.children?.length}}条回复</view>
<view class="back_div">
<view class="back-icon"></view>
</view>
</template>
</view>
<view class="children" v-if="item.show">
<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>
<image v-else src="/static/images/me/default_user_avatar.png" class="img"></image>
</view>
<view class="msg_content">
<view class="title_div">
<view class="name">{{childrenItem.userName}}</view>
<view class="arrow"></view>
<view class="name">{{childrenItem.rtnUName}}</view>
</view>
<view class="title">
{{childrenItem.bbsContent}}
</view>
<view class="img_div">
</view>
<view class="time_and_reply">
<view class="time">{{childrenItem.bbsTm.substr(0,16)}}</view>
<view class="reply" @click="click_reply(childrenItem, childrenItem.parentId, index)">回复
</view>
<view class="title">
{{childrenItem.bbsContent}}
</view>
<view class="img_div">
</view>
<view class="time_and_reply">
<view class="time">{{childrenItem.bbsTm.substr(0,16)}}</view>
<view class="reply"
@click="click_reply(childrenItem, childrenItem.parentId, index)">回复
</view>
</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>
<!-- </scroll-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> -->
<uni-popup ref="popup">
<view class="bottom_reply_input_div">
<uv-input v-model="reply_data.bbsContent" placeholderStyle='color:#999999;font-size:26rpx'
@@ -90,7 +93,6 @@
</uni-popup>
</view>
</template>
<script setup>
@@ -100,15 +102,22 @@
onMounted
} 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 inputValue = ref('')
const placeholder = ref('')
const message_list = reactive([])
const status = ref('loading') // loadmore - loading - nomore -
const limit = 20
const page = ref(0)
const reply_data_init = {
"index": null,
"parentBbsId": null,
@@ -121,6 +130,7 @@
})
const props = defineProps({
crsId: String,
crsNum: String,
imgId: String
})
@@ -157,14 +167,45 @@
}
}
const getData = () => {
qryTraCrsBbsDataByCrsNum({
crsNum: props.crsNum
status.value = 'loading'
page.value ++
queryTraCrsBbsInfoByCrsId({
crsId: props.crsId,
page:page.value,
limit:20
}).then(({
body
}) => {
Object.assign(message_list, body)
message_list.concat(body)
// console.log('body', body);
Object.assign(message_list, message_list.concat(body))
})
}
//
const showPicture = (urls, item) => {
const base_url = get_base_url()
const current = urls.findIndex(res => item === res)
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() {
// that.$common.msg('')
}
});
},
fail: function(err) {}
}
});
}
defineExpose({
getData
})
@@ -174,15 +215,17 @@
</script>
<style lang="scss" scoped>
.empty_message_div{
.empty_message_div {
display: flex;
justify-content: center;
padding: 80rpx 0;
.img{
.img {
width: 288rpx;
height: 276rpx;
}
}
.pic-cell {
width: 100%;
display: flex;
@@ -403,12 +446,15 @@
}
}
}
.comment_scroll{
height: calc(100vh - 92rpx - 22rpx - 187rpx);
}
.comment_div {
padding: 20rpx 0 20rpx 0;
padding: 20rpx 0 200rpx 0;
background-color: #ffffff;
border-radius: 24rpx;
position: relative;
// height: calc(100vh - 88rpx - 162rpx - 256rpx - 70rpx);
// overflow: hidden;
}
@@ -17,6 +17,60 @@
<view class="fz-30 font_pf text ellipsis-text">{{ item.pgrphContent }}</view>
</view>
</view>
<view class="point-item mb-30" v-for="(item, index) in modelValue?.pgrphData || []" :key="item.index"
@click="toDetail(item)" :class="item.pgrphStdyStateName == '已学习' ? 'learn' : 'unlearn'">
<view class="top mb-30">
<view class="blue-ball">
<view class="ball"></view>
</view>
<view class="fz-30 font_pf title">知识点{{ item.pgrphNm }}</view>
<view class="fl1">
</view>
<view class="font_pf fz-24 study-status" >
{{ item.pgrphStdyStateName }}
</view>
</view>
<view class="bottom">
<view class="fz-30 font_pf text ellipsis-text">{{ item.pgrphContent }}</view>
</view>
</view>
<view class="point-item mb-30" v-for="(item, index) in modelValue?.pgrphData || []" :key="item.index"
@click="toDetail(item)" :class="item.pgrphStdyStateName == '已学习' ? 'learn' : 'unlearn'">
<view class="top mb-30">
<view class="blue-ball">
<view class="ball"></view>
</view>
<view class="fz-30 font_pf title">知识点{{ item.pgrphNm }}</view>
<view class="fl1">
</view>
<view class="font_pf fz-24 study-status" >
{{ item.pgrphStdyStateName }}
</view>
</view>
<view class="bottom">
<view class="fz-30 font_pf text ellipsis-text">{{ item.pgrphContent }}</view>
</view>
</view>
<view class="point-item mb-30" v-for="(item, index) in modelValue?.pgrphData || []" :key="item.index"
@click="toDetail(item)" :class="item.pgrphStdyStateName == '已学习' ? 'learn' : 'unlearn'">
<view class="top mb-30">
<view class="blue-ball">
<view class="ball"></view>
</view>
<view class="fz-30 font_pf title">知识点{{ item.pgrphNm }}</view>
<view class="fl1">
</view>
<view class="font_pf fz-24 study-status" >
{{ item.pgrphStdyStateName }}
</view>
</view>
<view class="bottom">
<view class="fz-30 font_pf text ellipsis-text">{{ item.pgrphContent }}</view>
</view>
</view>
</template>
<script setup>
+83 -35
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">
{{ '自行车支持下支自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩自行车支持下支持下在踩踩踩踩踩踩踩踩踩持下在踩踩踩踩踩踩踩踩踩' }}
</view>
<view class="title-num">
<view class="num-item">
<image class="title-icon" src="/src/static/images/courseDetail/zhishidian.png"
@@ -20,46 +21,57 @@
<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'>
<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)">
<view class="btn-box btn-box-height font_pf" v-if="[0,1,2].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> -->
<!-- <template v-if="tabAct == 2">
<uv-button type="primary" class="send_evaluate"
@click="common.navigateTo('/pages/courseDetail/submit?crsNum='+crsNum)">发布评价</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%;
@@ -261,13 +305,18 @@
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 {
min-height: calc(100vh - 92rpx - 22rpx - 245rpx - var(--status-bar-height));
}
// .body-swiper {
// // min-height: 100vh;
// height: calc(100vh - 92rpx - 22rpx - 187rpx - 20rpx - var(--status-bar-height));
// }
.btn-box-height {
height: 187rpx;
@@ -283,6 +332,7 @@
background-color: #ffffff;
// background-color: red;
border: 2rpx solid #E5E5E5;
z-index: 1000;
:deep(.uv-button-wrapper) {
flex: 1;
@@ -311,9 +361,7 @@
color: #666666;
}
.point {
width: 100%;
}
.learn {
color: #1dd17a;
+29
View File
@@ -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);
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>