添加普通项目tab

This commit is contained in:
Mr.jiang 2024-08-05 16:02:36 +08:00
parent 0328880a87
commit e04b7a87e5
1 changed files with 57 additions and 19 deletions

View File

@ -28,7 +28,7 @@
<custom-nomore /> <custom-nomore />
</template> </template>
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)"> <view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<image :src="item.packageImg" mode="" class="item-img"></image> <image :src="item.packageImg?item.packageImg:item.massageImg" mode="" class="item-img"></image>
<view class="item-view"> <view class="item-view">
<view class="view-cata"> <view class="view-cata">
<view class="item-view-title">{{item.title}}</view> <view class="item-view-title">{{item.title}}</view>
@ -37,11 +37,17 @@
<view class="item-view-bottom-qian"> <view class="item-view-bottom-qian">
<span></span> <span></span>
<span>{{item.price}}</span> <span>{{item.price}}</span>
<span>/ <text v-if="item.type!='104'">{{item.serviceCount}}</text> <span v-if="type=='104'||type=='105'||type=='106'">/ <text v-if="item.type!='104'">{{item.serviceCount}}</text>
{{typeData=='104'?'套':typeData=='105'?'次':'次'}}</span> {{type=='104'?'套':type=='105'?'次':'次'}}</span>
<span></span> <span></span>
<span>{{item.oldPrice}}<text <span>{{item.oldPrice}}</span>
v-if="item.type!='104'">/{{item.serviceCount}}</text>{{typeData=='104'?'':typeData=='105'?'':''}}</span> <span v-if="type=='104'||type=='105'||type=='106'">
<text v-if="item.type!='104'">
/{{item.serviceCount}}{{type=='104'?'':type=='105'?'':''}}
</text>
</span>
</span>
</view> </view>
<view class="flex" style="margin-top: 10rpx;"> <view class="flex" style="margin-top: 10rpx;">
<view class="shop_label" v-if="item.tagsData!=''"> <view class="shop_label" v-if="item.tagsData!=''">
@ -78,11 +84,23 @@
serviceTrue: true, serviceTrue: true,
page: 1, page: 1,
limit: 10, limit: 10,
type:'104', type:'95',
titleNmae: '', titleNmae: '',
classifyId: '', classifyId: '',
getName: '', getName: '',
tabList: [{ tabList: [
{
code: "服务项目",
id: 95,
name: "",
orderNum: 5,
parentId: 22,
remark: "",
status: 1,
type: "95",
value: "服务项目",
},
{
code: "服务套餐", code: "服务套餐",
id: 104, id: 104,
name: "", name: "",
@ -115,6 +133,7 @@
type: "106", type: "106",
value: "服务疗程", value: "服务疗程",
}, },
], ],
} }
}, },
@ -123,17 +142,14 @@
this.classifyId=e.classifyId this.classifyId=e.classifyId
this.myId = uni.getStorageSync('userId') this.myId = uni.getStorageSync('userId')
// this.getData(); // this.getData();
// this.tabList[0]=this.typeData
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.typeData == '95' ? '中医推拿' : this.typeData == '101' ? '小儿推拿' : this.typeData == title: this.typeData == '95' ? '中医推拿' : this.typeData == '101' ? '小儿推拿' : this.typeData ==
'102' ? '产后康复' : this.typeData == '91' ? '私密护理' : '正骨拨筋', '102' ? '产后康复' : this.typeData == '91' ? '私密护理' : '正骨拨筋',
}) })
this.taocan()
}, },
methods: { methods: {
taocan() {
},
input(res) { // input(res) { //
this.searchValue = res; this.searchValue = res;
}, },
@ -147,14 +163,29 @@
this.$refs.paging.reload(true); this.$refs.paging.reload(true);
}, },
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
const params = { // console.log("item======",this.type)
page: pageNo, if(this.type!='104'&&this.type!='105'&&this.type!='106'){//
limit: pageSize, var url='/app/artificer/selectMassageTypePage'
type: this.type, var params = {
title: this.searchValue, page: pageNo,
classifyId: this.classifyId limit: pageSize,
by: 3,
status: 1,
classifyId: this.classifyId,
title:this.searchValue
}
}else{//
var url='/app/massage/package/findPage'
var params = {
page: pageNo,
limit: pageSize,
type: this.type,
title: this.searchValue,
classifyId: this.classifyId
}
} }
this.$Request.get('/app/massage/package/findPage', params).then(res => {
this.$Request.get(url, params).then(res => {
for (var i = 0; i < res.data.list.length; i++) { for (var i = 0; i < res.data.list.length; i++) {
res.data.list[i].tagsData = res.data.list[i].labels.split(','); res.data.list[i].tagsData = res.data.list[i].labels.split(',');
if (res.data.list[i].level == 3) { if (res.data.list[i].level == 3) {
@ -173,7 +204,8 @@
}) })
}, },
changeClick(index, item) { changeClick(index, item) {
this.type = item.type this.type = item.type;
this.classifyId=item.classifyId
this.searchValue = '' this.searchValue = ''
this.page = 1; this.page = 1;
this.dataList = [] this.dataList = []
@ -188,6 +220,7 @@
this.getData() this.getData()
}, },
itemClick(item) { itemClick(item) {
console.log('item=========',item)
if (this.type == '104') { if (this.type == '104') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/my/serviceOderDrtail?id=' + item.id + '&limit=' + this.limit + '&page=' + this url: '/pages/my/serviceOderDrtail?id=' + item.id + '&limit=' + this.limit + '&page=' + this
@ -203,6 +236,11 @@
url: '/pages/my/fuwuliaochengDetail?id=' + item.id + '&limit=' + this.limit + '&page=' + url: '/pages/my/fuwuliaochengDetail?id=' + item.id + '&limit=' + this.limit + '&page=' +
this.page + '&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon this.page + '&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
}) })
}else{
uni.navigateTo({
url: '/pages/my/fuwuDateil?id=' + item.massageTypeId + '&limit=' + this.limit + '&page=' +
this.page + '&name=' + 'index' + '&isCanCoupon=' + item.isCanCoupon
})
} }
} }
} }