1.首页课程栏目选完之后再回来被重置的问题

This commit is contained in:
liuyuan
2025-01-23 14:09:03 +08:00
parent c043408e68
commit b24119a549
8 changed files with 995 additions and 555 deletions

View File

@@ -2,28 +2,14 @@ let baseUrl = "";
let socketUrl = ""; let socketUrl = "";
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// 开发环境 // 开发环境
// baseUrl = "http://localhost:7001/"; // baseUrl = "https://testapi.nuttyreading.com/"; //线上测试环境
// socketUrl = "ws://localhost:6001/"; baseUrl = "https://api.nuttyreading.com/"; //线上正式
// baseUrl = "https://twin-ui.com/demo/"; //baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
// baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/";
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
// socketUrl = "ws://8.129.186.35:6001/";
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// 生产环境11 // 生产环境11
// baseUrl = "http://59.110.212.44:9100/pb/";
// baseUrl = "https://testapi.nuttyreading.com/"; // baseUrl = "https://testapi.nuttyreading.com/";
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥 baseUrl = "https://api.nuttyreading.com/";
baseUrl = "https://api.nuttyreading.com/"; //1 //baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
// baseUrl = "ws://twin-ui.com:6001/";
// socketUrl = "ws://twin-ui.com:6001/";
} }
const courtConfig = { const courtConfig = {
//微信公众号APPID1 //微信公众号APPID1

View File

@@ -1,270 +1,273 @@
{ {
"name": "吴门医述", "name" : "吴门医述",
"appid": "__UNI__C7475A8", "appid" : "__UNI__C7475A8",
"description": "吴门医述", "description" : "吴门医述",
"networkTimeout": { "networkTimeout" : {
"request": 15000 "request" : 15000
}, },
"transformPx": false, "transformPx" : false,
"icons": [{ "icons" : [
"sizes": "分辨率192x192", {
"src": "图片路径" "sizes" : "分辨率192x192",
}], "src" : "图片路径"
"versionName": "1.0.39", }
"versionCode": 1039, ],
"app-plus": { "versionName" : "1.0.40",
"nvueCompiler": "weex", "versionCode" : 1040,
"compatible": { "app-plus" : {
"ignoreVersion": true "nvueCompiler" : "weex",
}, "compatible" : {
"screenOrientation": [ "ignoreVersion" : true
"portrait-primary", },
"portrait-secondary", "screenOrientation" : [
"landscape-primary", "portrait-primary",
"landscape-secondary" "portrait-secondary",
], "landscape-primary",
"privacy": { "landscape-secondary"
"prompt": "template", ],
"template": { "privacy" : {
"title": "用户协议和隐私政策", "prompt" : "template",
"message": "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://wumen.taihumed.com/agreement.html'>《用户协议》</a>和<a href='https://wumen.taihumed.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "template" : {
"buttonAccept": "同意", "title" : "用户协议和隐私政策",
"buttonRefuse": "暂不同意" "message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://wumen.taihumed.com/agreement.html'>《用户协议》</a>和<a href='https://wumen.taihumed.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
} "buttonAccept" : "同意",
}, "buttonRefuse" : "暂不同意"
"modules": { }
"Payment": {}, },
"Share": {}, "modules" : {
"Camera": {}, "Payment" : {},
"OAuth": {}, "Share" : {},
"VideoPlayer": {} "Camera" : {},
}, "OAuth" : {},
"distribute": { "VideoPlayer" : {}
"apple": { },
"devices": "universal" "distribute" : {
}, "apple" : {
// "UIBackgroundModes" : [ "audio" ] "devices" : "universal"
"android": { },
"permissionPhoneState": { // "UIBackgroundModes" : [ "audio" ]
"request": "none", "android" : {
"prompt": "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。" "permissionPhoneState" : {
}, "request" : "none",
"permissionExternalStorage": { "prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
"request": "none", },
"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" "permissionExternalStorage" : {
}, "request" : "none",
"permissions": [ "prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
"<uses-feature android:name=\"android.hardware.camera\"/>", },
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "permissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>", "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
], "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"], "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"minSdkVersion": 21, ],
"targetSdkVersion": 30, "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"schemes": "medicine" "minSdkVersion" : 21,
}, "targetSdkVersion" : 30,
"sdkConfigs": { "schemes" : "medicine"
"ad": {}, },
"maps": {}, "sdkConfigs" : {
"share": { "ad" : {},
"weixin": { "maps" : {},
"appid": "wx6b17b40171dea988", "share" : {
"UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/" "weixin" : {
} "appid" : "wx6b17b40171dea988",
}, "UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
"payment": { }
"alipay": { },
"__platform__": ["ios", "android"] "payment" : {
}, "alipay" : {
"appleiap": {}, "__platform__" : [ "ios", "android" ]
"weixin": { },
"__platform__": ["ios", "android"], "appleiap" : {},
"appid": "wx6b17b40171dea988", "weixin" : {
"UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/" "__platform__" : [ "ios", "android" ],
} "appid" : "wx6b17b40171dea988",
}, "UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
"oauth": {}, }
"push": {} },
}, "oauth" : {},
"splashscreen": { "push" : {}
"iosStyle": "common", },
"androidStyle": "default", "splashscreen" : {
"useOriginalMsgbox": true "iosStyle" : "common",
}, "androidStyle" : "default",
"ios": { "useOriginalMsgbox" : true
"dSYMs": false, },
// "UIBackgroundModes" : [ "audio" ], // 背景播放音乐 "ios" : {
"capabilities": { "dSYMs" : false,
"entitlements": { // "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
"com.apple.developer.associated-domains": ["applinks:verification.nuttyreading.com"] "capabilities" : {
} "entitlements" : {
}, "com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
"idfa": false, }
"urltypes": "medicine", },
"urlschemewhitelist": "nuttyreading,zmzm", "idfa" : false,
"privacyDescription": { "urltypes" : "medicine",
"NSPhotoLibraryUsageDescription": "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用", "urlschemewhitelist" : "nuttyreading,zmzm",
"NSCameraUsageDescription": "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用", "privacyDescription" : {
"NSPhotoLibraryAddUsageDescription": "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用" "NSPhotoLibraryUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
} "NSCameraUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
}, "NSPhotoLibraryAddUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用"
"icons": { }
"android": { },
"hdpi": "unpackage/res/icons/72x72.png", "icons" : {
"xhdpi": "unpackage/res/icons/96x96.png", "android" : {
"xxhdpi": "unpackage/res/icons/144x144.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xxxhdpi": "unpackage/res/icons/192x192.png" "xhdpi" : "unpackage/res/icons/96x96.png",
}, "xxhdpi" : "unpackage/res/icons/144x144.png",
"ios": { "xxxhdpi" : "unpackage/res/icons/192x192.png"
"appstore": "unpackage/res/icons/1024x1024.png", },
"ipad": { "ios" : {
"app": "unpackage/res/icons/76x76.png", "appstore" : "unpackage/res/icons/1024x1024.png",
"app@2x": "unpackage/res/icons/152x152.png", "ipad" : {
"notification": "unpackage/res/icons/20x20.png", "app" : "unpackage/res/icons/76x76.png",
"notification@2x": "unpackage/res/icons/40x40.png", "app@2x" : "unpackage/res/icons/152x152.png",
"proapp@2x": "unpackage/res/icons/167x167.png", "notification" : "unpackage/res/icons/20x20.png",
"settings": "unpackage/res/icons/29x29.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"settings@2x": "unpackage/res/icons/58x58.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"spotlight": "unpackage/res/icons/40x40.png", "settings" : "unpackage/res/icons/29x29.png",
"spotlight@2x": "unpackage/res/icons/80x80.png" "settings@2x" : "unpackage/res/icons/58x58.png",
}, "spotlight" : "unpackage/res/icons/40x40.png",
"iphone": { "spotlight@2x" : "unpackage/res/icons/80x80.png"
"app@2x": "unpackage/res/icons/120x120.png", },
"app@3x": "unpackage/res/icons/180x180.png", "iphone" : {
"notification@2x": "unpackage/res/icons/40x40.png", "app@2x" : "unpackage/res/icons/120x120.png",
"notification@3x": "unpackage/res/icons/60x60.png", "app@3x" : "unpackage/res/icons/180x180.png",
"settings@2x": "unpackage/res/icons/58x58.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"settings@3x": "unpackage/res/icons/87x87.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"spotlight@2x": "unpackage/res/icons/80x80.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight@3x": "unpackage/res/icons/120x120.png" "settings@3x" : "unpackage/res/icons/87x87.png",
} "spotlight@2x" : "unpackage/res/icons/80x80.png",
} "spotlight@3x" : "unpackage/res/icons/120x120.png"
} }
}, }
"compilerVersion": 3, }
"nvueLaunchMode": "fast", },
"splashscreen": { "compilerVersion" : 3,
"alwaysShowBeforeRender": false "nvueLaunchMode" : "fast",
}, "splashscreen" : {
"nativePlugins": {}, "alwaysShowBeforeRender" : false
"uniStatistics": { },
"enable": true "nativePlugins" : {},
}, "uniStatistics" : {
"safearea": { "enable" : true
//安全区域配置仅iOS平台生效 },
"bottom": { "safearea" : {
// 底部安全区域配置 //安全区域配置仅iOS平台生效
"offset": "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none" "bottom" : {
} // 底部安全区域配置
} "offset" : "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
}, }
// 5+App特有相关 }
"quickapp": {}, },
// 快应用特有相关 // 5+App特有相关
"mp-weixin": { "quickapp" : {},
"setting": { // 快应用特有相关
"urlCheck": false, "mp-weixin" : {
"es6": true, "setting" : {
"postcss": true, "urlCheck" : false,
"minified": true "es6" : true,
}, "postcss" : true,
"usingComponents": true, "minified" : true
"appid": "wxd3ba52b7661b36be", },
"permission": { "usingComponents" : true,
"scope.userLocation": { "appid" : "wxd3ba52b7661b36be",
"desc": "你的位置信息将用于小程序位置接口的效果展示" "permission" : {
} "scope.userLocation" : {
}, "desc" : "你的位置信息将用于小程序位置接口的效果展示"
"uniStatistics": { }
"enable": true },
} "uniStatistics" : {
}, "enable" : true
"h5": { }
"template": "template.h5.html", },
"router": { "h5" : {
"mode": "hash", "template" : "template.h5.html",
"base": "/uniappDemo/" "router" : {
}, "mode" : "hash",
"optimization": { "base" : "/uniappDemo/"
"treeShaking": { },
"enable": true "optimization" : {
} "treeShaking" : {
}, "enable" : true
"uniStatistics": { }
"enable": true },
} "uniStatistics" : {
}, "enable" : true
"_spaceID": "mp-3614b80b-2d75-4462-a481-4998f8187274", }
"uniStatistics": { },
"version": "2", "_spaceID" : "mp-3614b80b-2d75-4462-a481-4998f8187274",
"enable": true "uniStatistics" : {
}, "version" : "2",
"mp-alipay": { "enable" : true
"uniStatistics": { },
"enable": true "mp-alipay" : {
} "uniStatistics" : {
}, "enable" : true
"mp-baidu": { }
"uniStatistics": { },
"enable": true "mp-baidu" : {
} "uniStatistics" : {
}, "enable" : true
"mp-jd": { }
"uniStatistics": { },
"enable": true "mp-jd" : {
} "uniStatistics" : {
}, "enable" : true
"mp-kuaishou": { }
"uniStatistics": { },
"enable": true "mp-kuaishou" : {
} "uniStatistics" : {
}, "enable" : true
"mp-lark": { }
"uniStatistics": { },
"enable": true "mp-lark" : {
} "uniStatistics" : {
}, "enable" : true
"mp-qq": { }
"uniStatistics": { },
"enable": true "mp-qq" : {
} "uniStatistics" : {
}, "enable" : true
"mp-toutiao": { }
"uniStatistics": { },
"enable": true "mp-toutiao" : {
} "uniStatistics" : {
}, "enable" : true
"quickapp-webview-huawei": { }
"uniStatistics": { },
"enable": true "quickapp-webview-huawei" : {
} "uniStatistics" : {
}, "enable" : true
"quickapp-webview-union": { }
"uniStatistics": { },
"enable": true "quickapp-webview-union" : {
} "uniStatistics" : {
} "enable" : true
}
}
} }
// // 小程序特有相关

View File

@@ -4,17 +4,18 @@
// }, // },
"pages": [ "pages": [
{ {
"path": "pages/peanut/home",
"style": {
"navigationBarTitleText": "首页"
}
},{
"path": "pages/user/login", "path": "pages/user/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"enablePullDownRefresh": false // 禁止下拉刷新 "enablePullDownRefresh": false // 禁止下拉刷新
} }
}, },
{
"path": "pages/peanut/home",
"style": {
"navigationBarTitleText": "首页"
}
},
{ {
"path": "pages/mine/vip/index", "path": "pages/mine/vip/index",
"style": { "style": {
@@ -358,6 +359,12 @@
"navigationBarTitleText": "课程列表" "navigationBarTitleText": "课程列表"
} }
}, },
{
"path": "pages/course/scale",
"style": {
"navigationBarTitleText": "自评测表"
}
},
{ {
"path": "pages/course/courseDetail", "path": "pages/course/courseDetail",
"style": { "style": {

View File

@@ -1409,7 +1409,6 @@
}); });
return; return;
} }
let images = ""; let images = "";
if (this.uploadPicLIst.length > 0) { if (this.uploadPicLIst.length > 0) {
let list = this.uploadPicLIst.map((item) => item.url); let list = this.uploadPicLIst.map((item) => item.url);

View File

@@ -1,5 +1,5 @@
<template> <template>
<view> <view class="courseWrap">
<!-- 公共组件-每个页面必须引入 --> <!-- 公共组件-每个页面必须引入 -->
<public-module></public-module> <public-module></public-module>
<z-nav-bar :title="pageTitle" @back='handleBack'><view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"><uni-icons type="info" size="24"></uni-icons> 课程说明</view></z-nav-bar> <z-nav-bar :title="pageTitle" @back='handleBack'><view class="curseSet" slot="right" @click="shuomingPage('/pages/course/courseSet',tagId,pid)"><uni-icons type="info" size="24"></uni-icons> 课程说明</view></z-nav-bar>
@@ -8,28 +8,14 @@
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList" :activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs> itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
</view> </view>
<view class="containerBg"> <view class="containerBg" v-if="tagId!='71'">
<view class="subCate flex" v-if="subList.length> 0"> <view class="subCate flex" v-if="subList.length> 0">
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList" <text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList"
@click="curseClick(item)" :key="index">{{item.title}}</text> @click="curseClick(item)" :key="index">{{item.title}}</text>
</view> </view>
<view class="learnBox box"> <view class="learnBox box">
<!-- <view class="learn flexbox shiting">
<view class="item" v-for="(item, index) in courseList" :key="index">
<view class="imgcontainer">
<image :src="item.image" mode="aspectFit"></image>
</view>
<view class="buyItems flexbox">
<view class="txt555">
{{item.title}}
</view>
</view>
</view>
</view> -->
<view class="newBox"> <view class="newBox">
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)"> <view class="item flexbox" v-for="(item, index) in courseList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer"> <view class="imgcontainer">
<image :src="item.image" mode="aspectFit"></image> <image :src="item.image" mode="aspectFit"></image>
</view> </view>
@@ -57,263 +43,297 @@
<u-divider v-show="status == 1" text="加载中..."></u-divider> <u-divider v-show="status == 1" text="加载中..."></u-divider>
</view> </view>
<view> <view>
<!-- <u-back-top scroll-top="100"></u-back-top> -->
<u-back-top :scroll-top="scrollTop" bottom="150" :customStyle='bgiStyle' <u-back-top :scroll-top="scrollTop" bottom="150" :customStyle='bgiStyle'
:iconStyle="iconStyle"></u-back-top> :iconStyle="iconStyle"></u-back-top>
</view> </view>
<public-module></public-module> <public-module></public-module>
<z-navigation></z-navigation> <z-navigation></z-navigation>
<!-- <music-play :playData="playData"></music-play> --> </view>
<view class="formBlock" v-if="tagId=='71'">
<view v-for="(item,index) in formList" :key="index" class="form_item">
<text class="form_title">{{item.title}}</text>
<view class="form_solid">
<view class="form_des">{{item.des}}</view>
<u-button class="form_btn" @click="test(item)">进入测试</u-button>
</view>
</view>
<public-module></public-module>
<z-navigation></z-navigation>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import musicPlay from '@/components/music.vue' import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
var clear; var clear;
import { import {
mapState mapState
} from 'vuex'; } from 'vuex';
export default { export default {
data() { data() {
return { return {
playData: {}, playData: {},
tagId: null, tagId: null,
pid:null, pid:null,
fixed: false, fixed: false,
fatherTabId: null, fatherTabId: null,
subTabId: null, // subTabId: null, //
bgiStyle: { bgiStyle: {
background: '#fff' background: '#fff'
}, },
iconStyle: { iconStyle: {
fontSize: '40rpx', fontSize: '40rpx',
fontWeight: 'bold', fontWeight: 'bold',
color: '#258feb', color: '#258feb',
}, },
scrollTop: 0, scrollTop: 0,
activeStyle: { activeStyle: {
color: '#333', color: '#333',
fontWeight: 'bold', fontWeight: 'bold',
transform: 'scale(1.2)', transform: 'scale(1.2)'
// backgroundColor: '#258feb' },
subList: [],
}, scrollable: false,
subList: [], pageTitle: '',
scrollable: false, tabList: [],
pageTitle: '', curTagId: 0,
tabList: [], courseList: [],
curTagId: 0, status: 3, // 0 不显示, 1 加载中2 加载全部完成3 暂无数据
courseList: [], page: 1,
status: 3, // 0 不显示, 1 加载中2 加载全部完成3 暂无数据 flag: true, // 函数是否执行完
page: 1, //心身量表
flag: true, // 函数是否执行完 formList: []
}; };
}, },
//第一次加载 //第一次加载
onLoad(e) { onLoad(e) {
// 隐藏原生的tabbar // 隐藏原生的tabbar
uni.hideTabBar(); uni.hideTabBar();
this.tagId = e.id this.tagId = e.id
this.pageTitle = e.title this.pageTitle = e.title
this.pid = e.pid this.pid = e.pid
console.log(e, '传入分类id') this.getCateList(this.tagId)
this.getCateList(this.tagId) //如果是心身量表栏目
}, if(this.tagId=='71'){
onPageScroll(e) { this.getFormList();
this.scrollTop = e.scrollTop; }
if (this.scrollTop > 500) { },
this.fixed = true onPageScroll(e) {
} else { this.scrollTop = e.scrollTop;
this.fixed = false if (this.scrollTop > 500) {
} this.fixed = true
// console.log(this.scrollTop,'this.scrollTop') } else {
}, this.fixed = false
onPullDownRefresh() { }
console.log('下拉刷新') },
this.status = 3 onPullDownRefresh() {
this.page = 1 this.status = 3
this.courseList = [] this.page = 1
this.courseList = []
this.getData(this.subTabId)
uni.stopPullDownRefresh()
},
onReachBottom() {
if (this.status != 2 && this.flag) {
this.page++
this.getData(this.subTabId) this.getData(this.subTabId)
uni.stopPullDownRefresh() }
},
computed: {
...mapState(['userInfo'])
},
//页面显示
onShow() {
//隐藏原生的tabbar
uni.hideTabBar();
uni.removeStorageSync('data')
uni.removeStorageSync('selectedData')
uni.removeStorageSync('resList')
},
components: {
musicPlay
},
//方法
methods: {
handleBack(){
uni.setStorageSync('fixed',true)
}, },
onReachBottom() { surl(imageurl) {
if (this.status != 2 && this.flag) { return `url(${imageurl})`
this.page++
this.getData(this.subTabId)
}
console.log('触底加载', this.page)
}, },
computed: { getCateList(id) {
...mapState(['userInfo']) $http.request({
}, url: "medical/home/getChildCourseMedicalTree",
//页面显示 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
onShow() { data: {
// 隐藏原生的tabbar "id": id,
uni.hideTabBar(); },
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
}, },
components: { })
musicPlay .then(res => {
}, if (res.code == 0) {
//方法 if (res.labels.length > 0) {
methods: { var list = []
handleBack(){ res.labels.forEach(item => {
uni.setStorageSync('fixed',true) item.name = item.title
}, })
surl(imageurl) { this.tabList = res.labels
return `url(${imageurl})` // this.fatherTabId = this.tabList[0].id
}, if (this.tabList[0].isLast == 1) { // 终极
getCateList(id) {
$http.request({
url: "medical/home/getChildCourseMedicalTree",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"id": id,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
if (res.labels.length > 0) {
var list = []
res.labels.forEach(item => {
item.name = item.title
})
this.tabList = res.labels
// this.fatherTabId = this.tabList[0].id
if (this.tabList[0].isLast == 1) { // 终极
this.subList = []
this.subTabId = this.tabList[0].id
} else { //非终极
if (this.tabList[0].children.length > 0) {
this.subList = this.tabList[0].children
this.subTabId = this.subList[0].id
} else {
this.subList = []
this.subTabId = null
}
}
if (this.subTabId) {
// console.log(this.subTabId, this.subList[0].title, '初始进入')
this.courseList = []
this.status = 1
this.getData(this.subTabId)
}
}else{
this.subList = [] this.subList = []
this.subTabId = id this.subTabId = this.tabList[0].id
this.getData(id) } else { //非终极
} if (this.tabList[0].children.length > 0) {
console.log(this.curTagId, '当前高亮') this.subList = this.tabList[0].children
} this.subTabId = this.subList[0].id
}).catch(e => {
console.log(e, '获取子分类报错')
});
},
fatherClick(e) {
// console.log(e, '点击')
this.page = 1
var item = e
if (item.isLast == 1) { // 终极
this.subList = []
this.subTabId = item.id
} else {
if (item.children.length > 0) { // 非终极
this.subList = item.children
this.subTabId = item.children[0].id
} else {
this.subList = []
this.subTabId = null
}
}
if (this.subTabId) {
this.status = 1
this.courseList = []
this.getData(this.subTabId);
}
},
curseClick(item) {
this.subTabId = item.id
this.courseList = []
this.page = 1
this.getData(this.subTabId);
},
getData(id) {
// if (!this.flag) {
// console.log('正在执行,未完成')
// return
// }
this.status = 1
this.flag = false
$http.request({
url: "medical/home/getMedicalCourseList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"id": id,
"limit": 12,
"page": this.page
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
if (res.courses.records.length > 0) {
var list = res.courses.records
this.courseList = this.courseList.concat(list)
if (res.courses.pages > this.page) {
this.status = 0
} else { } else {
this.status = 2 this.subList = []
this.subTabId = null
} }
} else if (this.page > 1) {
this.status = 2 // 加载完成
} else {
this.status = 3 // 暂无数据
} }
console.log('status', this.status) if (this.subTabId) {
this.flag = true // console.log(this.subTabId, this.subList[0].title, '初始进入')
this.courseList = []
this.status = 1
this.getData(this.subTabId)
}
}else{
this.subList = []
this.subTabId = id
this.getData(id)
} }
console.log(this.curTagId, '当前高亮')
}).catch(e => { }
this.flag = true }).catch(e => {
console.log(e, '数据报错') console.log(e, '获取子分类报错')
this.status = 3
uni.showToast({
title:`获取数据失败`,
icon:'error'
})
});
},
// 跳转
onPageJump(url,id) {
uni.navigateTo({
url: `${url}?id=${id}`
}); });
},
shuomingPage(url,id,pid){
uni.navigateTo({
url: `${url}?id=${id}&pid=${pid}`
});
}
}, },
}; fatherClick(e) {
this.page = 1
var item = e
if (item.isLast == 1) { // 终极
this.subList = []
this.subTabId = item.id
} else {
if (item.children.length > 0) { // 非终极
this.subList = item.children
this.subTabId = item.children[0].id
} else {
this.subList = []
this.subTabId = null
}
}
if (this.subTabId) {
this.status = 1
this.courseList = []
this.getData(this.subTabId);
}
},
curseClick(item) {
this.subTabId = item.id
this.courseList = []
this.page = 1
this.getData(this.subTabId);
},
getData(id) {
this.status = 1
this.flag = false
$http.request({
url: "medical/home/getMedicalCourseList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"id": id,
"limit": 12,
"page": this.page
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
if (res.courses.records.length > 0) {
var list = res.courses.records
this.courseList = this.courseList.concat(list)
if (res.courses.pages > this.page) {
this.status = 0
} else {
this.status = 2
}
} else if (this.page > 1) {
this.status = 2 // 加载完成
} else {
this.status = 3 // 暂无数据
}
console.log('status', this.status)
this.flag = true
}
}).catch(e => {
this.flag = true
console.log(e, '数据报错')
this.status = 3
uni.showToast({
title:`获取数据失败`,
icon:'error'
})
});
},
// 跳转
onPageJump(url,id) {
uni.navigateTo({
url: `${url}?id=${id}`
});
},
shuomingPage(url,id,pid){
uni.navigateTo({
url: `${url}?id=${id}&pid=${pid}`
});
},
//心身量表
getFormList() {
$http.request({
url: "common/selfEvaluationForm/formList",
method: "POST",
data: {},
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
this.formList = res.formList;
}
}).catch(e => {
});
},
//进入测试
test(item){
uni.setStorageSync('data',JSON.stringify(item))
uni.navigateTo({
url: '/pages/course/scale'
})
}
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/style/mixin.scss'; @import '@/style/mixin.scss';
.courseWrap{
height: 100vh;
background-color: #f4f7ff;
}
.containerBg { .containerBg {
background-color: $containerColor; background-color: $containerColor;
padding: 0 20rpx; padding: 0 20rpx;
@@ -424,8 +444,8 @@
} }
.learnBox { .learnBox {
// background-color: #fff; margin-bottom: 10px;
margin-top: 10px; padding-top: 10px;
.learn { .learn {
flex-wrap: wrap; flex-wrap: wrap;
@@ -458,4 +478,40 @@
} }
} }
} }
.formBlock{
background-color: #f4f7ff;
padding: 20rpx;
}
.form_item{
margin-bottom: 50rpx;
}
.form_solid{
border-radius: 20rpx;
background-color: #fff;
padding: 20rpx 20rpx 50rpx;
box-shadow: 0px 0px 10px 0px #a7bbe4;
}
.form_title{
display: inline-block;
width: 100%;
font-size: 42rpx;
color: #333;
text-align: center;
padding: 30rpx 0 20rpx;
}
.form_des{
font-size: 30rpx;
line-height: 48rpx;
color: #666;
}
.form_btn{
width: 300rpx;
height: 70rpx;
margin: 40rpx auto 0;
color: #fff;
font-size: 30rpx;
background: #258feb;
border-radius: 10rpx;
}
</style> </style>

398
pages/course/scale.vue Normal file
View File

@@ -0,0 +1,398 @@
<template>
<view class="viewWrap">
<z-nav-bar :title="title"></z-nav-bar>
<view class="scale_block" v-show="status==0">
<text class="scale_title">{{data.title}}</text>
<view class="scale_solid">
<view class="scale_des"><text style="font-weight: bold;">量表简介</text>{{data.des}}</view>
<view class="scale_des"><text style="font-weight: bold;">题目数量</text>{{data.num}}</view>
<view class="scale_des"><text style="font-weight: bold;">测试说明</text>{{data.tip}}</view>
</view>
<!-- Picker 组件 -->
<picker mode="multiSelector" :range="multiArray" @change="bindMultiPickerChange" @columnchange="bindMultiPickerColumnChange">
<u-button class="scale_btn">进入测试</u-button>
</picker>
</view>
<view class="scale_block" v-show="status==1">
<view class="test_block">
<text class="current_test">{{currentIndex+1}}{{testList[currentIndex]}}</text>
<radio-group @change="radioChange" class="test_group" :style="{ height: radioHeight + 'px' }">
<label v-for="(item,index) in checkList" :key="index" class="test_label">
<radio :value="String(item.value)" class="test_radio">{{item.name}}</radio>
</label>
</radio-group>
</view>
</view>
<view class="scale_block" v-show="status==2">
<view class="result_block">
<text class="result_title">{{data.title}}-测试结果</text>
<text class="result_total">{{resultTotal}}</text>
<text class="result_content">{{resultContent}}</text>
<u-button class="result_btn" @click="back">回到首页</u-button>
<view class="result_border">
<text class="result_con">结果解释</text>
<text class="result_cnRes" v-if="data.type=='yiyu'&&countryIndex==0">{{data.cnRes}}</text>
<text class="result_cnRes" v-else>{{data.worldRes}}</text>
<text class="result_con" style="padding-top: 40rpx;">计分规则</text>
<text class="result_cnRes">{{data.role}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
export default {
data() {
return {
data: {},
countries: [],
multiArray: [[], []],
value: [0, 0],
selectedData: {}, //城市
status: 0, //是否进入测试
title: '心身量表',
countryIndex: 0,
timer: null, // 用来绑定当前选择的值
checkList: [], //默认选项列表
testList: [], //测试题目数据
currentIndex: 0, //默认第一题
resList: [], //测试结果数据集合,用于传参!记录!
radioHeight: '',
resultContent: '',
resultTotal: ''
};
},
onLoad() {
this.data = JSON.parse(uni.getStorageSync('data'));
this.resultList = this.data.result;
//选项
this.checkList = this.resultList.map((item, index) => ({
name: item,
value: index+1
}));
this.getCityList();
this.getTestData();
//radioHeight
this.radioHeight = this.checkList.length*42 +20;
},
methods: {
//获取国家-一级
getCountryList() {
$http.request({
url: "common/baseArea/getAllBaseArea",
method: "POST",
data: {},
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
this.countries = res.baseAreas;
this.countries.forEach((country, index)=>{
if(country.code=='86'){
this.countries[index].cities = this.cityList;
}
})
//初始化 picker 数据
this.initPickerData();
}
}).catch(e => {
});
},
//获取城市-二级
getCityList() {
$http.request({
url: "common/province/getProvinceList",
method: "POST",
data: {},
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
const newCityList = res.provinceList.map( city => {
return city.provName;
});
this.cityList = newCityList;
this.getCountryList();
}
}).catch(e => {
});
},
//展示城市数据
initPickerData() {
//第一列是国家名
const countryNames = this.countries.map(item => item.title);
this.multiArray[0] = countryNames;
//默认选择中国,并加载其省份
if (this.countries[0].cities) {
this.multiArray[1] = Object.keys(this.countries[0].cities).map(key => this.countries[0].cities[key]);
} else {
this.multiArray[1] = [];
}
},
//picker修改值
bindMultiPickerChange(e) {
this.value = e.detail.value;
this.updateCurrentSelection();
},
//修改动作
bindMultiPickerColumnChange(e) {
let data = {
multiArray: this.multiArray,
value: this.value
};
if (e.detail.column === 0) {
// 如果是第一列(国家)改变了,则需要更新第二列(城市)
const selectedCountry = this.countries[e.detail.value];
if (selectedCountry.cities) {
// 如果选择了中国,加载省份
data.multiArray[1] = Object.keys(selectedCountry.cities).map(key => selectedCountry.cities[key]);
data.value = [e.detail.value, 0];
} else {
// 否则清空第二列
data.multiArray[1] = [];
data.value = [e.detail.value, 0];
}
}
this.multiArray = data.multiArray;
this.value = data.value;
//this.updateCurrentSelection();
},
updateCurrentSelection() {
const countryIndex = this.value[0];
this.countryIndex = countryIndex; //判断抑郁结果 标准的定义文字显示
const cityIndex = this.value[1];
const selectedCountry = this.multiArray[0][countryIndex];
const selectedCity = this.multiArray[1][cityIndex];
this.selectedData = {
country: selectedCountry
}
if(selectedCity){
this.selectedData.city = selectedCity
}else{
this.selectedData.city = ''
}
//切换界面,进入测试
this.status = 1;
this.title = '开始测试题';
},
//测试题目
getTestData(){
$http.request({
url: "common/selfEvaluationForm/formSubjectList",
method: "POST",
data: {
type: this.data.type
},
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
if(res.list&&res.list.length>0){
this.testList = res.list; //题目数据
}else{
uni.showToast({
title: '暂无数据',
icon: 'none'
})
}
}
}).catch(e => {
});
},
//选值
radioChange(e){
const value = e.detail.value;
this.resList.push(Number(value)); //记录测试结果集合
//延迟展示下一题
if (this.currentIndex < this.testList.length - 1) {
this.timer = setTimeout(() => {
this.currentIndex++;
this.checkList = []
//延迟更换选项,避免再显示被勾选
this.timer = setTimeout(() => {
this.checkList = this.resultList.map((item, index) => ({
name: item,
value: index+1
}));
}, 50)
}, 500)
}else{
//如果做完最后一道题
this.getCountForm();
}
},
//测试结果
getCountForm(){
$http.request({
url: "common/selfEvaluationForm/countForm",
method: "POST",
data: {
country: this.selectedData.country,
city: this.selectedData.city,
type: this.data.type,
resList: this.resList
},
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
this.status = 2;
this.resultContent = res.status;
this.resultTotal = res.total;
}
}).catch(e => {
});
},
//回到首页
back(){
uni.switchTab({
url: '/pages/peanut/home'
})
uni.setStorageSync('fixed',true)
}
}
};
</script>
<style scoped>
.viewWrap{
height: 100vh;
background-color: #f4f7ff;
}
.scale_block{
padding: 20rpx;
}
.scale_item{
margin-bottom: 50rpx;
}
.scale_solid{
border-radius: 20rpx;
background-color: #fff;
padding: 20rpx;
box-shadow: 0px 0px 10px 0px #a7bbe4;
}
.scale_title{
display: inline-block;
width: 100%;
font-size: 42rpx;
color: #333;
text-align: center;
padding: 30rpx 0 20rpx;
}
.scale_des{
font-size: 30rpx;
line-height: 48rpx;
color: #666;
padding: 5rpx 0;
}
.scale_btn{
width: 500rpx;
height: 70rpx;
margin: 60rpx auto 0;
color: #fff;
font-size: 30rpx;
background: #258feb;
border-radius: 10rpx;
}
.test_group{
margin-top: 20rpx;
background: #fff;
border-radius: 20rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
.uni-radio-input{
width: 14px !important;
height: 14px !important;
margin-right: 15rpx;
}
}
.test_label{
display: block;
padding: 20rpx 0;
font-size: 30rpx;
}
.test_radio{
display: flex;
align-items: center;
}
.current_test{
font-size: 32rpx;
padding-top: 30rpx;
color: #000;
display: block;
}
.result_block{
border-radius: 20rpx;
background-color: #fff;
padding: 80rpx 30rpx 50rpx;
color: #333;
}
.result_title{
display: block;
font-size: 36rpx;
line-height: 40rpx;
text-align: center;
}
.result_total{
display: block;
font-size: 52rpx;
line-height: 50rpx;
font-weight: 800;
color: crimson;
padding: 60rpx 0 30rpx;
text-align: center;
}
.result_content{
display: block;
font-size: 32rpx;
text-align: center;
}
.result_btn{
width: 500rpx;
height: 70rpx;
margin: 60rpx auto 0;
color: #fff;
font-size: 30rpx;
background: #258feb;
border-radius: 10rpx;
}
.result_cnRes{
display: block;
font-size: 28rpx;
line-height: 48rpx;
margin-top: 10rpx;
}
.result_con{
display: block;
font-size: 32rpx;
line-height: 48rpx;
color: crimson;
}
.result_border{
border: 1rpx solid #258feb;
border-radius: 10rpx;
padding: 40rpx 30rpx;
margin-top: 100rpx;
}
</style>

View File

@@ -10,9 +10,7 @@
--> -->
</z-nav-bar> </z-nav-bar>
<view class="contentBox commonPageContentBox" :style="`margin-top: ${ <view class="contentBox commonPageContentBox">
(40 + statusBarHeight) * 2
}rpx;height: calc(100% - ${(50 + statusBarHeight) * 2}rpx) !important;`">
<view class="flash_sale_content"> <view class="flash_sale_content">
<scroll-view scroll-y="true" class="scroll-Y" style=""> <scroll-view scroll-y="true" class="scroll-Y" style="">
<view class="scroll-view-item flash_sale_content_item color_shandow" v-for="(v, i) in dataList" <view class="scroll-view-item flash_sale_content_item color_shandow" v-for="(v, i) in dataList"
@@ -263,8 +261,6 @@
}, },
background: "rgb(255 255 255 / 85%)", background: "rgb(255 255 255 / 85%)",
buttonbg: "linear-gradient(to right, #3F7FC9 0%,#D3EEFC 100%) ", buttonbg: "linear-gradient(to right, #3F7FC9 0%,#D3EEFC 100%) ",
// titleBackground:
// "linear-gradient(130deg, rgb(153, 202, 192) 0%, rgb(192, 223, 207) 50%)",
color: "linear-gradient(130deg,rgb(45, 56, 244) 0%, #72AD92 100%)", color: "linear-gradient(130deg,rgb(45, 56, 244) 0%, #72AD92 100%)",
list: res.list[i], list: res.list[i],
quanyi: this.superQuanyi, quanyi: this.superQuanyi,
@@ -278,11 +274,7 @@
list: res.list[i], list: res.list[i],
background: "#c3e7f7c7", background: "#c3e7f7c7",
buttonbg: "rgba(255, 255, 255, 0.85)", buttonbg: "rgba(255, 255, 255, 0.85)",
// titleBackground:
// "linear-gradient(130deg, #E4F3E9 0%,#D6E7EF 100%) ",
color: "linear-gradient(130deg,#1ECEDE 0%, #72AD92 100%)", color: "linear-gradient(130deg,#1ECEDE 0%, #72AD92 100%)",
quanyi: this.sociologyQuanyi, quanyi: this.sociologyQuanyi,
}); });
} }
@@ -628,7 +620,7 @@
// console.log(res, '脉穴分类获取成功') // console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) { // if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list // this.oneCateList = res.list
this.getTowCateList(this.oneCateList[0].type); // this.getTowCateList(this.oneCateList[0].type);
// } else { // } else {
// this.oneCateList = [] // this.oneCateList = []
// } // }

View File

@@ -403,7 +403,6 @@
if(this.fixed){ if(this.fixed){
this.curseClick(this.currentItem,this.currentIndex); this.curseClick(this.currentItem,this.currentIndex);
}else{ }else{
console.log('我是else11111')
this.currentIndex = 0; this.currentIndex = 0;
this.currentItem = null; this.currentItem = null;
} }