1.15提交

This commit is contained in:
zoujiandong
2026-01-15 18:38:21 +08:00
parent 00d0ec8a9b
commit cf6df28e8c
16 changed files with 683 additions and 180 deletions
+54 -9
View File
@@ -211,11 +211,13 @@
}
}
const switchTab = (index) => {
activeTab.value = index;
if (index === 0) {
activeTab.value = index;
getWelfarePage();
} else if (index === 1) {
activeTab.value = index;
useWelfarePage();
} else if (index === 2) {
navTo({
@@ -250,11 +252,29 @@
url: '/pages_app/zhinan/zhinan'
});
}else if(benefit.name == 'daicha'){
if(benefit.num == 0){
showDialog.value = true;
}else{
}
// if(benefit.num == 0){
// showDialog.value = true;
// }else{
plus.share.getServices(res => {
const wechat = res.find(i => i.id === 'weixin')
if (wechat) {
wechat.openCustomerServiceChat({
corpid: 'wwc72af5440141e84e',//第三步获取
url: 'https://work.weixin.qq.com/kfid/kfceb116f7032dbbb91',
}, src => {
console.log("success:")
}, err => {
console.log("error:")
})
} else {
uni.showToast({
title: '当前环境不支持',
icon: "error"
});
}
});
//}
}
}
};
@@ -267,7 +287,7 @@
const gofuliDetail = () => {
navTo({
url: '/pages_app/myPoint/myPoint'
url: '/pages_app/myWelfare/welfareDetail'
})
};
@@ -277,15 +297,34 @@
})
};
const goRules = () => {
navTo({
url: '/pages_app/webview/webview?url='+encodeURIComponent(docUrl+'integral/integral_welfare.html')+'&title=福利规则'
url: '/pages_app/webview/webview?url='+encodeURIComponent('https://doc.igandan.com/app/integral/integral_welfare.html')+'&title=福利规则'
})
};
const useWelfarePage = () => {
api.useWelfarePage().then(res => {
if (res.code === '200' && res.data) {
// 更新福利列表数据
benefitsList.value = res.data;
res.data.forEach(item => {
item.name = item.name.replace(' ', '');
});
// 定义排序顺序:肝胆积分、肝胆视频、肝胆课件、查找文献、知识U盘
const sortOrder = ['jifen', 'video', 'kejian', 'daicha', 'upan'];
// 对列表进行排序
benefitsList.value = res.data.sort((a, b) => {
const indexA = sortOrder.indexOf(a.name);
const indexB = sortOrder.indexOf(b.name);
// 如果找不到对应的排序索引,放在最后
if (indexA === -1 && indexB === -1) return 0;
if (indexA === -1) return 1;
if (indexB === -1) return -1;
return indexA - indexB;
});
}
});
};
@@ -470,21 +509,27 @@
border:2rpx solid #fff;
&.jifen{
border:2rpx solid #ffad17;
background:#feeae9;
}
&.wenxian{
border:2rpx solid #33c966;
background:#fdeafe;
}
&.video{
border:2rpx solid #ff951d;
background:#fefbea;
}
&.kejian{
border:2rpx solid #f17dff;
background:#fdeafe;
}
&.upan{
border:2rpx solid #40cdc5;
background:#eafffa;
}
&.wanfang{
border:2rpx solid #4aa2fe;
background:#fff;
}
.disabled-text {
color: $text-light !important;