Commit 639084e4 authored by yuwenwen's avatar yuwenwen

修改配置以及BUG

parent 8a7caf6c
# 页面标题
VUE_APP_TITLE = 一站式高校轻享平台
VUE_APP_TITLE = 一站式江服社区
# 开发环境配置
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://127.0.0.1:8080'
VUE_APP_BASE_API = 'http://127.0.0.1:8089'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 页面标题
VUE_APP_TITLE = 一站式高校轻享平台
VUE_APP_TITLE = 一站式江服社区
# 生产环境配置
ENV = 'production'
......
# 页面标题
VUE_APP_TITLE = 一站式高校轻享平台
VUE_APP_TITLE = 一站式江服社区
NODE_ENV = production
......
......@@ -35,7 +35,7 @@ export default {
},
data() {
return {
title: '一站式高校轻享平台',
title: ' 一站式江服社区',
logo: logoImg
}
}
......
......@@ -177,7 +177,7 @@ Router.prototype.replace = function push(location) {
}
export default new Router({
base:'/bbs/pc',
base:'/bbspc',
mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
......
<template>
<div class="app-container home">
<div class="app-home">
<p>欢迎使用一站式高校轻享平台</p>
<p>欢迎使用 一站式江服社区</p>
<img src="@/assets/images/index-img.png" />
</div>
......
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">一站式高校轻享平台</h3>
<h3 class="title"> 一站式江服社区</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
......
......@@ -41,13 +41,13 @@
</span>
</template>
</el-table-column>
<el-table-column label="话题" align="center" prop="topicNames" width="240"></el-table-column>
<el-table-column label="话题" align="center" prop="topicNames" width="200"></el-table-column>
<el-table-column label="帐号" prop="userName" align="center" width="140"></el-table-column>
<el-table-column label="姓名" prop="nickName" align="center" width="120"></el-table-column>
<el-table-column label="部门" prop="deptName" align="center" width="160"></el-table-column>
<el-table-column label="学院" prop="fullDeptName" align="center"></el-table-column>
<el-table-column label="点赞数" prop="likeCount" align="center" width="100"></el-table-column>
<el-table-column label="评论数" prop="commentCount" align="center" width="100"></el-table-column>
<el-table-column label="部门(班级)" prop="deptName" align="center" width="120"></el-table-column>
<el-table-column label="上级部门(学院)" prop="fullDeptName" align="center" width="160"></el-table-column>
<el-table-column label="点赞数" prop="likeCount" align="center" width="80"></el-table-column>
<el-table-column label="评论数" prop="commentCount" align="center" width="80"></el-table-column>
<el-table-column label="创建时间" prop="createTime" align="center" width="160"></el-table-column>
<el-table-column label="操作" align="center" width="160">
<template #default="{ row }">
......
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">一站式高校轻享平台</h3>
<h3 class="title"> 一站式江服社区</h3>
<el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
......
......@@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '一站式高校轻享平台' // 网页标题
const name = process.env.VUE_APP_TITLE || ' 一站式江服社区' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口
......@@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/bbs/pc" : "/",
publicPath: process.env.NODE_ENV === "production" ? "/bbspc" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
......
......@@ -5,10 +5,9 @@
<image class="avatar" v-if="form.avatar" :src="form.avatar"></image>
<image class="avatar" v-else src="/static/images/default-avatar.png"></image>
<view class="user-name">{{form.nickName}}</view>
<image v-if="deleteable || userInfo.bbsAdmin" class="more-icon" @click.stop="handleDelDynamics"
<image v-if="deleteable || userInfo.bbsAdmin || form.isSelf==1" class="more-icon" @click.stop="handleDelDynamics"
src="/static/images/more-icon.png"></image>
<image v-else class="more-icon" src="/static/images/more-icon.png"></image>
<!-- 删除按钮 -->
<view class="del-btn" v-if="showDelBtn" @click.stop="handleDel"
:style="'left:' + clientX + 'rpx;' +'top:' + clientY + 'rpx'">
......@@ -292,7 +291,7 @@
uni.showToast({
title: '删除成功',
})
_this.$emit('refresh');
_this.$emit('deleteSuccess');
uni.$emit('hanldeDynamicRefresh')
}
})
......@@ -314,7 +313,7 @@
uni.showToast({
title: '投票成功'
})
this.$emit('refresh')
this.$emit('refreshCurrent',this.form.id)
}
})
},
......
......@@ -315,6 +315,11 @@
// 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
uni.chooseVideo({
success(res) {
console.log(res)
if(res.size > (config.videoLimitSize*1024*1024)){
$modal.msg(`请上传大小为${config.videoLimitSize}M以下的视频`);
return
}
if (_this.isVideo == true) {
$modal.msg('上传了视频,不能再上传其他媒体文件。');
} else {
......
......@@ -2,14 +2,16 @@ const CONFIG = {
//开发环境配置
development: {
debug: true,
platformName: '一站式轻享',
requestUrl: 'http://192.168.5.177:8080',
platformName: '社区',
requestUrl: 'http://192.168.5.177:8089',
videoLimitSize:10
},
//生产环境配置
production: {
debug: false,
platformName: '一站式轻享',
platformName: '社区',
requestUrl: '/bbs/prod-api',
videoLimitSize:10
}
}
......
{
"name" : "一站式轻享",
"name" : "社区",
"appid" : "__UNI__E3457E1",
"description" : "",
"versionName" : "1.0.0",
......@@ -72,7 +72,7 @@
"h5" : {
"router" : {
"mode" : "history",
"base" : "/bbs/h5/"
"base" : "/bbsh5/"
}
}
}
......@@ -3,7 +3,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "轻享",
"navigationBarTitleText": "社区",
"enablePullDownRefresh": true
}
},
......@@ -55,7 +55,7 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "一站式轻享",
"navigationBarTitleText": "社区",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "custom"
......@@ -73,9 +73,9 @@
"position": "bottom",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home-active.png",
"text": "轻享"
"iconPath": "/static/images/tabbar/home.png",
"selectedIconPath": "/static/images/tabbar/home-active.png",
"text": "社区"
}, {
"pagePath": "pages/topics/topics",
"iconPath": "/static/images/tabbar/topic.png",
......@@ -83,8 +83,8 @@
"text": "话题"
}, {
"pagePath": "pages/mine/mine",
"iconPath": "static/images/tabbar/mine.png",
"selectedIconPath": "static/images/tabbar/mine-active.png",
"iconPath": "/static/images/tabbar/mine.png",
"selectedIconPath": "/static/images/tabbar/mine-active.png",
"text": "我的"
}]
}
......
<template>
<view class="detail-page-container">
<dynamic-item :form="form" @refresh="handleRefresh"></dynamic-item>
<dynamic-item :form="form" @refresh="handleRefresh" @deleteSuccess="deleteSuccess"></dynamic-item>
<!-- 评论管理区 -->
<comment-item :form="form" ></comment-item>
</view>
......@@ -44,6 +44,9 @@
}
})
},
deleteSuccess(){
history.go(-1)
}
}
}
</script>
......
......@@ -6,10 +6,12 @@
@keypress.enter="refreshContentList" placeholder-class="placeholder-class" />
</view>
<!-- <scroll-view class="scroll-view-index" scroll-y :show-scrollbar="false" v-if="list.length>0"
@scrolltolower="loadMore" @scroll="onScroll" :scroll-top="scrollTop"> -->
<scroll-view class="scroll-view-index" scroll-y :show-scrollbar="false" v-if="list.length>0"
@scrolltolower="loadMore">
<template v-for="(item,index) in list">
<dynamic-item :form="item" @refresh="refreshContentList"></dynamic-item>
<dynamic-item :form="item" @refresh="refreshContentList" @refreshCurrent="refreshCurrent"></dynamic-item>
</template>
</scroll-view>
<scroll-view class="scroll-view-index" scroll-y :show-scrollbar="false" v-else>
......@@ -30,7 +32,8 @@
import ListEmpty from '@/components/ListEmpty.vue';
import emotions from '@/utils/emjo';
import {
dynamicList
dynamicList,
dynamicDetail
} from '@/api/api.js'
export default {
data() {
......@@ -45,7 +48,8 @@
x: 620,
y: 1060
},
emotions
emotions,
scrollTop: 0
}
},
components: {
......@@ -63,7 +67,7 @@
_this.getList()
})
}
if(res.code == 401){
if (res.code == 401) {
window.location = res.data
}
})
......@@ -83,10 +87,13 @@
uni.showLoading({
title: '加载中...'
})
const currentScrollTop = this.scrollTop;
dynamicList(this.queryParams).then(res => {
this.list = [...this.list, ...res.rows]
this.total = res.total
setTimeout(() => {
this.scrollTop = currentScrollTop;
}, 0);
}).finally(() => {
uni.hideLoading()
})
......@@ -118,6 +125,22 @@
console.log(e)
this.area.y = e.detail.y;
this.area.x = e.detail.x
},
onScroll(e) {
this.scrollTop = e.detail.scrollTop;
},
// 指定更新
refreshCurrent(momentId) {
dynamicDetail(momentId).then(res => {
if (res.code == 200) {
const targetIndex = this.list.findIndex(item => item.id === momentId);
if (targetIndex === -1) return; // 未找到则退出
// 使用 Vue.set 或展开运算符确保响应式
this.list.splice(targetIndex, 1, {
...res.data
});
}
})
}
}
}
......
......@@ -12,7 +12,7 @@
<scroll-view class="scroll-view-topic" scroll-y :show-scrollbar="false" v-if="list.length>0"
@scrolltolower="loadMore">
<template v-for="(item,index) in list">
<dynamic-item :form="item" @refresh="handleRefresh"></dynamic-item>
<dynamic-item :form="item" @refresh="handleRefresh" @deleteSuccess="handleRefresh"></dynamic-item>
</template>
</scroll-view>
<scroll-view class="scroll-view-topic" scroll-y :show-scrollbar="false" v-else>
......
......@@ -45,15 +45,17 @@
margin-bottom: 20rpx;
}
.imgs{
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto;
// display: grid;
// grid-template-columns: 1fr 1fr 1fr;
// grid-template-rows: auto;
display: flex;
flex-wrap: wrap;
row-gap: 6rpx;
column-gap: 6rpx;
margin-top: 12rpx;
.item{
width: 100%;
height: 224rpx;
width: 222rpx;
height: 222rpx;
}
}
}
......@@ -97,7 +99,7 @@
}
.text{
color: rgba(142, 153, 171, 1);
font-size: 14px;
font-size: 28rpx;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment