This commit is contained in:
Vinjor 2025-05-08 16:20:41 +08:00
parent 49269503d1
commit 96f3578fa9
6 changed files with 181 additions and 150 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="dl-notice-box-index"> <view class="dl-notice-box-index">
<!-- 标题 --> <!-- 标题 -->
<view class="dl-title"> <view :class="['dl-title','01'==nowUserType?'dl-tgz':'']">
<view class="right-text"> <view class="right-text">
<text class="dl-text">通告</text> <text class="dl-text">通告</text>
</view> </view>
@ -208,6 +208,12 @@
treeCity treeCity
} from '@/api/business/base.js' } from '@/api/business/base.js'
export default { export default {
props: {
nowUserType: {
type: String,
default: null
}
},
components: { components: {
noticeItem noticeItem
}, },
@ -616,7 +622,7 @@
} }
.dl-notice-box-index { .dl-notice-box-index {
padding-top: var(--status-bar-height); // padding-top: var(--status-bar-height);
width: 100%; width: 100%;
color: #363636; color: #363636;
background-color: white; background-color: white;
@ -628,13 +634,20 @@
justify-content: start; justify-content: start;
position: relative; position: relative;
.dl-tgz {
background-color: #4260ff !important;
}
.dl-title { .dl-title {
width: 100%; width: 100%;
display: flex; display: flex;
position: relative; position: relative;
z-index: 10; z-index: 10;
padding: 25rpx 10rpx 10rpx 15rpx; padding-top: calc(var(--status-bar-height) + 25rpx);
padding-left: 15rpx;
padding-right: 10rpx;
padding-bottom: 10rpx;
// padding: 25rpx 10rpx 10rpx 15rpx;
border-bottom: 1px solid #F4F4F4; border-bottom: 1px solid #F4F4F4;

View File

@ -3,7 +3,8 @@
<!-- 主体区域 --> <!-- 主体区域 -->
<view class="content-body"> <view class="content-body">
<!-- 通告列表页 --> <!-- 通告列表页 -->
<notice-index ref="noticeIndex" v-if="'home'==menuCode" @openVip="openVip"></notice-index> <notice-index ref="noticeIndex" :nowUserType="nowUserType" v-if="'home'==menuCode"
@openVip="openVip"></notice-index>
<mine-index ref="minePage" :key="nowUserType" :nowUserType="nowUserType" v-if="'my'==menuCode" <mine-index ref="minePage" :key="nowUserType" :nowUserType="nowUserType" v-if="'my'==menuCode"
@refreshUserType="refreshUserType()"></mine-index> @refreshUserType="refreshUserType()"></mine-index>
<subscribe v-if="'dingyue'==menuCode"></subscribe> <subscribe v-if="'dingyue'==menuCode"></subscribe>
@ -103,6 +104,7 @@
this.refreshUserType() this.refreshUserType()
}, },
onShow() { onShow() {
this.$refs.minePage.getDetail()
this.refreshUserType() this.refreshUserType()
setTimeout(() => { setTimeout(() => {
this.checkUserIfLogin() this.checkUserIfLogin()
@ -113,7 +115,7 @@
this.menuCode = param.menuCode this.menuCode = param.menuCode
} }
this.selectSiteConfig("platform_tel") this.selectSiteConfig("platform_tel")
this.selectSiteConfig("join_community") this.selectSiteConfig("join_community")
let that = this let that = this
}, },
@ -249,8 +251,8 @@
} else if (constant.wechat_img == item.name) { } else if (constant.wechat_img == item.name) {
setStrData(constant.wechat_img, item.value) setStrData(constant.wechat_img, item.value)
} else if (constant.join_str == item.name) { } else if (constant.join_str == item.name) {
setStrData(constant.join_str, item.value) setStrData(constant.join_str, item.value)
} }
}) })
}).catch((e) => { }).catch((e) => {
uni.showToast({ uni.showToast({

View File

@ -342,8 +342,6 @@
padding-top: calc(90rpx + var(--status-bar-height)); padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4; border-top: 1rpx solid #F4F4F4;
background-color: white; background-color: white;
padding-left: 30rpx;
padding-right: 30rpx;
width: 100%; width: 100%;
color: #363636; color: #363636;
font-size: 30rpx; font-size: 30rpx;
@ -358,7 +356,7 @@
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx); height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll; overflow-y: scroll;
width: 100%; width: 100%;
padding: 20rpx; padding: 20rpx 30rpx;
background-color: white; background-color: white;
border-radius: 20rpx; border-radius: 20rpx;
display: flex; display: flex;

View File

@ -14,21 +14,21 @@
</view> </view>
<view v-if="null != member.identityName" class="renzheng-dom"> <view v-if="null != member.identityName" class="renzheng-dom">
<image src="@/static/mine/auth/renzhen.png" mode="aspectFit"></image> <image src="@/static/mine/auth/renzhen.png" mode="aspectFit"></image>
认证{{ member.identityName }} 认证{{ member.identityName }}
</view>
<view v-else class="renzheng-dom">
未认证
</view> </view>
<view v-else class="renzheng-dom">
未认证
</view>
</view> </view>
<view class="opt-box"> <view class="opt-box">
<view class="guanzhu" v-if="!isLove" @click="forkUser('1')">关注</view> <view class="guanzhu" v-if="!isLove" @click="forkUser('1')">关注</view>
<view class="guanzhu" v-if="isLove" @click="forkUser('0')">取消关注</view> <view class="guanzhu" v-if="isLove" @click="forkUser('0')">取消关注</view>
</view> </view>
</view> </view>
<!-- <view class="bozhu-type-box">--> <!-- <view class="bozhu-type-box">-->
<!-- <view class="item-dom">好物</view>--> <!-- <view class="item-dom">好物</view>-->
<!-- <view class="item-dom">颜值</view>--> <!-- <view class="item-dom">颜值</view>-->
<!-- </view>--> <!-- </view>-->
<view class="pingjia-box"> <view class="pingjia-box">
<view class="pingjia-content"> <view class="pingjia-content">
<view class="top-title"> <view class="top-title">
@ -36,7 +36,9 @@
合作博主评价 合作博主评价
</view> </view>
<view class="item-box"> <view class="item-box">
<view v-for="item in member.evaluates" class="item-dom">{{item.evaluate}}(<text>{{ item.num }}</text>)</view> <view v-for="item in member.evaluates" class="item-dom">
{{item.evaluate}}(<text>{{ item.num }}</text>)
</view>
</view> </view>
</view> </view>
</view> </view>
@ -47,7 +49,7 @@
<view class="data-list-box"> <view class="data-list-box">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled <scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered"> @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<notice-item v-if="dataList.length>0" :dataList="dataList" ></notice-item> <notice-item v-if="dataList.length>0" :dataList="dataList"></notice-item>
<view style="text-align: center" v-if="dataList.length==0"> <view style="text-align: center" v-if="dataList.length==0">
<image class="" src="@/static/images/nothing.png"></image> <image class="" src="@/static/images/nothing.png"></image>
</view> </view>
@ -58,13 +60,21 @@
</template> </template>
<script> <script>
import {toast} from '@/utils/common.js' import {
import {queryListByUserId} from '@/api/business/notice.js' toast
import {announcerDetail} from '@/api/business/member.js' } from '@/utils/common.js'
import {
queryListByUserId
} from '@/api/business/notice.js'
import {
announcerDetail
} from '@/api/business/member.js'
import noticeItem from '@/pages/components/notice-item.vue' import noticeItem from '@/pages/components/notice-item.vue'
import navigationBarVue from '@/components/navigation/navigationBar.vue'; import navigationBarVue from '@/components/navigation/navigationBar.vue';
import config from '@/config' import config from '@/config'
import {postForkUser} from '@/api/business/base.js' import {
postForkUser
} from '@/api/business/base.js'
export default { export default {
components: { components: {
navigationBarVue, navigationBarVue,
@ -72,83 +82,83 @@
}, },
data() { data() {
return { return {
imageUrl: '', imageUrl: '',
member:{}, member: {},
dataList: ['', ''], dataList: ['', ''],
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userId:null, userId: null,
status:'进行中', status: '进行中',
}, },
userId:null, userId: null,
total: 0, total: 0,
// //
isTriggered: false, isTriggered: false,
// //
isLove: false, isLove: false,
} }
}, },
onLoad(option){ onLoad(option) {
this.userId = option.userId this.userId = option.userId
this.queryParams.userId = option.userId this.queryParams.userId = option.userId
this.isLove = option.isLove this.isLove = option.isLove
this.initMember() this.initMember()
this.initNotice() this.initNotice()
}, },
methods: { methods: {
/** /**
* 关注取消关注 * 关注取消关注
* @param {Object} isLove * @param {Object} isLove
*/ */
forkUser(isLove) { forkUser(isLove) {
postForkUser({ postForkUser({
userId: this.userId, userId: this.userId,
isLove: isLove isLove: isLove
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
duration: 2000, duration: 2000,
title: '操作成功' title: '操作成功'
}); });
this.isLove = isLove == '1' this.isLove = isLove == '1'
} }
}).catch((e) => { }).catch((e) => {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
duration: 2000, duration: 2000,
title: e title: e
}); });
}) })
}, },
/**出初始化通告主详情*/ /**出初始化通告主详情*/
initMember(){ initMember() {
announcerDetail(this.userId).then(res=>{ announcerDetail(this.userId).then(res => {
if (res.code ==200){ if (res.code == 200) {
this.member = res.data this.member = res.data
} }
}) })
}, },
/**初始化通告列表*/ /**初始化通告列表*/
initNotice(){ initNotice() {
queryListByUserId(this.queryParams).then(res=>{ queryListByUserId(this.queryParams).then(res => {
this.isTriggered = false this.isTriggered = false
if (res.code == 200){ if (res.code == 200) {
if (this.queryParams.pageNum == 1) { if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records this.dataList = res.data.records
} else { } else {
this.dataList = this.dataList.concat(res.data.records) this.dataList = this.dataList.concat(res.data.records)
} }
this.total = res.data.total this.total = res.data.total
} }
}) })
}, },
/** /**
* 上滑加载数据 * 上滑加载数据
@ -161,7 +171,7 @@
} }
//+1, //+1,
this.queryParams.pageNum++ this.queryParams.pageNum++
this.initNotice() this.initNotice()
}, },
/** /**
* 下拉刷新数据 * 下拉刷新数据
@ -170,7 +180,7 @@
this.isTriggered = true this.isTriggered = true
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.total = 0 this.total = 0
this.initNotice() this.initNotice()
}, },
} }
} }
@ -192,6 +202,8 @@
position: relative; position: relative;
.choose-detail { .choose-detail {
height: calc(100vh - 150rpx);
overflow-y: scroll;
border-top: 1rpx solid #F4F4F4; border-top: 1rpx solid #F4F4F4;
width: 100%; width: 100%;
background-color: #F2F2F2; background-color: #F2F2F2;
@ -394,4 +406,4 @@
} }
} }
} }
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="mine-container"> <view class="mine-container">
<!-- 切换身份 --> <!-- 切换身份 -->
<view :class="['dl-title',ifHasCard?'has-member-card':''] "> <view :class="['dl-title','01'==localUserType?'dl-tgz':''] ">
<view class="left-search" @click="changeUserType('01'==localUserType?'02':'01')"> <view class="left-search" @click="changeUserType('01'==localUserType?'02':'01')">
<image v-if="!ifHasCard" class="dl-image" src="@/static/mine/qiehuan.png" mode="aspectFit"></image> <image v-if="!ifHasCard" class="dl-image" src="@/static/mine/qiehuan.png" mode="aspectFit"></image>
<image v-else class="dl-image" src="@/static/mine/change_member.png" mode="aspectFit"></image> <image v-else class="dl-image" src="@/static/mine/change_member.png" mode="aspectFit"></image>
@ -9,7 +9,7 @@
</view> </view>
</view> </view>
<!-- 头像信息 --> <!-- 头像信息 -->
<view :class="['dl-person-box',ifHasCard?'has-member-card':''] "> <view :class="['dl-person-box'] ">
<view class="user-image-box"> <view class="user-image-box">
<view class="dl-image-box"> <view class="dl-image-box">
<image v-if="!userInfo.avatar" class="touxiang" src="@/static/images/profile.jpg" <image v-if="!userInfo.avatar" class="touxiang" src="@/static/images/profile.jpg"
@ -140,10 +140,10 @@
<view class="box-room"> <view class="box-room">
<view class="detail-title">其他信息</view> <view class="detail-title">其他信息</view>
<view class="menu-box"> <view class="menu-box">
<view class="menu-item" @click="viewNewPeople()"> <view class="menu-item" @click="viewNewPeople()">
<image src="@/static/mine/caise/shouce.png" mode="aspectFit"></image> <image src="@/static/mine/caise/shouce.png" mode="aspectFit"></image>
<view>新人手册</view> <view>新人手册</view>
</view> </view>
<view class="menu-item" style="position: relative;"> <view class="menu-item" style="position: relative;">
<!-- <image src="@/static/mine/kefu.png" mode="aspectFit"></image> --> <!-- <image src="@/static/mine/kefu.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/kefu.png" mode="aspectFit"></image> <image src="@/static/mine/caise/kefu.png" mode="aspectFit"></image>
@ -230,8 +230,8 @@
imageUrl: '', imageUrl: '',
// //
wechat_img: constant.wechat_img, wechat_img: constant.wechat_img,
// //
join_str: constant.join_str, join_str: constant.join_str,
// //
customer_service: constant.customer_service, customer_service: constant.customer_service,
// //
@ -288,24 +288,24 @@
dialogConfirm() { dialogConfirm() {
this.goPoints() this.goPoints()
}, },
toggle(type, key) { toggle(type, key) {
this.type = type this.type = type
if (type == 'center') { if (type == 'center') {
// //
wx.openOfficialAccountProfile({ wx.openOfficialAccountProfile({
username: 'tonggaokuaijie', // username: 'tonggaokuaijie', //
success: res => {}, success: res => {},
fail: res => {} fail: res => {}
}) })
} }
}, },
getCommunity(type, key){ getCommunity(type, key) {
this.type = type this.type = type
this.popupImgUrl = getStrData(key) this.popupImgUrl = getStrData(key)
// open uni-popup type // open uni-popup type
this.$refs.popup.open(type) this.$refs.popup.open(type)
}, },
getDetail() { getDetail() {
let param = { let param = {
userId: this.userInfo.userId, userId: this.userInfo.userId,
@ -393,33 +393,33 @@
.userId) .userId)
}, },
viewNewPeople() { viewNewPeople() {
if (this.localUserType == '02'){ if (this.localUserType == '02') {
uni.downloadFile({ uni.downloadFile({
url: 'https://www.ddtg.site/bz.docx', url: 'https://www.ddtg.site/bz.docx',
success: function(res) { success: function(res) {
var filePath = res.tempFilePath; var filePath = res.tempFilePath;
uni.openDocument({ uni.openDocument({
filePath: filePath, filePath: filePath,
showMenu: true, showMenu: true,
success: function(res) {} success: function(res) {}
}); });
} }
}); });
} else { } else {
uni.downloadFile({ uni.downloadFile({
url: 'https://www.ddtg.site/tgz.docx', url: 'https://www.ddtg.site/tgz.docx',
success: function(res) { success: function(res) {
var filePath = res.tempFilePath; var filePath = res.tempFilePath;
uni.openDocument({ uni.openDocument({
filePath: filePath, filePath: filePath,
showMenu: true, showMenu: true,
success: function(res) {} success: function(res) {}
}); });
} }
}); });
} }
// this.$tab.navigateTo( // this.$tab.navigateTo(
// `/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[3].title}&code=${this.globalConfig.appInfo.agreements[3].code}` // `/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[3].title}&code=${this.globalConfig.appInfo.agreements[3].code}`
// ) // )
} }
@ -491,6 +491,10 @@
} }
} }
.dl-tgz {
background-color: #4260ff !important;
}
.dl-person-box { .dl-person-box {
width: 100%; width: 100%;
@ -611,12 +615,14 @@
justify-content: center; justify-content: center;
height: 100rpx; height: 100rpx;
width: 100%; width: 100%;
background: url('/static/index/member-bg.png'); color: #ffffff;
background-size: 100% 100%; background-color: #1c1c1c;
background-position: center; // background: url('/static/index/member-bg.png');
/* 图片居中显示 */ // background-size: 100% 100%;
background-repeat: no-repeat; // /* */
/* 不重复背景图片 */ // background-position: center;
// /* */
// background-repeat: no-repeat;
.dl-left { .dl-left {
display: flex; display: flex;
@ -624,7 +630,7 @@
padding-left: 30rpx; padding-left: 30rpx;
align-items: center; align-items: center;
font-size: 30rpx; font-size: 30rpx;
color: #623109; // color: #623109;
justify-content: left; justify-content: left;
.dl-icon { .dl-icon {
@ -642,8 +648,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #F5D8A5; background: linear-gradient(to right, #f4e6a5, #f2c479);
color: #623109; color: #461c00;
padding: 10rpx 25rpx; padding: 10rpx 25rpx;
float: right; float: right;
border-radius: 30rpx; border-radius: 30rpx;
@ -898,4 +904,4 @@
} }
} }
} }
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB