This commit is contained in:
Vinjor 2025-03-21 17:57:53 +08:00
parent f6b35cc074
commit 6b0e104d51
44 changed files with 571 additions and 103 deletions

View File

@ -1,7 +1,9 @@
<script> <script>
import config from './config' import config from './config'
import store from '@/store' import store from '@/store'
import { getToken } from '@/utils/auth' import {
getToken
} from '@/utils/auth'
export default { export default {
onLaunch: function() { onLaunch: function() {

15
api/business/notice.js Normal file
View File

@ -0,0 +1,15 @@
import upload from '@/utils/upload'
import request from '@/utils/request'
// 根据code查分类树
export function getCatgByCode(code) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
data: data
})
}

View File

@ -10,3 +10,11 @@ export function getSiteConfig(params) {
}) })
} }
// 根据code查分类值列表
export function getCatgByCode(params) {
return request({
url: '/base/category/listByCode',
method: 'get',
params:params
})
}

View File

@ -0,0 +1,154 @@
<template>
<view class="tabbar-container">
<!-- :style="['width: calc(100% /' + tabbar.length + ')']" -->
<view class="tabbar-item" :class="[item.centerItem ? ' center-item' : '']" v-for="(item, i) in tabbar" :key="i"
@click="goPage(item)">
<view class="item-top">
<view style="position: relative;width: 45rpx;margin: auto;">
<image class="dl-image" :src="currPage === item.id ? item.selectedIconPath : item.iconPath" />
<image v-if="1==i" class="dl-vip" src="@/static/index/vip.png" mode="aspectFit"></image>
</view>
</view>
<view class="item-bottom" :class="[currPage === item.id ? 'item-active' : '']">{{ item.text }}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
currPage: 0,
tabbar: [{
id: 0,
code: "home",
text: "首页",
iconPath: '/static/images/tabbar/home.png',
selectedIconPath: '/static/images/tabbar/home_.png',
centerItem: false
},
{
id: 1,
code: "dingyue",
text: "订阅",
iconPath: '/static/images/tabbar/dingyue.png',
selectedIconPath: '/static/images/tabbar/dingyue_.png',
centerItem: false
},
{
id: 2,
code: "myNotice",
text: "我的通告",
iconPath: '/static/images/tabbar/my_notice.png',
selectedIconPath: '/static/images/tabbar/my_notice_.png',
centerItem: false
},
{
id: 3,
code: "my",
text: "我的",
iconPath: '/static/images/tabbar/my.png',
selectedIconPath: '/static/images/tabbar/my_.png',
centerItem: false
}
]
}
},
onLoad() {
},
onUnload() {
},
methods: {
/**
* 页面跳转
* @param {Object} item
*/
goPage(item) {
this.currPage=item.id
this.$emit("changeMenu", item.code)
}
}
}
</script>
<style scoped lang="scss">
$textDefaultColor: #9B9B9B; //
$textSelectedColor: #FC1F3E; //
$centerItemBg: #fff; //
.tabbar-container {
bottom: 0;
position: fixed;
left: 0;
display: flex;
width: 100%;
height: 125rpx;
color: $textDefaultColor;
background-color: #F7F7F7;
background-size: 100% 100%;
}
.tabbar-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
width: 150rpx;
height: 120rpx;
flex-grow: 1;
position: relative;
.item-top {
padding-top: 25rpx;
flex-shrink: 0;
width: 150rpx;
height: 130rpx;
.dl-image {
width: 70rpx;
height: 55rpx;
}
.dl-vip {
position: absolute;
height: 25rpx;
top: -10rpx;
right: -24px;
}
}
.item-bottom {
width: 100%;
font-size: 28rpx;
position: absolute;
bottom: 10rpx;
}
.item-active {
color: $textSelectedColor;
}
}
.center-item {
position: relative;
.item-top {
position: absolute;
top: -55rpx;
left: 50%;
transform: translateX(-50%);
width: 105rpx;
height: 105rpx;
background-color: $centerItemBg;
border-radius: 50%;
}
.item-bottom {
position: absolute;
bottom: 5rpx;
}
}
</style>

View File

@ -41,6 +41,9 @@
}, },
"quickapp" : {}, "quickapp" : {},
"mp-weixin" : { "mp-weixin" : {
"optimization":{
"subPackages":true
},
"appid" : "wxd8ef44a8268672e4", "appid" : "wxd8ef44a8268672e4",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,

View File

@ -20,6 +20,11 @@
"style": { "style": {
"navigationBarTitleText": "工作台" "navigationBarTitleText": "工作台"
} }
}, {
"path": "pages/work/my-notice",
"style": {
"navigationBarTitleText": "我的通告"
}
}, { }, {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
@ -75,33 +80,31 @@
"style": { "style": {
"navigationBarTitleText": "浏览富文本" "navigationBarTitleText": "浏览富文本"
} }
}],
"tabBar": {
"color": "#000000",
"selectedColor": "#000000",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home_.png",
"text": "首页"
}, {
"pagePath": "pages/work/index",
"iconPath": "static/images/tabbar/work.png",
"selectedIconPath": "static/images/tabbar/work_.png",
"text": "工作台"
}, {
"pagePath": "pages/mine/index",
"iconPath": "static/images/tabbar/mine.png",
"selectedIconPath": "static/images/tabbar/mine_.png",
"text": "我的"
}
]
}, },
{
"path" : "pages/components/index",
"style" :
{
"navigationBarTitleText" : "通告首页"
}
},{
"path" : "pages/components/notice-item",
"style" :
{
"navigationBarTitleText" : "通告组件"
}
}],
// "subPackages": [
// {
// "root": "pages/notice",
// "pages": [
// ]
// }
// ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "RuoYi", "navigationBarTitleText": "多点通告",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
} }

View File

@ -0,0 +1,174 @@
<template>
<view class="dl-components">
<view v-for="(item,index) in dataList" class="dl-notice-box">
<view class="dl-notice-title">
<image class="dl-image" src="@/static/index/xiaohongshu.png" mode="aspectFit"></image>
<view class="dl-text">某品牌鞋子上海宁波博主探店招募某品牌鞋子上海宁波博主探店招募</view>
</view>
<view class="dl-notice-content">
<view class="left-text">
<view class="text-item">
<image class="dl-icon" src="@/static/index/money.png" mode="aspectFit"></image>
<view class="dl-content">奖励¥30-400</view>
</view>
<view class="text-item">
<image class="dl-icon" src="@/static/index/my.png" mode="aspectFit"></image>
<view class="dl-content">粉丝1K-10w</view>
</view>
<view class="text-item" style="border-bottom: 1rpx solid #F4F4F4;padding-bottom: 17rpx;">
<image class="dl-icon" src="@/static/index/xing.png" mode="aspectFit"></image>
<view class="dl-content">类型时尚 探店 运动 颜值</view>
</view>
<view class="text-item" style="padding-top: 20rpx;">
<view class="item-box" style="width: 40%;">
<image class="dl-icon2" src="@/static/images/profile.jpg" mode="aspectFit"></image>
<view class="dl-item-right">资深Pr资深</view>
</view>
<view class="item-box">
<image class="dl-icon3" src="@/static/index/person.png" mode="aspectFit"></image>
<view class="dl-item-right dl-number">659</view>
</view>
<view class="item-box">
<image class="dl-icon3" src="@/static/index/eye.png" mode="aspectFit"></image>
<view class="dl-item-right dl-number">659</view>
</view>
</view>
</view>
<image class="right-image" src="@/static/images/profile.jpg" mode="aspectFit"></image>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
dataList: {
type: Array,
default: []
}
},
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.dl-components {
width: 100%;
height: 100%;
.dl-notice-box {
font-size: 29rpx;
width: 100%;
padding: 20rpx;
background-color: white;
border-radius: 30rpx;
margin-bottom: 20rpx;
.dl-notice-title {
display: flex;
width: 100%;
padding-bottom: 20rpx;
align-items: center;
justify-content: center;
.dl-image {
flex: none;
width: 50rpx;
height: 50rpx;
}
.dl-text {
margin-left: 10rpx;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
font-weight: bold;
}
}
.dl-notice-content{
font-size: 27rpx;
display: flex;
color: #363636;
width: 100%;
align-items: center;
justify-content: center;
.left-text{
flex: 1;
min-width: 0;
margin-right: 10rpx;
.text-item{
display: flex;
padding: 5rpx;
width: 100%;
align-items: center;
justify-content: center;
.dl-icon{
flex: none;
width: 40rpx;
height: 44rpx;
}
.dl-content{
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
padding-left: 15rpx;
}
.item-box{
display: flex;
width: 100%;
align-items: center;
justify-content: center;
.dl-icon2{
flex: none;
width: 40rpx;
height: 44rpx;
border-radius: 50%;
}
.dl-icon3{
flex: none;
width: 30rpx;
height: 29rpx;
}
.dl-item-right{
flex: 1;
padding-left: 10rpx;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.dl-number{
font-size: 26rpx;
margin-right: 5rpx;
}
}
}
}
.right-image{
flex: none;
width: 230rpx;
height: 230rpx;
border-radius: 20rpx;
}
}
}
}
</style>

View File

@ -1,43 +1,86 @@
<template> <template>
<view class="content"> <view class="content">
<image class="logo" src="@/static/logo.png"></image> <!-- 主体区域 -->
<view class="text-area"> <view style="width: 100%;">
<text class="title">Hello RuoYi</text> <!-- 通告列表页 -->
<notice-index v-show="'home'==menuCode"></notice-index>
<mine-index v-show="'my'==menuCode"></mine-index>
</view> </view>
<tabBarVue :currPage="0" ref="tarBar" @changeMenu="changeMenu"></tabBarVue>
</view> </view>
</template> </template>
<script> <script>
import tabBarVue from '@/components/tabbar/tabBar.vue'
import noticeIndex from '@/pages/components/index.vue'
import mineIndex from '@/pages/mine/index.vue'
export default { export default {
components:{
tabBarVue,
noticeIndex,
mineIndex
},
data() {
return {
menus: ['全部', '最新', '高奖励', '急招', '品牌置换'],
menuIndex: 0,
dataList:['1','2','2','2'],
queryParams: {
pageNo: 1,
pageSize: 10,
},
total: 0,
//
isTriggered: false,
menuCode:"home",
}
},
onLoad: function() { onLoad: function() {
},
methods: {
itemClick(index, item) {
this.menuIndex = index
},
/**
* 菜单切换
* @param {Object} code
*/
changeMenu(code){
this.menuCode=code
},
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.queryParams.pageNo * this.queryParams.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')
return
}
//+1,
this.queryParams.pageNo++
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.queryParams.pageNo = 1
this.total = 0
},
} }
} }
</script> </script>
<style> <style lang="scss">
.content { .content {
display: flex; width: 100%;
flex-direction: column; color: #363636;
align-items: center; background-color: white;
justify-content: center; font-size: 38rpx;
} height: 100vh;
padding-top: var(--status-bar-height);
.logo { padding-bottom: var(--window-bottom);
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
} }
</style> </style>

View File

@ -73,13 +73,18 @@
</view> </view>
</view> </view>
<tabBarVue :currPage="3" ref="tarBar" ></tabBarVue>
</view> </view>
</template> </template>
<script> <script>
import tabBarVue from '@/components/tabbar/tabBar.vue'
import storage from '@/utils/storage' import storage from '@/utils/storage'
export default { export default {
components:{
tabBarVue,
},
data() { data() {
return { return {
name: this.$store.state.user.name, name: this.$store.state.user.name,

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
static/images/tabbar/my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
static/index/douyin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/index/eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

BIN
static/index/go-view.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/index/member-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
static/index/money.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/index/my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/index/person.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/index/sanjiao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

BIN
static/index/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/index/vip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/index/xing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/index/zuanshi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/index/矩形@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

BIN
static/platform/douyin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -13,8 +13,8 @@
body { body {
background-color: #f1f1f1; background-color: #f1f1f1;
font-size: 28upx; font-size: 28upx;
color: #333333; color: #363636;
font-family: Helvetica Neue, Helvetica, sans-serif; font-family: 'SourceHanSansCN-Medium', sans-serif;
} }
view, view,

View File

@ -1,3 +1,9 @@
@font-face {
font-family: 'SourceHanSansCN-Medium';
src: url('@/static/font/SourceHanSansCN-Medium-Alphabetic.ttf') format('opentype');
font-weight: normal;
font-style: normal;
}
.text-center { .text-center {
text-align: center; text-align: center;
} }

View File

@ -7,9 +7,9 @@
<uni-icons color="#c0c4cc" size="18" type="search" /> <uni-icons color="#c0c4cc" size="18" type="search" />
</slot> </slot>
</view> </view>
<input v-if="show || searchVal" :focus="showSync" :disabled="readonly" :placeholder="placeholderText" :maxlength="maxlength" <input v-if="show || searchVal" :focus="showSync" :disabled="readonly" :placeholder="placeholderText"
class="uni-searchbar__box-search-input" confirm-type="search" type="text" v-model="searchVal" :maxlength="maxlength" class="uni-searchbar__box-search-input" confirm-type="search" type="text"
@confirm="confirm" @blur="blur" @focus="emitFocus" /> v-model="searchVal" @confirm="confirm" @blur="blur" @focus="emitFocus" />
<text v-else class="uni-searchbar__text-placeholder">{{ placeholder }}</text> <text v-else class="uni-searchbar__text-placeholder">{{ placeholder }}</text>
<view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='') &&!readonly" <view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='') &&!readonly"
class="uni-searchbar__box-icon-clear" @click="clear"> class="uni-searchbar__box-icon-clear" @click="clear">
@ -149,7 +149,7 @@
immediate: true, immediate: true,
handler(newVal) { handler(newVal) {
if (newVal) { if (newVal) {
if(this.readonly) return if (this.readonly) return
this.show = true; this.show = true;
this.$nextTick(() => { this.$nextTick(() => {
this.showSync = true this.showSync = true
@ -166,7 +166,7 @@
}, },
methods: { methods: {
searchClick() { searchClick() {
if(this.readonly) return if (this.readonly) return
if (this.show) { if (this.show) {
return return
} }
@ -182,7 +182,7 @@
this.searchVal = "" this.searchVal = ""
}, },
cancel() { cancel() {
if(this.readonly) return if (this.readonly) return
this.$emit("cancel", { this.$emit("cancel", {
value: this.searchVal value: this.searchVal
}); });
@ -234,7 +234,6 @@
/* #endif */ /* #endif */
flex-direction: row; flex-direction: row;
position: relative; position: relative;
padding: 10px;
// background-color: #fff; // background-color: #fff;
} }
@ -267,7 +266,7 @@
.uni-searchbar__box-search-input { .uni-searchbar__box-search-input {
flex: 1; flex: 1;
font-size: 14px; font-size: 30rpx;
color: #333; color: #333;
} }
@ -281,7 +280,7 @@
} }
.uni-searchbar__text-placeholder { .uni-searchbar__text-placeholder {
font-size: 14px; font-size: 30rpx;
color: #B3B3B3; color: #B3B3B3;
margin-left: 5px; margin-left: 5px;
} }
@ -289,7 +288,7 @@
.uni-searchbar__cancel { .uni-searchbar__cancel {
padding-left: 10px; padding-left: 10px;
line-height: $uni-searchbar-height; line-height: $uni-searchbar-height;
font-size: 14px; font-size: 30rpx;
color: #333333; color: #333333;
/* #ifdef H5 */ /* #ifdef H5 */
cursor: pointer; cursor: pointer;

View File

@ -11,3 +11,31 @@ export function setToken(token) {
export function removeToken() { export function removeToken() {
return uni.removeStorageSync(TokenKey) return uni.removeStorageSync(TokenKey)
} }
export function getJSONData(keyStr) {
if(uni.getStorageSync(keyStr)){
return JSON.parse(uni.getStorageSync(keyStr))
}else{
return "";
}
}
export function setJSONData(keyStr,dataObj) {
return uni.setStorageSync(keyStr, JSON.stringify(dataObj))
}
export function removeJSONData(keyStr) {
return uni.removeStorageSync(keyStr)
}
export function getStrData(keyStr) {
return uni.getStorageSync(keyStr)
}
export function setStrData(keyStr,dataStr) {
return uni.setStorageSync(keyStr, dataStr)
}
export function removeStrData(keyStr) {
return uni.removeStorageSync(keyStr)
}

View File

@ -1,3 +1,31 @@
import { getJSONData,setJSONData,removeJSONData,setStrData } from '@/utils/auth'
// 用户权益code
const UserRightsKey = 'User-Rights'
//用户当前身份code
const UserTypeKey = 'User-Type'
/**
* 判断某用户是否有某权益
* @param {Object} code 权益code
*/
export function hasRights(code) {
let userRights = getJSONData(UserRightsKey)
//默认无权限
let rtnData = false
if(''!=userRights && userRights.con){
}
return rtnData
}
/**
* 切换用户当前身份
* @param {Object} value 身份值
*/
export function changeUserType(value) {
setStrData(UserTypeKey,value)
}
/** /**
* 显示消息提示框 * 显示消息提示框
* @param content 提示的标题 * @param content 提示的标题