Merge branch 'main' of http://47.93.242.168:3000/talk/talk_app
commit
c06d507be8
|
@ -4,9 +4,8 @@ export default {
|
||||||
uploadQiNiuDomain: 'https://upload-z2.qiniup.com',
|
uploadQiNiuDomain: 'https://upload-z2.qiniup.com',
|
||||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||||
// baseUrl: 'http://47.93.242.168:8080',
|
// baseUrl: 'http://47.93.242.168:8080',
|
||||||
baseUrl: 'http://47.93.242.168:8080',
|
|
||||||
// baseUrl: 'http://localhost:8080',
|
|
||||||
// baseUrl: 'http://47.93.242.168:8080',
|
// baseUrl: 'http://47.93.242.168:8080',
|
||||||
|
baseUrl: 'http://localhost:8080',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
// 应用名称
|
// 应用名称
|
||||||
|
|
1
main.js
1
main.js
|
@ -12,6 +12,7 @@ export function createApp() {
|
||||||
app.config.globalProperties.iconConfig = iconConfig
|
app.config.globalProperties.iconConfig = iconConfig
|
||||||
app.use(uviewPlus)
|
app.use(uviewPlus)
|
||||||
app.use(store)
|
app.use(store)
|
||||||
|
|
||||||
// app.use(uView)
|
// app.use(uView)
|
||||||
install(app)
|
install(app)
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"qiniu": "^7.12.0",
|
"qiniu": "^7.12.0",
|
||||||
"qiniu-js": "^3.4.2",
|
"qiniu-js": "^3.4.2",
|
||||||
|
"quill": "^1.3.7",
|
||||||
"uview-plus": "^3.2.15"
|
"uview-plus": "^3.2.15"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,14 @@
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
, {
|
||||||
|
"path": "pages/activity/publish",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "发布活动",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
}
|
||||||
, {
|
, {
|
||||||
"path": "pages/work/index",
|
"path": "pages/work/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -177,9 +177,7 @@ function cancel () {
|
||||||
.btnText {
|
.btnText {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
|
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
||||||
color: #00CCBE !important;
|
color: #00CCBE !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,174 @@
|
||||||
|
<template>
|
||||||
|
|
||||||
|
<view>
|
||||||
|
<!-- 顶部导航栏 -->
|
||||||
|
<up-navbar leftText="" title="" :placeholder="true" :safeAreaInsetTop="true" @leftClick="leftClick"
|
||||||
|
:bgColor="bgColor">
|
||||||
|
|
||||||
|
<template #center>
|
||||||
|
<div class="navbarcenter"><span>发布活动</span></div>
|
||||||
|
</template>
|
||||||
|
</up-navbar>
|
||||||
|
</view>
|
||||||
|
<view class="bgc"></view>
|
||||||
|
<view class="cardz">
|
||||||
|
<view class="titleInfo">
|
||||||
|
<up-input placeholder="输入活动标题~(5~20个字)" v-model="title" border="none" maxlength="20" fontSize="34rpx"
|
||||||
|
color="#C0C0C0" clearable></up-input>
|
||||||
|
<view class="xian"></view>
|
||||||
|
</view>
|
||||||
|
<view class="contentInfo">
|
||||||
|
<up-textarea v-model="content" placeholder="输入活动内容
|
||||||
|
活动图片最多可发布两张
|
||||||
|
输入准确定位可以更好提供活动信息奥!安全指南:请勿发布带有个人信息(如:住址)" count border="none" height="270" maxlength="500"
|
||||||
|
placeholderStyle="color: #c0c0c0;font-size: 30rpx; background:none;"></up-textarea>
|
||||||
|
</view>
|
||||||
|
<view class="cardzfile">
|
||||||
|
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1"></fileUpload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cardx">
|
||||||
|
<up-cell-group :border="false">
|
||||||
|
<up-cell :isLink="true" :center="true">
|
||||||
|
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||||
|
<image :src="tu52" style="width: 30rpx; height: 32rpx;"></image>
|
||||||
|
<span>请选择活动开始时间</span>
|
||||||
|
</template>
|
||||||
|
</up-cell>
|
||||||
|
<up-cell :isLink="true" :center="true">
|
||||||
|
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||||
|
<image :src="tu53" style="width: 30rpx; height: 32rpx;"></image>
|
||||||
|
<span>请选择活动结束时间</span>
|
||||||
|
</template>
|
||||||
|
</up-cell>
|
||||||
|
<up-cell :border="false" :isLink="true" :center="true">
|
||||||
|
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||||
|
<image :src="tu51" style="width: 30rpx; height: 32rpx;"></image>
|
||||||
|
<span>添加活动具体位置</span>
|
||||||
|
</template>
|
||||||
|
</up-cell>
|
||||||
|
</up-cell-group>
|
||||||
|
</view>
|
||||||
|
<view class="cardxx">
|
||||||
|
<up-button color="#C9F6F5" size="large" shape="circle" @click="publish"><span
|
||||||
|
class="fbText">发布</span></up-button>
|
||||||
|
<view style="width: 26rpx;height: 80rpx;"></view>
|
||||||
|
<up-button color="#F8F8E3" size="large" shape="circle" @click="draft" style="margin-left: 26rpx;"><span
|
||||||
|
class="cgText">存草稿</span></up-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import fileUpload from '../common/file/fileUpload'
|
||||||
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||||
|
import { useStore } from 'vuex';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const iconConfig = proxy.iconConfig;
|
||||||
|
const tu51 = iconConfig.tu51;
|
||||||
|
const tu52 = iconConfig.tu52;
|
||||||
|
const tu53 = iconConfig.tu53;
|
||||||
|
const title = ref('')
|
||||||
|
const content = ref('');
|
||||||
|
const fileList1 = ref([])
|
||||||
|
const fileTypeInfo1 = ref('image')
|
||||||
|
const bgColor = ref('');
|
||||||
|
bgColor.value = 'rgba(170, 0, 0, 0)'
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
console.log("页面参数:", options.id);
|
||||||
|
})
|
||||||
|
const leftClick = () => {
|
||||||
|
proxy.$tab.navigateBack(1)
|
||||||
|
}
|
||||||
|
const draft = () => {
|
||||||
|
console.log("存草稿");
|
||||||
|
}
|
||||||
|
const publish = () => {
|
||||||
|
console.log("发布");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" >
|
||||||
|
.navbarcenter {
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
font-size: 36rpx;
|
||||||
|
text-align: left;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgc {
|
||||||
|
width: 100%;
|
||||||
|
height: 500rpx;
|
||||||
|
background: linear-gradient(-180deg, #c9f6f5, #ffffff);
|
||||||
|
position: fixed;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardz {
|
||||||
|
margin-left: 32rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
|
|
||||||
|
.titleInfo {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
|
||||||
|
.xian {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
height: 2rpx;
|
||||||
|
border-radius: 1rpx 1rpx 1rpx 1rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentInfo {
|
||||||
|
margin-top: 46rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardzfile {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardx {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
padding-top: 72rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
|
|
||||||
|
.c1 {
|
||||||
|
margin-top: 2rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 102rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardxx {
|
||||||
|
display: flex;
|
||||||
|
margin-left: 32rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
|
margin-top: 80rpx;
|
||||||
|
|
||||||
|
.fbText {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #FBFBFB !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.cgText {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999999 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -43,6 +43,12 @@ import { useStore } from 'vuex';
|
||||||
const emit = defineEmits(['scrolltolower']);
|
const emit = defineEmits(['scrolltolower']);
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const iconConfig = proxy.iconConfig;
|
||||||
|
const tu21 = iconConfig.tu21;
|
||||||
|
const tu22 = iconConfig.tu22;
|
||||||
|
const tu51 = iconConfig.tu51;
|
||||||
|
const tu52 = iconConfig.tu52;
|
||||||
|
const tu53 = iconConfig.tu53;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: Array
|
modelValue: Array
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
name="fileInfowx"
|
name="fileInfowx"
|
||||||
multiple
|
multiple
|
||||||
:previewFullImage="true"
|
:previewFullImage="true"
|
||||||
></up-upload>
|
>
|
||||||
|
<image :src="tu2x"
|
||||||
|
style="width: 210rpx;height: 210rpx;"></image>
|
||||||
|
</up-upload>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -24,7 +27,8 @@ import * as qiniu from 'qiniu-js'
|
||||||
const emit = defineEmits();
|
const emit = defineEmits();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const uploadQiNiuDomain = config1.uploadQiNiuDomain;
|
const uploadQiNiuDomain = config1.uploadQiNiuDomain;
|
||||||
|
const iconConfig = proxy.iconConfig;
|
||||||
|
const tu2x = iconConfig.tu2x;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: [String, Object, Array],
|
modelValue: [String, Object, Array],
|
||||||
fileTypeInfo: {
|
fileTypeInfo: {
|
||||||
|
@ -109,6 +113,7 @@ const afterRead = async (event) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadFilePromise = async (fileInfo1, name) => {
|
const uploadFilePromise = async (fileInfo1, name) => {
|
||||||
|
console.log("fileInfo1:",fileInfo1);
|
||||||
// 主要目的的拼名字,大小,类型
|
// 主要目的的拼名字,大小,类型
|
||||||
let fileNameOld = [0, 1];
|
let fileNameOld = [0, 1];
|
||||||
if (fileInfo1.name !== undefined) {
|
if (fileInfo1.name !== undefined) {
|
||||||
|
@ -118,12 +123,14 @@ const uploadFilePromise = async (fileInfo1, name) => {
|
||||||
fileInfo.name = fileNameOld[0] + "_" + store.state.user.phoneType + "_" + name;
|
fileInfo.name = fileNameOld[0] + "_" + store.state.user.phoneType + "_" + name;
|
||||||
|
|
||||||
let extension1 = fileInfo1.url.split('.');
|
let extension1 = fileInfo1.url.split('.');
|
||||||
|
|
||||||
// 防止 h5 报错
|
// 防止 h5 报错
|
||||||
if (extension1[1] == null) {
|
if (extension1[1] === undefined) {
|
||||||
extension1[1] = fileNameOld[1];
|
extension1[1] = fileNameOld[fileNameOld.length-1]; //保证取最后一个
|
||||||
}
|
}
|
||||||
//主要是为了拼接文件type(video/mp4),因为各端传入的type各有不同
|
//主要是为了拼接文件type(video/mp4),因为各端传入的type各有不同
|
||||||
fileInfo.type = fileInfo1.type + "/" + extension1[1];
|
fileInfo.type = fileInfo1.type + "/" + extension1[extension1.length-1];
|
||||||
|
console.log("fileInfo.type:",fileInfo);
|
||||||
fileInfo.extension = extension1[1];
|
fileInfo.extension = extension1[1];
|
||||||
try {
|
try {
|
||||||
const tokenData = await getQNtoken(fileInfo);
|
const tokenData = await getQNtoken(fileInfo);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<!-- 加号小弹窗 -->
|
<!-- 加号小弹窗 -->
|
||||||
<view class="postTypeContainer" v-if="postTypeOpen">
|
<view class="postTypeContainer" v-if="postTypeOpen">
|
||||||
<view class="postTypeWindow" v-for="(item, index) in postTypeList" :key="index">
|
<view class="postTypeWindow" v-for="(item, index) in postTypeList" :key="index">
|
||||||
<text>{{item}}</text>
|
<text @click="publishTalk(item)">{{item.lable}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
lefther: 0,
|
lefther: 0,
|
||||||
searchPrerequisite: '热门',
|
searchPrerequisite: '热门',
|
||||||
postTypeOpen: false,
|
postTypeOpen: false,
|
||||||
postTypeList: ['发布话题', '发布活动'],
|
postTypeList: [{lable:'发布话题',id:1}, {lable:'发布活动',id:2}],
|
||||||
bgColor: 'rgba(170, 0, 0, 0)',
|
bgColor: 'rgba(170, 0, 0, 0)',
|
||||||
searchPrerequisiteList: [
|
searchPrerequisiteList: [
|
||||||
'热门', '最新', '筛选3', '筛选4', '筛选5', '筛选6', '筛选7', '筛选8', '筛选9'
|
'热门', '最新', '筛选3', '筛选4', '筛选5', '筛选6', '筛选7', '筛选8', '筛选9'
|
||||||
|
@ -362,6 +362,14 @@
|
||||||
console.log()
|
console.log()
|
||||||
this.$tab.navigateTo('/pages/search/index')
|
this.$tab.navigateTo('/pages/search/index')
|
||||||
},
|
},
|
||||||
|
publishTalk(item){
|
||||||
|
console.log()
|
||||||
|
if(item.id === 2){
|
||||||
|
//todo 判断用户是否有增加活动的接口调用权限
|
||||||
|
this.$tab.navigateTo('/pages/activity/publish')
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
rightClick() {
|
rightClick() {
|
||||||
console.log('rightClick');
|
console.log('rightClick');
|
||||||
},
|
},
|
||||||
|
|
|
@ -85,7 +85,7 @@ const loginSuccess = async () => {
|
||||||
await store.dispatch('GetInfo')
|
await store.dispatch('GetInfo')
|
||||||
await store.dispatch('getQNDomainInfo')
|
await store.dispatch('getQNDomainInfo')
|
||||||
proxy.$tab.reLaunch('/pages/index');
|
proxy.$tab.reLaunch('/pages/index');
|
||||||
// await store.dispatch('GetUserInfo');
|
store.dispatch('GetUserInfo');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("获取用户信息失败", error)
|
console.log("获取用户信息失败", error)
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,10 +79,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import fileUpload from './../common/file/fileUpload/index.vue'
|
import fileUpload from './../common/file/fileUpload/index.vue'
|
||||||
import {ref, reactive,getCurrentInstance} from 'vue'
|
import {ref, reactive,getCurrentInstance} from 'vue'
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
|
|
|
@ -137,7 +137,7 @@ const user = {
|
||||||
const avatar =
|
const avatar =
|
||||||
user == null || user.avatar == "" || user.avatar == null
|
user == null || user.avatar == "" || user.avatar == null
|
||||||
? defaultAvatar
|
? defaultAvatar
|
||||||
: baseUrl + user.avatar;
|
: qnDomain + user.avatar;
|
||||||
const username =
|
const username =
|
||||||
user == null || user.userName == "" || user.userName == null
|
user == null || user.userName == "" || user.userName == null
|
||||||
? ""
|
? ""
|
||||||
|
|
|
@ -9,9 +9,10 @@ const tu51 = ref(QNDomain + "home/icon/image/png/tu5-1_20240601124004353.png")
|
||||||
const tu52 = ref(QNDomain + "home/icon/image/png/tu5-2_20240601124010403.png")
|
const tu52 = ref(QNDomain + "home/icon/image/png/tu5-2_20240601124010403.png")
|
||||||
const tu53 = ref(QNDomain + "home/icon/image/png/tu5-3_20240601124016641.png")
|
const tu53 = ref(QNDomain + "home/icon/image/png/tu5-3_20240601124016641.png")
|
||||||
const tu23 = ref(QNDomain + "home/icon/image/png/tu2-3_20240602093303793.png")
|
const tu23 = ref(QNDomain + "home/icon/image/png/tu2-3_20240602093303793.png")
|
||||||
|
const tu2x = ref(QNDomain + "home/icon/image/png/添加图片@2x_20240603101717136.png")
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
tu21,tu22,tu23,
|
tu21,tu22,tu23,tu2x,
|
||||||
tu51,tu52,tu53
|
tu51,tu52,tu53
|
||||||
}
|
}
|
Loading…
Reference in New Issue