折扣功能+列表文字截取的问题
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.0.55",
|
||||
"versionCode" : 1055,
|
||||
"versionName" : "1.0.56",
|
||||
"versionCode" : 1056,
|
||||
"app-plus" : {
|
||||
"nvueCompiler" : "uni-app",
|
||||
"compatible" : {
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<view class="btn_box_price" v-if="item.courseCatalogueEntityList.length>1">
|
||||
<text v-for="(v,i) in item.courseCatalogueEntityList" :key="i">
|
||||
{{(v.title).substring(0, 1)}}<text v-if="i !== item.courseCatalogueEntityList.length - 1">/</text>
|
||||
{{formatContent(v.title)}}<text v-if="i !== item.courseCatalogueEntityList.length - 1">/</text>
|
||||
</text>
|
||||
<text v-if="item.courseCatalogueEntityList[0].halfFee==0" style="padding-left: 20rpx;">免费</text>
|
||||
<text v-else style="margin-left: 20rpx;">¥{{item.courseCatalogueEntityList[0].halfFee}}/{{item.courseCatalogueEntityList[0].fee}}</text>
|
||||
@@ -207,6 +207,19 @@ export default {
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
//判断显示‘上/中/下’
|
||||
formatContent(content) {
|
||||
const keywords = ["上部", "中部", "下部"];
|
||||
let result = [];
|
||||
|
||||
// 判断是否包含关键字
|
||||
keywords.forEach((keyword) => {
|
||||
if (content.includes(keyword)) {
|
||||
result.push(keyword.substring(0, 1));
|
||||
}
|
||||
});
|
||||
return result.join("");
|
||||
},
|
||||
//获取国家-一级
|
||||
getCountryList() {
|
||||
$http.request({
|
||||
|
||||
@@ -963,19 +963,19 @@
|
||||
padding: 0 10rpx;
|
||||
background: linear-gradient(90deg, #258feb 0%, #00e1ec 100%);
|
||||
border-radius: 20rpx;
|
||||
font-size: 20rpx;
|
||||
font-size: 18rpx;
|
||||
line-height: 40rpx;
|
||||
height: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-right: 10rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.vip_type_item:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
.vip_type_item image{
|
||||
width: 34rpx;
|
||||
height: 24rpx;
|
||||
width: 30rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.vip_infor{
|
||||
padding-left: 20rpx;
|
||||
|
||||
Reference in New Issue
Block a user