修改
This commit is contained in:
@@ -5,13 +5,13 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// baseUrl = "http://localhost:7001/";
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
|
||||
|
||||
|
||||
|
||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
|
||||
|
||||
// baseUrl = "http://101.201.146.165:8088/App-EH/"; // 一路健康APP线上正式
|
||||
@@ -34,8 +34,8 @@ if (process.env.NODE_ENV === 'development') {
|
||||
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/"; //磊哥
|
||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||
baseUrl = "https://testapi.nuttyreading.com/";
|
||||
// baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "ws://twin-ui.com:6001/";
|
||||
// socketUrl = "ws://twin-ui.com:6001/";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -105,7 +105,7 @@ export default {
|
||||
timer: null,
|
||||
isLeftClick: false,
|
||||
isOpenRightButton: true,
|
||||
viewid: "cont0",
|
||||
viewid: "",
|
||||
viewidIndex: 0,
|
||||
cateIconList: [
|
||||
{
|
||||
@@ -508,4 +508,7 @@ export default {
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
.richDetail{
|
||||
padding: 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,31 +31,99 @@
|
||||
height: 50rpx;"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<uni-indexed-list :options="indexList" :showSelect="false" @itemKeyClick="getCurrent">
|
||||
|
||||
<!-- labelSlot -->
|
||||
|
||||
<u-index-list
|
||||
<template slot="titleSlot" slot-scope="slotProps">
|
||||
|
||||
<text :class="`cate_item_name ${viewidIndex == slotProps.rowIndex ? 'hot' : ''}`">{{ slotProps.row }}</text>
|
||||
</template>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
|
||||
<common-list
|
||||
noDataIcon="data"
|
||||
:isCondition="true"
|
||||
:isNoIcon="true"
|
||||
|
||||
:dataList="slotProps.row"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<image
|
||||
v-if="slotProps.row.image"
|
||||
:src="slotProps.row.image"
|
||||
mode="aspectFil"
|
||||
class="book_image"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
src="@/static/icon/videoIcon.png"
|
||||
mode="aspectFil"
|
||||
class="book_image"
|
||||
></image>
|
||||
|
||||
<view class="related_courses_name">
|
||||
<view class="">
|
||||
{{ slotProps.row.title }}
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 10rpx">
|
||||
<view
|
||||
v-for="item in slotProps.row.courseCatalogueEntityList"
|
||||
style="float: left; margin-right: 20rpx"
|
||||
>
|
||||
{{
|
||||
slotProps.row.courseCatalogueEntityList.length > 1
|
||||
? item.title
|
||||
: "整部"
|
||||
}}:
|
||||
|
||||
<text v-if="item.halfFee == 0 && item.fee == 0">免费</text>
|
||||
<text v-else-if="item.halfFee == 0 || item.fee == 0">
|
||||
{{ item.halfFee != 0 ? item.halfFee : "免费" }}/{{
|
||||
item.fee != 0 ? item.fee : "免费"
|
||||
}}</text
|
||||
>
|
||||
<text v-else-if="item.halfFee != 0 || item.fee != 0">
|
||||
{{ item.halfFee }}/{{ item.fee }}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
</common-list>
|
||||
|
||||
|
||||
</template>
|
||||
</uni-indexed-list>
|
||||
<!-- <u-index-list
|
||||
:index-list="indexList"
|
||||
activeColor="#60CABF"
|
||||
:uIndexStyle="{
|
||||
height: 'auto',
|
||||
padding: '20rpx',
|
||||
margin: '20rpx',
|
||||
|
||||
}"
|
||||
>
|
||||
<view v-for="(item, index) in itemArr">
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
|
||||
<u-index-anchor
|
||||
:text="indexList[index]"
|
||||
bgColor="#AFDECC"
|
||||
></u-index-anchor>
|
||||
<!-- #endif -->
|
||||
|
||||
<u-index-item>
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
|
||||
<u-index-anchor :text="indexList[index]"></u-index-anchor>
|
||||
<!-- #endif -->
|
||||
|
||||
<common-list
|
||||
noDataIcon="data"
|
||||
:isCondition="true"
|
||||
:isNoIcon="true"
|
||||
@lower="onReachBottom1"
|
||||
|
||||
:dataList="item"
|
||||
label="title"
|
||||
>
|
||||
@@ -102,12 +170,12 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||
|
||||
</template>
|
||||
</common-list>
|
||||
</u-index-item>
|
||||
</view>
|
||||
</u-index-list>
|
||||
</u-index-list> -->
|
||||
|
||||
|
||||
|
||||
@@ -132,7 +200,7 @@ export default {
|
||||
timer: null,
|
||||
isLeftClick: false,
|
||||
isOpenRightButton: true,
|
||||
viewid: "cont0",
|
||||
viewid: "",
|
||||
viewidIndex: 0,
|
||||
|
||||
cateIconList: [
|
||||
@@ -304,6 +372,11 @@ export default {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
getCurrent(data){
|
||||
console.log('data at line 375:', data)
|
||||
this.viewidIndex=data
|
||||
|
||||
},
|
||||
close() {
|
||||
this.isOpenRightButton = false;
|
||||
},
|
||||
@@ -395,7 +468,7 @@ export default {
|
||||
|
||||
this.cateIconList = res.list;
|
||||
this.indexList = this.cateIconList.map((e) => {
|
||||
return e.sociology.title;
|
||||
return {...e,data:e.courseList,letter:e.sociology.title};
|
||||
});
|
||||
console.log("this.indexList at line 645:", this.indexList);
|
||||
this.itemArr = this.cateIconList.map((e) => {
|
||||
@@ -599,7 +672,11 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.cate_item_name {
|
||||
|
||||
}
|
||||
|
||||
|
||||
.cate_item_name {
|
||||
padding-top: 60rpx;
|
||||
width: 100%;
|
||||
// margin-left: 21rpx;
|
||||
@@ -611,7 +688,6 @@ export default {
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.hot {
|
||||
color: $themeColor !important;
|
||||
}
|
||||
@@ -641,7 +717,7 @@ export default {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
/deep/.list_item {
|
||||
padding-left: 20rpx;
|
||||
padding: 12rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-color: #efeef4 !important;
|
||||
|
||||
@@ -44,10 +44,7 @@
|
||||
<view
|
||||
v-if="curriculumData.image"
|
||||
:style="`height: auto !important;${
|
||||
(cateList.length > 0 &&
|
||||
cateList[currentCateIndex].isBuy == 0 &&
|
||||
vip.type == '0') ||
|
||||
vip.type != 0
|
||||
goBuyTitle
|
||||
? 'padding-top:80rpx'
|
||||
: ''
|
||||
}`"
|
||||
@@ -74,7 +71,7 @@
|
||||
>
|
||||
</view>
|
||||
|
||||
<view class="containerBg1">
|
||||
<view class="containerBg1" :style="`${curriculumData.content && curriculumData.content != ''?'padding:40rpx 0;':''}`">
|
||||
<view class="course_info_box">
|
||||
<view class="course_info">
|
||||
<view class="flexbox course_title" v-if="curriculumData.id">
|
||||
@@ -106,7 +103,7 @@
|
||||
|
||||
<view class="containerBg2">
|
||||
<view class="shiting_content">
|
||||
<view v-for="(v, i) in cateList" style="margin-bottom: 40rpx">
|
||||
<view v-for="(v, i) in cateList" class="catalogueList" style="margin-top: 20rpx">
|
||||
<view class="catalogueTitle chapter_title">
|
||||
<view class="top">
|
||||
<view class="line"></view>
|
||||
@@ -161,7 +158,9 @@
|
||||
|
||||
<!-- -->
|
||||
</view>
|
||||
<view class="chapter_content" v-if="courseList[i].length>0">
|
||||
|
||||
|
||||
<view class="chapter_content" v-if="courseList[i]">
|
||||
|
||||
<courseDescription
|
||||
:isCondition="true"
|
||||
@@ -207,12 +206,7 @@
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view
|
||||
></view>
|
||||
</view>
|
||||
|
||||
<view class="small_class_teaching_box">
|
||||
<view class="small_class_teaching_box">
|
||||
<!-- <view class="small_class_teaching_top">
|
||||
<view class="small_class_teaching_top_left">
|
||||
<image src="@/static/icon/course_ic.png" mode="aspectFil" class="icon1"></image>
|
||||
@@ -246,36 +240,33 @@
|
||||
<view class="progress_icon" style=""
|
||||
><u-line-progress
|
||||
activeColor="#3AB3AE"
|
||||
height="18"
|
||||
:percentage="percentage"
|
||||
height="14"
|
||||
:percentage="v.completion"
|
||||
:showText="false"
|
||||
></u-line-progress>
|
||||
<text
|
||||
v-if="percentage"
|
||||
|
||||
style="
|
||||
font-size: 28rpx;
|
||||
margin-left: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: -2rpx;
|
||||
font-weight: 700;
|
||||
"
|
||||
>
|
||||
{{ percentage }} %</text
|
||||
{{ v.completion }} %</text
|
||||
>
|
||||
</view>
|
||||
<image
|
||||
src="@/static/icon/curriculum_05.png"
|
||||
mode="aspectFil"
|
||||
class="icon1"
|
||||
/>
|
||||
<image
|
||||
src="@/static/icon/curriculum_07.png"
|
||||
mode="aspectFil"
|
||||
class="icon2"
|
||||
/>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view
|
||||
></view>
|
||||
</view>
|
||||
|
||||
|
||||
<view
|
||||
class="small_class_teaching_box related_courses_box"
|
||||
v-if="relatedCoursesList.length > 0"
|
||||
@@ -1238,8 +1229,8 @@ export default {
|
||||
|
||||
.small_class_teaching_box {
|
||||
width: 100%;
|
||||
// margin-top: 20rpx;
|
||||
background: #f0fbf3;
|
||||
margin-top: 20rpx;
|
||||
// background: #f0fbf3;
|
||||
|
||||
.small_class_teaching_top {
|
||||
padding: 20rpx 20rpx 0 10rpx;
|
||||
@@ -1295,7 +1286,10 @@ export default {
|
||||
.schedule {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
padding: 20rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10rpx 0;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
color: #018f89;
|
||||
@@ -1303,7 +1297,7 @@ export default {
|
||||
// font-family: MicrosoftYaHei;
|
||||
|
||||
.icon_box {
|
||||
width: 100%;
|
||||
width:auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0rpx;
|
||||
@@ -1317,14 +1311,16 @@ export default {
|
||||
}
|
||||
|
||||
.progress_box {
|
||||
width: 100%;
|
||||
width: calc(100% - 180rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
|
||||
.progress_icon {
|
||||
width: calc(100% - 240rpx);
|
||||
width: calc(100% - 60rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.icon1 {
|
||||
@@ -1621,10 +1617,9 @@ export default {
|
||||
}
|
||||
|
||||
.containerBg2 {
|
||||
padding-top: 40rpx;
|
||||
// padding-top: 40rpx;
|
||||
// margin-top: 100rpx;
|
||||
background: linear-gradient(108deg, #e4f8eb 0%, #d1e8da 100%) !important;
|
||||
|
||||
|
||||
.shiting {
|
||||
line-height: 100rpx;
|
||||
background: linear-gradient(130deg, #4fa1fd 0%, #12f3ff 100%);
|
||||
@@ -1644,7 +1639,7 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
.shiting_content {
|
||||
padding: 20rpx;
|
||||
padding: 20rpx 0 0;
|
||||
}
|
||||
}
|
||||
.chapter_title {
|
||||
@@ -1699,6 +1694,7 @@ export default {
|
||||
.catalogueTitle {
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
// background-image: linear-gradient(108deg, #cae9f9 0%, #e1f6fc8c 50%);
|
||||
|
||||
// background-image: linear-gradient(180deg, #cfe0ff 0%, #fff 50%);
|
||||
@@ -1766,6 +1762,7 @@ export default {
|
||||
margin-top: -4rpx;
|
||||
// position: relative;
|
||||
z-index: 1;
|
||||
// padding: 40rpx 0;
|
||||
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
// background-color: #fff;
|
||||
@@ -1780,4 +1777,14 @@ export default {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.catalogueList{
|
||||
background: linear-gradient(108deg, #e4f8eb 0%, #d1e8da 100%) !important;
|
||||
padding: 20rpx;
|
||||
padding-bottom: 0;
|
||||
|
||||
}
|
||||
|
||||
.catalogueList:nth-child(1){
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</view>
|
||||
</template> -->
|
||||
|
||||
<view class="contentBox commonPageContentBox">
|
||||
<view class="contentBox commonPageContentBox" :style="`height:auto !important`">
|
||||
<!-- <scroll-view class="scroll-view_H statusList" scroll-x="true" scroll-left="0"> -->
|
||||
<!-- <view class="statusList flexbox" >
|
||||
<text :class="[currentStatusIndex == index ? 'cur' : '']" @click="setOneCateIndex(item, index)"
|
||||
@@ -158,14 +158,14 @@
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<u-modal
|
||||
<!-- <u-modal
|
||||
:show="show"
|
||||
:title="modalInfo.title"
|
||||
:content="modalInfo.content"
|
||||
showCancelButton
|
||||
@confirm="hancleModalConfirm"
|
||||
@cancel="hancleModalCancel"
|
||||
></u-modal>
|
||||
></u-modal> -->
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
@@ -448,7 +448,7 @@ export default {
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
await this.getCourseDescriptionData();
|
||||
// await this.getCourseDescriptionData();
|
||||
// that.cateIconList = res.labels ? res.labels : [];
|
||||
}
|
||||
});
|
||||
@@ -1439,6 +1439,7 @@ export default {
|
||||
// border-radius: 10rpx;
|
||||
}
|
||||
.scroll {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.scroll view {
|
||||
|
||||
@@ -34,33 +34,31 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<view
|
||||
style="font-size: 24rpx;line-height: 40rpx;"
|
||||
style="font-size: 24rpx; line-height: 40rpx"
|
||||
class="learning_image_right"
|
||||
v-if="currentCateIndex != 2"
|
||||
@click.stop="
|
||||
slotProps.row.isStudying == 1 || currentCateIndex == 0
|
||||
? openCancelCollection(slotProps.row)
|
||||
: handlecollection(slotProps.row)
|
||||
"
|
||||
>
|
||||
<text
|
||||
style="background-color: #adecf7"
|
||||
v-if="slotProps.row.isStudying == 1 || currentCateIndex == 0"
|
||||
@click.native.stop="openCancelCollection(slotProps.row)"
|
||||
>
|
||||
移出正在学习</text
|
||||
>
|
||||
<text
|
||||
v-else
|
||||
style="font-size: 24rpx"
|
||||
@click.native.stop="handlecollection(slotProps.row)"
|
||||
>
|
||||
加入正在学习</text
|
||||
>
|
||||
<text v-else style="font-size: 24rpx"> 加入正在学习</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="overflow: hidden">
|
||||
<view class="feng" style="position: relative;">
|
||||
<view class="feng" style="position: relative">
|
||||
<!-- <view v-if="currentCateIndex==0" class="delisted"
|
||||
>已过期</view
|
||||
> -->
|
||||
|
||||
|
||||
<image
|
||||
v-if="slotProps.row.image"
|
||||
:src="slotProps.row.image"
|
||||
@@ -77,17 +75,19 @@
|
||||
"
|
||||
>暂无封面图</view
|
||||
>
|
||||
|
||||
|
||||
<view v-if="currentCateIndex==2" style="font-size: 24rpx;position: absolute;" class="learning_image_right delisted">
|
||||
|
||||
<view
|
||||
v-if="currentCateIndex == 2"
|
||||
style="font-size: 24rpx; position: absolute"
|
||||
class="learning_image_right delisted"
|
||||
>
|
||||
<text style="background-color: red; color: #fff"> 再次学习</text>
|
||||
</view>
|
||||
</view
|
||||
>
|
||||
</view>
|
||||
<view class="cate_right">
|
||||
<view
|
||||
class="related_courses_name "
|
||||
:style="`${currentCateIndex==2 ? 'color:#c0c4cc' : ''}`"
|
||||
class="related_courses_name"
|
||||
:style="`${currentCateIndex == 2 ? 'color:#c0c4cc' : ''}`"
|
||||
>{{ slotProps.row.title }}</view
|
||||
>
|
||||
|
||||
@@ -166,22 +166,21 @@
|
||||
flex-direction: column;
|
||||
margin-bottom: 10rpx;
|
||||
"
|
||||
><view
|
||||
><view
|
||||
class=""
|
||||
v-if="item.isBuy!=1"
|
||||
v-if="item.isBuy != 1"
|
||||
style="color: #969696; font-size: 24rpx"
|
||||
>
|
||||
未购买 </view
|
||||
>
|
||||
未购买
|
||||
</view>
|
||||
<view
|
||||
class=""
|
||||
v-if="item.lastStudyTime"
|
||||
style="color: #969696; font-size: 24rpx"
|
||||
>
|
||||
上次学习时间:{{ item.lastStudyTime }} </view
|
||||
>
|
||||
|
||||
|
||||
上次学习时间:{{ item.lastStudyTime }}
|
||||
</view>
|
||||
|
||||
<view
|
||||
class=""
|
||||
style="color: #969696; font-size: 24rpx"
|
||||
@@ -254,7 +253,16 @@ export default {
|
||||
console.log(res, "7777777777777777777");
|
||||
this.signShow = false;
|
||||
if (res.code == 0) {
|
||||
this.$emit("refresh");
|
||||
if (this.currentCateIndex == 0) {
|
||||
this.$emit("refresh");
|
||||
} else {
|
||||
this.dataList.map((e) => {
|
||||
if (e.id == this.selectCurriculum.id) {
|
||||
e.isStudying = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// that.cateIconList = res.labels ? res.labels : [];
|
||||
}
|
||||
});
|
||||
@@ -285,7 +293,12 @@ export default {
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$emit("refresh");
|
||||
this.dataList.map((e) => {
|
||||
if (e.id == row.id) {
|
||||
e.isStudying = 1;
|
||||
}
|
||||
});
|
||||
// this.$emit("refresh");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="loaded || list.itemIndex < 15" class="uni-indexed-list__title-wrapper">
|
||||
<text v-if="list.items && list.items.length > 0" class="uni-indexed-list__title">{{ list.key }}</text>
|
||||
<view @click="handleClick(list.key)" v-if="loaded || list.itemIndex < 15" class="uni-indexed-list__title-wrapper">
|
||||
<slot v-if="list.items && list.items.length > 0" name="titleSlot" :row="list.key" :rowIndex="idx"></slot>
|
||||
<!-- <text class="uni-indexed-list__title">{{ list.key }}</text> -->
|
||||
</view>
|
||||
|
||||
<view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0" class="uni-indexed-list__list">
|
||||
<view v-for="(item, index) in list.items" :key="index" class="uni-indexed-list__item" hover-class="uni-indexed-list__item--hover">
|
||||
|
||||
<slot name="labelSlot" :row="list.items.map(e=>{return e.name})"></slot>
|
||||
<!-- <view v-for="(item, index) in list.items" :key="index" class="uni-indexed-list__item" hover-class="uni-indexed-list__item--hover">
|
||||
<view class="uni-indexed-list__item-container" @click="onClick(idx, index)">
|
||||
<view class="uni-indexed-list__item-border" :class="{'uni-indexed-list__item-border--last':index===list.items.length-1}">
|
||||
<view v-if="showSelect" style="margin-right: 20rpx;">
|
||||
<uni-icons :type="item.checked ? 'checkbox-filled' : 'circle'" :color="item.checked ? '#007aff' : '#C0C0C0'" size="24" />
|
||||
</view>
|
||||
|
||||
<text class="uni-indexed-list__item-content">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -43,6 +48,10 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(data){
|
||||
console.log('data at line 51:', data)
|
||||
this.$emit("itemKeyClick", data)
|
||||
},
|
||||
onClick(idx, index) {
|
||||
this.$emit("itemClick", {
|
||||
idx,
|
||||
@@ -55,12 +64,13 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-indexed-list__list {
|
||||
margin-top: 30px;
|
||||
background-color: $uni-bg-color;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
border-top-style: solid;
|
||||
// border-top-style: solid;
|
||||
border-top-width: 1px;
|
||||
border-top-color: #DEDEDE;
|
||||
}
|
||||
@@ -132,7 +142,7 @@
|
||||
display: flex;
|
||||
width: 100%;
|
||||
/* #endif */
|
||||
background-color: #f7f7f7;
|
||||
// background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.uni-indexed-list__title {
|
||||
|
||||
@@ -9,7 +9,17 @@
|
||||
<view v-for="(list, idx) in lists" :key="idx" :id="'uni-indexed-list-' + idx">
|
||||
<!-- #endif -->
|
||||
<indexed-list-item :list="list" :loaded="loaded" :idx="idx" :showSelect="showSelect"
|
||||
@itemClick="onClick"></indexed-list-item>
|
||||
@itemClick="onClick" >
|
||||
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
|
||||
<slot name="labelSlot" :row="slotProps.row"></slot>
|
||||
</template>
|
||||
<template slot="titleSlot" slot-scope="slotProps">
|
||||
|
||||
<slot name="titleSlot" :row="slotProps.row" :rowIndex="slotProps.rowIndex"></slot>
|
||||
</template>
|
||||
</indexed-list-item>
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -21,15 +31,15 @@
|
||||
<view class="uni-indexed-list__menu" @touchstart="touchStart" @touchmove.stop.prevent="touchMove"
|
||||
@touchend="touchEnd" @mousedown.stop="mousedown" @mousemove.stop.prevent="mousemove"
|
||||
@mouseleave.stop="mouseleave">
|
||||
<view v-for="(list, key) in lists" :key="key" class="uni-indexed-list__menu-item"
|
||||
<view @click="itemKeyClick(list.key)" v-for="(list, key) in lists" :key="key" class="uni-indexed-list__menu-item"
|
||||
:class="touchmoveIndex == key ? 'uni-indexed-list__menu--active' : ''">
|
||||
<text class="uni-indexed-list__menu-text"
|
||||
:class="touchmoveIndex == key ? 'uni-indexed-list__menu-text--active' : ''">{{ list.key }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="touchmove" class="uni-indexed-list__alert-wrapper">
|
||||
<!-- <view v-if="touchmove" class="uni-indexed-list__alert-wrapper">
|
||||
<text class="uni-indexed-list__alert">{{ lists[touchmoveIndex].key }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -110,7 +120,7 @@
|
||||
itemHeight: 0,
|
||||
winOffsetY: 0,
|
||||
touchmove: false,
|
||||
touchmoveIndex: -1,
|
||||
touchmoveIndex:0,
|
||||
scrollViewId: '',
|
||||
touchmovable: true,
|
||||
loaded: false,
|
||||
@@ -181,6 +191,8 @@
|
||||
// #endif
|
||||
},
|
||||
touchStart(e) {
|
||||
console.log('e at line 193:', e)
|
||||
|
||||
this.touchmove = true
|
||||
let pageY = this.isPC ? e.pageY : e.touches[0].pageY
|
||||
let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight)
|
||||
@@ -251,6 +263,7 @@
|
||||
|
||||
|
||||
onClick(e) {
|
||||
console.log('e at line 263:', e)
|
||||
let {
|
||||
idx,
|
||||
index
|
||||
@@ -278,11 +291,16 @@
|
||||
item: obj,
|
||||
select: select
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
itemKeyClick(data){
|
||||
this.$emit('itemKeyClick', this.touchmoveIndex)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
.uni-indexed-list {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -300,7 +318,8 @@
|
||||
}
|
||||
|
||||
.uni-indexed-list__menu {
|
||||
width: 24px;
|
||||
width: 20px;
|
||||
font-size: 20px;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
@@ -320,9 +339,10 @@
|
||||
}
|
||||
|
||||
.uni-indexed-list__menu-text {
|
||||
font-size: 12px;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #aaa;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.uni-indexed-list__menu--active {
|
||||
@@ -332,11 +352,11 @@
|
||||
.uni-indexed-list__menu--active {}
|
||||
|
||||
.uni-indexed-list__menu-text--active {
|
||||
border-radius: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
background-color: #007aff;
|
||||
// border-radius: 16px;
|
||||
// width: 16px;
|
||||
// height: 16px;
|
||||
// line-height: 16px;
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
4656
unpackage/dist/dev/app-plus/app-service.js
vendored
4656
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
4401
unpackage/dist/dev/app-plus/app-view.js
vendored
4401
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/dev/app-plus/static/icon/kechengBg.png
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/static/icon/kechengBg.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
Reference in New Issue
Block a user