修复bug

This commit is contained in:
丁杰 2026-06-05 13:09:01 +08:00
parent 62632e0aff
commit 5ac5be413b
8 changed files with 526 additions and 482 deletions

538
App.vue
View File

@ -1,276 +1,284 @@
<script> <script>
// #ifdef APP-PLUS // #ifdef APP-PLUS
import { import {
isNotificationsEnabled, isNotificationsEnabled,
permissions, permissions,
registPush registPush
} from '@/utils/AS-NotifyTheAuthority.js' } from '@/utils/AS-NotifyTheAuthority.js'
import { import {
permissionListener permissionListener
} from './utils/permissionTips.js' } from './utils/permissionTips.js'
// import { appUpdateListener } from '@/common/utils/appUpdateTips.js' // import { appUpdateListener } from '@/common/utils/appUpdateTips.js'
import locationService from './utils/locationService.js' import locationService from './utils/locationService.js'
// import uploadApp from './utils/uploadApp.js' // import uploadApp from './utils/uploadApp.js'
// #endif // #endif
import request from './utils/request' import request from './utils/request'
import { import {
setVersion setVersion
} from './utils/version.js' } from './utils/version.js'
// //
const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns'); const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns');
export default { export default {
globalData: { globalData: {
artisanType: 2, artisanType: 2,
latitude: '38.366667', latitude: '38.366667',
longitude: '117.333333', longitude: '117.333333',
address: '黄骅市', address: '黄骅市',
servers_region: `河北省-沧州市-黄骅市`, servers_region: `河北省-沧州市-黄骅市`,
deviceid: '', deviceid: '',
addressRes: { addressRes: {
"type": "gcj02", "type": "gcj02",
"altitude": 0, "altitude": 0,
"latitude": 38.372266, "latitude": 38.372266,
"longitude": 117.332895, "longitude": 117.332895,
"speed": 0, "speed": 0,
"accuracy": 30, "accuracy": 30,
"adcode": "130983",
"cCode": "130900",
"pcode": "130000",
"address": {
"country": "中国",
"province": "河北省",
"city": "沧州市",
"district": "黄骅市",
"street": "渤海西路",
"streetNum": "35号",
// "poiName": "",
"poiName": "黄骅市人民政府",
"cityCode": "0317",
"adcode": "130983", "adcode": "130983",
"cCode": "130900", "cCode": "130900",
"pcode": "130000", "pcode": "130000",
"address": {
"country": "中国",
"province": "河北省",
"city": "沧州市",
"district": "黄骅市",
"street": "渤海西路",
"streetNum": "35号",
// "poiName": "",
"poiName": "黄骅市人民政府",
"cityCode": "0317",
"adcode": "130983",
"cCode": "130900",
"pcode": "130000",
}
} }
},
onLaunch: async function() {
// #ifdef APP-PLUS
uni.hideTabBar();
if (uni.getStorageSync('accessToken')) {
registPush()
//
this.messageUpudateNum()
}
// #endif
//
// await setVersion()
//访
// GET
let version = uni.getStorageSync('setVersion')
let baseUrl
await uni.request({
url: 'https://api.mrrwlkj.top/api/openPuc/getSjApiUrl', //
method: 'GET', // GET
header: {
'Content-Type': 'application/json', //
'VersionCode': version.VersionCode,
'DeviceBrand': version.DeviceBrand,
'DeviceType': version.DeviceType
},
success: (res) => {
if (res.data.code == 200) {
// #ifndef MP-WEIXIN
uni.setStorageSync('baseUrl', res.data.data.url)
// #endif
// #ifdef MP-WEIXIN
wx.setStorageSync('baseUrl', res.data.data.url)
// #endif
this.$store.commit("setLocation", true)
}
console.log('请求成功', res.data);
},
fail: (err) => {
console.log('请求失败', err);
},
complete: () => {
console.log('请求完成(无论成功失败都会执行)');
}
});
// #ifdef APP-PLUS
//
plus.screen.lockOrientation("portrait-primary")
// #endif
// #ifdef APP-PLUS
//
let systemInfo = uni.getSystemInfoSync();
let platform = systemInfo.platform;
if (platform === 'android') {
// console.log('')
permissionListener()
} else if (platform === 'ios') {
// console.log('')
} else {
// console.log('')
}
//
let sdkInfo = '';
//
if (platform == 'android') {
//SDK
aLiSDKModule.setLoggerEnable(true);
aLiSDKModule.expandAuthPageCheckedScope(true);
//
//aLiSDKModule.closeAuthPageReturnBack(true);
//
aLiSDKModule.userControlAuthPageCancel();
//
aLiSDKModule.setAuthPageUseDayLight(false);
sdkInfo =
'cvJWYFO9s7xgJrzD+Ok2m2kCh3x0kdRkfJzGI0oxnyUXGlNAwAzvj87Yd6y030BWposVHUT84av2adBG9SdHl5CJpL0mGi+BRtachnyADJjfdpkJC0e0Uqb45pO7h7ZZvT+sNWQs1sa4JpL0U7hYKkgCP1iVXHoA1zKfzZynON6eKyvkzL1xpoPPag4O50slww4+6XuRVplCOSNCcsLRtot4CYnfsdcMvlV34MY5qB/rV+HNb1velpx4rg5atk3iTEiSLjla69c6pOT6vpjkK1qFVpNMxrEY';
} else if (platform == 'ios') {
sdkInfo =
'BONXQSabNMt1a8Cru1TjeW94aXen5rQHeAxzLGgpFzIUicDYeb9SD0l35MkKvjq7gQemE2HDp6B7adKZ8nrdUk4wgg1LIYSGDYVSc/Q1CwrJ9A3lMUeBfS1UUu3nBBg58bDvG1bl3j6tS4h6FjnYmP5+dDsyqb0YNmIhlSmia5Et7cfBMv2OT85N9WLJc/tOMQ9ZQCnuizKVlofkmDGFgjsBN/Bf2gLq6lTQyVqsgPJE5yEPd4riNg=='
}
aLiSDKModule.setAuthSDKInfo(sdkInfo)
// await uploadApp.uploadApp('onLaunch');
// #endif
console.log('App Launch')
this.globalData.deviceId = uni.getDeviceInfo().deviceId;
// this.globalData.deviceid = 'AC6F605124DFA87DCE40D5C062C94C3B';
// #ifndef MP-WEIXIN
if (uni.getStorageSync('refreshToken')) {
let endTime = uni.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
uni.removeStorageSync('accessToken')
uni.removeStorageSync('refreshToken')
}
}
// #endif
// #ifdef MP-WEIXIN
if (wx.getStorageSync('refreshToken')) {
let endTime = wx.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
wx.removeStorageSync('accessToken')
wx.removeStorageSync('refreshToken')
}
}
// #endif
},
onShow: function() {
uni.hideTabBar();
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods: {
//
verifyLogin() {
if (!vuex.state.userInfo.token) {
uni.showModal({
title: '提示',
content: '您需要登陆后才能进行此操作',
confirmColor: '#F1AC66',
success(e) {
if (e.confirm) {
// uni.oprPresentLogin()
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
}
}
})
} else {
return true
}
},
/**
* /县adcode转换为6位市adcode后两位补0
* @param {string|number} districtAdcode - 6位区/县编码字符串或数字类型
* @returns {string|null} 6位市编码无效编码返回null
*/
districtAdcodeTo6DigitCityAdcode(districtAdcode) {
// 1.
const adcodeStr = String(districtAdcode).trim();
// 2. 6
const adcodeReg = /^\d{6}$/;
if (!adcodeReg.test(adcodeStr)) {
console.warn('无效的区/县编码必须是6位数字');
return null;
}
// 3. 4 + "00" 6
const cityAdcode4Digit = adcodeStr.slice(0, 4);
const cityAdcode6Digit = cityAdcode4Digit + '00';
// 4. 6
if (!/^\d{6}$/.test(cityAdcode6Digit)) {
console.warn('编码转换异常');
return null;
}
return cityAdcode6Digit;
},
//
updateAddress(item) {
console.log('item', item)
let location = item.location.split(',');
this.globalData.latitude = location[1];
this.globalData.longitude = location[0];
this.globalData.address = item.name;
this.globalData.servers_region = `${item.pname}-${item.cityname}-${item.adname}`;
this.globalData.pcode = item.pcode;
this.globalData.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.adcode = item.adcode;
//
this.globalData.addressRes.latitude = location[1];
this.globalData.addressRes.longitude = location[0];
this.globalData.addressRes.address.province = item.pname;
this.globalData.addressRes.address.city = item.cityname;
this.globalData.addressRes.address.district = item.adname;
this.globalData.addressRes.address.street = item.address;
this.globalData.addressRes.address.poiName = item.name;
this.globalData.addressRes.address.streetNum = '';
this.globalData.addressRes.address.cityCode = '';
this.globalData.addressRes.address.pcode = item.pcode;
this.globalData.addressRes.address.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.address.adcode = item.adcode;
this.globalData.addressRes.pcode = item.pcode;
this.globalData.addressRes.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.adcode = item.adcode;
console.log('globalData', this.globalData)
uni.setStorageSync('userAdrees', this.globalData)
},
} }
},
onLaunch: async function () {
// #ifdef APP-PLUS
uni.hideTabBar();
if (uni.getStorageSync('accessToken')) {
registPush()
//
this.messageUpudateNum()
}
// #endif
//
// await setVersion()
//访
// GET
let version = uni.getStorageSync('setVersion')
let baseUrl
await uni.request({
url: 'https://api.mrrwlkj.top/api/openPuc/getSjApiUrl', //
method: 'GET', // GET
header: {
'Content-Type': 'application/json', //
'VersionCode': version.VersionCode,
'DeviceBrand': version.DeviceBrand,
'DeviceType': version.DeviceType
},
success: (res) => {
if (res.data.code == 200) {
// #ifndef MP-WEIXIN
uni.setStorageSync('baseUrl', res.data.data.url)
// #endif
// #ifdef MP-WEIXIN
wx.setStorageSync('baseUrl', res.data.data.url)
// #endif
this.$store.commit("setLocation", true)
}
console.log('请求成功', res.data);
},
fail: (err) => {
console.log('请求失败', err);
},
complete: () => {
console.log('请求完成(无论成功失败都会执行)');
}
});
// #ifdef APP-PLUS
//
plus.screen.lockOrientation("portrait-primary")
// #endif
// #ifdef APP-PLUS
//
let systemInfo = uni.getSystemInfoSync();
let platform = systemInfo.platform;
if (platform === 'android') {
// console.log('')
permissionListener()
} else if (platform === 'ios') {
// console.log('')
} else {
// console.log('')
}
//
let sdkInfo = '';
//
if (platform == 'android') {
//SDK
aLiSDKModule.setLoggerEnable(true);
aLiSDKModule.expandAuthPageCheckedScope(true);
//
//aLiSDKModule.closeAuthPageReturnBack(true);
//
aLiSDKModule.userControlAuthPageCancel();
//
aLiSDKModule.setAuthPageUseDayLight(false);
sdkInfo =
'cvJWYFO9s7xgJrzD+Ok2m2kCh3x0kdRkfJzGI0oxnyUXGlNAwAzvj87Yd6y030BWposVHUT84av2adBG9SdHl5CJpL0mGi+BRtachnyADJjfdpkJC0e0Uqb45pO7h7ZZvT+sNWQs1sa4JpL0U7hYKkgCP1iVXHoA1zKfzZynON6eKyvkzL1xpoPPag4O50slww4+6XuRVplCOSNCcsLRtot4CYnfsdcMvlV34MY5qB/rV+HNb1velpx4rg5atk3iTEiSLjla69c6pOT6vpjkK1qFVpNMxrEY';
} else if (platform == 'ios') {
sdkInfo =
'BONXQSabNMt1a8Cru1TjeW94aXen5rQHeAxzLGgpFzIUicDYeb9SD0l35MkKvjq7gQemE2HDp6B7adKZ8nrdUk4wgg1LIYSGDYVSc/Q1CwrJ9A3lMUeBfS1UUu3nBBg58bDvG1bl3j6tS4h6FjnYmP5+dDsyqb0YNmIhlSmia5Et7cfBMv2OT85N9WLJc/tOMQ9ZQCnuizKVlofkmDGFgjsBN/Bf2gLq6lTQyVqsgPJE5yEPd4riNg=='
}
aLiSDKModule.setAuthSDKInfo(sdkInfo)
// await uploadApp.uploadApp('onLaunch');
// #endif
console.log('App Launch')
this.globalData.deviceId = uni.getDeviceInfo().deviceId;
// this.globalData.deviceid = 'AC6F605124DFA87DCE40D5C062C94C3B';
// #ifndef MP-WEIXIN
if (uni.getStorageSync('refreshToken')) {
let endTime = uni.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
uni.removeStorageSync('accessToken')
uni.removeStorageSync('refreshToken')
}
}
// #endif
// #ifdef MP-WEIXIN
if (wx.getStorageSync('refreshToken')) {
let endTime = wx.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
wx.removeStorageSync('accessToken')
wx.removeStorageSync('refreshToken')
}
}
// #endif
},
onShow: function () {
uni.hideTabBar();
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
},
methods: {
//
verifyLogin() {
if (!vuex.state.userInfo.token) {
uni.showModal({
title: '提示',
content: '您需要登陆后才能进行此操作',
confirmColor: '#F1AC66',
success(e) {
if (e.confirm) {
// uni.oprPresentLogin()
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
}
}
})
} else {
return true
}
},
/**
* /县adcode转换为6位市adcode后两位补0
* @param {string|number} districtAdcode - 6位区/县编码字符串或数字类型
* @returns {string|null} 6位市编码无效编码返回null
*/
districtAdcodeTo6DigitCityAdcode(districtAdcode) {
// 1.
const adcodeStr = String(districtAdcode).trim();
// 2. 6
const adcodeReg = /^\d{6}$/;
if (!adcodeReg.test(adcodeStr)) {
console.warn('无效的区/县编码必须是6位数字');
return null;
}
// 3. 4 + "00" 6
const cityAdcode4Digit = adcodeStr.slice(0, 4);
const cityAdcode6Digit = cityAdcode4Digit + '00';
// 4. 6
if (!/^\d{6}$/.test(cityAdcode6Digit)) {
console.warn('编码转换异常');
return null;
}
return cityAdcode6Digit;
},
//
updateAddress(item) {
console.log('item', item)
let location = item.location.split(',');
this.globalData.latitude = location[1];
this.globalData.longitude = location[0];
this.globalData.address = item.name;
this.globalData.servers_region = `${item.pname}-${item.cityname}-${item.adname}`;
this.globalData.pcode = item.pcode;
this.globalData.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.adcode = item.adcode;
//
this.globalData.addressRes.latitude = location[1];
this.globalData.addressRes.longitude = location[0];
this.globalData.addressRes.address.province = item.pname;
this.globalData.addressRes.address.city = item.cityname;
this.globalData.addressRes.address.district = item.adname;
this.globalData.addressRes.address.street = item.address;
this.globalData.addressRes.address.poiName = item.name;
this.globalData.addressRes.address.streetNum = '';
this.globalData.addressRes.address.cityCode = '';
this.globalData.addressRes.address.pcode = item.pcode;
this.globalData.addressRes.address.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.address.adcode = item.adcode;
this.globalData.addressRes.pcode = item.pcode;
this.globalData.addressRes.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.adcode = item.adcode;
console.log('globalData', this.globalData)
uni.setStorageSync('userAdrees', this.globalData)
},
} }
}
</script> </script>
<style> <style>
/*每个页面公共css */ /*每个页面公共css */
@import '@/static/css/common.css'; @import '@/static/css/common.css';
/* App.vue全局style */
page,
html,
body {
-webkit-text-size-adjust: 100% !important;
text-size-adjust: 100% !important;
}
</style> </style>

View File

@ -15,8 +15,9 @@
<view class="tags-container"> <view class="tags-container">
<view class="tag-item" v-for="(tag, idx) in displayTags" :key="idx" :style="getTagStyle(tag)"> <view class="tag-item" v-for="(tag, idx) in displayTags" :key="idx" :style="getTagStyle(tag)">
<image class="tag-icon" v-if="tag.icon" :src="tag.icon"></image> <!-- <image class="tag-icon" v-if="tag.icon" :src="tag.icon"></image> -->
<text class="tag-text">{{ tag.text }}</text> <text class="tag-text">{{ tag.text }} </text>
<text class="tag-text1"></text>
</view> </view>
</view> </view>
</view> </view>
@ -109,7 +110,7 @@ export default {
} }
} else if (len === 2) { } else if (len === 2) {
sizeStyle = { sizeStyle = {
width: '134rpx', width: '142rpx',
height: '42rpx', height: '42rpx',
padding: '0 12rpx', padding: '0 12rpx',
boxSizing: 'border-box' boxSizing: 'border-box'
@ -219,10 +220,20 @@ export default {
} }
.tag-text { .tag-text {
font-size: 22rpx; font-size: 24rpx;
line-height: 28rpx; line-height: 28rpx;
white-space: nowrap; white-space: nowrap;
margin-top: 4rpx; margin-top: 4rpx;
padding-right: 2rpx; padding-right: 2rpx;
} }
.tag-text1 {
font-size: 40rpx;
line-height: 28rpx;
white-space: nowrap;
margin-top: 4rpx;
padding-right: 2rpx;
margin-bottom: 6rpx;
font-weight: 200;
}
</style> </style>

View File

@ -144,6 +144,7 @@ export default {
margin-top: 10rpx; margin-top: 10rpx;
.type-icon { .type-icon {
border: 1rpx solid #D6CAC0;
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
margin-right: 8rpx; margin-right: 8rpx;

View File

@ -452,7 +452,7 @@ export default {
} }
// //
return { return {
val: num, val: parseFloat(num.toFixed(2)),
unit: '元' unit: '元'
}; };
}, },
@ -1432,19 +1432,21 @@ page {
.notice-text { .notice-text {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 26rpx;
color: #30353C; color: #30353C;
} }
} }
.notice-btn { .notice-btn {
font-weight: 400; // font-weight: 400;
font-size: 18rpx; font-size: 20rpx;
color: #8D4C1B; color: #8D4C1B;
padding: 2rpx 15rpx; padding: 6rpx 18rpx;
border-radius: 30rpx; border-radius: 30rpx;
border: 1rpx solid #8d4c1b50; border: 1rpx solid #8d4c1b50;
margin-left: 10rpx; margin-left: 10rpx;
margin-bottom: 4rpx;
margin-top: 4rpx;
} }
} }

View File

@ -1,18 +1,10 @@
<template> <template>
<view class="skill-market-page"> <view class="skill-market-page">
<custom-navbar <custom-navbar title="技能集市" :showBack="true" backgroundColor="#FFFFFF" :show-headle="true" borderBottom="none"
title="技能集市"
:showBack="true"
backgroundColor="#FFFFFF"
:show-headle="true"
borderBottom="none"
headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png" headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png"
@onHeadleClick="goToSearch"> @onHeadleClick="goToSearch" class="nav-img-size">
</custom-navbar> </custom-navbar>
<view class="nav-placeholder" :style="{ height: navHeight + 'px' }"></view>
<view class="sticky-header-container" :style="{ top: navHeight + 'px' }"> <view class="sticky-header-container" :style="{ top: navHeight + 'px' }">
<view class="official-author-block" v-if="authorInfo.show"> <view class="official-author-block" v-if="authorInfo.show">
@ -68,14 +60,11 @@
</view> </view>
</view> </view>
</view> </view>
</view> <view class="list-container"> </view>
<view class="list-container">
<view v-if="skillList.length > 0"> <view v-if="skillList.length > 0">
<skill-card <skill-card v-for="(item, index) in skillList" :key="item.id || index" :item="item"
v-for="(item, index) in skillList" @click="goToDetail(item)"></skill-card>
:key="item.id || index"
:item="item"
@click="goToDetail(item)"
></skill-card>
</view> </view>
<view v-else> <view v-else>
@ -131,7 +120,9 @@ export default {
}, },
computed: { computed: {
filterIcon() { filterIcon() {
return 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png' return this.filterVisible
? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e00ab2ac-bccf-42d8-820c-65727327e279.png'
: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/bfe7a104-bef8-4432-9487-42f05e3e9035.png'
} }
}, },
// //
@ -255,7 +246,7 @@ export default {
// //
if (this.authorInfo.show && !this.authorInfo.isOfficial && this.authorInfo.brandId) { if (this.authorInfo.show && !this.authorInfo.isOfficial && this.authorInfo.brandId) {
list = list.filter(item => item.brand_id == this.authorInfo.brandId) list = list.filter(item => item.brand_id == this.authorInfo.brandId)
} }
if (this.orderType !== 0) { if (this.orderType !== 0) {
@ -313,11 +304,11 @@ export default {
initMockData() { initMockData() {
this.mockDatabase = [ this.mockDatabase = [
{ id: 1, title: '穿戴甲的操作视频扫码验券操作教程', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '平台课程', link_type: 1, views: 836000, time: '7小时前', timestamp: Date.now() - 7*3600000 }, { id: 1, title: '穿戴甲的操作视频扫码验券操作教程', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '平台课程', link_type: 1, views: 836000, time: '7小时前', timestamp: Date.now() - 7 * 3600000 },
{ id: 2, title: '脸部按摩操作步骤详情', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '品牌课程', link_type: 2, brand_id: 101, views: 8334, time: '1天前', timestamp: Date.now() - 24*3600000 }, { id: 2, title: '脸部按摩操作步骤详情', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '品牌课程', link_type: 2, brand_id: 101, views: 8334, time: '1天前', timestamp: Date.now() - 24 * 3600000 },
{ id: 3, title: '全身SPA的操作视频操作教程', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '平台课程', link_type: 1, views: 2344, time: '3天前', timestamp: Date.now() - 3*24*3600000 }, { id: 3, title: '全身SPA的操作视频操作教程', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '平台课程', link_type: 1, views: 2344, time: '3天前', timestamp: Date.now() - 3 * 24 * 3600000 },
{ id: 4, title: '高级面部护理手法详解最新版', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '平台课程', link_type: 1, views: 836, time: '4月26日', timestamp: Date.now() - 30*24*3600000 }, { id: 4, title: '高级面部护理手法详解最新版', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '平台课程', link_type: 1, views: 836, time: '4月26日', timestamp: Date.now() - 30 * 24 * 3600000 },
{ id: 5, title: '光疗美甲进阶全方位解析', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '品牌课程', link_type: 2, brand_id: 101, views: 12000, time: '2小时前', timestamp: Date.now() - 2*3600000 } { id: 5, title: '光疗美甲进阶全方位解析', coverSrc: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e2220528-fdf6-4cad-a25d-ec6cbee1501e.jpg', type: '品牌课程', link_type: 2, brand_id: 101, views: 12000, time: '2小时前', timestamp: Date.now() - 2 * 3600000 }
] ]
} }
} }
@ -384,16 +375,16 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 24rpx; font-size: 24rpx;
color: #FF4767 ; color: #FF4767;
border: 2rpx solid #FF4767 ; border: 2rpx solid #FF4767;
padding: 8rpx 20rpx; padding: 8rpx 20rpx;
border-radius: 45rpx; border-radius: 45rpx;
.arrow-right { .arrow-right {
width: 10rpx; width: 10rpx;
height: 10rpx; height: 10rpx;
border-top: 2rpx solid #FF4767 ; border-top: 2rpx solid #FF4767;
border-right: 2rpx solid #FF4767 ; border-right: 2rpx solid #FF4767;
transform: rotate(45deg); transform: rotate(45deg);
margin-left: 6rpx; margin-left: 6rpx;
} }
@ -459,11 +450,14 @@ export default {
} }
.filter-icon { .filter-icon {
width: 18rpx; width: 24rpx;
height: 12rpx; height: 24rpx;
transition: transform 0.3s ease; transition: transform 0.3s ease;
&.rotate { &.rotate {
transform: rotate(180deg); transform: rotate(180deg);
width: 18rpx;
height: 12rpx;
} }
} }
} }
@ -476,7 +470,8 @@ export default {
.filter-panel { .filter-panel {
position: absolute; position: absolute;
top: 100%; top: 100%;
left: 0; right: 0; left: 0;
right: 0;
height: 100vh; height: 100vh;
z-index: 100; z-index: 100;
pointer-events: none; pointer-events: none;
@ -484,21 +479,32 @@ export default {
&.show { &.show {
pointer-events: auto; pointer-events: auto;
.filter-mask { opacity: 1; }
.filter-container { transform: translateY(0); } .filter-mask {
opacity: 1;
}
.filter-container {
transform: translateY(0);
}
} }
.filter-mask { .filter-mask {
position: absolute; position: absolute;
top: 0; left: 0; right: 0; bottom: 0; top: 0;
background: rgba(0,0,0,0.4); left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
opacity: 0; opacity: 0;
transition: opacity 0.3s ease-in-out; transition: opacity 0.3s ease-in-out;
} }
.filter-container { .filter-container {
position: absolute; position: absolute;
top: 0; left: 0; right: 0; top: 0;
left: 0;
right: 0;
background: #fff; background: #fff;
border-radius: 0 0 24rpx 24rpx; border-radius: 0 0 24rpx 24rpx;
padding: 30rpx 30rpx 40rpx; padding: 30rpx 30rpx 40rpx;
@ -553,12 +559,19 @@ export default {
height: 373rpx; height: 373rpx;
} }
} }
::v-deep .icon-headle { ::v-deep .icon-headle {
width: 32rpx !important; width: 32rpx !important;
height: 32rpx !important; height: 32rpx !important;
} }
::v-deep .back-icon { ::v-deep .back-icon {
width: 28rpx !important; width: 28rpx !important;
height: 36rpx !important; height: 36rpx !important;
}
.nav-img-size::v-deep .icon-headle {
width: 36rpx !important;
height: 36rpx !important;
} }
</style> </style>

View File

@ -86,7 +86,7 @@
<view class="order-card"> <view class="order-card">
<template v-for="card in currentCardList"> <template v-for="card in currentCardList">
<view class="function-list" v-if="card.type == 'line'"> <view class="function-list" v-if="card.type == 'line'" :key="card.title">
<view class="function-title">{{ card.title }}</view> <view class="function-title">{{ card.title }}</view>
<view class="function-grid"> <view class="function-grid">
<view class="grid-item" v-for="(item, index) in card.list" :key="index" <view class="grid-item" v-for="(item, index) in card.list" :key="index"
@ -98,22 +98,22 @@
</view> </view>
</view> </view>
</view> </view>
<view class="function-list" style="padding: 24rpx; padding-bottom: 28rpx" <view class="function-list" style="padding: 24rpx; padding-bottom: 28rpx" v-if="card.type == 'lineCard'"
v-if="card.type == 'lineCard'"> :key="card.title">
<view class="lineCard-title">{{ card.title }}</view> <view class="lineCard-title">{{ card.title }}</view>
<view class="lineCard-grid"> <view class="lineCard-grid">
<image v-for="(item, index) in card.list" :src="item.url" mode="widthFix" <image v-for="(item, index) in card.list" :src="item.url" mode="widthFix"
@click="handleFunction(item)"></image> @click="handleFunction(item)" :key="index"></image>
</view> </view>
</view> </view>
<view class="imagePure" v-if="card.type == 'imagePure'"> <view class="imagePure" v-if="card.type == 'imagePure'" :key="card.title">
<image @click="handleFunction(card)" :src="card.url" mode="widthFix"></image> <image @click="handleFunction(card)" :src="card.url" mode="widthFix"></image>
</view> </view>
<view class="image-list" v-if="card.type == 'image'"> <view class="image-list" v-if="card.type == 'image'" :key="card.title">
<view class="image-title">{{ card.title }}</view> <view class="image-title">{{ card.title }}</view>
<image @click="handleFunction(card)" :src="card.url" mode="widthFix"></image> <image @click="handleFunction(card)" :src="card.url" mode="widthFix"></image>
</view> </view>
<view class="listcard-list" v-if="card.type == 'listcard'"> <view class="listcard-list" v-if="card.type == 'listcard'" :key="card.title">
<view class="function-title">{{ card.title }}</view> <view class="function-title">{{ card.title }}</view>
<view class="listcard-item" v-for="(item, index) in card.list" :key="index"> <view class="listcard-item" v-for="(item, index) in card.list" :key="index">
<image @click="handleFunction(item)" :src="item.url" mode="widthFix"></image> <image @click="handleFunction(item)" :src="item.url" mode="widthFix"></image>
@ -121,7 +121,7 @@
<view class="listcard-text">{{ item.text }}</view> <view class="listcard-text">{{ item.text }}</view>
</view> </view>
</view> </view>
<view class="imageText-list" v-if="card.type == 'imageText'"> <view class="imageText-list" v-if="card.type == 'imageText'" :key="card.title">
<view class="lineCard-title">{{ card.title }}</view> <view class="lineCard-title">{{ card.title }}</view>
<view class="imageText-content"> <view class="imageText-content">
<image :src="card.url" mode="widthFix"></image> <image :src="card.url" mode="widthFix"></image>
@ -160,6 +160,8 @@
<view class="item-right orange" @tap="goToBusinessTime">去配置</view> <view class="item-right orange" @tap="goToBusinessTime">去配置</view>
</view> </view>
<view class="divider-line"></view>
<view class="missing-item" v-if="!hasServiceSkill"> <view class="missing-item" v-if="!hasServiceSkill">
<view class="item-left"> <view class="item-left">
<image class="item-icon" <image class="item-icon"
@ -173,6 +175,8 @@
<view class="item-right orange" @tap="goToServiceSkill">去配置</view> <view class="item-right orange" @tap="goToServiceSkill">去配置</view>
</view> </view>
<view class="divider-line"></view>
<view class="missing-item" v-if="!isCertified"> <view class="missing-item" v-if="!isCertified">
<view class="item-left"> <view class="item-left">
<image class="item-icon" <image class="item-icon"
@ -1682,6 +1686,13 @@ button::after {
align-items: center; align-items: center;
gap: 12rpx; gap: 12rpx;
margin-top: 10rpx; margin-top: 10rpx;
width: auto;
height: 36rpx;
padding: 0 8rpx 0 8rpx;
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/378a6936-a543-4ff5-9aa0-cfcb4d4e14b3.png');
background-size: 100% 100%;
background-repeat: no-repeat;
margin-left: -6rpx;
.user_detail_tip_phone { .user_detail_tip_phone {
// width: 100rpx; // width: 100rpx;
@ -1743,7 +1754,7 @@ button::after {
.modal-header { .modal-header {
position: relative; position: relative;
z-index: 1; z-index: 1;
height: 150rpx; height: 100rpx;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
justify-content: center; justify-content: center;
@ -1832,6 +1843,13 @@ button::after {
} }
} }
} }
.divider-line {
width: 100%;
height: 1rpx;
background-color: #f2f2f2;
margin: -26rpx 0;
}
} }
} }

View File

@ -1,14 +1,9 @@
<template> <template>
<view class="notice-page"> <view class="notice-page">
<!-- 自定义顶部导航组件 --> <!-- 自定义顶部导航组件 -->
<custom-navbar <custom-navbar title="公告通知" :showBack="true" backgroundColor="#FFFFFF" :show-headle="true"
title="公告通知"
:showBack="true"
backgroundColor="#FFFFFF"
:show-headle="true"
headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png" headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png"
@onHeadleClick="goToSearch" @onHeadleClick="goToSearch" class="nav-img-size" />
/>
<view class="page-content"> <view class="page-content">
<!-- 加载状态 --> <!-- 加载状态 -->
@ -19,12 +14,7 @@
<!-- 公告列表 --> <!-- 公告列表 -->
<view v-else-if="noticeList.length > 0" class="notice-list"> <view v-else-if="noticeList.length > 0" class="notice-list">
<NoticeCard <NoticeCard v-for="item in noticeList" :key="item.id" :item="item" @click="goToDetail" />
v-for="item in noticeList"
:key="item.id"
:item="item"
@click="goToDetail"
/>
<!-- 加载更多状态 --> <!-- 加载更多状态 -->
<view v-if="loadingMore" class="load-more"> <view v-if="loadingMore" class="load-more">
@ -36,7 +26,9 @@
</view> </view>
<!-- 空状态 --> <!-- 空状态 -->
<view v-else class="empty-container"> <view v-else class="empty-container">
<image class="empty-img" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/8c5e7b2a-3d4f-4b1e-9a7c-6e8f2d1b4a5c.png" mode="aspectFit"></image> <image class="empty-img"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/8c5e7b2a-3d4f-4b1e-9a7c-6e8f2d1b4a5c.png"
mode="aspectFit"></image>
<text class="empty-text">暂无公告通知</text> <text class="empty-text">暂无公告通知</text>
</view> </view>
</view> </view>
@ -181,9 +173,13 @@ export default {
} }
@keyframes spin { @keyframes spin {
to { transform: rotate(360deg); } to {
transform: rotate(360deg);
}
} }
.load-more, .no-more {
.load-more,
.no-more {
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
font-size: 24rpx; font-size: 24rpx;
@ -209,4 +205,9 @@ export default {
color: #999; color: #999;
} }
} }
.nav-img-size::v-deep .icon-headle {
width: 36rpx !important;
height: 36rpx !important;
}
</style> </style>

View File

@ -5,15 +5,8 @@
<image class="back-icon" src="/static/images/back.png" @tap="goBack"></image> <image class="back-icon" src="/static/images/back.png" @tap="goBack"></image>
<view class="search-box"> <view class="search-box">
<input <input class="search-input" v-model="keyword" :placeholder="placeholderText"
class="search-input" placeholder-class="search-placeholder" focus confirm-type="search" @confirm="handleSearch" />
v-model="keyword"
:placeholder="placeholderText"
placeholder-class="search-placeholder"
focus
confirm-type="search"
@confirm="handleSearch"
/>
<text class="search-btn" @tap="handleSearch">搜索</text> <text class="search-btn" @tap="handleSearch">搜索</text>
</view> </view>
</view> </view>
@ -23,7 +16,8 @@
<view class="result-container"> <view class="result-container">
<view class="sort-bar" v-if="hasSearched && ['brand', 'skill', 'collection_brand', 'collection_course'].includes(searchType)"> <view class="sort-bar"
v-if="hasSearched && ['brand', 'skill', 'collection_brand', 'collection_course'].includes(searchType)">
<view class="sort-item" @tap="toggleSort('time')"> <view class="sort-item" @tap="toggleSort('time')">
<text class="sort-text" :class="{ active: orderType === 1 || orderType === 2 }">发布时间</text> <text class="sort-text" :class="{ active: orderType === 1 || orderType === 2 }">发布时间</text>
<view class="arrows"> <view class="arrows">
@ -44,36 +38,24 @@
<view v-if="loading && page === 1" class="loading-tips">加载中...</view> <view v-if="loading && page === 1" class="loading-tips">加载中...</view>
<view v-else-if="searchType === 'notice' && resultList.length > 0"> <view v-else-if="searchType === 'notice' && resultList.length > 0">
<notice-card <notice-card v-for="item in resultList" :key="item.id" :item="item" @click="goToDetail(item)" />
v-for="item in resultList"
:key="item.id"
:item="item"
@click="goToDetail(item)"
/>
</view> </view>
<view v-else-if="(searchType === 'brand' || searchType === 'collection_brand') && resultList.length > 0" class="brand-grid"> <view v-else-if="(searchType === 'brand' || searchType === 'collection_brand') && resultList.length > 0"
<brand-card class="brand-grid">
class="brand-card-wrap" <brand-card class="brand-card-wrap" v-for="item in resultList" :key="item.id" :item="item"
v-for="item in resultList" :tagKeys="item.tagKeys || []" @click="goToDetail(item)" />
:key="item.id"
:item="item"
:tagKeys="item.tagKeys || []"
@click="goToDetail(item)"
/>
</view> </view>
<view v-else-if="(searchType === 'skill' || searchType === 'collection_course') && resultList.length > 0" class="course-list"> <view v-else-if="(searchType === 'skill' || searchType === 'collection_course') && resultList.length > 0"
<skill-card class="course-list">
v-for="item in resultList" <skill-card v-for="item in resultList" :key="item.id" :item="item" @click="goToDetail(item)" />
:key="item.id"
:item="item"
@click="goToDetail(item)"
/>
</view> </view>
<view v-else-if="!loading && hasSearched && resultList.length === 0" class="empty-state"> <view v-else-if="!loading && hasSearched && resultList.length === 0" class="empty-state">
<image class="empty-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4e4320d1-cc5c-4312-890c-f1eb8381fdd2.png"></image> <image class="empty-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4e4320d1-cc5c-4312-890c-f1eb8381fdd2.png">
</image>
<text>未搜索到相关内容哦~</text> <text>未搜索到相关内容哦~</text>
</view> </view>
@ -262,7 +244,9 @@ export default {
coverSrc: item.cover_img || 'https://dummyimage.com/300x200/ccc/fff.png', coverSrc: item.cover_img || 'https://dummyimage.com/300x200/ccc/fff.png',
type: item.link_name || (item.link_type === 1 ? '平台课程' : '品牌课程'), type: item.link_name || (item.link_type === 1 ? '平台课程' : '品牌课程'),
views: item.browse_num || 0, views: item.browse_num || 0,
typeIcon: item.link_logo || '' typeIcon: item.link_logo || '',
time: item.create_time ? item.create_time.split(' ')[0] : '',
video: item.video || ''
})); }));
} }
@ -340,6 +324,7 @@ export default {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
} }
.search-placeholder { .search-placeholder {
color: #CCCCCC; color: #CCCCCC;
} }
@ -417,7 +402,11 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
.brand-card-wrap { width: 48.5%; margin-bottom: 24rpx; }
.brand-card-wrap {
width: 48.5%;
margin-bottom: 24rpx;
}
} }
.course-list { .course-list {
@ -437,6 +426,7 @@ export default {
height: 300rpx; height: 300rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
text { text {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;