修改
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/";
|
||||
}
|
||||
|
||||
@@ -4,65 +4,71 @@
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="课程设置" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
||||
|
||||
|
||||
<view class="contentBox commonPageContentBox">
|
||||
<view :style="`height:calc(100vh - ${50 + statusBarHeight}px) !important`">
|
||||
<!-- <scroll-view class="scroll-view_H cateList" scroll-x="true" scroll-left="0"> -->
|
||||
|
||||
<view class="cateList flexbox">
|
||||
<text :class="[currentCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item, index)"
|
||||
v-for="(item, index) in cateList" :key="item.type">{{ item.title }}</text>
|
||||
<text
|
||||
:class="[currentCateIndex == index ? 'cur' : '']"
|
||||
@click="setOneCateIndex(item, index)"
|
||||
v-for="(item, index) in cateList"
|
||||
:key="item.type"
|
||||
>{{ item.title }}</text
|
||||
>
|
||||
</view>
|
||||
|
||||
|
||||
<view :class="`priceDetail commonPageWhiteBox`" v-if="this.cateList[this.currentCateIndex].type == 'price'">
|
||||
|
||||
<view
|
||||
:class="`priceDetail commonPageWhiteBox`"
|
||||
v-if="this.cateList[this.currentCateIndex].type == 'price'"
|
||||
>
|
||||
<scroll-view scroll-y="true" class="scroll-Y">
|
||||
<price ref="priceDetail" type="price" :oid="this.cateList[this.currentCateIndex].oid"></price>
|
||||
|
||||
<price
|
||||
ref="priceDetail"
|
||||
type="price"
|
||||
:oid="this.cateList[this.currentCateIndex].oid"
|
||||
></price>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view :class="`priceDetail commonPageWhiteBox`"
|
||||
v-else-if="this.cateList[this.currentCateIndex].type == 'purchaseNotice'">
|
||||
|
||||
<view
|
||||
:class="`priceDetail commonPageWhiteBox`"
|
||||
v-else-if="
|
||||
this.cateList[this.currentCateIndex].type == 'purchaseNotice'
|
||||
"
|
||||
>
|
||||
<scroll-view scroll-y="true" class="scroll-Y">
|
||||
<price ref="purchaseNotice" :oid="this.cateList[this.currentCateIndex].oid"></price>
|
||||
|
||||
<price
|
||||
ref="purchaseNotice"
|
||||
:oid="this.cateList[this.currentCateIndex].oid"
|
||||
></price>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<view :class="`priceDetail commonPageWhiteBox`"
|
||||
v-else-if="this.cateList[this.currentCateIndex].type == 'instructionsForUse'">
|
||||
<view
|
||||
:class="`priceDetail commonPageWhiteBox`"
|
||||
v-else-if="
|
||||
this.cateList[this.currentCateIndex].type == 'instructionsForUse'
|
||||
"
|
||||
>
|
||||
<instructionsForUse ref="instructionsForUse"></instructionsForUse>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<view :class="`dataList priceDetail`" v-else>
|
||||
|
||||
<!-- <image src="@/static/image/headImg/top.png" mode="aspectFit" class="headImage"></image> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<view v-if="this.cateList[this.currentCateIndex].type == 'courseDescription'"
|
||||
<view
|
||||
v-if="
|
||||
this.cateList[this.currentCateIndex].type == 'courseDescription'
|
||||
"
|
||||
>
|
||||
<courseDescription
|
||||
ref="courseDescription"
|
||||
:dataList="dataList"
|
||||
@hancleClick="goCourseDescription"
|
||||
label="nameCN"
|
||||
>
|
||||
|
||||
<courseDescription ref="courseDescription" :dataList="dataList" @hancleClick="goCourseDescription" label="nameCN">
|
||||
</courseDescription>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <template v-if="currentCateIndex == 2 && curTwoCateIndex == 2">
|
||||
|
||||
|
||||
@@ -75,23 +81,8 @@
|
||||
</u-grid>
|
||||
|
||||
</template> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -100,10 +91,8 @@ import courseDescription from "../price/courseDescription.vue";
|
||||
import price from "../price/index.vue";
|
||||
import purchaseNotice from "../purchaseNotice/index.vue";
|
||||
import instructionsForUse from "../instructionsForUse/index.vue";
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
courseDescription, //课程说明
|
||||
@@ -114,16 +103,18 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
searchValue: '',
|
||||
cateList: [{
|
||||
searchValue: "",
|
||||
cateList: [
|
||||
{
|
||||
title: "课程价格(半年/一年)",
|
||||
type: 'price',
|
||||
oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||
}, {
|
||||
type: "price",
|
||||
oid: "8a9fb99809e4428888aad6b56a3096a6",
|
||||
},
|
||||
{
|
||||
title: "课程说明",
|
||||
type: 'courseDescription',
|
||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
||||
}
|
||||
type: "courseDescription",
|
||||
apiUrl: "app/phoneDoctor.do?getTaiHuToShine",
|
||||
},
|
||||
|
||||
// , {
|
||||
// title: "使用须知",
|
||||
@@ -135,9 +126,6 @@ export default {
|
||||
// oid: 'd0f47071c2194e94845fbb373d06f59d',
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
], // 一级分类标题1
|
||||
twoCateList: [], // 二级分类标题
|
||||
dataList: [], // 方剂标题
|
||||
@@ -148,75 +136,62 @@ export default {
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: '提示',
|
||||
limitContent: '',
|
||||
limitTitle: "提示",
|
||||
limitContent: "",
|
||||
scrollViewHeight: 0,
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
// this.getCourseDescriptionData()
|
||||
this.getPriceData()
|
||||
this.getPriceData();
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
|
||||
},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
goCourseDescription(v) {
|
||||
console.log(v)
|
||||
console.log(v);
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/courseInformation/courseDescription/index?navTitle=${v.nameCN}&title=${v.nameCN}&oid=${v.oid}`
|
||||
})
|
||||
url: `/pages/courseInformation/courseDescription/index?navTitle=${v.nameCN}&title=${v.nameCN}&oid=${v.oid}`,
|
||||
});
|
||||
},
|
||||
getCourseDescriptionData() {
|
||||
console.log(this.$store.state, '11111111111')
|
||||
console.log(this.$store.state, "11111111111");
|
||||
this.$http
|
||||
.post('app/phoneDoctor.do?getTaiHuToShine', {
|
||||
customerType
|
||||
:
|
||||
"D",
|
||||
token
|
||||
: uni.getStorageSync("token")
|
||||
,
|
||||
customerOid
|
||||
: uni.getStorageSync("customerOid"),
|
||||
oid: 'b07e45f6a5f3491db9854b16f3fd8b19',
|
||||
|
||||
.post("app/phoneDoctor.do?getTaiHuToShine", {
|
||||
customerType: "D",
|
||||
token: uni.getStorageSync("token"),
|
||||
customerOid: uni.getStorageSync("customerOid"),
|
||||
oid: "b07e45f6a5f3491db9854b16f3fd8b19",
|
||||
|
||||
step: 0,
|
||||
limit: 100
|
||||
limit: 100,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res.obj.dataLst
|
||||
, '7777777777777777777')
|
||||
this.dataList = res.obj.dataLst
|
||||
.then((res) => {
|
||||
console.log(res.obj.dataLst, "7777777777777777777");
|
||||
this.dataList = res.obj.dataLst;
|
||||
|
||||
// socket.init();
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
getPriceData() {
|
||||
var that = this;
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.priceDetail.getData()
|
||||
})
|
||||
}, 100)
|
||||
|
||||
|
||||
that.$refs.priceDetail.getData();
|
||||
});
|
||||
}, 100);
|
||||
},
|
||||
// 检查是有权限使用搜索功能
|
||||
checkDisable() {
|
||||
console.log('点击了')
|
||||
console.log("点击了");
|
||||
},
|
||||
// 显示无权限弹窗
|
||||
// showNoRights() {
|
||||
@@ -237,198 +212,211 @@ export default {
|
||||
getUserInfo() {
|
||||
// 用户详情
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http
|
||||
.post('book/user/info/' + this.userInfo.id)
|
||||
.then(res => {
|
||||
this.userMes = res.user
|
||||
this.getCateList()
|
||||
console.log(this.userMes, '呼呼')
|
||||
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
|
||||
this.userMes = res.user;
|
||||
this.getCateList();
|
||||
console.log(this.userMes, "呼呼");
|
||||
});
|
||||
}
|
||||
},
|
||||
// 详情
|
||||
gotoDetail(item) {
|
||||
console.log('111', item)
|
||||
console.log('this.currentCateIndex', this.currentCateIndex)
|
||||
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
|
||||
console.log("111", item);
|
||||
console.log("this.currentCateIndex", this.currentCateIndex);
|
||||
console.log("this.curTwoCateIndex", this.curTwoCateIndex);
|
||||
if (this.currentCateIndex == 0) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: './xueshugongxianDetail?id=' + item.id
|
||||
})
|
||||
return
|
||||
url: "./xueshugongxianDetail?id=" + item.id,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.currentCateIndex == 1) {
|
||||
uni.navigateTo({
|
||||
url: "./medicaldesDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
url: "./medicaldesDetail?id=" + item.id,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.currentCateIndex == 2) {
|
||||
console.log('111', item)
|
||||
console.log("111", item);
|
||||
uni.navigateTo({
|
||||
url: './video?title=' + item.name + '&src=' + item.url
|
||||
})
|
||||
return
|
||||
url: "./video?title=" + item.name + "&src=" + item.url,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.currentCateIndex == 3) {
|
||||
console.log('111', item)
|
||||
console.log("111", item);
|
||||
uni.navigateTo({
|
||||
url: "./recordDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
url: "./recordDetail?id=" + item.id,
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
// 获取名称
|
||||
getTitles(dictType) {
|
||||
console.log('dictType', dictType)
|
||||
console.log("dictType", dictType);
|
||||
if (this.currentCateIndex == 0) {
|
||||
if (dictType == 2) {
|
||||
uni.navigateTo({
|
||||
url: './zhuanzhuchuban'
|
||||
})
|
||||
return
|
||||
url: "./zhuanzhuchuban",
|
||||
});
|
||||
return;
|
||||
}
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/generalArticle/articleByPage",
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"type": dictType == 1 ? '1' : '2',
|
||||
"limit": 1000,
|
||||
"current": 1,
|
||||
type: dictType == 1 ? "1" : "2",
|
||||
limit: 1000,
|
||||
current: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
if (res.code == 0 && res.result && res.result.records.length > 0) {
|
||||
this.dataList = res.result.records
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result && res.result.records.length > 0) {
|
||||
this.dataList = res.result.records;
|
||||
} else {
|
||||
this.dataList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.dataList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.currentCateIndex == 1) {
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/inheritListByPage",
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
'dictType': dictType,
|
||||
"limit": 1000,
|
||||
"current": 1
|
||||
dictType: dictType,
|
||||
limit: 1000,
|
||||
current: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result.records.length > 0) {
|
||||
this.dataList = res.result.records
|
||||
this.dataList = res.result.records;
|
||||
for (let i = 0; i < this.dataList.length; i++) {
|
||||
this.dataList[i].imageslist = [];
|
||||
this.dataList[i].imageslist = this.dataList[i].img.split(";");
|
||||
}
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.dataList = [];
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.dataList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.currentCateIndex == 2) {
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/lightListByType?type=" + dictType,
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 1000,
|
||||
"page": 1,
|
||||
limit: 1000,
|
||||
page: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.dataList = res.result
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.dataList = res.result;
|
||||
} else {
|
||||
this.dataList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.dataList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.currentCateIndex == 3) {
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/recordByType?type=" + dictType,
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 1000,
|
||||
"page": 1,
|
||||
limit: 1000,
|
||||
page: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.dataList = res.result
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.dataList = res.result;
|
||||
} else {
|
||||
this.dataList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.dataList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
setTwoCateIndex(item, index) {
|
||||
let dictType = item.dictType
|
||||
this.curTwoCateIndex = index
|
||||
this.getTitles(dictType)
|
||||
let dictType = item.dictType;
|
||||
this.curTwoCateIndex = index;
|
||||
this.getTitles(dictType);
|
||||
},
|
||||
async setOneCateIndex(item, index) {
|
||||
console.log(index, 99999)
|
||||
var that = this
|
||||
console.log(index, 99999);
|
||||
var that = this;
|
||||
switch (item.type) {
|
||||
case 'courseDescription':
|
||||
case "courseDescription":
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.courseDescription.getData()
|
||||
})
|
||||
}, 100)
|
||||
that.$refs.courseDescription.getData();
|
||||
});
|
||||
}, 100);
|
||||
|
||||
break;
|
||||
case 'price':
|
||||
case "price":
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.priceDetail.getData()
|
||||
})
|
||||
}, 100)
|
||||
that.$refs.priceDetail.getData();
|
||||
});
|
||||
}, 100);
|
||||
break;
|
||||
case 'purchaseNotice':
|
||||
case "purchaseNotice":
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.purchaseNotice.getData()
|
||||
})
|
||||
}, 100)
|
||||
that.$refs.purchaseNotice.getData();
|
||||
});
|
||||
}, 100);
|
||||
break;
|
||||
case 'instructionsForUse':
|
||||
case "instructionsForUse":
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.instructionsForUse.getData()
|
||||
})
|
||||
}, 100)
|
||||
that.$refs.instructionsForUse.getData();
|
||||
});
|
||||
}, 100);
|
||||
// that.getPriceData()
|
||||
break;
|
||||
}
|
||||
@@ -452,24 +440,20 @@ export default {
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
let type = item.type
|
||||
this.currentCateIndex = index
|
||||
let type = item.type;
|
||||
this.currentCateIndex = index;
|
||||
|
||||
this.searchValue = ''
|
||||
this.searchList = []
|
||||
this.showSearchList = false
|
||||
this.searchValue = "";
|
||||
this.searchList = [];
|
||||
this.showSearchList = false;
|
||||
// if (index != 2) {
|
||||
|
||||
|
||||
|
||||
|
||||
// uni.createSelectorQuery().select('.cateList').boundingClientRect(function (rect) {
|
||||
// var height = rect.height
|
||||
// console.log('元素高度:',);
|
||||
|
||||
// }).exec();
|
||||
|
||||
|
||||
// } else {
|
||||
// this.getJFList(dictType)
|
||||
// }
|
||||
@@ -477,10 +461,8 @@ export default {
|
||||
|
||||
transformData(inputData) {
|
||||
const result = {};
|
||||
inputData.forEach(item => {
|
||||
const {
|
||||
letter
|
||||
} = item;
|
||||
inputData.forEach((item) => {
|
||||
const { letter } = item;
|
||||
if (!result[letter]) {
|
||||
result[letter] = [];
|
||||
}
|
||||
@@ -516,9 +498,9 @@ export default {
|
||||
// })
|
||||
// },
|
||||
getCateList(id) {
|
||||
id ? '' : id = 0
|
||||
this.twoCateList = []
|
||||
this.curTwoCateIndex = 0
|
||||
id ? "" : (id = 0);
|
||||
this.twoCateList = [];
|
||||
this.curTwoCateIndex = 0;
|
||||
// 0为获取顶级分类,其他为搜索下级分类,目前的逻辑,顶级是写死的,所以可能只会涉及到搜索第二级
|
||||
// $http.request({
|
||||
// url: "book/prescript/prescriptCategoryList",
|
||||
@@ -534,7 +516,7 @@ export default {
|
||||
// console.log(res, '脉穴分类获取成功')
|
||||
// if (res.code == 0 && res.list.length > 0) {
|
||||
// this.cateList = res.list
|
||||
this.getTowCateList(this.cateList[0].type)
|
||||
this.getTowCateList(this.cateList[0].type);
|
||||
// } else {
|
||||
// this.cateList = []
|
||||
// }
|
||||
@@ -546,15 +528,15 @@ export default {
|
||||
|
||||
// 放大图片
|
||||
previewImage(url) {
|
||||
console.log(url)
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ['很抱歉,暂不支持保存图片到本地'],
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function (res) {
|
||||
// console.log(res,'+++++')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
// getSearch() {
|
||||
@@ -645,8 +627,7 @@ export default {
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -669,8 +650,8 @@ export default {
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
height: calc(100% - 50px);
|
||||
|
||||
// height: calc(100% - 50px);
|
||||
}
|
||||
.cateList {
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
@@ -703,7 +684,7 @@ export default {
|
||||
}
|
||||
|
||||
.cur {
|
||||
color: #3AB3AE;
|
||||
color: #3ab3ae;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
@@ -718,8 +699,6 @@ export default {
|
||||
background-color: #f8f9fa;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
|
||||
.JFtitleItem {
|
||||
background-color: #ffffff;
|
||||
padding: 20rpx 10rpx;
|
||||
@@ -732,8 +711,6 @@ export default {
|
||||
height: 220rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search_box {
|
||||
margin: 0 auto;
|
||||
@@ -752,17 +729,16 @@ export default {
|
||||
padding: 0upx 40upx;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
box-shadow: 0 0px 10px 1px #3AB3AE33;
|
||||
box-shadow: 0 0px 10px 1px #3ab3ae33;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #838383;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.icon_search {
|
||||
background-image: url('@/static/icon/map_ic_search.png');
|
||||
background-image: url("@/static/icon/map_ic_search.png");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
@@ -789,9 +765,6 @@ export default {
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.scroll-Y {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -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 -->
|
||||
|
||||
<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">
|
||||
|
||||
<u-index-list
|
||||
:index-list="indexList"
|
||||
activeColor="#60CABF"
|
||||
:uIndexStyle="{
|
||||
height: 'auto',
|
||||
padding: '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="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',
|
||||
margin: '20rpx',
|
||||
|
||||
}"
|
||||
>
|
||||
<view v-for="(item, index) in itemArr">
|
||||
|
||||
<u-index-anchor
|
||||
:text="indexList[index]"
|
||||
bgColor="#AFDECC"
|
||||
></u-index-anchor>
|
||||
|
||||
<u-index-item>
|
||||
|
||||
<u-index-anchor :text="indexList[index]"></u-index-anchor>
|
||||
|
||||
<common-list
|
||||
noDataIcon="data"
|
||||
:isCondition="true"
|
||||
:isNoIcon="true"
|
||||
|
||||
: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,6 +672,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.cate_item_name {
|
||||
padding-top: 60rpx;
|
||||
width: 100%;
|
||||
@@ -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,11 +206,6 @@
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view
|
||||
></view>
|
||||
</view>
|
||||
|
||||
<view class="small_class_teaching_box">
|
||||
<!-- <view class="small_class_teaching_top">
|
||||
<view class="small_class_teaching_top_left">
|
||||
@@ -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,9 +1617,8 @@ 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;
|
||||
@@ -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,29 +34,27 @@
|
||||
</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
|
||||
> -->
|
||||
@@ -78,12 +76,14 @@
|
||||
>暂无封面图</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"
|
||||
@@ -171,16 +171,15 @@
|
||||
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=""
|
||||
@@ -254,7 +253,16 @@ export default {
|
||||
console.log(res, "7777777777777777777");
|
||||
this.signShow = false;
|
||||
if (res.code == 0) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
4040
unpackage/dist/dev/app-plus/app-service.js
vendored
4040
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
3975
unpackage/dist/dev/app-plus/app-view.js
vendored
3975
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