Merge remote-tracking branch 'origin/main'
commit
763976a6b2
1
App.vue
1
App.vue
|
@ -3,6 +3,7 @@
|
|||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
this.initApp()
|
||||
|
|
|
@ -4,8 +4,8 @@ export default {
|
|||
uploadQiNiuDomain: 'https://upload-z2.qiniup.com',
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||
// 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://localhost:8080',
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
|
|
2
main.js
2
main.js
|
@ -4,6 +4,7 @@ import store from './store' // store
|
|||
import { install } from './plugins' // plugins
|
||||
import './permission.js' // permission
|
||||
import iconConfig from './utils/icon/icon.js'
|
||||
import { getDictLabelByValue } from '@/utils/dict'
|
||||
|
||||
// main.js
|
||||
import uviewPlus from 'uview-plus'
|
||||
|
@ -11,6 +12,7 @@ import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, select
|
|||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
app.config.globalProperties.iconConfig = iconConfig
|
||||
app.config.globalProperties.getDictLabelByValue = getDictLabelByValue
|
||||
app.config.globalProperties.parseTime = parseTime
|
||||
app.config.globalProperties.resetForm = resetForm
|
||||
app.config.globalProperties.handleTree = handleTree
|
||||
|
|
|
@ -275,13 +275,17 @@ page{
|
|||
}
|
||||
|
||||
.bgc {
|
||||
width: 750rpx;
|
||||
height: 500rpx;
|
||||
background: linear-gradient(180deg, rgb(201, 246, 245), rgb(248, 248, 226));
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
|
||||
width: 750rpx;
|
||||
height: 500rpx;
|
||||
background: linear-gradient(
|
||||
180deg, /* 渐变方向,从上到下 */
|
||||
#C9F6F5 0%, /* 起始颜色 */
|
||||
#F8F8E2 80%, /* 中间颜色 */
|
||||
#FBFBFB 100% /* 结束颜色 */
|
||||
);
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
}
|
||||
|
||||
.sousuoBox1 {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<view class="addrs">活动地点:{{ actiInfoList.addres }}</view>
|
||||
</view>
|
||||
<view class="cardz">
|
||||
<up-text size="15" color="#000000" lineHeight="23" :text="actiInfoList.acContent"></up-text>
|
||||
<up-text size="15" color="#000000" lineHeight="23" :text="actiInfoList.acContent"></up-text>
|
||||
|
||||
</view>
|
||||
<view class="cardx" v-for="(item, index) in toimage(actiInfoList.file)" :key="index">
|
||||
|
@ -28,33 +28,43 @@
|
|||
<view v-if="actiInfoList.state === '0'">
|
||||
<view class="state3"
|
||||
v-if="activityAttendInfo.attendState === '0' || activityAttendInfo.attendState === '1'">
|
||||
<up-button color="#F1F1F1" size="large" shape="circle"><span class="btnText">未参加</span></up-button>
|
||||
<view class="btn btnText">
|
||||
未参加
|
||||
</view>
|
||||
</view>
|
||||
<view class="state3" v-else-if="activityAttendInfo.attendState === '2'">
|
||||
<up-button color="#F1F1F1" size="large" shape="circle"><span class="btnText">已参加</span></up-button>
|
||||
<view class="btn btnText">
|
||||
已参加
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="actiInfoList.state === '2'">
|
||||
<view class="state1" v-if="activityAttendInfo.attendState === '0'">
|
||||
<up-button color="#C0F0EC" size="large" shape="circle" @click="goSing(1)"><span
|
||||
class="btnText">立即报名</span></up-button>
|
||||
<view class="btn btnText" @click="goSing(1)">
|
||||
立即报名
|
||||
</view>
|
||||
</view>
|
||||
<view class="state2" v-else-if="activityAttendInfo.attendState === '1'">
|
||||
<up-button color="#FDE2E2" size="large" shape="circle" @click="goQrcode(1)"><span
|
||||
class="btnText">扫码签到</span></up-button>
|
||||
<view class="btn btnText" @click="goQrcode(1)">
|
||||
扫码签到
|
||||
</view>
|
||||
</view>
|
||||
<view class="state2" v-else-if="activityAttendInfo.attendState === '2'">
|
||||
<up-button color="#FDE2E2" size="large" shape="circle"><span class="btnText">已签到</span></up-button>
|
||||
<view class="btn btnText">
|
||||
已签到
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="actiInfoList.state === '1'">
|
||||
<view class="state1" v-if="activityAttendInfo.attendState === '0'">
|
||||
<up-button color="#C0F0EC" size="large" shape="circle" @click="goSing(1)"><span
|
||||
class="btnText">立即报名</span></up-button>
|
||||
<view class="btn btnText" @click="goSing(1)">
|
||||
立即报名
|
||||
</view>
|
||||
</view>
|
||||
<view class="state1" v-else-if="activityAttendInfo.attendState === '1'">
|
||||
<up-button color="#C0F0EC" size="large" shape="circle" @click="goSing(0)"><span
|
||||
class="btnText">取消报名</span></up-button>
|
||||
<view class="btn btnText" @click="goSing(0)">
|
||||
取消报名
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -211,10 +221,11 @@ const toqrcode = (e) => {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page{
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
|
||||
}
|
||||
|
||||
.navbarcenter {
|
||||
font-weight: 400;
|
||||
width: 148rpx;
|
||||
|
@ -230,7 +241,7 @@ page{
|
|||
|
||||
.cards {
|
||||
.title {
|
||||
font-weight: 400 !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 32rpx;
|
||||
text-align: left;
|
||||
color: #000000 !important;
|
||||
|
@ -264,8 +275,10 @@ page{
|
|||
|
||||
.cardx {
|
||||
margin-top: 48rpx;
|
||||
|
||||
.image {
|
||||
width: 686rpx;
|
||||
border-radius: 24rpx;
|
||||
height: 720rpx;
|
||||
}
|
||||
}
|
||||
|
@ -277,14 +290,23 @@ page{
|
|||
margin: 4rpx auto;
|
||||
margin-bottom: 400rpx;
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.state1 {
|
||||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 40rpx;
|
||||
background-color: #C0F0EC;
|
||||
|
||||
.btnText {
|
||||
font-weight: 400;
|
||||
width: 120rpx;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #00CCBE !important;
|
||||
}
|
||||
|
@ -294,10 +316,11 @@ page{
|
|||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 40rpx;
|
||||
background-color: #FDE2E2;
|
||||
|
||||
.btnText {
|
||||
font-weight: 400;
|
||||
width: 120rpx;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #FFABAB !important;
|
||||
}
|
||||
|
@ -307,10 +330,11 @@ page{
|
|||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 40rpx;
|
||||
background-color: #F1F1F1;
|
||||
|
||||
.btnText {
|
||||
font-weight: 400;
|
||||
width: 120rpx;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #7E7E7E !important;
|
||||
}
|
||||
|
@ -340,6 +364,22 @@ page{
|
|||
|
||||
.infoavatar {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
.launchName {
|
||||
font-size: 26rpx;
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
.launchAddres {
|
||||
|
||||
font-size: 24rpx;
|
||||
color: #999999 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.elroll {
|
||||
font-size: 24rpx;
|
||||
color: #999999 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<view class="titleInfo">
|
||||
<up-form-item label="" prop="acTitle" borderBottom>
|
||||
<up-input placeholder="输入活动标题~(5~20个字)" v-model="form.acTitle" border="none" maxlength="20"
|
||||
fontSize="34rpx" color="#C0C0C0" clearable></up-input>
|
||||
fontSize="34rpx" color="#333333" clearable placeholderStyle="color: #c0c0c0;font-size: 34rpx;"></up-input>
|
||||
</up-form-item>
|
||||
<view class="xian"></view>
|
||||
</view>
|
||||
|
@ -23,7 +23,9 @@
|
|||
<textarea class="text_style" v-model="form.acContent"
|
||||
placeholder="输入活动内容\n活动图片最多可发布两张\n输入准确定位可以更好提供活动信息奥!\n安全指南:请勿发布带有个人信息(如:住址)\n" cols="50"
|
||||
rows="10" maxlength="500"
|
||||
placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap"
|
||||
placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap;"
|
||||
color="#333333"
|
||||
fontSize="30rpx"
|
||||
@linechange="inputtextInfo"></textarea>
|
||||
<view class="char-count">{{ form.acContent.length }}/500</view>
|
||||
</up-form-item>
|
||||
|
@ -85,11 +87,13 @@
|
|||
<up-datetime-picker :show="showEndTime" v-model="newData" @confirm="confirm2" :modelValue="newData"
|
||||
format="YYYY-MM-DD HH:mm:ss" @cancel="cancel" mode="datetime"></up-datetime-picker>
|
||||
<view class="cardxx">
|
||||
<up-button color="#C9F6F5" size="large" shape="circle" @click="publish" throttleTime="500"><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 class="cardxx-btn" @click="publish">
|
||||
发布
|
||||
</view>
|
||||
<view class="cardxx-btn cgText" @click="draft">
|
||||
存草稿
|
||||
</view>
|
||||
</view>
|
||||
</up-form>
|
||||
</template>
|
||||
|
@ -298,13 +302,14 @@ page{
|
|||
width: 100%;
|
||||
overflow: auto;
|
||||
|
||||
color: #c0c0c0;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.char-count {
|
||||
z-index:1;
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
|
@ -336,17 +341,23 @@ page{
|
|||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
margin-top: 80rpx;
|
||||
|
||||
.fbText {
|
||||
font-weight: 400;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 32rpx;
|
||||
.cardxx-btn{
|
||||
width: 330rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
background: #c9f6f5;
|
||||
font-size: 30rpx;
|
||||
color: #FBFBFB !important;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FBFBFB;
|
||||
}
|
||||
|
||||
.cgText {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #999999 !important;
|
||||
background-color: #F8F8E3;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,4 +368,8 @@ page{
|
|||
text-align: left;
|
||||
color: #C9F6F5 !important;
|
||||
}
|
||||
.btnInfo1{
|
||||
width: 330rpx !important;
|
||||
height: 80rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
结束时间:{{ item.endTime }}
|
||||
</view>
|
||||
<view class="addrs flex alignCenter">
|
||||
<image :src="tu51" style="width: 20rpx; height: 26rpx; margin-right: 12rpx;"></image>
|
||||
<image :src="tu51" style="width: 25rpx; height: 26rpx; margin-right: 12rpx;"></image>
|
||||
活动地点:{{ item.addres }}
|
||||
</view>
|
||||
<view class="statsInfo">
|
||||
|
@ -97,7 +97,7 @@ onShow(() => {
|
|||
padding-left: 24rpx;
|
||||
|
||||
.titile {
|
||||
font-weight: 400;
|
||||
font-weight: 600;
|
||||
|
||||
height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
name="fileInfowx"
|
||||
multiple
|
||||
:previewFullImage="true"
|
||||
width="210rpx"
|
||||
height="210rpx"
|
||||
>
|
||||
<image :src="tu2x"
|
||||
style="width: 210rpx;height: 210rpx;"></image>
|
||||
</up-upload>
|
||||
<image :src="tu2x" style="width: 210rpx; height: 210rpx;"></image>
|
||||
</up-upload>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -148,30 +149,7 @@ const uploadFilePromise = async (fileInfo1, name) => {
|
|||
const uploadQN = (file) => {
|
||||
return uploadQN1(file.url);
|
||||
};
|
||||
//废弃
|
||||
const uploadQN2 = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const observable = qiniu.upload(file, dataToken.key, dataToken.token, putExtra, config);
|
||||
const subscription = observable.subscribe({
|
||||
next(res) {
|
||||
console.log("next:", res);
|
||||
},
|
||||
error(err) {
|
||||
console.log("error:", err);
|
||||
reject(err);
|
||||
},
|
||||
async complete(res) {
|
||||
console.log("complete:", res);
|
||||
form.url = res.key;
|
||||
form.name = res.key;
|
||||
form.type = res.mimeType;
|
||||
form.size = res.fsize;
|
||||
await addFileList(form);
|
||||
resolve(res.key);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
//调用uni上传方法
|
||||
const uploadQN1 = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
@ -0,0 +1,208 @@
|
|||
<template>
|
||||
<view>
|
||||
<up-upload
|
||||
:accept="fileTypeInfo"
|
||||
:maxCount="limit"
|
||||
:fileList="fileList1"
|
||||
@afterRead="afterRead"
|
||||
@delete="deletePic"
|
||||
:maxSize="fileSize"
|
||||
name="fileInfowx"
|
||||
multiple
|
||||
:previewFullImage="true"
|
||||
>
|
||||
<image :src="tu2x"
|
||||
style="width: 210rpx;height: 210rpx;"></image>
|
||||
</up-upload>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getQNtoken, addFileList } from "@/api/qiniu/info";
|
||||
import config1 from "@/config";
|
||||
import { ref, reactive, getCurrentInstance, defineEmits } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
import * as qiniu from 'qiniu-js'
|
||||
|
||||
const emit = defineEmits();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const uploadQiNiuDomain = config1.uploadQiNiuDomain;
|
||||
const iconConfig = proxy.iconConfig;
|
||||
const tu2x = iconConfig.tu2x;
|
||||
const props = defineProps({
|
||||
modelValue: [String, Object, Array],
|
||||
fileTypeInfo: {
|
||||
type: String,
|
||||
default: "image",
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 6,
|
||||
},
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 100 * 1024 * 1024,
|
||||
}
|
||||
});
|
||||
|
||||
const url = ref('');
|
||||
const fileList1 = ref([]);
|
||||
const store = useStore();
|
||||
const dataToken = reactive({
|
||||
token: '',
|
||||
key: ''
|
||||
});
|
||||
const fileInfo = reactive({
|
||||
name: '',
|
||||
type: '',
|
||||
extension: ''
|
||||
});
|
||||
const config = reactive({
|
||||
useCdnDomain: true,
|
||||
region: qiniu.region.z2,
|
||||
checkByMD5: true,
|
||||
forceDirect: false
|
||||
});
|
||||
const putExtra = reactive({});
|
||||
const form = reactive({
|
||||
id: null,
|
||||
configId: null,
|
||||
name: null,
|
||||
path: null,
|
||||
url: null,
|
||||
type: null,
|
||||
fileCategory: null,
|
||||
size: null,
|
||||
creator: null,
|
||||
createTime: null,
|
||||
updater: null,
|
||||
updateTime: null,
|
||||
deleted: null
|
||||
});
|
||||
|
||||
// 新增图片
|
||||
const afterRead = async (event) => {
|
||||
|
||||
let name = event.name;
|
||||
let lists = [].concat(event.file);
|
||||
let fileListLen = fileList1.value.length;
|
||||
lists.forEach(item => {
|
||||
fileList1.value.push({
|
||||
...item,
|
||||
status: 'uploading',
|
||||
message: '上传中',
|
||||
});
|
||||
});
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
try {
|
||||
const result = await uploadFilePromise(lists[i], name);
|
||||
let item = fileList1.value[fileListLen];
|
||||
fileList1.value.splice(fileListLen, 1, {
|
||||
...item,
|
||||
status: 'success',
|
||||
message: '',
|
||||
url: store.state.user.QNDomain + result,
|
||||
furl: result
|
||||
});
|
||||
emit("update:modelValue", listToString(fileList1.value));
|
||||
fileListLen++;
|
||||
} catch (error) {
|
||||
console.error("上传失败:", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const uploadFilePromise = async (fileInfo1, name) => {
|
||||
|
||||
// 主要目的的拼名字,大小,类型
|
||||
let fileNameOld = [0, 1];
|
||||
if (fileInfo1.name !== undefined) {
|
||||
fileNameOld = fileInfo1.name.split('.');
|
||||
}
|
||||
|
||||
fileInfo.name = fileNameOld[0] + "_" + store.state.user.phoneType + "_" + name;
|
||||
|
||||
let extension1 = fileInfo1.url.split('.');
|
||||
|
||||
// 防止 h5 报错
|
||||
if (extension1[1] === undefined) {
|
||||
extension1[1] = fileNameOld[fileNameOld.length-1]; //保证取最后一个
|
||||
}
|
||||
//主要是为了拼接文件type(video/mp4),因为各端传入的type各有不同
|
||||
fileInfo.type = fileInfo1.type + "/" + extension1[extension1.length-1];
|
||||
|
||||
fileInfo.extension = extension1[1];
|
||||
try {
|
||||
const tokenData = await getQNtoken(fileInfo);
|
||||
dataToken.token = tokenData.QNtoken;
|
||||
dataToken.key = tokenData.key;
|
||||
|
||||
const result = await uploadQN(fileInfo1);
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.error("获取 token 或上传失败:", error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
//多走一步,为了实现文件分片上传(废弃,简单上传即可)
|
||||
const uploadQN = (file) => {
|
||||
return uploadQN1(file.url);
|
||||
};
|
||||
|
||||
//调用uni上传方法
|
||||
const uploadQN1 = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: uploadQiNiuDomain,
|
||||
filePath: file,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'key': dataToken.key,
|
||||
'token': dataToken.token
|
||||
},
|
||||
success: async (e) => {
|
||||
try {
|
||||
let data = JSON.parse(e.data);
|
||||
form.url = data.key;
|
||||
form.name = data.key;
|
||||
form.type = data.fileType;
|
||||
form.size = data.fsize;
|
||||
await addFileList(form);
|
||||
resolve(form.url);
|
||||
} catch (error) {
|
||||
console.error("处理上传成功响应时出错:", error);
|
||||
reject(error);
|
||||
}
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log("上传失败:", e);
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const deletePic = (e) => {
|
||||
fileList1.value.splice(e.index, 1);
|
||||
};
|
||||
|
||||
const typeInfo = () => {
|
||||
store.dispatch('getPhoneType');
|
||||
|
||||
};
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].furl + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
typeInfo();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
|
@ -35,15 +35,20 @@ const { proxy } = getCurrentInstance();
|
|||
const iconConfig = proxy.iconConfig;
|
||||
const sh2x1 = iconConfig.sh2x1;
|
||||
const sh2x = iconConfig.sh2x;
|
||||
const bgColor = ref('');
|
||||
bgColor.value = 'rgba(170, 0, 0, 0)'
|
||||
const bgColor = ref('rgba(170, 0, 0, 0)');
|
||||
|
||||
|
||||
const leftClick = () => {
|
||||
proxy.$tab.navigateBack(1)
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" >
|
||||
page{
|
||||
background-color: #ffffff;
|
||||
|
||||
}
|
||||
.bacimg2 {
|
||||
z-index: 1;
|
||||
width: 508rpx;
|
||||
height: 540rpx;
|
||||
position: fixed;
|
||||
|
@ -66,7 +71,7 @@ const leftClick = () => {
|
|||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: -1;
|
||||
|
||||
}
|
||||
|
||||
.shenhe2x1 {
|
||||
|
|
|
@ -45,6 +45,10 @@ const leftClick = () => {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
background-color: #ffffff;
|
||||
|
||||
}
|
||||
.bacimg2 {
|
||||
width: 508rpx;
|
||||
height: 540rpx;
|
||||
|
@ -68,7 +72,7 @@ const leftClick = () => {
|
|||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: -1;
|
||||
|
||||
}
|
||||
|
||||
.shenhe2x1 {
|
||||
|
@ -80,7 +84,7 @@ const leftClick = () => {
|
|||
}
|
||||
|
||||
.text1 {
|
||||
font-weight: 400;
|
||||
font-weight: 600;
|
||||
|
||||
font-size: 48rpx;
|
||||
text-align: left;
|
||||
|
@ -109,7 +113,7 @@ const leftClick = () => {
|
|||
}
|
||||
|
||||
.fbText {
|
||||
font-weight: 400;
|
||||
font-weight: 600;
|
||||
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
</template>
|
||||
</up-navbar>
|
||||
</view>
|
||||
<image class="bacimg2" :src="cg2x22"></image>
|
||||
<image class="bacimg2" :src="cg2x21"></image>
|
||||
<view class="bgc"></view>
|
||||
<view class="cardz">
|
||||
<image :src="cg2x21" class="shenhe2x1"></image>
|
||||
<span class="text">待审核</span>
|
||||
<image :src="cg2x22" class="shenhe2x1"></image>
|
||||
<span class="text">发布成功</span>
|
||||
</view>
|
||||
<view style="position: fixed; top: 632rpx; width: 100%; padding-left: 32rpx; padding-right: 32rpx;">
|
||||
<up-button color="#c0f0ec" size="large" shape="circle" @click="publish"><span
|
||||
<up-button color="#DBF6EF" size="large" shape="circle" @click="publish"><span
|
||||
class="fbText">继续发布</span></up-button>
|
||||
</view>
|
||||
|
||||
|
@ -34,9 +34,9 @@ const { proxy } = getCurrentInstance();
|
|||
|
||||
const iconConfig = proxy.iconConfig;
|
||||
const cg2x21 = iconConfig.cg2x21;
|
||||
const cg2x22 = iconConfig.cg2x21;
|
||||
const bgColor = ref('');
|
||||
bgColor.value = 'rgba(170, 0, 0, 0)'
|
||||
const cg2x22 = iconConfig.cg2x22;
|
||||
const bgColor = ref('rgba(170, 0, 0, 0)');
|
||||
|
||||
|
||||
const leftClick = () => {
|
||||
proxy.$tab.switchTab("/pages/index")
|
||||
|
@ -45,13 +45,18 @@ const publish = () => {
|
|||
proxy.$tab.switchTab("/pages/index")
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" >
|
||||
page{
|
||||
background-color: #ffffff;
|
||||
|
||||
}
|
||||
.bacimg2 {
|
||||
width: 508rpx;
|
||||
height: 540rpx;
|
||||
position: fixed;
|
||||
top: -100rpx;
|
||||
left: -100rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.navbarcenter {
|
||||
|
@ -69,7 +74,7 @@ const publish = () => {
|
|||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: -1;
|
||||
|
||||
}
|
||||
|
||||
.shenhe2x1 {
|
||||
|
@ -78,14 +83,15 @@ const publish = () => {
|
|||
position: fixed;
|
||||
top: 276rpx;
|
||||
left: 260rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-weight: 400;
|
||||
font-weight: 600;
|
||||
|
||||
font-size: 48rpx;
|
||||
text-align: left;
|
||||
color: #00CCBE !important;
|
||||
color: #5CCDB1 !important;
|
||||
position: fixed;
|
||||
top: 500rpx;
|
||||
left: 300rpx;
|
||||
|
@ -97,7 +103,7 @@ const publish = () => {
|
|||
align-items: center;
|
||||
}
|
||||
.fbText{
|
||||
font-weight: 400;
|
||||
font-weight: 600;
|
||||
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
|
|
|
@ -138,9 +138,10 @@ export default {
|
|||
// 登录成功后,处理函数
|
||||
loginSuccess(result) {
|
||||
// 设置用户信息
|
||||
this.$store.dispatch('GetUserInfo');
|
||||
|
||||
this.$store.dispatch('GetInfo').then(res => {
|
||||
this.$store.dispatch('getQNDomainInfo')
|
||||
this.$store.dispatch('GetUserInfo');
|
||||
this.$tab.reLaunch('/pages/index')
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6,15 +6,42 @@
|
|||
<view>
|
||||
<view v-if="!name">
|
||||
<view class="userInfoNot" @click="handleToLogin">
|
||||
<up-avatar size="148rpx"></up-avatar>
|
||||
<up-avatar size="148rpx"></up-avatar>
|
||||
<up-text text="请登录" size="44rpx" color="#FFFFFF" bold="400" margin="24rpx"></up-text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="userInfoNot">
|
||||
<up-avatar :src="avatar" size="148rpx"></up-avatar>
|
||||
<up-text :text="nickName" size="44rpx" color="#FFFFFF" bold="400" margin="24rpx"></up-text>
|
||||
<up-text :text="sex" size="44rpx" color="#FFFFFF" bold="400" margin="24rpx"></up-text>
|
||||
<view class="avatarInfo">
|
||||
<up-avatar :src="avatar" size="148rpx"></up-avatar>
|
||||
<image v-if="isOfficial" class="official" :src="tu36"></image>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="simpleInfo-text">
|
||||
<view class="textgrid1">
|
||||
<view class="grid11">{{ nickName }}</view>
|
||||
<image :src="mupdate" style="width: 32rpx; height: 32rpx;"></image>
|
||||
</view>
|
||||
<view class="textgrid2">
|
||||
<view class="textInfo grid21">{{ dictSex(sex) }}</view>
|
||||
<view class="textInfo grid22">LV{{ infoRank }}</view>
|
||||
<view class="textInfo grid23">ID:{{ name }}</view>
|
||||
|
||||
</view>
|
||||
<view class="textgrid3">
|
||||
<view class="grid31">[签名]{{ qm(remark) }}</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="school">
|
||||
<view class="school1">
|
||||
<image :src="tu51addres" style="width: 16rpx; height: 20rpx;"></image>
|
||||
<view class="textInfo">{{ infoSchool }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="smallUserInfo">
|
||||
|
@ -37,8 +64,7 @@
|
|||
<text class="text1">我的话题</text>
|
||||
<view>
|
||||
<up-grid :border="false" col="5" @click="grid1Click1">
|
||||
<up-grid-item v-for="(listItem, listIndex) in list1" :key="listIndex"
|
||||
customStyle="padding-top: 24rpx; ">
|
||||
<up-grid-item v-for="(listItem, listIndex) in list1" :key="listIndex" customStyle="padding-top: 24rpx; ">
|
||||
<image :src="listItem.icon" style="width: 66rpx; height: 66rpx;"></image>
|
||||
<text style="font-size: 24rpx;color: #999999;margin-top: 20rpx;">{{ listItem.title }}</text>
|
||||
</up-grid-item>
|
||||
|
@ -49,8 +75,7 @@
|
|||
<text class="text1">我的活动</text>
|
||||
<view>
|
||||
<up-grid :border="false" col="5" @click="grid1Click2">
|
||||
<up-grid-item v-for="(listItem, listIndex) in list2" :key="listIndex"
|
||||
customStyle="padding-top: 24rpx; ">
|
||||
<up-grid-item v-for="(listItem, listIndex) in list2" :key="listIndex" customStyle="padding-top: 24rpx; ">
|
||||
<image :src="listItem.icon" style="width: 66rpx; height: 66rpx;"></image>
|
||||
<text style="font-size: 24rpx;color: #999999;margin-top: 20rpx;">{{ listItem.title }}</text>
|
||||
</up-grid-item>
|
||||
|
@ -61,8 +86,7 @@
|
|||
<text class="text1">更多功能</text>
|
||||
<view>
|
||||
<up-grid :border="false" col="4" @click="grid1Click3">
|
||||
<up-grid-item v-for="(listItem, listIndex) in list3" :key="listIndex"
|
||||
customStyle="padding-top: 24rpx; ">
|
||||
<up-grid-item v-for="(listItem, listIndex) in list3" :key="listIndex" customStyle="padding-top: 24rpx; ">
|
||||
<image :src="listItem.icon" style="width: 66rpx; height: 66rpx;"></image>
|
||||
<text style="font-size: 24rpx;color: #999999;margin-top: 20rpx;">{{ listItem.title }}</text>
|
||||
</up-grid-item>
|
||||
|
@ -77,10 +101,17 @@ import { useStore } from 'vuex'
|
|||
import { useRouter } from 'vue-router'
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import { getDicts } from "@/api/system/dict/data";
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import image from 'uview-plus/libs/config/props/image';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const isOfficial = ref(true)
|
||||
const iconConfig = proxy.iconConfig;
|
||||
const bjt = iconConfig.bjt;
|
||||
const bjt2 = iconConfig.bjt2;
|
||||
const mupdate = iconConfig.mupdate;
|
||||
const tu36 = iconConfig.tu36;
|
||||
//定位
|
||||
const tu51addres = iconConfig.tu51addres;
|
||||
//+更多
|
||||
const gd11 = iconConfig.gd11;
|
||||
const gd12 = iconConfig.gd12;
|
||||
|
@ -103,38 +134,63 @@ const hd13 = iconConfig.hd13;
|
|||
const hd14 = iconConfig.hd14;
|
||||
const hd15 = iconConfig.hd15;
|
||||
const list1 = ref([
|
||||
{icon: ht11, title: '全部话题' },
|
||||
{ icon: ht12, title: '已发布' },
|
||||
{ icon: ht13, title: '审核中' },
|
||||
{ icon: ht14, title: '未通过' },
|
||||
{ icon: ht15, title: '草稿箱' }
|
||||
{ icon: ht11, title: '全部话题' },
|
||||
{ icon: ht12, title: '已发布' },
|
||||
{ icon: ht13, title: '审核中' },
|
||||
{ icon: ht14, title: '未通过' },
|
||||
{ icon: ht15, title: '草稿箱' }
|
||||
])
|
||||
const list2 = ref([
|
||||
{icon: hd11, title: '全部活动' },
|
||||
{ icon: hd12, title: '已发布' },
|
||||
{ icon: hd13, title: '审核中' },
|
||||
{ icon: hd14, title: '未通过' },
|
||||
{ icon: hd15, title: '草稿箱' }
|
||||
{ icon: hd11, title: '全部活动' },
|
||||
{ icon: hd12, title: '已发布' },
|
||||
{ icon: hd13, title: '审核中' },
|
||||
{ icon: hd14, title: '未通过' },
|
||||
{ icon: hd15, title: '草稿箱' }
|
||||
])
|
||||
const list3 = ref([
|
||||
{icon: gd11, title: '外卖订单' },
|
||||
{ icon: gd12, title: '我的兼职' },
|
||||
{ icon: gd13, title: '证件证明' },
|
||||
{ icon: gd14, title: '地址管理' },
|
||||
{ icon: gd21, title: '优惠卡券' },
|
||||
{icon: gd22, title: '联系客服' },
|
||||
{ icon: gd23, title: '邀请好友' },
|
||||
{ icon: gd24, title: '系统设置' }
|
||||
{ icon: gd11, title: '外卖订单' },
|
||||
{ icon: gd12, title: '我的兼职' },
|
||||
{ icon: gd13, title: '证件证明' },
|
||||
{ icon: gd14, title: '地址管理' },
|
||||
{ icon: gd21, title: '优惠卡券' },
|
||||
{ icon: gd22, title: '联系客服' },
|
||||
{ icon: gd23, title: '邀请好友' },
|
||||
{ icon: gd24, title: '系统设置' }
|
||||
])
|
||||
|
||||
const infoAssist = ref(0)
|
||||
const followCount = ref(0)
|
||||
const fanCount = ref(0)
|
||||
|
||||
|
||||
|
||||
const name = ref(proxy.$store.state.user.name)
|
||||
const nickName = ref(proxy.$store.state.user.nickName)
|
||||
const sex = ref(proxy.$store.state.user.sex)
|
||||
|
||||
const infoSchool = ref(proxy.$store.state.userInfo.infoSchool)//学校
|
||||
const infoRank = ref(proxy.$store.state.userInfo.infoRank)
|
||||
const remark = ref(proxy.$store.state.userInfo.remark)//签名
|
||||
const infoAssist = ref(proxy.$store.state.userInfo.infoAssist)//获赞
|
||||
const followCount = ref(proxy.$store.state.userInfo.followCount)//关注
|
||||
const fanCount = ref(proxy.$store.state.userInfo.fanCount)//粉丝
|
||||
const qm = (e) => {
|
||||
if (e === "" | e === null) {
|
||||
return "这个人很懒什么都没有留下……"
|
||||
} else {
|
||||
return e
|
||||
}
|
||||
}
|
||||
const dictSexInfo = ref('')
|
||||
onLoad((options) => {
|
||||
getDicts('sys_user_sex').then(e => {
|
||||
console.log("字典:", e);
|
||||
dictSexInfo.value = e.data
|
||||
})
|
||||
|
||||
})
|
||||
const dictSex = (state) => {
|
||||
const dict = dictSexInfo.value.find((dict) => dict.dictValue === state);
|
||||
return dict ? dict.dictLabel : '未知状态';
|
||||
}
|
||||
|
||||
const version = ref(getApp().globalData.config.appInfo.version)
|
||||
const avatar = ref(proxy.$store.state.user.avatar)
|
||||
function handleLogout() {
|
||||
|
@ -156,7 +212,8 @@ const grid1Click3 = (e) => {
|
|||
}
|
||||
|
||||
const info = () => {
|
||||
console.log(avatar);
|
||||
console.log("昵称:", useStore().state.userInfo);
|
||||
|
||||
}
|
||||
info();
|
||||
function handleToLogin() {
|
||||
|
@ -214,6 +271,65 @@ page {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.avatarInfo {
|
||||
position: relative;
|
||||
|
||||
.official {
|
||||
position: absolute;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.simpleInfo-text {
|
||||
margin-left: 24rpx;
|
||||
text-align: left;
|
||||
|
||||
.textgrid1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.grid11 {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
color: #FFFFFF !important;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.textgrid2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.textInfo {
|
||||
font-size: 24rpx;
|
||||
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
.grid21 {
|
||||
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.grid22 {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.grid23 {}
|
||||
}
|
||||
|
||||
.textgrid3 {
|
||||
.grid31 {
|
||||
font-size: 24rpx;
|
||||
text-align: left;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.smallUserInfo {
|
||||
|
@ -252,6 +368,7 @@ page {
|
|||
margin: 0 24rpx; // 调整 margin 确保 top margin 不会折叠
|
||||
}
|
||||
}
|
||||
|
||||
.cardz3 {
|
||||
width: 686rpx;
|
||||
height: 356rpx;
|
||||
|
@ -268,4 +385,29 @@ page {
|
|||
margin: 0 24rpx; // 调整 margin 确保 top margin 不会折叠
|
||||
}
|
||||
}
|
||||
|
||||
.school {
|
||||
position: absolute;
|
||||
top: 362rpx;
|
||||
right: 32rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
opacity: 0.5;
|
||||
background: #000000 !important;
|
||||
display: flex; /* 添加 flex 布局 */
|
||||
align-items: center; /* 垂直居中 */
|
||||
justify-content: center; /* 水平居中 */
|
||||
|
||||
.school1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 4rpx 18rpx;
|
||||
.textInfo {
|
||||
margin-left: 8rpx;
|
||||
font-size: 18rpx;
|
||||
color: #FFFFFF !important;
|
||||
line-height: 28rpx; /* 确保文字垂直居中 */
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
registerSuccess(result) {
|
||||
// 设置用户信息
|
||||
this.$store.dispatch('GetInfo').then(res => {
|
||||
this.$store.dispatch('GetUserInfo');
|
||||
this.$tab.reLaunch('/pages/index')
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,19 +1,159 @@
|
|||
<template class="content">
|
||||
<view class="fixed-header">
|
||||
外卖
|
||||
<template>
|
||||
<view class="work-container">
|
||||
<!-- 轮播图 -->
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
|
||||
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
|
||||
<swiper-item v-for="(item, index) in data" :key="index">
|
||||
<view class="swiper-item" @click="clickBannerItem(item)">
|
||||
<image class="w-full" :src="item.image" mode="aspectFill" :draggable="false" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</uni-swiper-dot>
|
||||
|
||||
<!-- 宫格组件 -->
|
||||
<uni-section title="系统管理" type="line"></uni-section>
|
||||
<view class="grid-body">
|
||||
|
||||
</view>
|
||||
<view>
|
||||
<up-button type="primary" text="待审核" size @click="clickBannerItem(1)"></up-button>
|
||||
<up-button type="primary" text="发布成功" size @click="clickBannerItem(2)"></up-button>
|
||||
<up-button type="primary" text="审核失败" size @click="clickBannerItem(3)"></up-button>
|
||||
</view>
|
||||
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1">
|
||||
</fileUpload>
|
||||
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo2">
|
||||
</fileUpload>
|
||||
<view class="album" v-for="(item, index) in fileList1" :key="index">
|
||||
<view class="album__avatar">
|
||||
<image :src="QNDomain + item.furl" mode="" style="width: 32px;height: 32px;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
|
||||
import ActiInfoList from '../common/activityList/index.vue'
|
||||
import { onShow, onLoad ,onPullDownRefresh} from '@dcloudio/uni-app'
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
import { ref, reactive, getCurrentInstance, toRefs } from 'vue'
|
||||
import { useStore } from 'vuex';
|
||||
import { func } from "uview-plus/libs/function/test";
|
||||
const { proxy } = getCurrentInstance();
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import fileUpload from './../common/file/fileUpload/index.vue'
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||
import { useStore } from 'vuex';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const store = useStore();
|
||||
const fileTypeInfo1 = ref("image")
|
||||
const fileTypeInfo2 = ref("video")
|
||||
const QNDomain = store.state.user.QNDomain
|
||||
const current = ref(0)
|
||||
const swiperDotIndex = ref(0)
|
||||
|
||||
const data = ref([{
|
||||
image: '/static/images/banner/banner01.jpg'
|
||||
},
|
||||
{
|
||||
image: '/static/images/banner/banner02.jpg'
|
||||
},
|
||||
{
|
||||
image: '/static/images/banner/banner03.jpg'
|
||||
}
|
||||
])
|
||||
const fileList1 = ref([])
|
||||
|
||||
|
||||
function clickBannerItem(item) {
|
||||
if(item === 1){
|
||||
proxy.$tab.navigateTo('/pages/common/talkState/audit')
|
||||
}
|
||||
if(item === 2){
|
||||
proxy.$tab.navigateTo('/pages/common/talkState/publish')
|
||||
}
|
||||
if(item === 3){
|
||||
proxy.$tab.navigateTo('/pages/common/talkState/auditFailure')
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
function changeSwiper(e) {
|
||||
current.value = e.detail.current
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.uni-margin-wrap {
|
||||
width: 690rpx;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
height: 300rpx;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 500px) {
|
||||
.uni-swiper-dot-box {
|
||||
width: 400px;
|
||||
/* #ifndef APP-NVUE */
|
||||
margin: 0 auto;
|
||||
/* #endif */
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -7,7 +7,7 @@ import defaultAvatar from "@/static/images/profile.jpg";
|
|||
import { ref } from 'vue';
|
||||
const baseUrl = config.baseUrl;
|
||||
|
||||
const user = {
|
||||
const userInfo = {
|
||||
state: {
|
||||
birthday: storage.get(constant.birthday) /** 生日 */,
|
||||
doingsStatus: storage.get(constant.doingsStatus) /** 活动发布权限(0没有,1有) */,
|
||||
|
@ -21,48 +21,78 @@ const user = {
|
|||
infoRank: storage.get(constant.infoRank) /** 用户等级 */,
|
||||
infoCoin: storage.get(constant.infoCoin) /** 虚拟币数量 */,
|
||||
infoActive: storage.get(constant.infoActive) /** 活跃度 */,
|
||||
remark: storage.get(constant.remark) /** 简介 */,
|
||||
infoAssist: storage.get(constant.infoAssist) /** 获赞 */,
|
||||
followCount: storage.get(constant.followCount) /** 关注 */,
|
||||
fanCount: storage.get(constant.fanCount) /** 粉丝 */,
|
||||
remark: storage.get(constant.remark) /** 签名 */,
|
||||
},
|
||||
|
||||
mutations: {
|
||||
SET_BIRTHDAY: (state, birthday) => {
|
||||
state.birthday = birthday;
|
||||
storage.set(constant.birthday, birthday);
|
||||
},
|
||||
SET_doingsStatus: (state, doingsStatus) => {
|
||||
state.doingsStatus = doingsStatus;
|
||||
storage.set(constant.doingsStatus, doingsStatus);
|
||||
},
|
||||
SET_infoName: (state, infoName) => {
|
||||
state.infoName = infoName;
|
||||
storage.set(constant.infoName, infoName);
|
||||
},
|
||||
SET_infoSchool: (state, infoSchool) => {
|
||||
state.infoSchool = infoSchool;
|
||||
storage.set(constant.infoSchool, infoSchool);
|
||||
},
|
||||
SET_infoDepartment: (state, infoDepartment) => {
|
||||
state.infoDepartment = infoDepartment;
|
||||
storage.set(constant.infoDepartment, infoDepartment);
|
||||
},
|
||||
SET_infoGrade: (state, infoGrade) => {
|
||||
state.infoGrade = infoGrade;
|
||||
storage.set(constant.infoGrade, infoGrade);
|
||||
},
|
||||
SET_infoCode: (state, infoCode) => {
|
||||
state.infoCode = infoCode;
|
||||
storage.set(constant.infoCode, infoCode);
|
||||
},
|
||||
SET_infoDocument: (state, infoDocument) => {
|
||||
state.infoDocument = infoDocument;
|
||||
storage.set(constant.infoDocument, infoDocument);
|
||||
},
|
||||
SET_auditInfo: (state, auditInfo) => {
|
||||
state.auditInfo = auditInfo;
|
||||
storage.set(constant.auditInfo, auditInfo);
|
||||
},
|
||||
SET_infoRank: (state, infoRank) => {
|
||||
state.infoRank = infoRank;
|
||||
storage.set(constant.infoRank, infoRank);
|
||||
},
|
||||
SET_infoCoin: (state, infoCoin) => {
|
||||
state.infoCoin = infoCoin;
|
||||
storage.set(constant.infoCoin, infoCoin);
|
||||
},
|
||||
SET_infoActive: (state, infoActive) => {
|
||||
state.infoActive = infoActive;
|
||||
storage.set(constant.infoActive, infoActive);
|
||||
},
|
||||
|
||||
SET_infoAssist: (state, infoAssist) => {
|
||||
state.infoAssist = infoAssist;
|
||||
storage.set(constant.infoAssist, infoAssist);
|
||||
},
|
||||
SET_followCount: (state, followCount) => {
|
||||
state.followCount = followCount;
|
||||
storage.set(constant.followCount, followCount);
|
||||
},
|
||||
SET_fanCount: (state, fanCount) => {
|
||||
state.fanCount = fanCount;
|
||||
storage.set(constant.fanCount, fanCount);
|
||||
},
|
||||
|
||||
SET_remark: (state, remark) => {
|
||||
state.remark = remark;
|
||||
storage.set(constant.remark, remark);
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -73,8 +103,6 @@ const user = {
|
|||
getUserInfo()
|
||||
.then((res) => {
|
||||
const userInfo = res.data;
|
||||
console.log("res:", res);
|
||||
|
||||
const infoDocument = ref([]);
|
||||
infoDocument.value =
|
||||
userInfo == null ||
|
||||
|
@ -83,6 +111,7 @@ const user = {
|
|||
? defaultAvatar
|
||||
: userInfo.infoDocument;
|
||||
if (userInfo) {
|
||||
console.log("userInfo:",userInfo);
|
||||
commit("SET_BIRTHDAY", userInfo.birthday);
|
||||
commit("SET_doingsStatus", userInfo.doingsStatus);
|
||||
commit("SET_infoName", userInfo.infoName);
|
||||
|
@ -95,6 +124,9 @@ const user = {
|
|||
commit("SET_infoRank", userInfo.infoRank);
|
||||
commit("SET_infoCoin", userInfo.infoCoin);
|
||||
commit("SET_infoActive", userInfo.infoActive);
|
||||
commit("SET_infoAssist", userInfo.infoAssist);
|
||||
commit("SET_followCount", userInfo.followCount);
|
||||
commit("SET_fanCount", userInfo.fanCount);
|
||||
commit("SET_remark", userInfo.remark);
|
||||
}
|
||||
|
||||
|
@ -108,4 +140,4 @@ const user = {
|
|||
},
|
||||
};
|
||||
|
||||
export default user;
|
||||
export default userInfo;
|
||||
|
|
|
@ -1,8 +1,30 @@
|
|||
const constant = {
|
||||
avatar: 'vuex_avatar',
|
||||
name: 'vuex_name',
|
||||
roles: 'vuex_roles',
|
||||
permissions: 'vuex_permissions'
|
||||
}
|
||||
avatar: "vuex_avatar",
|
||||
name: "vuex_name",
|
||||
roles: "vuex_roles",
|
||||
permissions: "vuex_permissions",
|
||||
nickName: "vuex_nickName",
|
||||
// userInfo
|
||||
sex: "vuex_sex",
|
||||
QNDomain: "vuex_QNDomain",
|
||||
phoneType: "vuex_phoneType",
|
||||
// userInfo
|
||||
birthday: "vuex_birthday",
|
||||
doingsStatus: "vuex_doingsStatus",
|
||||
infoName: "vuex_infoName",
|
||||
infoSchool: "vuex_infoSchool",
|
||||
infoDepartment: "vuex_infoDepartment",
|
||||
infoGrade: "vuex_infoGrade",
|
||||
infoCode: "vuex_infoCode",
|
||||
infoDocument: "vuex_infoDocument",
|
||||
auditInfo: "vuex_auditInfo",
|
||||
infoRank: "vuex_infoRank",
|
||||
infoCoin: "vuex_infoCoin",
|
||||
infoActive: "vuex_infoActive",
|
||||
infoAssist: "vuex_infoAssist",
|
||||
followCount: "vuex_followCount",
|
||||
fanCount: "vuex_fanCount",
|
||||
remark: "vuex_remark",
|
||||
};
|
||||
|
||||
export default constant
|
||||
export default constant;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
import { ref } from 'vue'
|
||||
|
||||
import store from '@/store'
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
const sex_dict = ref([])
|
||||
|
||||
export const getDictLabelByValue = (dictInfo, state) => {
|
||||
return getDicts(dictInfo).then(e => {
|
||||
const dict = e.data.find((dict) => dict.dictValue === state);
|
||||
return dict ? dict : '未知状态';
|
||||
});
|
||||
};
|
|
@ -7,6 +7,8 @@ const tu21 = ref(QNDomain + "home/icon/image/png/tu2-1_20240531153239639.png")
|
|||
const tu22 = ref(QNDomain + "home/icon/image/png/tu2-2_20240531163115818.png")
|
||||
//定位
|
||||
const tu51 = ref(QNDomain + "home/icon/image/png/tu5-1_20240601124004353.png")
|
||||
const tu51addres = ref(QNDomain + "home/icon/image/png/addres_20240609145253989.png")
|
||||
|
||||
const tu512 = ref(QNDomain + "home/icon/image/png/tu5-1-2_20240605120128566.png")
|
||||
//开始
|
||||
const tu52 = ref(QNDomain + "home/icon/image/png/tu5-2_20240601124010403.png")
|
||||
|
@ -14,6 +16,8 @@ const tu522 = ref(QNDomain + "home/icon/image/png/tu5-2-2_20240605120128561.png"
|
|||
//结束
|
||||
const tu53 = ref(QNDomain + "home/icon/image/png/tu5-3_20240601124016641.png")
|
||||
const tu532 = ref(QNDomain + "home/icon/image/png/tu5-3-2_20240605120128565.png")
|
||||
//V
|
||||
const tu36 = ref(QNDomain + "home/icon/image/png/tu3-6_20240609144044085.png")
|
||||
|
||||
|
||||
const tu23 = ref(QNDomain + "home/icon/image/png/tu2-3_20240602093303793.png")
|
||||
|
@ -34,6 +38,8 @@ const sb2x1 = ref(QNDomain + "home/icon/image/png/审核失败@2x1_2024060510110
|
|||
//+背景图
|
||||
const bjt = ref(QNDomain + "home/icon/image/png/bjtu_20240608121940341.png");
|
||||
const bjt2 = ref(QNDomain + "home/icon/image/png/minebackpng2_20240608144208172.png");
|
||||
//修改
|
||||
const mupdate = ref(QNDomain + "home/icon/image/png/mineupdate_20240609132053217.png");
|
||||
|
||||
//+更多
|
||||
const gd11 = ref(QNDomain + "home/icon/image/png/gd11_20240608080819017.png");
|
||||
|
@ -58,13 +64,13 @@ const hd14 = ref(QNDomain + "home/icon/image/png/hd14_20240608080819057.png");
|
|||
const hd15 = ref(QNDomain + "home/icon/image/png/hd15_20240608080819068.png");
|
||||
export default {
|
||||
tu21,tu22,tu23,tu2x,
|
||||
tu51,tu52,tu53,tu512,tu522,tu532,
|
||||
tu51,tu51addres,tu52,tu53,tu512,tu522,tu532,tu36,
|
||||
sh2x,sh2x1,
|
||||
cg2x21,cg2x22,
|
||||
sb2x,sb2x1,
|
||||
|
||||
//我的界面
|
||||
bjt,bjt2,
|
||||
bjt,bjt2,mupdate,
|
||||
gd11,gd12,gd13,gd14,gd21,gd22,gd23,gd24,
|
||||
ht11,ht12,ht13,ht14,ht15,
|
||||
hd11,hd12,hd13,hd14,hd15,
|
||||
|
|
|
@ -4,7 +4,32 @@ import constant from './constant'
|
|||
let storageKey = 'storage_data'
|
||||
|
||||
// 存储节点变量名
|
||||
let storageNodeKeys = [constant.avatar, constant.name, constant.roles, constant.permissions]
|
||||
let storageNodeKeys = [
|
||||
constant.avatar,
|
||||
constant.nickName,
|
||||
constant.sex,
|
||||
constant.QNDomain,
|
||||
constant.phoneType,
|
||||
// userInfo
|
||||
constant.birthday,
|
||||
constant.doingsStatus,
|
||||
constant.infoName,
|
||||
constant.infoSchool,
|
||||
constant.infoDepartment,
|
||||
constant.infoGrade,
|
||||
constant.infoCode,
|
||||
constant.infoDocument,
|
||||
constant.auditInfo,
|
||||
constant.infoRank,
|
||||
constant.infoCoin,
|
||||
constant.infoActive,
|
||||
constant.infoAssist,
|
||||
constant.followCount,
|
||||
constant.fanCount,
|
||||
constant.remark,
|
||||
|
||||
|
||||
constant.name, constant.roles, constant.permissions]
|
||||
|
||||
const storage = {
|
||||
set: function(key, value) {
|
||||
|
|
Loading…
Reference in New Issue