Compare commits
8 Commits
5607d11395
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0d6d62356 | ||
|
|
0b1c5b39bd | ||
|
|
edd856475e | ||
|
|
5ed0c676b2 | ||
|
|
4fc72fbffe | ||
|
|
f77801f9a1 | ||
|
|
125ab7ab9d | ||
|
|
da65fde285 |
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules/
|
||||
85
App.vue
@@ -1,38 +1,67 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
// console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
|
||||
console.log('App Launch')
|
||||
import http from '@/until/http.js';
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
// this.getInfo()
|
||||
},
|
||||
onHide: function () {
|
||||
uni.removeStorageSync('Theme_Data')
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
http.get('/api/Theme/get_theme_data').then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
if(code) {
|
||||
if(data) {
|
||||
uni.setStorageSync('Theme_Data',JSON.stringify(data))
|
||||
} else {
|
||||
uni.setStorageSync('Theme_Data','')
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.setStorageSync('Theme_Data','')
|
||||
});
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '@/static/public.css';
|
||||
/*每个页面公共css */
|
||||
@import '@/uni_modules/uni-scss/index.scss';
|
||||
/* #ifndef APP-NVUE */
|
||||
@import '@/static/customicons.css';
|
||||
@import '@/static/public.css';
|
||||
/*每个页面公共css */
|
||||
@import '@/uni_modules/uni-scss/index.scss';
|
||||
/* #ifndef APP-NVUE */
|
||||
@import '@/static/customicons.css';
|
||||
|
||||
body {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
body {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
// 设置整个项目的背景色
|
||||
page {
|
||||
background-color: transparent !important;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
// 设置整个项目的背景色
|
||||
page {
|
||||
background-color: transparent !important;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
// 定制
|
||||
:root {
|
||||
--primary-color: #3ABC6D;
|
||||
--sub-color: #F0EEF7;
|
||||
--subs-color: #3ABC6D;
|
||||
--subss-color: #DEB52E;
|
||||
--warn-color:#F69627;
|
||||
--font-button-color:#fff;
|
||||
--font-button-size:24rpx;
|
||||
--font-button-size-p:28rpx;
|
||||
/* tab图标 */
|
||||
--tab-url:url('https://test.vespa.qxyushen.top/h5/image/tabline.png');
|
||||
}
|
||||
</style>
|
||||
50
component/MiddlePopup.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div v-if="isVisible" class="popup-container">
|
||||
<div class="popup-content">
|
||||
<slot></slot>
|
||||
<!-- <button @click="closePopup">关闭</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'MiddlePopup',
|
||||
data() {
|
||||
return {
|
||||
isVisible: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openPopup() {
|
||||
this.isVisible = true;
|
||||
document.body.style.overflow = 'hidden'; // 防止页面滚动
|
||||
},
|
||||
closePopup() {
|
||||
this.isVisible = false;
|
||||
document.body.style.overflow = 'auto'; // 恢复页面滚动
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.popup-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 6;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.popup-content {
|
||||
/* background-color: white; */
|
||||
/* padding: 20px; */
|
||||
/* border-radius: 8px; */
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
</style>
|
||||
94
component/avatar.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 用于放置VAP播放器的容器 -->
|
||||
<view id="vapContainer"></view>
|
||||
<!-- 用户头像,通过定位等方式与VAP容器重叠 -->
|
||||
<!-- <image :src="avatarUrl" class="user-avatar" mode="aspectFill"></image> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 引入 VAP 库
|
||||
import Vap from 'video-animation-player';
|
||||
import config from './demo.json';
|
||||
import testVideo from '@/static/che.mp4';
|
||||
export default {
|
||||
props: {
|
||||
avatarUrl: {
|
||||
type: String,
|
||||
default: () => "https://example.com/path/to/your/avatar.png",
|
||||
},
|
||||
videoUrl: {
|
||||
type: String,
|
||||
default: () => "",
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
vapInstance: null ,
|
||||
testUrl:testVideo
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 确保 DOM 已经渲染
|
||||
this.$nextTick(() => {
|
||||
this.initVap();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁时,务必销毁 VAP 实例以避免内存泄漏
|
||||
if (this.vapInstance) {
|
||||
this.vapInstance.destroy();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initVap() {
|
||||
// VAP 配置参数
|
||||
const options = {
|
||||
container: document.getElementById('vapContainer'), // 容器 DOM 元素
|
||||
src: this.testUrl, // VAP 视频路径
|
||||
config: config,
|
||||
width: 200, // 宽度
|
||||
height: 100, // 高度
|
||||
loop: true, // 是否循环播放
|
||||
mute: true, // 是否静音(通常头像框不需要声音)
|
||||
accurate: false, // 是否启用精准模式
|
||||
|
||||
};
|
||||
// 创建 VAP 实例并播放
|
||||
this.vapInstance = new Vap(options);
|
||||
this.vapInstance.play(); // 开始播放
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
/* 其他样式 */
|
||||
}
|
||||
|
||||
#vapContainer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1; /* 确保 VAP 视频层在上方 */
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%); /* 居中 */
|
||||
width: 150px; /* 根据你的 VAP 视频中预留的头像区域大小调整 */
|
||||
height: 150px;
|
||||
border-radius: 50%; /* 如果头像是圆形 */
|
||||
z-index: 2; /* 头像在视频层下方 */
|
||||
/* 其他样式 */
|
||||
}
|
||||
</style>
|
||||
3089
component/demo.json
Normal file
@@ -14,10 +14,6 @@
|
||||
@click="toggleSort"
|
||||
>
|
||||
<text>时间</text>
|
||||
<!-- <view class="sort-icon">
|
||||
<text v-if="sortOrder === 'asc'">↑</text>
|
||||
<text v-else-if="sortOrder === 'desc'">↓</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="header-item">累计流水</view>
|
||||
<view class="header-item">获得补贴</view>
|
||||
@@ -33,7 +29,7 @@
|
||||
<view class="row-item">{{ item.total_transaction }}</view>
|
||||
<view class="row-item">{{ item.subsidy_amount }}</view>
|
||||
<view class="row-item">
|
||||
<text :class="'status-' + item.status">{{ item.status_str }}</text>
|
||||
<text :class="`status-${item.status_str === '已发放' ? 0 : 1}`">{{ item.status_str }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -202,13 +198,12 @@ export default {
|
||||
}
|
||||
|
||||
.status-0 {
|
||||
color: #FF9900;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.status-1 {
|
||||
color: #19be6b;
|
||||
color: var(--subss-color);
|
||||
}
|
||||
|
||||
.status-2 {
|
||||
color: #FA3534;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
transform: translateX(-50%);
|
||||
width: 80%;
|
||||
height: 16rpx;
|
||||
background-image: url('@/static/image/propMall/tabline.png');
|
||||
background-image: var(--tab-url);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 1px;
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import config from '@/until/config.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
httpUrl: 'https://vespa.qxyushen.top',
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
@@ -15,6 +17,9 @@
|
||||
this.$emit('changeImageList',this.fileList)
|
||||
}
|
||||
},
|
||||
// onLoad() {
|
||||
// this.httpUrl = config.BASE_URL
|
||||
// },
|
||||
methods: {
|
||||
// 选择文件回调
|
||||
select(e) {
|
||||
@@ -60,7 +65,7 @@
|
||||
},
|
||||
uploadFile(file) {
|
||||
uni.uploadFile({
|
||||
url: 'https://chat.qxmier.com/adminapi/UploadFile/file_upload',
|
||||
url: `${this.httpUrl}/adminapi/UploadFile/file_upload`,
|
||||
filePath: file.path,
|
||||
name: 'files',
|
||||
success: (uploadRes) => {
|
||||
|
||||
6
main.js
@@ -2,11 +2,11 @@
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
|
||||
import config from '@/until/config.js'
|
||||
Vue.config.productionTip = false
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
Vue.prototype.$config = config;
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
@@ -15,9 +15,11 @@ app.$mount()
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
import config from '@/until/config.js'
|
||||
import App from './App.vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
app.config.globalProperties.$config = config
|
||||
return {
|
||||
app
|
||||
}
|
||||
|
||||
173
manifest.json
@@ -1,82 +1,93 @@
|
||||
{
|
||||
"name": "Vespa",
|
||||
"appid": "__UNI__A4B5AED",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"background": "transparent", // 关键配置
|
||||
"backgroundColor": "#00000000",
|
||||
"webview": {
|
||||
"transparent": "always" // 确保 Webview 透明
|
||||
},
|
||||
/* 5+App特有相关 */
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
"modules": {},
|
||||
/* 模块配置 */
|
||||
"distribute": {
|
||||
/* 应用发布信息 */
|
||||
"android": {
|
||||
/* android打包配置 */
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\" />"
|
||||
]
|
||||
},
|
||||
"ios": {},
|
||||
/* ios打包配置 */
|
||||
"sdkConfigs": {}
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"quickapp": {},
|
||||
/* 快应用特有相关 */
|
||||
"mp-weixin": {
|
||||
/* 小程序特有相关 */
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"usingComponents": true
|
||||
},
|
||||
"h5": {
|
||||
"devServer": {
|
||||
"port": 8080, //浏览器运行端口
|
||||
"disableHostCheck": true, //设置跳过host检查
|
||||
"proxy": {
|
||||
"/api": {
|
||||
"target": "https://chat.qxmier.com", //目标接口域名
|
||||
"changeOrigin": true, //是否跨域
|
||||
"secure": false, // 设置支持https协议的代理
|
||||
"pathRewrite": {
|
||||
"^/api": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vueVersion": "3"
|
||||
}
|
||||
"name" : "Vespa",
|
||||
"appid" : "__UNI__A4B5AED",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"background" : "transparent", // 关键配置
|
||||
"backgroundColor" : "#00000000",
|
||||
"webview" : {
|
||||
"transparent" : "always" // 确保 Webview 透明
|
||||
},
|
||||
"packOptions" : {
|
||||
"ignore" : [
|
||||
{
|
||||
"type" : "folder",
|
||||
"value" : "node_modules"
|
||||
}
|
||||
]
|
||||
},
|
||||
/* 5+App特有相关 */
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"modules" : {},
|
||||
/* 模块配置 */
|
||||
"distribute" : {
|
||||
/* 应用发布信息 */
|
||||
"android" : {
|
||||
/* android打包配置 */
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\" />"
|
||||
]
|
||||
},
|
||||
"ios" : {},
|
||||
/* ios打包配置 */
|
||||
"sdkConfigs" : {}
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"quickapp" : {},
|
||||
/* 快应用特有相关 */
|
||||
"mp-weixin" : {
|
||||
/* 小程序特有相关 */
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"h5" : {
|
||||
"devServer" : {
|
||||
"port" : 8080, //浏览器运行端口
|
||||
"disableHostCheck" : true, //设置跳过host检查
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"target" : "https://tmd.xscmmidi.site", //目标接口域名
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : false, // 设置支持https协议的代理
|
||||
"pathRewrite" : {
|
||||
"^/api" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"router" : {
|
||||
"base" : "/h5/web"
|
||||
}
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
}
|
||||
|
||||
9
package-lock.json
generated
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "yusheng-H5",
|
||||
"name": "fanyin-h5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"axios": "^1.9.0",
|
||||
"video-animation-player": "^1.0.5",
|
||||
"vue-i18n": "^11.1.5"
|
||||
}
|
||||
},
|
||||
@@ -604,6 +605,12 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/video-animation-player": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/video-animation-player/-/video-animation-player-1.0.5.tgz",
|
||||
"integrity": "sha512-KLz+uL6zojOYXEPFxL2AB0iKSLHnmKQPBnXmFWHpGtAdB6/j9EWCbWcUDCg0KVOBTFRHa2UfiSNK0y1I+LEfpA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.5.16",
|
||||
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.16.tgz",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"axios": "^1.9.0",
|
||||
"office-viewer": "^0.3.14",
|
||||
"video-animation-player": "^1.0.5",
|
||||
"vue-i18n": "^11.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
121
pages.json
@@ -7,45 +7,77 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/union/detail",
|
||||
"path": "pages/union/list",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公会详情"
|
||||
"navigationBarTitleText": "公会中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/union/roomAndflow",
|
||||
"path": "pages/union/agreement",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公会房间及流水"
|
||||
"navigationBarTitleText": "查看协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/union/unionMembers",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公会成员"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "pages/union/detail",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom",
|
||||
// "navigationBarTitleText": "公会详情",
|
||||
// "app-plus": {
|
||||
// "popGesture": "none" // 禁用 iOS 左滑返回
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "path": "pages/union/roomAndflow",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom",
|
||||
// "navigationBarTitleText": "公会房间及流水",
|
||||
// "app-plus": {
|
||||
// "popGesture": "none" // 禁用 iOS 左滑返回
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "path": "pages/union/unionMembers",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom",
|
||||
// "navigationBarTitleText": "公会成员",
|
||||
// "app-plus": {
|
||||
// "popGesture": "none" // 禁用 iOS 左滑返回
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/union/exitApplication",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "退出审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/union/subsidy",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公会补贴"
|
||||
"navigationBarTitleText": "退出审核",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "pages/union/subsidy",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom",
|
||||
// "navigationBarTitleText": "公会补贴",
|
||||
// "app-plus": {
|
||||
// "popGesture": "none" // 禁用 iOS 左滑返回
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/union/historyRecord",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "公会补贴历史记录"
|
||||
"navigationBarTitleText": "公会补贴历史记录",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -66,7 +98,11 @@
|
||||
"path": "pages/other/taskDesc",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "规则说明"
|
||||
"navigationBarTitleText": "规则说明",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -87,7 +123,10 @@
|
||||
"path": "pages/other/gradeRule",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "等级规则"
|
||||
"navigationBarTitleText": "等级规则",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -100,14 +139,29 @@
|
||||
"path": "pages/feedback/help",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "帮助与反馈"
|
||||
"navigationBarTitleText": "帮助与反馈",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},{
|
||||
"path": "pages/feedback/customerService",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "在线客服",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/feedback/feedback",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "反馈问题"
|
||||
"navigationBarTitleText": "反馈问题",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -117,11 +171,24 @@
|
||||
"navigationBarTitleText": "青少年"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/feedback/teenageDetail",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "青少年详情",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/feedback/problemDetail",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "问题详情"
|
||||
"navigationBarTitleText": "问题详情",
|
||||
"app-plus": {
|
||||
"popGesture": "none" // 禁用 iOS 左滑返回
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -141,6 +208,10 @@
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
||||
|
||||
|
||||
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "transparent"
|
||||
|
||||
42
pages/feedback/customerService.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'在线客服'" :emitBack="false">
|
||||
</navBar>
|
||||
<view class="">
|
||||
<img :src="$config.kefu_url" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navBar from '@/component/nav.vue';
|
||||
export default {
|
||||
components: {
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:0
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
h
|
||||
} = options
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
if(uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-page {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -50,7 +50,9 @@
|
||||
{{item.updatetime}}
|
||||
</view>
|
||||
<!-- -->
|
||||
<img v-if="item.is_deal === 2" style="width: 100rpx;height: 100rpx;position: absolute; right: 5%;bottom: 2%;" :src="icon" alt="" />
|
||||
<img v-if="item.is_deal === 2"
|
||||
style="width: 100rpx;height: 100rpx;position: absolute; right: 5%;bottom: 2%;"
|
||||
:src="icon" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -66,7 +68,7 @@
|
||||
<view class="footer-button flex-line" @click="operate(index)" v-for="(item,index) in footerList"
|
||||
:key="index">
|
||||
<view class="icon">
|
||||
<uni-icons :type="item.icon" :color="footerIndex === index ? '#0DFFB9' : '#333'"
|
||||
<uni-icons :type="item.icon" :color="footerIndex === index ? $config.BASR_COLOR : '#333'"
|
||||
size="20"></uni-icons>
|
||||
</view>
|
||||
<view :class="footerIndex === index ? 'active' : ''" class="title ml-6 color-3 font-28 font-w400">
|
||||
@@ -93,7 +95,7 @@
|
||||
data() {
|
||||
return {
|
||||
logo,
|
||||
icon:Icon,
|
||||
icon: Icon,
|
||||
footerList: [{
|
||||
title: '意见反馈',
|
||||
icon: 'mail-open'
|
||||
@@ -127,7 +129,6 @@
|
||||
id
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
// this.statusBarHeight = h
|
||||
this.errorPage = id ? false : true
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -155,9 +156,9 @@
|
||||
this.dataList = []
|
||||
this.getUserFeedList()
|
||||
}
|
||||
setTimeout(()=> {
|
||||
setTimeout(() => {
|
||||
this.footerIndex = index
|
||||
},500)
|
||||
}, 500)
|
||||
},
|
||||
async getUserFeedList() {
|
||||
await http.get('/api/Suggest/my_suggest', {
|
||||
@@ -233,7 +234,7 @@
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "提交失败",
|
||||
icon: 'error'
|
||||
icon: 'none'
|
||||
});
|
||||
uni.hideLoading()
|
||||
}
|
||||
@@ -241,7 +242,7 @@
|
||||
}).catch(error => {
|
||||
uni.showToast({
|
||||
title: "提交失败",
|
||||
icon: 'error'
|
||||
icon: 'none'
|
||||
});
|
||||
uni.hideLoading()
|
||||
});
|
||||
@@ -256,16 +257,23 @@
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background-color: #F8F8F8;
|
||||
.text-content-image{
|
||||
|
||||
.text-content-image {
|
||||
width: calc(100% - 260rpx);
|
||||
position: relative;
|
||||
display: inline-flex;flex-wrap: wrap;align-content: space-between;
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: space-between;
|
||||
}
|
||||
.text-content{
|
||||
|
||||
.text-content {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: inline-flex;flex-wrap: wrap;align-content: space-between;
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: space-between;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
@@ -288,7 +296,7 @@
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #0DFFB9
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,16 +330,19 @@
|
||||
border-radius: 22rpx;
|
||||
margin-bottom: 24rpx;
|
||||
width: calc(100% - 48rpx);
|
||||
.box-top-line{
|
||||
|
||||
.box-top-line {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.new-box-image {
|
||||
width: 240rpx;
|
||||
height: 184rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
img {
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
@@ -362,7 +373,9 @@
|
||||
.confirm-button {
|
||||
width: 600rpx;
|
||||
height: 84rpx;
|
||||
background: #0DFFB9;
|
||||
background: var(--primary-color);
|
||||
font-size: var(--font-button-size);
|
||||
color: var(--font-button-color);
|
||||
border-radius: 106rpx;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'帮助与反馈'" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
@@ -66,6 +66,7 @@
|
||||
import http from '@/until/http.js';
|
||||
import keFuImg from '@/static/image/help/Headphone.png';
|
||||
import fkImg from '@/static/image/help/fankui.png';
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
@@ -74,6 +75,7 @@
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:0,
|
||||
baseBgUrl:config.PRIMARY_BGURL,
|
||||
problemList: [{
|
||||
title: '问题分类',
|
||||
id: 0,
|
||||
@@ -100,6 +102,7 @@
|
||||
limit: 10,
|
||||
typeData: null,
|
||||
typeId: null,
|
||||
ThemeData:null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -110,11 +113,14 @@
|
||||
if (uni.getStorageSync('token')) this.getHelpList()
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
if(uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getHelpList() {
|
||||
http.get('/api/Help/help_type', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -141,7 +147,7 @@
|
||||
},
|
||||
async getProblemList(id) {
|
||||
http.get('/api/Help/help_list', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
type: id,
|
||||
page: this.page,
|
||||
page_limit: this.limit
|
||||
@@ -175,6 +181,9 @@
|
||||
});
|
||||
} else {
|
||||
// 在线客服
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/feedback/customerService?h=${this.statusBarHeight}`
|
||||
// });
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
// console.log(platform, '打印设备参数')
|
||||
if (platform === 'ios') {
|
||||
@@ -187,7 +196,6 @@
|
||||
console.log('调用Android原生方法')
|
||||
// 调用 Android 原生方法
|
||||
window.Android.customerService();
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -220,7 +228,6 @@
|
||||
// padding: 32rpx;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
|
||||
@@ -54,19 +54,10 @@
|
||||
} = options
|
||||
if (id) this.getDetail(id)
|
||||
},
|
||||
// onShow() {
|
||||
// if(uni.getStorageSync('statusBarHeight')) {
|
||||
// this.statusBarHeight = uni.getStorageSync('statusBarHeight')
|
||||
// } else {
|
||||
// const systemInfo = uni.getSystemInfoSync(); // 获取系统信息
|
||||
// this.statusBarHeight = systemInfo.statusBarHeight
|
||||
// uni.setStorageSync('statusBarHeight', this.statusBarHeight)
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
getDetail(id) {
|
||||
http.get('/api/Help/help_detail', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
id: id
|
||||
}).then(response => {
|
||||
const {
|
||||
@@ -89,7 +80,6 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-page {
|
||||
// padding: 32rpx;
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background-color: #F8F8F8;
|
||||
@@ -128,13 +118,7 @@
|
||||
justify-items: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
// margin-top: ;
|
||||
.help-box {
|
||||
// display: inline-flex;
|
||||
// flex-wrap: wrap;
|
||||
// justify-items: center;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
text-align: center;
|
||||
.help-icon {
|
||||
width: 100rpx;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<!-- <headerHeight bgColor="#fff" /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'举报'" bgColor="#fff" :emitBack="true" @backEvent="back">
|
||||
<navBar :style="{paddingTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'举报'" bgColor="#fff" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="content">
|
||||
<uni-forms ref="baseForm" :modelValue="formData" label-position="top">
|
||||
@@ -33,9 +33,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -57,19 +57,20 @@
|
||||
formData: {
|
||||
content: ""
|
||||
},
|
||||
optionsProps:{
|
||||
|
||||
optionsProps: {
|
||||
|
||||
},
|
||||
array: [],
|
||||
typeList:[],
|
||||
statusBarHeight:0,
|
||||
typeList: [],
|
||||
statusBarHeight: 0,
|
||||
typeIndex: 0,
|
||||
messageText: "",
|
||||
msgType: "success"
|
||||
msgType: "success",
|
||||
fromView: null
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
typeIndex(val){
|
||||
watch: {
|
||||
typeIndex(val) {
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
@@ -78,13 +79,17 @@
|
||||
const {
|
||||
id,
|
||||
fromType,
|
||||
fromId,h
|
||||
fromId,
|
||||
fromView,
|
||||
h
|
||||
} = options
|
||||
this.optionsProps = {
|
||||
id,
|
||||
fromType,
|
||||
fromId
|
||||
}
|
||||
this.fromView = fromView
|
||||
// console.log(this.fromView)
|
||||
uni.setStorageSync('token', id)
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
@@ -94,7 +99,12 @@
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.closeWeb()
|
||||
if (this.fromView == 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
this.closeWeb()
|
||||
}
|
||||
|
||||
},
|
||||
closeWeb() {
|
||||
// 关闭页面
|
||||
@@ -105,34 +115,41 @@
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.closeWeb();
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
async getTypeList(){
|
||||
async getTypeList() {
|
||||
http.get('/api/Report/report_type_list', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const{code,data} = response
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = response
|
||||
this.typeList = data
|
||||
this.array = data.map(ele => {return ele.type})
|
||||
this.array = data.map(ele => {
|
||||
return ele.type
|
||||
})
|
||||
this.typeIndex = 0
|
||||
})
|
||||
},
|
||||
bindPickerChange({detail}) {
|
||||
bindPickerChange({
|
||||
detail
|
||||
}) {
|
||||
// console.log()
|
||||
this.typeIndex = detail.value
|
||||
},
|
||||
comfirm(){
|
||||
comfirm() {
|
||||
const formData = {
|
||||
type_id:this.typeList[this.typeIndex].id,
|
||||
type_id: this.typeList[this.typeIndex].id,
|
||||
report_type: this.optionsProps.fromType || 1,
|
||||
content:this.formData.content || '',
|
||||
image:this.formData.image,
|
||||
from_id:this.optionsProps.fromId || ""
|
||||
content: this.formData.content || '',
|
||||
image: this.formData.image,
|
||||
from_id: this.optionsProps.fromId || ""
|
||||
}
|
||||
http.post('/api/Report/report', {
|
||||
...formData,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -145,9 +162,12 @@
|
||||
this.msgType = 'success'
|
||||
this.formData = {
|
||||
content: "",
|
||||
image:"",
|
||||
image: "",
|
||||
}
|
||||
this.$refs.uploadImage.clearImage()
|
||||
// if(this.fromView == 1) {
|
||||
// uni.navigateBack()
|
||||
// }
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
@@ -155,9 +175,11 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
successUpload(list){
|
||||
const imageList = list.map(ele => {return ele.tempFilePath})
|
||||
if(imageList && imageList.length) {
|
||||
successUpload(list) {
|
||||
const imageList = list.map(ele => {
|
||||
return ele.tempFilePath
|
||||
})
|
||||
if (imageList && imageList.length) {
|
||||
this.formData.image = imageList.join(',')
|
||||
} else {
|
||||
this.formData.image = ""
|
||||
@@ -192,10 +214,13 @@
|
||||
padding: 21rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
.comfirmButton{
|
||||
|
||||
.comfirmButton {
|
||||
width: 600rpx;
|
||||
height: 84rpx;
|
||||
background: #0DFFB9;
|
||||
background: var(--primary-color);
|
||||
font-size: var(--font-button-size);
|
||||
color: var(--font-button-color);
|
||||
border-radius: 106rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="'青少年模式'" :emitBack="true" @backEvent="back">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'青少年模式'" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="content-view">
|
||||
<view class="flex-line">
|
||||
@@ -9,13 +8,13 @@
|
||||
</NavigationTabs>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="flex-line flex-spaceB w-fill new-box" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="flex-line flex-spaceB w-fill new-box" v-for="(item, index) in dataList" :key="index" @click="openDetail(item)">
|
||||
<view class="">
|
||||
<view class="color-3 font-32 font-w500">
|
||||
{{item.title}}
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="color-6 mt-24 font-28 font-w400 multi-line">
|
||||
{{item.introduced}}
|
||||
{{ item.introduced }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="new-box-image">
|
||||
@@ -30,148 +29,159 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import http from '@/until/http.js';
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import NavigationTabs from '@/component/tab.vue';
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar,
|
||||
NavigationTabs
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorPage: true,
|
||||
currentIndex: 0,
|
||||
pageConfig: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
loading: false,
|
||||
noMore: false,
|
||||
tabs: [],
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.getUnderageModeList(this.tabs[0].type)
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.errorPage = true
|
||||
this.dataList = []
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
if (uni.getStorageSync('token')) this.getUnderageTypeList()
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.closeWeb()
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import NavigationTabs from '@/component/tab.vue';
|
||||
export default {
|
||||
components: {
|
||||
navBar,
|
||||
NavigationTabs
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorPage: true,
|
||||
currentIndex: 0,
|
||||
statusBarHeight:0,
|
||||
pageConfig: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
closeWeb() {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'closeWeb'
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.closeWeb();
|
||||
}
|
||||
},
|
||||
async getUnderageTypeList() {
|
||||
http.get('/api/Usermode/getUnderageTypeList', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
if (code) {
|
||||
this.tabs = data.map(ele => {
|
||||
return {
|
||||
type: ele.id,
|
||||
value: ele.type_name
|
||||
}
|
||||
})
|
||||
}
|
||||
this.errorPage = false
|
||||
this.$nextTick(() => {
|
||||
this.getUnderageModeList(this.tabs[0].type)
|
||||
})
|
||||
}).catch(error => {
|
||||
this.tabs = []
|
||||
this.errorPage = true
|
||||
loading: false,
|
||||
noMore: false,
|
||||
tabs: [],
|
||||
dataList: [],
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.getUnderageModeList(this.tabs[0].type)
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.errorPage = true
|
||||
this.dataList = []
|
||||
const {
|
||||
id,
|
||||
h
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
if (uni.getStorageSync('token')) this.getUnderageTypeList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.closeWeb()
|
||||
},
|
||||
closeWeb() {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'closeWeb'
|
||||
});
|
||||
},
|
||||
async getUnderageModeList(type) {
|
||||
http.get('/api/Usermode/getUnderageModeList', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
type: type,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize
|
||||
}).then(response => {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = response
|
||||
if (code) {
|
||||
this.pageConfig.total = data.total
|
||||
this.loading = false
|
||||
const newData = data.data || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTabChange(data) {
|
||||
this.dataList = []
|
||||
this.noMore = false
|
||||
this.loading = false
|
||||
this.pageConfig.currentPage = 1
|
||||
this.pageConfig.pageSize = 10
|
||||
this.getUnderageModeList(data.tab.type)
|
||||
} else if (platform === 'android') {
|
||||
window.Android.closeWeb();
|
||||
}
|
||||
},
|
||||
async getUnderageTypeList() {
|
||||
http.get('/api/Usermode/getUnderageTypeList', {
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
if (code) {
|
||||
this.tabs = data.map(ele => {
|
||||
return {
|
||||
type: ele.id,
|
||||
value: ele.type_name
|
||||
}
|
||||
})
|
||||
}
|
||||
this.errorPage = false
|
||||
this.$nextTick(() => {
|
||||
this.getUnderageModeList(this.tabs[0].type)
|
||||
})
|
||||
}).catch(error => {
|
||||
this.tabs = []
|
||||
this.errorPage = true
|
||||
});
|
||||
},
|
||||
async getUnderageModeList(type) {
|
||||
http.get('/api/Usermode/getUnderageModeList', {
|
||||
token: uni.getStorageSync('token') || '',
|
||||
type: type,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize
|
||||
}).then(response => {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = response
|
||||
if (code) {
|
||||
this.pageConfig.total = data.total
|
||||
this.loading = false
|
||||
const newData = data.data || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTabChange(data) {
|
||||
this.dataList = []
|
||||
this.noMore = false
|
||||
this.loading = false
|
||||
this.pageConfig.currentPage = 1
|
||||
this.pageConfig.pageSize = 10
|
||||
this.getUnderageModeList(data.tab.type)
|
||||
},
|
||||
openDetail(data){
|
||||
uni.navigateTo({
|
||||
url: `/pages/feedback/teenageDetail?dataId=${data.id}`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-page {
|
||||
// padding: 32rpx;
|
||||
background: linear-gradient(180deg, #B3FAEB 2%, #FFFFFF 40%);
|
||||
background-size: 100% 100%;
|
||||
min-height: 100vh;
|
||||
.view-page {
|
||||
// padding: 32rpx;
|
||||
background: linear-gradient(180deg, #B3FAEB 2%, #FFFFFF 40%);
|
||||
background-size: 100% 100%;
|
||||
min-height: 100vh;
|
||||
|
||||
.content-view {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
.content-view {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.new-box {
|
||||
margin-top: 32rpx;
|
||||
.new-box {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.new-box-image {
|
||||
width: 240rpx;
|
||||
height: 144rpx;
|
||||
.new-box-image {
|
||||
width: 240rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
img {
|
||||
border-radius: 12rpx;
|
||||
|
||||
img {
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
111
pages/feedback/teenageDetail.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="'内容详情'">
|
||||
</navBar>
|
||||
<template v-if="detailData">
|
||||
<view class="" v-if="detailData.from === 2">
|
||||
<iframe id="myIframe" :src="detailData.url" style="width: 100%;border: none;height: 100dvh;"></iframe>
|
||||
<!-- <web-view :src="detailData.url"></web-view> -->
|
||||
</view>
|
||||
<view class="detailContent" v-else>
|
||||
<!-- from 1站内 2 外链 -->
|
||||
|
||||
<view class="">
|
||||
<view class="detailTitle">
|
||||
{{detailData.title}}
|
||||
</view>
|
||||
<!-- 内容 -->
|
||||
<view class="detailData" v-html="detailData.content || ''">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailData: null,
|
||||
ThemeData: null,
|
||||
BarHeight:0
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
dataId
|
||||
} = options
|
||||
if (dataId) {
|
||||
this.getDetail(dataId)
|
||||
}
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
this.BarHeight = uni.getStorageSync('BarHeight')
|
||||
},
|
||||
methods: {
|
||||
// 获取公会信息
|
||||
async getDetail(Id) {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中'
|
||||
})
|
||||
http.get('/api/Usermode/getUnderageModeContent', {
|
||||
id: Id,
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
uni.hideLoading()
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
this.detailData = code ? data : null
|
||||
console.log(this.detailData)
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-page {
|
||||
// padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
min-height: 100vh;
|
||||
|
||||
.detailContent {
|
||||
padding: 0 32rpx;
|
||||
flex: 1;
|
||||
/* 关键:撑满剩余空间 */
|
||||
overflow: auto;
|
||||
|
||||
/* 允许内容滚动 */
|
||||
.detailTitle {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
padding-bottom: 48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.detailData{
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,34 +1,38 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="`关于我们`" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="dec-view">
|
||||
<web-view src="https://chat.qxmier.com/api/Page/page_show?id=20"></web-view>
|
||||
<web-view :src="`${httpUrl}/api/Page/page_show?id=20`"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
// import headerHeight from '@/component/headerHeight.vue';
|
||||
import config from '@/until/config.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
export default {
|
||||
components: {
|
||||
// headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:0
|
||||
statusBarHeight:0,
|
||||
ThemeData:null,
|
||||
httpUrl:null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.httpUrl = config.BASE_URL
|
||||
const {
|
||||
h
|
||||
} = options
|
||||
this.currentIndex = type !== undefined ? +type : 0
|
||||
this.statusBarHeight = h
|
||||
if(uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
@@ -52,7 +56,7 @@
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
img{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" v-if="levelActiveData">
|
||||
<view class="view-page" v-if="levelActiveData && detailData">
|
||||
<view class="top-view">
|
||||
<view class="navbar" :style="{'margin-top' : `${statusBarHeight || 0}px`}">
|
||||
<view class="">
|
||||
@@ -13,13 +13,15 @@
|
||||
<view @click="cutTabPage(1)" :class="currentIndex == 1 ? 'active' : ''">
|
||||
魅力等级
|
||||
</view>
|
||||
<view v-if="userSinger" @click="cutTabPage(2)" :class="currentIndex == 2 ? 'active' : ''">
|
||||
歌手等级
|
||||
</view>
|
||||
</view>
|
||||
<view class="" @click="jumpGradeRule">
|
||||
<img class="icon-image" src="@/static/image/grade/Question.png" alt="" />
|
||||
<view class="icon-image">
|
||||
</view>
|
||||
</view>
|
||||
<view class="swiper-view" v-if="levelActiveData.length">
|
||||
<view class="swiper-image" :style="{ 'background-image' : `url(${levelActiveData[0].bg_image})`}">
|
||||
<view class="swiper-image" :style="{ 'background-image' : `url('${levelActiveData[0].bg_image}')` }">
|
||||
<view class="view-level">
|
||||
<view class="">
|
||||
<view class="level-str" :style="{textShadow : `0px 0px 5px ${levelActiveData[0].color}`}">
|
||||
@@ -27,15 +29,19 @@
|
||||
</view>
|
||||
<view class="color-9 flex-line" style="font-size: 20rpx;">
|
||||
<span
|
||||
style="white-space: nowrap">{{levelActiveData[0].level_str || levelActiveData[0].name}}</span><progress
|
||||
style="white-space: nowrap">{{`lv.${levelActiveData[0].level}`}}</span><progress
|
||||
style="width: 200rpx;margin: 0 24rpx;" :border-radius="52" :percent="3"
|
||||
:activeColor="levelActiveData[0].color" stroke-width="3" />
|
||||
<span
|
||||
style="white-space: nowrap">{{nextLevelData[0].level_str || nextLevelData[0].name }}</span>
|
||||
style="white-space: nowrap">{{`lv.${nextLevelData[0].level}`}}</span>
|
||||
</view>
|
||||
<view class="color-9 mt-24" style="font-size: 20rpx;">
|
||||
距离下一个段位还差{{detailData.user.next_exp}}经验值
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view v-if="[1,2].includes(currentIndex)" style="width: 196rpx;height: 196rpx;">
|
||||
<img :src="levelActiveData[0].rights_icon" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -66,88 +72,43 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 每日奖励等 -->
|
||||
<view class="content-view">
|
||||
<template v-if="!currentIndex">
|
||||
<!-- <view class="card-view">
|
||||
<view class="card-title color-3 font-32 font-w500">
|
||||
每日奖励
|
||||
</view>
|
||||
<view class="card-body flex-line">
|
||||
<view class="coin">
|
||||
<img src="@/static/image/grade/coin.png" alt="" />
|
||||
</view>
|
||||
<view class="flex-line w-fill" style="justify-content: space-around;">
|
||||
<view class="font-28 color-3">
|
||||
<view class="">
|
||||
段位达到富豪8
|
||||
</view>
|
||||
<view class="">
|
||||
可每日领取金币
|
||||
</view>
|
||||
</view>
|
||||
<view class="receive-button flex-line color-3 font-24">
|
||||
立即领取
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <Canvans /> -->
|
||||
<view class="card-view" v-if="detailData.privilege">
|
||||
<view class="card-title color-3 font-32 font-w500">
|
||||
财富特权
|
||||
</view>
|
||||
<!-- 容器使用 Flex 布局并允许换行 -->
|
||||
<view class="flex-container" v-if="detailData.privilege && detailData.privilege.length">
|
||||
<!-- 循环生成子元素 -->
|
||||
<view v-for="(item, index) in detailData.privilege" :key="index" class="flex-item">
|
||||
<view class="image">
|
||||
<img :src="item.base_image || logo" alt="" />
|
||||
</view>
|
||||
<view class="color-3 font-28">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="font-24 color-9">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 每日奖励等 -->
|
||||
<view class="content-view" v-if="detailData">
|
||||
<view class="font-32 color-3 font-w500">
|
||||
{{`如何获得${currentIndex === 1 ? '魅力' : currentIndex === 2 ? '歌手经验' : '财富'}值?`}}
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="card-view" v-if="detailData.privilege">
|
||||
<view class="card-title color-3 font-32 font-w500">
|
||||
等级特权
|
||||
</view>
|
||||
<!-- 容器使用 Flex 布局并允许换行 -->
|
||||
<view class="flex-container" v-if="detailData.privilege && detailData.privilege.length">
|
||||
<!-- 循环生成子元素 -->
|
||||
<view v-for="(item, index) in detailData.privilege" :key="index" class="flex-item">
|
||||
<view class="image">
|
||||
<img :src="item.rights_icon || logo" alt="" />
|
||||
</view>
|
||||
<view class="font-24 color-9">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-24 color-3 font-w400" style="font-size: 28rpx;">
|
||||
{{`${currentIndex === 1 ? `在平台收到的所有打赏均可转化为魅力值,具体比例为1金币=${detailData.coin_charm_exp}魅力值。` : currentIndex === 2 ? `在平台的所有打赏均可转化为歌手经验值,具体比例为1金币=${detailData.singer_coin_exp}经验值` : `在平台的所有打赏均可转化为财富值,具体比例为1金币=${detailData.coin_wealth_exp}财富值。`}`}}
|
||||
</view>
|
||||
</template>
|
||||
<!-- 财富等级 -->
|
||||
<view class="mt-24">
|
||||
<template v-if="!currentIndex" class="mt-24">
|
||||
<img :src="$config.wealth_url" alt="" />
|
||||
</template>
|
||||
<template v-if="currentIndex == 1" class="mt-24">
|
||||
<img :src="$config.charm_url" alt="" />
|
||||
</template>
|
||||
<template v-if="currentIndex == 2" class="mt-24">
|
||||
<img :src="$config.singer_url" alt="" />
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png';
|
||||
import SwiperView from '@/component/swiper.vue';
|
||||
// import SwiperView from '@/component/swiper.vue';
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import LevelProgress from '@/component/LevelProgress.vue'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
SwiperView,
|
||||
// SwiperView,
|
||||
LevelProgress
|
||||
},
|
||||
data() {
|
||||
@@ -163,7 +124,9 @@
|
||||
levelList: [],
|
||||
levelCurrent: 0,
|
||||
nextLevelData: null,
|
||||
userSinger:false,
|
||||
currentSelectedLevel: 2,
|
||||
userSingerLevel:0
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -177,31 +140,46 @@
|
||||
uni.setStorageSync('token', id)
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
if (uni.getStorageSync('token')) this.getData()
|
||||
if (uni.getStorageSync('token')) {
|
||||
this.getData()
|
||||
this.getSingInfo()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.levelActiveData = []
|
||||
if (this.currentIndex) {
|
||||
if (this.currentIndex === 1) {
|
||||
// 魅力等级
|
||||
this.getCharmLevel()
|
||||
} else {
|
||||
} else if (this.currentIndex === 0) {
|
||||
// 财富等级
|
||||
this.getWealthLevel()
|
||||
}
|
||||
},
|
||||
jumpGradeRule() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/other/gradeRule?flag=${this.currentIndex}&h=${this.statusBarHeight}`
|
||||
});
|
||||
} else if(this.currentIndex === 2) {
|
||||
console.log('歌手等级')
|
||||
this.getSingerLevel()
|
||||
}
|
||||
},
|
||||
cutTabPage(index) {
|
||||
this.currentIndex = index
|
||||
this.getData()
|
||||
},
|
||||
async getSingInfo() {
|
||||
http.get('/api/Level/is_singer', {
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
this.userSinger = data.status ? true : false
|
||||
this.userSingerLevel = Number(data.level)
|
||||
}).catch(error => {
|
||||
this.userSinger = false
|
||||
});
|
||||
},
|
||||
async getCharmLevel() {
|
||||
http.get('/api/Level/get_level_rule', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -244,7 +222,7 @@
|
||||
},
|
||||
async getWealthLevel() {
|
||||
http.get('/api/Level/get_wealth_rule', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -270,6 +248,36 @@
|
||||
}).catch(error => {
|
||||
this.errorPage = true
|
||||
});
|
||||
},
|
||||
async getSingerLevel() {
|
||||
http.get('/api/Level/get_singer_level', {
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
if (code) {
|
||||
console.log(data)
|
||||
this.detailData = data
|
||||
this.levelList = data.level.map(ele => {
|
||||
return {
|
||||
...ele,
|
||||
title: ele.name
|
||||
}
|
||||
})
|
||||
this.levelCurrent = Number(data.user.level)
|
||||
this.nextLevelData = data.level.filter(ele => {
|
||||
return ele.level === Number(data.user.level) + 1
|
||||
})
|
||||
this.levelActiveData = data.level.filter(ele => {
|
||||
return ele.level === Number(data.user.level)
|
||||
})
|
||||
}
|
||||
this.errorPage = false
|
||||
}).catch(error => {
|
||||
this.errorPage = true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,7 +329,7 @@
|
||||
min-height: 50vh;
|
||||
background-image: url('@/static/image/grade/Maskgroupx.png');
|
||||
background-repeat: no-repeat;
|
||||
|
||||
position: relative;
|
||||
.navbar {
|
||||
display: inline-flex;
|
||||
justify-content: space-around;
|
||||
@@ -409,9 +417,13 @@
|
||||
|
||||
.content-view {
|
||||
min-height: 46vh;
|
||||
width: 100%;
|
||||
padding: 0 32rpx;
|
||||
|
||||
// width: 100%;
|
||||
width: calc(100% - 64rpx);
|
||||
padding:32rpx;
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
background-color: #fff;
|
||||
.card-view {
|
||||
|
||||
// padding: 24rpx 0;
|
||||
@@ -452,7 +464,7 @@
|
||||
flex: 0 0 calc(25% - 10px);
|
||||
/* 基础宽度25% 减去间隔 */
|
||||
margin: 5px;
|
||||
min-height: 220rpx;
|
||||
min-height: 260rpx;
|
||||
padding: 20rpx 0;
|
||||
/* 元素间距 */
|
||||
box-sizing: border-box;
|
||||
@@ -465,15 +477,14 @@
|
||||
.image{
|
||||
width: 100%;
|
||||
height: 60%;
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: 14rpx;
|
||||
img{
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
// .image {
|
||||
// width: 80%;
|
||||
// height: 120rpx;
|
||||
// }
|
||||
.title{
|
||||
max-width: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<navBar :navTitle="`规则说明`" :style="{'margin-top' : `${statusBarHeight || 0}px`}">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<navBar :navTitle="`规则说明`" :style="{'margin-top' : `${statusBarHeight || 0}px`}">
|
||||
</navBar>
|
||||
<view class="dec-view" v-if="flagIndex !== null">
|
||||
<web-view :src="`https://chat.qxmier.com/api/Page/page_show?id=${flagIndex === 1 ? 10 : 11}`"></web-view>
|
||||
<web-view :src="`${httpUrl}/api/Page/page_show?id=${flagIndex === 1 ? 10 : 11}`"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -11,22 +11,30 @@
|
||||
|
||||
<script>
|
||||
import navBar from '@/component/nav.vue';
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
components: {
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight:0,
|
||||
flagIndex:null
|
||||
httpUrl: null,
|
||||
statusBarHeight: 0,
|
||||
flagIndex: null,
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
h,flag
|
||||
h,
|
||||
flag
|
||||
} = options
|
||||
this.flagIndex = +flag
|
||||
this.httpUrl = config.BASE_URL
|
||||
this.statusBarHeight = h
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -35,12 +43,14 @@
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
img{
|
||||
width: 100%;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dec-view {
|
||||
min-height: calc(99vh - 160rpx);
|
||||
position: relative;
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
<view class="flex-line w-fill flex-spaceB">
|
||||
<view class="">
|
||||
<view class="color-3 font-32 font-w500">
|
||||
羽声语音
|
||||
{{ConfigData.BASE_NAME}}
|
||||
</view>
|
||||
<view class="color-3 font-32 font-w500">
|
||||
<view class="color-3 font-32 mt-24 font-w500">
|
||||
邀请码
|
||||
</view>
|
||||
<view class="color-6 font-24 mt-24">
|
||||
一级充值的4%为邀请收益
|
||||
{{detailData.invited_draw || 0}}%为邀请收益
|
||||
</view>
|
||||
</view>
|
||||
<view class="QRCodeImage">
|
||||
@@ -56,7 +56,7 @@
|
||||
</view>
|
||||
<view class="flex-line w-fill mt-24 flex-spaceB">
|
||||
<view class="Code-view color-3 font-w500" style="letter-spacing: 44rpx;text-align: center;">
|
||||
{{detailData.init_code}}
|
||||
{{detailData.init_code}}
|
||||
</view>
|
||||
<view class="copy-button color-3 font-w500 font-24" @click="copyText(detailData.init_code)">
|
||||
复制
|
||||
@@ -70,33 +70,36 @@
|
||||
<Table :tableData="dataList" v-else :tableLabel="columns" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="tiXian" @click="Withdrawal">
|
||||
<!-- 提现 -->
|
||||
<view v-if="isShow" class="tiXian" @click="Withdrawal">
|
||||
<img src="@/static/image/income/tixian.png" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="bindPopup" type="center" background-color="#fff" border-radius="32rpx">
|
||||
<middle-popup ref="bindPopup" v-show="PopupStatus">
|
||||
<view class="bindPopup-view">
|
||||
<view class="bind-title font-32 font-w500 color-3">
|
||||
<view class="">
|
||||
手动绑定
|
||||
<view class="bindPopup-Content">
|
||||
<view class="bind-title font-32 font-w500 color-3">
|
||||
<view class="">
|
||||
手动绑定
|
||||
</view>
|
||||
<img @click="closeBind" class="closeIcon" src="@/static/image/income/close.png" alt="" />
|
||||
</view>
|
||||
<img @click="closeBind" class="closeIcon" src="@/static/image/income/close.png" alt="" />
|
||||
</view>
|
||||
|
||||
<view class="bind-input">
|
||||
<input class="uni-input" v-model="bindValue" placeholder="输入好友邀请码" />
|
||||
</view>
|
||||
<view class="color-3 font-w400 font-24" style="text-align: left;">
|
||||
{{detailData.explain}}
|
||||
</view>
|
||||
<view class="bind-footer" @click="decorate">
|
||||
<view class="confirm-button flex-line">
|
||||
确定
|
||||
<view class="bind-input">
|
||||
<input class="uni-input" v-model="bindValue" placeholder="输入好友邀请码" />
|
||||
</view>
|
||||
<view class="color-3 font-w400 font-24" style="text-align: left;">
|
||||
{{detailData.explain}}
|
||||
</view>
|
||||
<view class="bind-footer" @click="decorate">
|
||||
<view class="confirm-button flex-line">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</middle-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -112,14 +115,19 @@
|
||||
import PYQ from '@/static/image/income/pyq.png';
|
||||
import Qcode from '@/static/image/income/Qcode.png';
|
||||
import QQ from '@/static/image/income/QQ.png';
|
||||
import Config from '@/until/config.js';
|
||||
import MiddlePopup from '@/component/MiddlePopup.vue'
|
||||
export default {
|
||||
components: {
|
||||
NavigationTabs,
|
||||
headerHeight,
|
||||
Table
|
||||
Table,
|
||||
MiddlePopup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ConfigData: Config,
|
||||
PopupStatus: false,
|
||||
errorPage: false,
|
||||
detailData: null,
|
||||
currentIndex: 0,
|
||||
@@ -131,13 +139,13 @@
|
||||
title: '钻石余额'
|
||||
},
|
||||
{
|
||||
icon: Coin,
|
||||
icon: ZS,
|
||||
value: 200,
|
||||
prop: 'today_earnings',
|
||||
title: '今日收益'
|
||||
},
|
||||
{
|
||||
icon: Coin,
|
||||
icon: ZS,
|
||||
value: 200,
|
||||
prop: 'total_earnings',
|
||||
title: '累计收益'
|
||||
@@ -146,27 +154,48 @@
|
||||
statusBarHeight: 0,
|
||||
bindValue: '',
|
||||
dataList: [],
|
||||
columns: [
|
||||
{ title: '昵称', key: 'nickname', width: '20%' },
|
||||
{ title: '时间', key: 'createtime', width: '35%' },
|
||||
{ title: '充值金额', key: 'coin', width: '30%' },
|
||||
{ title: '获得收益', key: 'earnings', width: '30%' }
|
||||
isShow:true,
|
||||
columns: [{
|
||||
title: '昵称',
|
||||
key: 'nickname',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
title: '时间',
|
||||
key: 'createtime',
|
||||
width: '35%'
|
||||
},
|
||||
{
|
||||
title: '充值金币',
|
||||
key: 'coin',
|
||||
width: '30%'
|
||||
},
|
||||
{
|
||||
title: '获得收益',
|
||||
key: 'earnings',
|
||||
width: '30%'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id,
|
||||
h
|
||||
h,
|
||||
is_show
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
if(is_show) {
|
||||
const flag = Number(is_show)
|
||||
this.isShow = flag === 1 ? true : false
|
||||
}
|
||||
if (uni.getStorageSync('token')) this.gettabs()
|
||||
this.statusBarHeight = this.getStatusBarHeight()
|
||||
this.statusBarHeight = h
|
||||
},
|
||||
methods: {
|
||||
copyText(text) {
|
||||
if(text) {
|
||||
if (text) {
|
||||
if (uni.getSystemInfoSync().platform === 'h5') {
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = text;
|
||||
@@ -174,7 +203,7 @@
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
|
||||
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'none',
|
||||
@@ -224,7 +253,7 @@
|
||||
},
|
||||
async gettabs() {
|
||||
http.get('/api/Invited/get_init_code', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -254,7 +283,7 @@
|
||||
},
|
||||
getInvitedList() {
|
||||
http.get('/api/Invited/invited_list', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -267,7 +296,7 @@
|
||||
},
|
||||
getBillList() {
|
||||
http.get('/api/Invited/bill_list', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -324,10 +353,13 @@
|
||||
},
|
||||
// 绑定
|
||||
bind() {
|
||||
this.$refs.bindPopup.open('center')
|
||||
this.PopupStatus = true
|
||||
this.$refs.bindPopup.openPopup()
|
||||
|
||||
},
|
||||
closeBind() {
|
||||
this.$refs.bindPopup.close()
|
||||
this.$refs.bindPopup.closePopup()
|
||||
this.PopupStatus = false
|
||||
},
|
||||
decorate() {
|
||||
if (this.bindValue) {
|
||||
@@ -335,7 +367,7 @@
|
||||
mask: true
|
||||
})
|
||||
http.post('/api/Invited/invited_bind', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
init_code: this.bindValue
|
||||
}).then(response => {
|
||||
const {
|
||||
@@ -346,7 +378,7 @@
|
||||
if (code) {
|
||||
uni.showToast({
|
||||
title: '绑定成功',
|
||||
icon: 'success',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 1000
|
||||
});
|
||||
@@ -355,7 +387,7 @@
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'error',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 1000
|
||||
});
|
||||
@@ -367,7 +399,7 @@
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入邀请码',
|
||||
icon: 'error',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 1000
|
||||
});
|
||||
@@ -376,6 +408,13 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
/* 覆盖uni-popup的动画 */
|
||||
::v-deep .uni-popup .uni-popup__wrapper {
|
||||
transition: none !important;
|
||||
transform: translateZ(0) !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
width: 100vw;
|
||||
@@ -519,7 +558,8 @@
|
||||
.copy-button {
|
||||
// width: 112rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #0DFFB9;
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
text-align: center;
|
||||
padding: 12rpx 24rpx;
|
||||
}
|
||||
@@ -554,89 +594,55 @@
|
||||
}
|
||||
}
|
||||
|
||||
.popup-view {
|
||||
padding: 32rpx;
|
||||
min-height: 300rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
// background: #FFFFFF;
|
||||
|
||||
.share-view {
|
||||
display: flex;
|
||||
/* 启用 Flex 布局 */
|
||||
flex-wrap: wrap;
|
||||
/* 允许换行 */
|
||||
justify-content: center;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.share-item {
|
||||
flex: 0 0 calc(25% - 10px);
|
||||
/* 基础宽度25% 减去间隔 */
|
||||
margin: 5px;
|
||||
/* 元素间距 */
|
||||
box-sizing: border-box;
|
||||
/* 包含内边距和边框 */
|
||||
border-radius: 14rpx;
|
||||
/* 样式美化(可选) */
|
||||
// background-color: #fff;
|
||||
// padding: 20rpx;
|
||||
// text-align: center;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
|
||||
.share-icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bindPopup-view {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
padding: 24rpx;
|
||||
width: 70vw;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
|
||||
.closeIcon {
|
||||
width: 22rpx;
|
||||
height: 26rpx;
|
||||
position: absolute;
|
||||
top: 34rpx;
|
||||
right: 34rpx;
|
||||
}
|
||||
.bindPopup-Content {
|
||||
padding: 24rpx;
|
||||
width: 80%;
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
|
||||
.bind-title {
|
||||
display: inline-flex;
|
||||
}
|
||||
.closeIcon {
|
||||
width: 22rpx;
|
||||
height: 26rpx;
|
||||
position: absolute;
|
||||
top: 34rpx;
|
||||
right: 34rpx;
|
||||
}
|
||||
|
||||
.bind-input {
|
||||
background: #EFF2F8;
|
||||
border-radius: 22rpx;
|
||||
padding: 18rpx 32rpx;
|
||||
margin: 70rpx 0;
|
||||
}
|
||||
.bind-title {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.bind-footer {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
margin-top: 78rpx;
|
||||
.bind-input {
|
||||
background: #EFF2F8;
|
||||
border-radius: 22rpx;
|
||||
padding: 18rpx 32rpx;
|
||||
margin: 70rpx 0;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
width: 356rpx;
|
||||
height: 84rpx;
|
||||
background: #0DFFB9;
|
||||
border-radius: 106rpx;
|
||||
.bind-footer {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
margin-top: 78rpx;
|
||||
|
||||
.confirm-button {
|
||||
width: 356rpx;
|
||||
height: 84rpx;
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
border-radius: 106rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
||||
@@ -4,85 +4,95 @@
|
||||
<img src="/static/image/task/rule.png" alt="" />
|
||||
</view>
|
||||
<view class="dec-view" style="background-color: transparent !important;">
|
||||
<web-view :style="{ backgroundColor: 'transparent' }" :webview-styles="webviewStyles" src="https://chat.qxmier.com/api/Page/page_show?id=17"></web-view>
|
||||
<web-view :style="{ backgroundColor: 'transparent' }" :webview-styles="webviewStyles"
|
||||
:src="`${httpUrl}/api/Page/page_show?id=17`"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 关键配置:设置 WebView 样式
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: 'transparent' // 隐藏进度条
|
||||
},
|
||||
// 安卓专用配置
|
||||
android: {
|
||||
hardwareAccelerated: true, // 开启硬件加速
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
// iOS 专用配置
|
||||
ios: {
|
||||
allowsInlineMediaPlayback: true,
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 WebView 实例进行原生设置
|
||||
const pages = getCurrentPages();
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview();
|
||||
|
||||
setTimeout(() => {
|
||||
const webview = currentWebview.children()[0];
|
||||
|
||||
// 安卓原生设置
|
||||
// #ifdef APP-ANDROID
|
||||
webview.setStyle({
|
||||
background: 'transparent'
|
||||
});
|
||||
// #endif
|
||||
|
||||
// iOS 原生设置
|
||||
// #ifdef APP-IOS
|
||||
webview.setStyle({
|
||||
opaque: false
|
||||
});
|
||||
// #endif
|
||||
}, 300); // 延迟确保 WebView 加载完成
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
httpUrl: null,
|
||||
// 关键配置:设置 WebView 样式
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: 'transparent' // 隐藏进度条
|
||||
},
|
||||
// 安卓专用配置
|
||||
android: {
|
||||
hardwareAccelerated: true, // 开启硬件加速
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
// iOS 专用配置
|
||||
ios: {
|
||||
allowsInlineMediaPlayback: true,
|
||||
backgroundColor: 'transparent'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.httpUrl = config.BASE_URL
|
||||
},
|
||||
onReady() {
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 WebView 实例进行原生设置
|
||||
const pages = getCurrentPages();
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview();
|
||||
|
||||
setTimeout(() => {
|
||||
const webview = currentWebview.children()[0];
|
||||
|
||||
// 安卓原生设置
|
||||
// #ifdef APP-ANDROID
|
||||
webview.setStyle({
|
||||
background: 'transparent'
|
||||
});
|
||||
// #endif
|
||||
|
||||
// iOS 原生设置
|
||||
// #ifdef APP-IOS
|
||||
webview.setStyle({
|
||||
opaque: false
|
||||
});
|
||||
// #endif
|
||||
}, 300); // 延迟确保 WebView 加载完成
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 重要:设置页面背景透明 */
|
||||
page {
|
||||
background-color: transparent !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
|
||||
/* 隐藏 WebView 默认容器背景 */
|
||||
uni-web-view > div {
|
||||
background-color: transparent !important;
|
||||
uni-web-view>div {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.view-page {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
min-width: calc(100% - 40rpx);
|
||||
padding: 0 20rpx;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background-color: transparent !important;
|
||||
background-color: transparent !important;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
.image{
|
||||
|
||||
.image {
|
||||
width: calc(100% - 40rpx);
|
||||
// min-height: 100vh;
|
||||
position: absolute;
|
||||
@@ -91,6 +101,7 @@ export default {
|
||||
right: 20rpx;
|
||||
// bottom: 0;
|
||||
}
|
||||
|
||||
.dec-view {
|
||||
width: calc(100% - 40rpx - 48rpx);
|
||||
min-height: calc(60% - 48rpx);
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<scroll-view scroll-y="true" class="list-view">
|
||||
<view class="flex-container" v-if="listData && listData.length">
|
||||
<!-- 循环生成子元素 -->
|
||||
<view v-for="(item,index) in listData" @click="openPopup(item)" :key="index" class="flex-item decorate-box">
|
||||
<view v-for="(item,index) in listData" @click="openPopup(item)" :key="index"
|
||||
class="flex-item decorate-box">
|
||||
<view class="decorate-content">
|
||||
<view class="decorate-image">
|
||||
<img :src="item.base_image" alt="" />
|
||||
@@ -28,17 +29,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <uni-grid :column="3" :showBorder="false" :square="false">
|
||||
<uni-grid-item class="decorate-box" @click="openPopup(item)" >
|
||||
|
||||
</uni-grid-item>
|
||||
</uni-grid> -->
|
||||
<view class="color-9" v-else style="text-align: center;font-size: 24rpx;">
|
||||
暂无数据
|
||||
</view>
|
||||
</scroll-view>
|
||||
<uni-popup ref="popup" borderRadius="32rpx 32rpx 0 0" type="bottom" background-color="#fff">
|
||||
<view class="popup-view" v-if="decorateDetail">
|
||||
<view class="popup-view" v-if="decorateDetail.tab.type !== 12">
|
||||
<view class="decorate-image">
|
||||
<img :src="decorateDetail.base_image" alt="" />
|
||||
</view>
|
||||
@@ -59,8 +55,7 @@
|
||||
商品价格
|
||||
</view>
|
||||
<view class="flex-line">
|
||||
{{payData.price}} <img class="icon-goin ml-6" src="@/static/image/goin.png"
|
||||
alt="" />
|
||||
{{payData.price}} <img class="icon-goin ml-6" src="@/static/image/goin.png" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="decorateDetail.decorate && decorateDetail.decorate.price_list">
|
||||
@@ -85,9 +80,6 @@
|
||||
<view>
|
||||
{{menu.day}}天
|
||||
</view>
|
||||
<view class="sale" v-if="menu.discount">
|
||||
7折优惠
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -99,21 +91,82 @@
|
||||
<view class="color-6 ml-20">
|
||||
{{decorateDetail.user_info.user_coin}}
|
||||
</view>
|
||||
<view class="chongzhi-text ml-20" @click="RechargeCoin">
|
||||
<view class="chongzhi-text ml-20" v-if="isShow" @click="RechargeCoin">
|
||||
去充值
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-footer">
|
||||
<view class="pay-button" @click="toPay">
|
||||
|
||||
确认支付
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup-view" v-else>
|
||||
<view class="decorate-image" style="width: 280rpx;height: 300rpx;">
|
||||
<img :src="decorateDetail.base_image" alt="" />
|
||||
</view>
|
||||
<view class="decorate-title w-fill color-3 font-28">
|
||||
{{decorateDetail.title}}
|
||||
</view>
|
||||
<view class="decorate-info">
|
||||
<view class="info-line">
|
||||
<view class="line-lable">
|
||||
商品名称
|
||||
</view>
|
||||
<view class="">
|
||||
{{decorateDetail.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-line">
|
||||
<view class="line-lable">
|
||||
商品单价
|
||||
</view>
|
||||
<view class="flex-line">
|
||||
{{decorateDetail.decorate.price}} <img class="icon-goin ml-6"
|
||||
src="@/static/image/goin.png" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-line">
|
||||
<view class="line-lable">
|
||||
购买次数
|
||||
</view>
|
||||
<view class="flex-line">
|
||||
<uni-number-box v-model="payData.number" @change="changeValue" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-line">
|
||||
<view class="line-lable">
|
||||
商品总价
|
||||
</view>
|
||||
<view class="flex-line">
|
||||
{{payData.allPrice}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-line user-account font-28">
|
||||
<view class="">
|
||||
<img class="icon-goin ml-6" src="@/static/image/goin.png" alt="" />
|
||||
</view>
|
||||
<view class="color-6 ml-20">
|
||||
{{decorateDetail.user_info.user_coin}}
|
||||
</view>
|
||||
<view class="chongzhi-text ml-20" v-if="isShow" @click="RechargeCoin">
|
||||
去充值
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-footer">
|
||||
<view class="pay-button" @click="toPay">
|
||||
确认支付
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 请求出错啦 -->
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -133,21 +186,29 @@
|
||||
indicatorLeft: 5,
|
||||
decorateDetail: null,
|
||||
currentMenuIndex: 0,
|
||||
payData: null
|
||||
payData: null,
|
||||
isShow: true,
|
||||
msgType:"success",
|
||||
messageText:"操作成功"
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.errorPage = true
|
||||
const {
|
||||
id
|
||||
id,
|
||||
is_show
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
if (is_show) {
|
||||
const flag = Number(is_show)
|
||||
this.isShow = flag === 1 ? true : false
|
||||
}
|
||||
if (uni.getStorageSync('token')) this.gettabs()
|
||||
},
|
||||
methods: {
|
||||
async gettabs() {
|
||||
http.get('/api/Decorate/get_type_list', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
have_hot: 0
|
||||
}).then(response => {
|
||||
const {
|
||||
@@ -163,15 +224,6 @@
|
||||
value: ele.name
|
||||
}
|
||||
})
|
||||
// Object.keys(data).forEach(ele => {
|
||||
// // console.log(ele)
|
||||
// const item = {
|
||||
// type: +ele,
|
||||
// value: data[ele]
|
||||
// }
|
||||
// list.push(item)
|
||||
// })
|
||||
// console.log(list)
|
||||
}
|
||||
// this.tabs = list
|
||||
this.errorPage = false
|
||||
@@ -184,17 +236,10 @@
|
||||
});
|
||||
},
|
||||
async getDecorate(type) {
|
||||
// let listData = []
|
||||
http.get('/api/Decorate/get_decorate_list', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
type
|
||||
}).then(response => {
|
||||
// console.log(response.data)
|
||||
// for (let i = 1; i <= 40; i++) {
|
||||
// listData.push(...response.data)
|
||||
// }
|
||||
// this.listData =listData
|
||||
// console.log(listData)
|
||||
const {
|
||||
data,
|
||||
code
|
||||
@@ -207,8 +252,10 @@
|
||||
});
|
||||
},
|
||||
async getDecorateDetail(id, detail) {
|
||||
// console.log(id, detail)
|
||||
this.payData = {}
|
||||
http.get('/api/Decorate/get_decorate_detail', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
did: id
|
||||
}).then(response => {
|
||||
const {
|
||||
@@ -217,14 +264,27 @@
|
||||
} = response
|
||||
this.decorateDetail = code ? {
|
||||
...detail,
|
||||
...data
|
||||
...data,
|
||||
tab: this.tabs[this.currentIndex]
|
||||
} : null
|
||||
this.currentMenuIndex = 0
|
||||
console.log(this.decorateDetail)
|
||||
this.payData = this.decorateDetail.decorate.price_list[this.currentMenuIndex]
|
||||
if (this.decorateDetail.tab.type !== 12) {
|
||||
this.payData = this.decorateDetail.decorate.price_list[this.currentMenuIndex]
|
||||
} else {
|
||||
this.payData.price = this.decorateDetail.decorate.price
|
||||
this.payData.number = 1
|
||||
this.payData.allPrice = this.decorateDetail.decorate.price * 1
|
||||
}
|
||||
// console.log(this.decorateDetail)
|
||||
this.$refs.popup.open('bottom')
|
||||
|
||||
}).catch(error => {});
|
||||
},
|
||||
changeValue(value) {
|
||||
// console.log(value)
|
||||
// console.log(this.payData)
|
||||
this.payData.allPrice = value * this.payData.price
|
||||
},
|
||||
changePayData(data, index) {
|
||||
this.payData = data
|
||||
this.currentMenuIndex = index
|
||||
@@ -252,38 +312,52 @@
|
||||
},
|
||||
// 去支付
|
||||
toPay() {
|
||||
// console.log(this.payData,this.decorateDetail)
|
||||
if (this.payData.price > this.decorateDetail.user_info.user_coin) {
|
||||
// 余额不足
|
||||
uni.showToast({
|
||||
title: '余额不足,请先充值',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 500
|
||||
});
|
||||
return
|
||||
if (this.decorateDetail.tab.type !== 12) {
|
||||
if (this.payData.price > this.decorateDetail.user_info.user_coin) {
|
||||
// 余额不足
|
||||
this.messageText = "余额不足"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
return
|
||||
}
|
||||
|
||||
} else {
|
||||
// 降身卡
|
||||
if (this.payData.allPrice > this.decorateDetail.user_info.user_coin) {
|
||||
// 余额不足
|
||||
this.messageText = "余额不足"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
return
|
||||
}
|
||||
}
|
||||
// 余额足 调购买装扮接口
|
||||
this.payDecorate()
|
||||
this.payDecorate(this.decorateDetail.tab.type)
|
||||
},
|
||||
payDecorate() {
|
||||
payDecorate(type) {
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
})
|
||||
http.post('/api/Decorate/pay_decorate', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
did: this.decorateDetail.did,
|
||||
day: this.payData.day
|
||||
day: type !== 12 ? this.payData.day : 0,
|
||||
num: type !== 12 ? 0 : this.payData.number
|
||||
}).then(response => {
|
||||
uni.showToast({
|
||||
title: '购买成功',
|
||||
icon: 'success',
|
||||
mask: true,
|
||||
duration: 1000
|
||||
});
|
||||
uni.hideLoading()
|
||||
this.closePopup()
|
||||
if (response.code) {
|
||||
this.messageText = "购买成功"
|
||||
this.msgType = 'success'
|
||||
this.$refs.message.open()
|
||||
uni.hideLoading()
|
||||
this.closePopup()
|
||||
} else {
|
||||
this.messageText = response.msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
|
||||
}).catch(error => {});
|
||||
|
||||
},
|
||||
// 点击去充值
|
||||
RechargeCoin() {
|
||||
@@ -341,6 +415,7 @@
|
||||
|
||||
img {
|
||||
width: 120rpx;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,14 +444,18 @@
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
margin: 12rpx 0;
|
||||
|
||||
// background-color: #5B5B5B;
|
||||
img {
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-view {
|
||||
width: 686rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
background-image: url('@/static/image/swiper.png');
|
||||
background-image: url('@/static/image/swipers.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin-bottom: 32rpx;
|
||||
@@ -389,7 +468,7 @@
|
||||
}
|
||||
|
||||
.popup-view {
|
||||
height: 60vh;
|
||||
height: 63vh;
|
||||
padding: 32rpx;
|
||||
width: calc(100vw - 64rpx);
|
||||
display: inline-flex;
|
||||
@@ -443,11 +522,12 @@
|
||||
}
|
||||
|
||||
.active-menubox {
|
||||
border: 0;
|
||||
background-image: url('@/static/image/menuBg.png');
|
||||
background: linear-gradient(180deg, #FBFBFF 0%, #F7EBFF 100%);
|
||||
border: 2rpx solid;
|
||||
border-radius: 12rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #0DFFB9;
|
||||
color: var(--primary-color);
|
||||
|
||||
}
|
||||
|
||||
@@ -484,7 +564,7 @@
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #0DFFB9;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,9 +586,16 @@
|
||||
|
||||
width: 376rpx;
|
||||
height: 84rpx;
|
||||
background-image: url('@/static/image/propMall/pay.png');
|
||||
// background-image: url('@/static/image/propMall/pay.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
font-size: var(--font-button-size-p);
|
||||
border-radius: 106rpx;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
70
pages/union/agreement.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'公会协议'">
|
||||
</navBar>
|
||||
<view class="dec-view" v-if="detailData">
|
||||
<web-view :src="detailData.agreement"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
components: {
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseBgUrl: config.new_unionUrl || '',
|
||||
unionBgUrl: config.unicon_url || '',
|
||||
statusBarHeight: 0,
|
||||
ThemeData: null,
|
||||
detailData:null
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
h
|
||||
} = options
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
if(uni.getStorageSync('token'))this.getInfo()
|
||||
},
|
||||
methods:{
|
||||
async getInfo() {
|
||||
http.get('/api/Guild/my_guild', {
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
// console.log(data)
|
||||
this.detailData = code ? data : false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.dec-view {
|
||||
min-height: calc(99vh - 160rpx);
|
||||
position: relative;
|
||||
border-radius: 16rpx;
|
||||
margin: 24rpx;
|
||||
// background-color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,670 +0,0 @@
|
||||
<template>
|
||||
<view class="view-page" >
|
||||
<headerHeight />
|
||||
<navBar :navTitle="'公会详情'">
|
||||
<template #rightView>
|
||||
<view class="icon-right flex-line" @click="exit"
|
||||
v-if="detailData && detailData.is_join && detailData.is_leader === 0">
|
||||
<img :src="logout" alt="" />
|
||||
</view>
|
||||
</template>
|
||||
</navBar>
|
||||
<view class="content" v-if="detailData">
|
||||
<view class="union-info">
|
||||
<view class="left-view">
|
||||
<view class="head-portrait">
|
||||
<img :src="detailData.cover || logo" alt="" />
|
||||
</view>
|
||||
<view class="info-detail">
|
||||
<view class="union-title">
|
||||
{{detailData.guild_name}}
|
||||
</view>
|
||||
<view class="union-id">
|
||||
ID:{{detailData.guild_special_id}}
|
||||
</view>
|
||||
<view class="union-date">
|
||||
{{detailData.createtime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="like-box">
|
||||
<uni-icons type="heart" size="20"></uni-icons>
|
||||
<span class="ml-6">
|
||||
{{detailData.total_transaction}}
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 公会按钮 是会长可以看公会成员 不是不能看 -->
|
||||
<view class="icon-wrap">
|
||||
<img class="icon-box" @click.stop="viewDetails(0)" src="@/static/image/union/ghfj.png" alt="" />
|
||||
<img class="icon-box" @click.stop="viewDetails(1)" src="@/static/image/union/ghcy.png" alt="" />
|
||||
<img class="icon-box" v-if="detailData.is_leader" @click.stop="viewDetails(2)"
|
||||
src="@/static/image/union/ghbt.png" alt="" />
|
||||
<img class="icon-box" v-if="detailData.is_join" @click.stop="viewDetails(3)"
|
||||
src="@/static/image/union/qlsz.png" alt="" />
|
||||
</view>
|
||||
<!-- 公会会长信息 -->
|
||||
<view class="union-user">
|
||||
<view class="user-title">
|
||||
公会会长
|
||||
</view>
|
||||
<view class="user-info" @click="jumpHomePage(detailData)">
|
||||
<view class="flex-line">
|
||||
<view class="head-portrait">
|
||||
<img :src="detailData.user_data.avatar" alt="" />
|
||||
</view>
|
||||
<view class="info-view">
|
||||
<view class="">
|
||||
{{detailData.user_data.nickname}}
|
||||
</view>
|
||||
<view class="iconTag-view"
|
||||
v-if="detailData.user_data.icon || detailData.user_data.icon.length">
|
||||
<view class="icon-tag" v-for="icon in detailData.user_data.icon" :key="icon">
|
||||
<img :src="icon" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<uni-icons type="right" size="20"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 公会介绍 -->
|
||||
<view class="union-dec">
|
||||
<view class="user-title">
|
||||
公会介绍
|
||||
</view>
|
||||
<view class="user-dec">
|
||||
{{detailData.intro || '暂无数据'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer" v-if="!detailData.is_join">
|
||||
<view class="confirm-button" @click="applyToJoin">
|
||||
<view class="button">
|
||||
{{buttonText}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer" v-if="detailData.is_leader">
|
||||
<view class="confirm-button" @click="dissolveUnion">
|
||||
<view class="button">
|
||||
{{buttonText}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
<uni-popup ref="popup" type="center">
|
||||
<view class="popup_view">
|
||||
<view class="color-3 font-32 popup_title">
|
||||
温馨提示
|
||||
</view>
|
||||
<view class="color-3 font-24 messageContent">
|
||||
{{messageContent}}
|
||||
</view>
|
||||
<view class="popup_button flex-line">
|
||||
<view class="close_button flex-line" @click="closePopup">
|
||||
取消
|
||||
</view>
|
||||
<view class="confirm-button flex-line" @click="confirmPopup">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logout from '@/static/image/union/logout.png'
|
||||
import logo from '@/static/image/logo.png';
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailData: null,
|
||||
logo,
|
||||
logout,
|
||||
buttonStatus: null,
|
||||
buttonText: '申请加入公会',
|
||||
// 弹出窗状态 null 不展示 0 申请退出 1申请加入公会 2 付费退出 3实名认证
|
||||
popupStstus: null,
|
||||
messageText: "",
|
||||
messageContent: '',
|
||||
msgType: "success"
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
if (id) {
|
||||
this.getDetail(id)
|
||||
this.getUserInfo()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息 拿实名信息
|
||||
async getUserInfo() {
|
||||
http.get('/api/User/get_user_info', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
this.isAuth = code ? data.auth : 0
|
||||
})
|
||||
},
|
||||
// 获取公会信息
|
||||
async getDetail(Id) {
|
||||
uni.showLoading({
|
||||
mask:true,
|
||||
title:'加载中'
|
||||
})
|
||||
http.get('/api/Guild/guild_detail', {
|
||||
id: Id,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
uni.hideLoading()
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
this.detailData = code ? data : null
|
||||
if(data) {
|
||||
this.buttonText = !data.is_leader ? data.is_join ? '退出公会' : '申请加入公会' : '解散公会'
|
||||
this.buttonStatus = !data.is_leader ? data.is_join ? 0 : 1 : 2
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击房间
|
||||
viewDetails(index) {
|
||||
// 0 公会房间 1 公会成员 2公会补贴 3 群聊设置
|
||||
if (index) {
|
||||
if (index === 1) {
|
||||
// 公会成员
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/unionMembers?id=${this.detailData.id?? null}&leader=${this.detailData.is_leader || 0}`
|
||||
});
|
||||
} else if (index === 2) {
|
||||
// 公会补贴
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/subsidy?id=${this.detailData.id?? null}&leader=${this.detailData.is_leader || 0}`
|
||||
});
|
||||
} else {
|
||||
// 群聊抛出
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
const ParmData = {
|
||||
group_id: this.detailData.group_id,
|
||||
cover: this.detailData.cover,
|
||||
guild_name: this.detailData.guild_name
|
||||
}
|
||||
if (platform === 'ios') {
|
||||
// 通过 messageHandlers 调用 iOS 原生方法
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'enterGroupChat',
|
||||
'data': ParmData
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
// 调用 Android 原生方法
|
||||
window.Android.enterGroupChat(this.detailData.group_id,this.detailData.cover,this.detailData.guild_name);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 房间
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/roomAndflow?id=${this.detailData.id?? null}&leader=${this.detailData.is_leader || 0}`
|
||||
});
|
||||
}
|
||||
},
|
||||
//申请加入公会
|
||||
applyToJoin() {
|
||||
if (this.buttonStatus === 1) {
|
||||
if (this.isAuth) {
|
||||
this.popupStstus = 1
|
||||
this.messageContent = "是否选择加入当前公会"
|
||||
this.$refs.popup.open('center')
|
||||
} else {
|
||||
this.popupStstus = 3
|
||||
this.messageContent = "当前尚未实名认证,是否跳转到实名认证页面?"
|
||||
this.$refs.popup.open('center')
|
||||
}
|
||||
}
|
||||
},
|
||||
// 申请加入公会
|
||||
async joinUnionize() {
|
||||
http.post('/api/Guild/join_guild', {
|
||||
guild_id: this.detailData.id,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
if (code) {
|
||||
this.messageText = `加入成功`
|
||||
this.$refs.message.open()
|
||||
this.msgType = 'success'
|
||||
this.getDetail(this.detailData.id)
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
this.closePopup()
|
||||
})
|
||||
},
|
||||
// 退出公会
|
||||
exit() {
|
||||
uni.showActionSheet({
|
||||
itemList: ["申请退出", "付费退出"],
|
||||
success: (res) => {
|
||||
if (res.tapIndex === 0) {
|
||||
this.applyToWithdraw();
|
||||
} else if (res.tapIndex === 1) {
|
||||
this.paidWithdrawal();
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error("用户取消选择:", err);
|
||||
},
|
||||
});
|
||||
},
|
||||
// 申请退出
|
||||
applyToWithdraw() {
|
||||
this.popupStstus = 0
|
||||
this.messageContent = "亲爱的会员,会长将在3天内审核,若超时未通过,您将自动退出并可加入其他公会;若通过,则30天内无法加入其他公会,是否还需要申请退出?"
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
// 付费退出
|
||||
paidWithdrawal() {
|
||||
this.popupStstus = 2
|
||||
this.messageContent = `亲爱的会员,支付${this.detailData.quit_guild_gold || 0}金币,即可及时退出公会!是否需要付费退出?`
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
// 解散公会
|
||||
dissolveUnion() {
|
||||
this.popupStstus = 4
|
||||
this.messageContent = `亲爱的会长,您当前操作将解散公会,是否解散?`
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
closePopup() {
|
||||
this.popupStstus = null
|
||||
this.messageContent = ""
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
confirmPopup() {
|
||||
if (this.popupStstus !== null) {
|
||||
if (this.popupStstus === 0) {
|
||||
this.exitUnionize(1)
|
||||
} else if (this.popupStstus === 1) {
|
||||
this.joinUnionize()
|
||||
} else if (this.popupStstus === 2) {
|
||||
// 付费退出
|
||||
this.exitUnionize(2)
|
||||
} else if (this.popupStstus === 3) {
|
||||
// 实名认证页面
|
||||
this.authConfirm()
|
||||
} else if (this.popupStstus === 4) {
|
||||
// 解散公会
|
||||
if (this.detailData.is_leader) {
|
||||
this.unionDissolve()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
authConfirm() {
|
||||
// 去实名认证页面
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'enterAuthent'
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.enterAuthent();
|
||||
}
|
||||
},
|
||||
// 跳转公会长个人页面
|
||||
jumpHomePage(data){
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'jumpWebPage',
|
||||
'data': {
|
||||
userId: data.user_id
|
||||
}
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.jumpWebPage(data.user_id);
|
||||
}
|
||||
},
|
||||
// 会长解散公会
|
||||
async unionDissolve() {
|
||||
http.post('/api/Guild/diss_guild', {
|
||||
guild_id: this.detailData.id,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
if (code === 1) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `操作成功,将返回上一页!`
|
||||
this.$refs.message.open()
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
this.closePopup()
|
||||
})
|
||||
},
|
||||
// 申请退出公会接口
|
||||
async exitUnionize(type) {
|
||||
http.post('/api/Guild/quit_guild', {
|
||||
guild_id: this.detailData.id,
|
||||
type: type,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
if (code === 1) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `${type === 1 ? '退出申请已提交,请等待审核' : '付费退出成功'}`
|
||||
this.$refs.message.open()
|
||||
this.getDetail(this.detailData.id)
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
this.closePopup()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.view-page {
|
||||
// padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
min-height: 100vh;
|
||||
|
||||
.content {
|
||||
padding: 0 32rpx;
|
||||
flex: 1;
|
||||
/* 关键:撑满剩余空间 */
|
||||
overflow: auto;
|
||||
/* 允许内容滚动 */
|
||||
}
|
||||
|
||||
.icon-right {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.popup_view {
|
||||
width: 550rpx;
|
||||
// height: 40vh;
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.popup_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.messageContent {
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.popup_button {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
|
||||
.close_button,
|
||||
.confirm-button {
|
||||
width: 200rpx;
|
||||
height: 84rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 106rpx;
|
||||
color: #999999;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background: #0DFFB9;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer {
|
||||
// background: #f0f0f0;
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
/* 适配iPhoneX等刘海屏 */
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 确保容器占满屏幕 */
|
||||
.union-info {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
|
||||
/* 头像 */
|
||||
.head-portrait {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
background-color: aquamarine;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.left-view {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
|
||||
.info-detail {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
margin-left: 24rpx;
|
||||
|
||||
.union-title {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.union-id {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.union-date {
|
||||
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.like-box {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
padding: 6rpx 24rpx;
|
||||
background: #2AFEC0;
|
||||
border-radius: 35rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin: 8rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-wrap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 25px;
|
||||
margin: 24rpx 0;
|
||||
|
||||
.icon-box {
|
||||
width: 48%;
|
||||
height: 30%;
|
||||
flex: 1;
|
||||
max-width: calc(50% - 12.5px);
|
||||
border-radius: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.union-user,
|
||||
.union-dec {
|
||||
padding: 24rpx;
|
||||
height: 220rpx;
|
||||
background: #fff;
|
||||
border-radius: 22rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.user-title {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
|
||||
/* 头像 */
|
||||
.head-portrait {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
background-color: aquamarine;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.info-view {
|
||||
margin-left: 24rpx;
|
||||
|
||||
.iconTag-view {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
padding: 12rpx 0;
|
||||
|
||||
.icon-tag {
|
||||
width: 75rpx;
|
||||
height: 30rpx;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.union-dec {
|
||||
min-height: 220rpx;
|
||||
|
||||
.user-dec {
|
||||
text-indent: 2em;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
padding: 0 50rpx;
|
||||
|
||||
.button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
border-radius: 106rpx;
|
||||
line-height: 84rpx;
|
||||
background-color: #0DFFB9;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,145 +1,157 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`退出审核`">
|
||||
</navBar>
|
||||
<view class="content">
|
||||
<view class="box-line flex-line w-fill" v-for="(ele,index) in dataList" >
|
||||
<view class="box-line flex-line w-fill" v-for="(ele, index) in dataList">
|
||||
<view class="flex-line">
|
||||
<img style="width: 100rpx;height: 100rpx;border-radius: 50%;" :src="ele.avatar || logo" alt="" />
|
||||
<view class="ml-20">
|
||||
<view class="color-3 font-32 font-w500">
|
||||
{{ele.nickname}}
|
||||
{{ ele.nickname }}
|
||||
</view>
|
||||
<view class="color-6 font-24">
|
||||
ID: {{ele.user_code}}
|
||||
ID: {{ ele.user_code }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view :class="ele.status === 1 ? 'success-text' : 'error-text'" v-if="ele.status">
|
||||
{{ele.status === 1 ? '已同意' : '已拒绝'}}
|
||||
{{ ele.status === 1 ? '已同意' : '已拒绝' }}
|
||||
</view>
|
||||
<view class="flex-line" v-else>
|
||||
<view class="no-button" @click="RefuseOrAgreeData(ele,2)">
|
||||
<view class="no-button" @click="RefuseOrAgreeData(ele, 2)">
|
||||
拒绝
|
||||
</view>
|
||||
<view class="agree-button" @click="RefuseOrAgreeData(ele,1)">
|
||||
<view class="agree-button" @click="RefuseOrAgreeData(ele, 1)">
|
||||
同意
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png';
|
||||
import navBar from '@/component/nav.vue';
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logo,
|
||||
guildId: null,
|
||||
msgType:"",
|
||||
messageText:"",
|
||||
dataList: [],
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
},
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import config from '@/until/config.js';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png';
|
||||
import navBar from '@/component/nav.vue';
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logo,
|
||||
baseBgUrl:config.PRIMARY_BGURL,
|
||||
guildId: null,
|
||||
msgType: "",
|
||||
messageText: "",
|
||||
dataList: [],
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') || ''
|
||||
},
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async RefuseOrAgreeData(ele, type) {
|
||||
const {
|
||||
code,
|
||||
data,
|
||||
msg
|
||||
} = await http.post('/api/Guild/quit_apply_audit', {
|
||||
token: uni.getStorageSync('token') || '',
|
||||
apply_id: ele.id,
|
||||
type
|
||||
})
|
||||
if (code === 1) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `操作成功`
|
||||
this.$refs.message.open()
|
||||
this.getList()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
async getList() {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getList()
|
||||
},
|
||||
methods: {
|
||||
async RefuseOrAgreeData(ele,type){
|
||||
const {
|
||||
code,
|
||||
data,
|
||||
msg
|
||||
} = await http.post('/api/Guild/quit_apply_audit', {
|
||||
token:uni.getStorageSync('token') ?? '',
|
||||
apply_id:ele.id,
|
||||
type
|
||||
})
|
||||
if(code === 1) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `操作成功`
|
||||
this.$refs.message.open()
|
||||
this.getList()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/quit_apply_list', this.searchParams)
|
||||
if (code) {
|
||||
this.dataList = data.list
|
||||
}
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/quit_apply_list', this.searchParams)
|
||||
if (code) {
|
||||
this.dataList = data.list
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
width: calc(100vw - 48rpx);
|
||||
height: calc(100vh - 67px);
|
||||
.box-line{
|
||||
justify-content: space-between;
|
||||
margin-top: 24rpx;
|
||||
.success-text{
|
||||
color: #0DFFB9;
|
||||
}
|
||||
.error-text{
|
||||
color: #FF8ACC;
|
||||
}
|
||||
.agree-button,.no-button{
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
background: #0DFFB9;
|
||||
border-radius: 68rpx;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
.no-button{
|
||||
background-color: #333333;
|
||||
color:#fff;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
width: calc(100vw - 48rpx);
|
||||
height: calc(100vh - 67px);
|
||||
|
||||
.box-line {
|
||||
justify-content: space-between;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.success-text {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.error-text {
|
||||
color: #FC8871;
|
||||
}
|
||||
|
||||
.agree-button,
|
||||
.no-button {
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
border-radius: 68rpx;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
|
||||
.no-button {
|
||||
background-color: #333333;
|
||||
color: #fff;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`历史记录`">
|
||||
</navBar>
|
||||
@@ -10,82 +10,88 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import tableView from '@/component/newTable.vue'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar,
|
||||
tableView
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guildId: null,
|
||||
dataList: [],
|
||||
pageConfig:{
|
||||
currentPage:1,
|
||||
pageSize:10
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import config from '@/until/config.js';
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import tableView from '@/component/newTable.vue'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar,
|
||||
tableView
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guildId: null,
|
||||
aseBgUrl: config.PRIMARY_BGURL,
|
||||
dataList: [],
|
||||
pageConfig: {
|
||||
currentPage: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') || ''
|
||||
},
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const {
|
||||
id
|
||||
} = options
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/guild_subsidy_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/guild_subsidy_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
width: calc(100vw - 48rpx);
|
||||
height: calc(100vh - 67px);
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
}
|
||||
.content {
|
||||
padding: 0 24rpx;
|
||||
width: calc(100vw - 48rpx);
|
||||
height: calc(100vh - 67px);
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
530
pages/union/list.vue
Normal file
@@ -0,0 +1,530 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'公会中心'">
|
||||
<template #rightView>
|
||||
<view class="icon-right flex-line" @click="exit" v-if="isHasUnicon && !isLeader">
|
||||
<img :src="logout" alt="" />
|
||||
</view>
|
||||
</template>
|
||||
</navBar>
|
||||
<view class="content">
|
||||
<view class="flex-input">
|
||||
<uni-easyinput prefixIcon="search" clearSize="18" v-model="searchValue"
|
||||
placeholder="请输入公会ID/昵称">
|
||||
</uni-easyinput>
|
||||
<view class="search-button" @click="search">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="hotspot-view">
|
||||
<view class="hotspot-box" v-for="data in listData" :key="data.id">
|
||||
<view class="flex-line">
|
||||
<view class="head-portrait">
|
||||
<img :src="data.cover || logo" alt="" />
|
||||
</view>
|
||||
<view class="info-box ml-20">
|
||||
<view class="flex-line">
|
||||
<span class="truncate">{{data.guild_name}}</span><span
|
||||
class="id-title">ID:{{data.guild_special_id}}</span>
|
||||
<img @click.stop="copyData(data.guild_special_id)" class="icon-box"
|
||||
src="@/static/image/union/copy.png" alt="" />
|
||||
</view>
|
||||
<view class="subhead-title truncate">
|
||||
{{data.intro}}
|
||||
</view>
|
||||
<view class="chairman">
|
||||
<view class="chairman-portrait">
|
||||
<img :src="data.user_avatar" alt="暂无头像" />
|
||||
</view>
|
||||
<view class="chairman-name">
|
||||
{{data.user_name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-button">
|
||||
<view class="apply-button" @click="applyUnion(data)">
|
||||
申请
|
||||
</view>
|
||||
<view class="online-view">
|
||||
<view v-show="data.guild_user_list.length">
|
||||
<view class="avatars-container">
|
||||
<view class="avatar" v-for="ele in data.guild_user_list.slice(0,3)" :key="ele.id">
|
||||
<img :src="ele.avatar" alt="" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="online-people">
|
||||
{{data.num}}人
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹窗 -->
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
<uni-popup ref="popup" type="center">
|
||||
<view class="popup_view">
|
||||
<view class="color-3 font-32 popup_title">
|
||||
温馨提示
|
||||
</view>
|
||||
<view class="color-3 font-24 messageContent">
|
||||
{{ messageContent }}
|
||||
</view>
|
||||
<view class="popup_button flex-line">
|
||||
<view class="close_button flex-line" @click="closePopup">
|
||||
取消
|
||||
</view>
|
||||
<view class="confirm-button flex-line" @click="confirmPopup">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png';
|
||||
import config from '@/until/config.js';
|
||||
import logout from '@/static/image/union/logout.png'
|
||||
export default {
|
||||
components: {
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchValue: '',
|
||||
noUnionImage: config.not_unionUrl,
|
||||
baseBgUrl: config.new_unionUrl,
|
||||
unionBgUrl: config.unicon_url,
|
||||
logo,
|
||||
logout,
|
||||
loading: false,
|
||||
noMore: false,
|
||||
isMerber: null,
|
||||
listData: [],
|
||||
UnionByUser: null,
|
||||
statusBarHeight: 0,
|
||||
ThemeData: null,
|
||||
// 是否實名
|
||||
isAuth: false,
|
||||
// 是否为公会长,
|
||||
isLeader: false,
|
||||
// 是否有公会
|
||||
isHasUnicon: false,
|
||||
messageContent: '',
|
||||
popupStstus: 0,
|
||||
messageText: "",
|
||||
msgType: "success",
|
||||
detailData:null
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (uni.getStorageSync('token')) {
|
||||
this.getUserInfo()
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
if (uni.getStorageSync('BarHeight')) {
|
||||
this.statusBarHeight = uni.getStorageSync('BarHeight')
|
||||
}
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息 拿实名信息
|
||||
async getUserInfo() {
|
||||
http.get('/api/User/get_user_info', {
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
this.isAuth = code ? data.auth : 0
|
||||
})
|
||||
},
|
||||
async getUnionList(name) {
|
||||
this.loading = true
|
||||
http.get('/api/Guild/guild_list', {
|
||||
page: 1,
|
||||
limit: 1000,
|
||||
search_id: name,
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
if (code) {
|
||||
this.loading = false
|
||||
this.listData = data.list || []
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
search() {
|
||||
if (this.searchValue) {
|
||||
// 搜索
|
||||
this.getUnionList(this.searchValue)
|
||||
}
|
||||
},
|
||||
// 申請加入工會
|
||||
applyUnion(data) {
|
||||
if (this.isAuth) {
|
||||
this.detailData = data
|
||||
this.popupStstus = 1
|
||||
this.messageContent = "是否选择加入当前公会"
|
||||
this.$refs.popup.open('center')
|
||||
} else {
|
||||
this.popupStstus = 3
|
||||
this.messageContent = "当前尚未实名认证,是否跳转到实名认证页面?"
|
||||
this.$refs.popup.open('center')
|
||||
}
|
||||
},
|
||||
closePopup() {
|
||||
this.popupStstus = null
|
||||
this.detailData = null
|
||||
this.messageContent = ""
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
confirmPopup() {
|
||||
if (this.popupStstus !== null) {
|
||||
if (this.popupStstus === 1) {
|
||||
this.joinUnionize()
|
||||
} else if (this.popupStstus === 3) {
|
||||
// 实名认证页面
|
||||
this.authConfirm()
|
||||
}
|
||||
}
|
||||
},
|
||||
authConfirm() {
|
||||
// 去实名认证页面
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'enterAuthent'
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.enterAuthent();
|
||||
}
|
||||
this.closePopup()
|
||||
},
|
||||
// 申请加入公会
|
||||
async joinUnionize() {
|
||||
http.post('/api/Guild/join_guild', {
|
||||
guild_id: this.detailData.id,
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
if (code) {
|
||||
this.messageText = `加入成功`
|
||||
this.$refs.message.open()
|
||||
this.msgType = 'success'
|
||||
uni.$emit('refreshList');
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
this.closePopup()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.view-page {
|
||||
// padding: 32rpx;
|
||||
// min-height: 100vh;
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.popup_view {
|
||||
width: 550rpx;
|
||||
// height: 40vh;
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.popup_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.messageContent {
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.popup_button {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
|
||||
.close_button,
|
||||
.confirm-button {
|
||||
width: 200rpx;
|
||||
height: 84rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 106rpx;
|
||||
color: #999999;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
// /* 搜索框 */
|
||||
.flex-input {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
|
||||
.search-button {
|
||||
padding: 0 0 0 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 热门公会 */
|
||||
.hotspot-view {
|
||||
margin-top: 28rpx;
|
||||
|
||||
.hotspot-box {
|
||||
width: calc(100% - 48rpx);
|
||||
padding: 24rpx;
|
||||
position: relative;
|
||||
// min-height: calc(268rpx - 48rpx);
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
/* */
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
|
||||
/* 头像 */
|
||||
.head-portrait {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 中间信息 */
|
||||
.info-box {
|
||||
padding: 0 24rpx;
|
||||
// max-width: 40%;
|
||||
width: 55%;
|
||||
|
||||
.icon-box {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
|
||||
/* 会长样式 */
|
||||
.chairman {
|
||||
min-width: 106rpx;
|
||||
height: 36rpx;
|
||||
padding: 0 12rpx;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
text-align: right;
|
||||
background: var(--subss-color);
|
||||
border-radius: 116rpx 116rpx 116rpx 116rpx;
|
||||
border: 2rpx solid var(--subss-color);
|
||||
position: relative;
|
||||
left: 10rpx;
|
||||
margin: 32rpx 0;
|
||||
display: inline-flex;
|
||||
|
||||
.truncate-three {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.chairman-portrait {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
position: absolute;
|
||||
top: -10rpx;
|
||||
left: -20rpx;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.chairman-name {
|
||||
margin-left: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
.id-title {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.subhead-title {
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin: 8rpx 0;
|
||||
}
|
||||
|
||||
.like-box {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
padding: 6rpx 24rpx;
|
||||
background: #2AFEC0;
|
||||
border-radius: 35rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin: 8rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 右边按钮 */
|
||||
.right-button {
|
||||
text-align: right;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
bottom: 50rpx;
|
||||
|
||||
.apply-button {
|
||||
display: inline-block;
|
||||
background: var(--primary-color);
|
||||
font-size: var(--font-button-size);
|
||||
color: var(--font-button-color);
|
||||
border-radius: 68rpx;
|
||||
text-align: center;
|
||||
|
||||
padding: 4rpx 30rpx;
|
||||
}
|
||||
|
||||
.online-view {
|
||||
|
||||
.avatar {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
border: 2px solid white;
|
||||
/* 白色边框 */
|
||||
background-size: cover;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
||||
transition: all 0.4s ease;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 头像位置 */
|
||||
.avatar:nth-child(1) {
|
||||
left: calc(50% - 60rpx);
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.avatar:nth-child(2) {
|
||||
left: calc(50% - 35rpx);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.avatar:nth-child(3) {
|
||||
left: calc(50% - 10rpx);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* 悬停效果 */
|
||||
.avatar:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
// display: inline-block;
|
||||
margin-top: 24rpx;
|
||||
padding: 12rpx 8rpx;
|
||||
text-align: right;
|
||||
width: 160rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
// background: #333333;
|
||||
border-radius: 92rpx 92rpx 92rpx 92rpx;
|
||||
position: relative;
|
||||
|
||||
.avatars-container {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
left: 40%;
|
||||
}
|
||||
|
||||
.online-people {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 24rpx;
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
/* width: 6ch; */
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
word-break: keep-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :navTitle="'查看成员'" :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}">
|
||||
</navBar>
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view style="width: 84rpx;" v-if="item.role === 'Owner' || item.role === 'Admin'">
|
||||
<img v-if=" item.role === 'Owner'" src="@/static/image/union/ghz.png" alt="" />
|
||||
<img v-if="item.role === 'Admin'" src="@/static/image/union/gly.png" alt="" />
|
||||
<img v-if="item.role === 'Admin'" :src="$config.PRIMARY_BLYURL" alt="" />
|
||||
</view>
|
||||
<view class="ml-20 flex-line">
|
||||
<span>{{item.nickname}}</span>
|
||||
@@ -51,7 +51,8 @@
|
||||
},
|
||||
loading:false,
|
||||
noMore:true,
|
||||
dataList: []
|
||||
dataList: [],
|
||||
ThemeData:null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -62,6 +63,9 @@
|
||||
this.guildId = guildId
|
||||
this.statusBarHeight = h || uni.getStorageSync('BarHeight')
|
||||
if(this.guildId) this.getList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpHomePage(data){
|
||||
@@ -111,7 +115,7 @@
|
||||
data
|
||||
} = await http.get('/api/Guild/member_list', {
|
||||
guild_id: this.guildId,
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize
|
||||
})
|
||||
@@ -130,7 +134,6 @@
|
||||
return
|
||||
}
|
||||
}
|
||||
console.log(this.dataList)
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -141,7 +144,7 @@
|
||||
// padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
min-height: 100vh;
|
||||
|
||||
@@ -1,231 +0,0 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`${ leaderStatus ? '公会房间及流水' : '公会房间'}`">
|
||||
<template #rightView>
|
||||
</template>
|
||||
</navBar>
|
||||
<view class="content_view">
|
||||
<view>
|
||||
<uni-datetime-picker type="range" style="background-color: #f8f8f8;" start-placeholder="开始时间" :end="currentDate" end-placeholder="结束时间"
|
||||
v-model="dateSearch" rangeSeparator="至" @change="changeDate" />
|
||||
</view>
|
||||
<view class="header-view" v-if="flowDetail && leaderStatus">
|
||||
<view class="flex-line flow-view w-fill flex-spaceB">
|
||||
<view class="flowTitle color-3">
|
||||
总流水
|
||||
</view>
|
||||
</view>
|
||||
<view class="flowNumber">
|
||||
{{flowDetail.total_transaction}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="room-list flex-line" v-if="flowList && flowList.length">
|
||||
<view class="room-line flex-line flex-spaceB" v-for="data in flowList" :key="data.room_id" @click="jumpRoomPage(data)">
|
||||
<view class="flex-line">
|
||||
<view class="head-portrait">
|
||||
<img :src="data.room_cover || logo" alt="" />
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
<view class="color-3 font-32 font-w500">
|
||||
{{data.room_name}}
|
||||
</view>
|
||||
<view class="color-6 font-24">
|
||||
ID:{{data.room_number}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-line" v-if="leaderStatus">
|
||||
<view class="flowIcon">
|
||||
<img src="@/static/image/union/flowIcon.png" alt="" />
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
{{data.total_price || 0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-24">
|
||||
<uni-load-more :status="loading ? 'loading' : noMore ? 'noMore' : 'more'" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dateSearch: [new Date(),new Date()],
|
||||
currentDate: +new Date(),
|
||||
logo,
|
||||
loading: false,
|
||||
noMore: false,
|
||||
detailData: null,
|
||||
pageConfig: {
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
start_time:new Date(),
|
||||
end_time: new Date(),
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
page: 1,
|
||||
page_size: 20
|
||||
},
|
||||
leaderStatus: null,
|
||||
flowDetail: null,
|
||||
flowList:[]
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id,
|
||||
leader
|
||||
} = options
|
||||
|
||||
this.leaderStatus = +leader
|
||||
this.searchParams.start_time = this.formatDate(new Date())
|
||||
this.searchParams.end_time = this.formatDate(new Date())
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getFlow()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.getFlow()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始需+1
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
// 获取流水
|
||||
async getFlow() {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/guild_flow', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_size: this.pageConfig.pageSize,
|
||||
})
|
||||
if(code) {
|
||||
this.flowDetail = data
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.flowList = [...this.flowList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
if (this.flowList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
// console.log(this.flowList.length === this.pageConfig.total)
|
||||
}
|
||||
},
|
||||
jumpRoomPage(data){
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'jumpRoomPage',
|
||||
'data': {
|
||||
room_id: data.room_id
|
||||
}
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.jumpRoomPage(data.room_id);
|
||||
}
|
||||
},
|
||||
// 日期范围
|
||||
changeDate(date) {
|
||||
this.searchParams.start_time = date.length ? date[0] : ''
|
||||
this.searchParams.end_time = date.length ? date[1] : ''
|
||||
this.getFlow()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
// padding: 24rpx 32rpx;
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.content_view {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.header-view {
|
||||
padding: 24rpx;
|
||||
margin-top: 24rpx;
|
||||
background-image: url('/static/image/union/flowbg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 152rpx;
|
||||
|
||||
.flow-view {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.flowNumber {
|
||||
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #004D3C;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-list {
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
.room-line {
|
||||
width: 100%;
|
||||
// background-color: #004D3C;
|
||||
margin-top: 24rpx;
|
||||
padding:24rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.flowIcon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.head-portrait {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'群聊设置'" :emitBack="true" @backEvent="back">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'群聊设置'" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="content" v-if="detailData">
|
||||
<view class="name-view flex-line">
|
||||
@@ -24,12 +25,12 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="w-fill flex-line mt-24">
|
||||
<view class="w-fill flex-line mt-24" style="align-items: flex-start;justify-content: space-between;">
|
||||
<view class="" v-for="ele in detailData.user_list">
|
||||
<view class="image-view">
|
||||
<img :src="ele.avatar" alt="" />
|
||||
</view>
|
||||
<view class="color-9 font-28 mt-24" style="text-align: center;">
|
||||
<view class="color-9 font-28 mt-24 text-container" style="text-align: center;">
|
||||
{{ele.nickname}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -37,32 +38,31 @@
|
||||
</view>
|
||||
<!-- 编辑 -->
|
||||
<view class="edit-name">
|
||||
<uni-easyinput v-model="guildName" :disabled="detailData.is_deacon !== 1 " primaryColor="#999" :inputBorder="false" :styles="styles" :placeholderStyle="placeholderStyle" placeholder="请输入内容"></uni-easyinput>
|
||||
<uni-easyinput v-model="guildName" :disabled="detailData.is_deacon !== 1 " primaryColor="#999"
|
||||
:inputBorder="false" :styles="styles" :placeholderStyle="placeholderStyle"
|
||||
placeholder="请输入内容"></uni-easyinput>
|
||||
</view>
|
||||
<view class="edit-notice">
|
||||
<view class="notice-title">
|
||||
群聊公告
|
||||
</view>
|
||||
<view class="notice-view">
|
||||
<uni-easyinput primaryColor="#999" :inputBorder="false" :disabled="detailData.is_deacon !== 1 " :styles="styles" :placeholderStyle="placeholderStyle" type="textarea" autoHeight v-model="detailData.notification" placeholder="请输入群聊公告"></uni-easyinput>
|
||||
<uni-easyinput primaryColor="#999" :inputBorder="false" :disabled="detailData.is_deacon !== 1 "
|
||||
:styles="styles" :placeholderStyle="placeholderStyle" type="textarea" autoHeight
|
||||
v-model="detailData.notification" placeholder="请输入群聊公告"></uni-easyinput>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer"v-if="detailData.is_deacon === 1">
|
||||
<view class="footer" v-if="detailData.is_deacon === 1">
|
||||
<view class="confirm-button" @click="confirmInfo">
|
||||
<view class="button">
|
||||
确认保存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="edit-notice flex-line w-fill flex-spaceB">
|
||||
<view class="notice-title">
|
||||
设置置顶
|
||||
</view>
|
||||
<view >
|
||||
<switch checked color="#457AFF" style="transform:scale(0.7)"/>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -80,37 +80,46 @@
|
||||
data() {
|
||||
return {
|
||||
logo,
|
||||
guildId:null,
|
||||
notice:'',
|
||||
guildId: null,
|
||||
notice: '',
|
||||
value: '',
|
||||
guildName:'',
|
||||
detailData:null,
|
||||
guildName: '',
|
||||
detailData: null,
|
||||
styles: {
|
||||
color: '#333',
|
||||
borderColor: 'none'
|
||||
},
|
||||
statusBarHeight:0,
|
||||
formType: 0,
|
||||
statusBarHeight: 0,
|
||||
placeholderStyle: "color:321;font-size:14px",
|
||||
ThemeData: null,
|
||||
msgType: "",
|
||||
messageText: ""
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id,
|
||||
guildId,h
|
||||
guildId,
|
||||
h
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
this.guildId = guildId || ''
|
||||
this.formType = type
|
||||
if (uni.getStorageSync('token')) {
|
||||
this.getInfo()
|
||||
}
|
||||
this.statusBarHeight = h || uni.getStorageSync('BarHeight')
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
// 关闭当前公会中心页面
|
||||
back() {
|
||||
this.closeWeb()
|
||||
},
|
||||
closeWeb(){
|
||||
closeWeb() {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
// 通过 messageHandlers 调用 iOS 原生方法
|
||||
@@ -124,7 +133,7 @@
|
||||
},
|
||||
async getInfo() {
|
||||
http.get('/api/Guild/get_guild_info', {
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
guild_id: this.guildId
|
||||
}).then(response => {
|
||||
const {
|
||||
@@ -132,24 +141,23 @@
|
||||
code
|
||||
} = response
|
||||
this.detailData = data || null
|
||||
if(data) {
|
||||
this.detailData.user_list = data.user_list.slice(0,4)
|
||||
if (data) {
|
||||
this.detailData.user_list = data.user_list.slice(0, 4)
|
||||
}
|
||||
this.guildName = data.name || null
|
||||
}).catch(error => {
|
||||
});
|
||||
}).catch(error => {});
|
||||
|
||||
},
|
||||
memberList(){
|
||||
memberList() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/memberList?guildId=${this.guildId}`
|
||||
});
|
||||
},
|
||||
async confirmInfo(){
|
||||
async confirmInfo() {
|
||||
if (this.guildName === '') {
|
||||
uni.showToast({
|
||||
title: "请输入群聊名称",
|
||||
icon: 'none'
|
||||
});
|
||||
this.messageText = "请输入群聊名称"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
return
|
||||
}
|
||||
const parameter = {
|
||||
@@ -171,26 +179,22 @@
|
||||
if (code) {
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "提交成功",
|
||||
icon: 'none',
|
||||
mask: true
|
||||
});
|
||||
this.messageText = "提交成功"
|
||||
this.msgType = 'success'
|
||||
this.$refs.message.open()
|
||||
this.getInfo()
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "提交失败",
|
||||
icon: 'error'
|
||||
});
|
||||
this.messageText = "提交失败"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
uni.hideLoading()
|
||||
}
|
||||
|
||||
|
||||
}).catch(error => {
|
||||
uni.showToast({
|
||||
title: "提交失败",
|
||||
icon: 'error'
|
||||
});
|
||||
this.messageText = "提交失败"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
uni.hideLoading()
|
||||
});
|
||||
}
|
||||
@@ -203,35 +207,48 @@
|
||||
// padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
|
||||
.text-container {
|
||||
width: 150rpx;
|
||||
/* 指定容器宽度 */
|
||||
white-space: nowrap;
|
||||
/* 防止文本换行 */
|
||||
overflow: hidden;
|
||||
/* 隐藏溢出的文本 */
|
||||
text-overflow: ellipsis;
|
||||
/* 显示省略号 */
|
||||
}
|
||||
|
||||
.footer {
|
||||
// background: #f0f0f0;
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
/* 适配iPhoneX等刘海屏 */
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
|
||||
|
||||
.confirm-button {
|
||||
padding: 0 50rpx;
|
||||
|
||||
|
||||
.button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
border-radius: 106rpx;
|
||||
line-height: 84rpx;
|
||||
background-color: #0DFFB9;
|
||||
color: #333;
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.image-view {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
@@ -295,15 +312,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.edit-name{
|
||||
|
||||
.edit-name {
|
||||
margin-top: 24rpx;
|
||||
background: #EFF2F8;
|
||||
padding: 24rpx;
|
||||
border-radius: 22rpx;
|
||||
}
|
||||
.edit-notice{
|
||||
|
||||
.notice-title{
|
||||
.edit-notice {
|
||||
|
||||
.notice-title {
|
||||
padding: 24rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
@@ -313,7 +332,8 @@
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
.notice-view{
|
||||
|
||||
.notice-view {
|
||||
background: #EFF2F8;
|
||||
padding: 24rpx;
|
||||
border-radius: 22rpx;
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`公会补贴`">
|
||||
<template #rightView>
|
||||
<view class="icon-right flex-line" @click="exit"
|
||||
v-if="detailData && leaderStatus" >
|
||||
<view @click="historyRecord" class="font-24" style="color:#FF8ACC;white-space: nowrap">
|
||||
历史记录
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</navBar>
|
||||
<view class="content-view" v-if="detailData">
|
||||
<view class="bottom" v-for="(data,index) in detailData" :key="index">
|
||||
<view class="flex-line flex-spaceB w-fill">
|
||||
<view class="color-3 font-w500 font-32">
|
||||
{{data.name}}
|
||||
</view>
|
||||
<view class="font-28" :style="{'color' : data.status_str === '已发放' ? '#999' : '#45D08C'}">
|
||||
{{data.status_str}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
|
||||
</view>
|
||||
<view class="flex-line flex-spaceB w-fill">
|
||||
<view class="cumulative font-28 font-w400">
|
||||
累计流水:{{data.total_transaction}}
|
||||
</view>
|
||||
<view class="subsidy font-28">
|
||||
获得补贴:{{data.subsidy_amount}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logo,
|
||||
detailData: null,
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id,
|
||||
leader
|
||||
} = options
|
||||
this.leaderStatus = +leader
|
||||
this.searchParams.guild_id = id
|
||||
if (id) this.getSubsidy()
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
async getSubsidy() {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/guild_subsidy', this.searchParams)
|
||||
this.detailData = code ? data.list : null
|
||||
},
|
||||
historyRecord(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/historyRecord?id=${this.searchParams.guild_id}`
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.content-view{
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
.bottom{
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.cumulative {
|
||||
color: #FF8ACC;
|
||||
}
|
||||
|
||||
.line {
|
||||
background-color: #ECECEC;
|
||||
height: 1rpx;
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.subsidy {
|
||||
color: #0DFFB9;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,719 +0,0 @@
|
||||
<template>
|
||||
<div class="wealth-level-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<div class="header">
|
||||
<div class="back-btn" @click="goBack">
|
||||
<i class="icon-back">‹</i>
|
||||
</div>
|
||||
<div class="title-section">
|
||||
<h1 class="main-title">财富等级</h1>
|
||||
<span class="sub-title">主播等级</span>
|
||||
</div>
|
||||
<div class="help-btn" @click="showHelp">
|
||||
<i class="icon-help">?</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 等级进度环形图 -->
|
||||
<div class="level-progress-section">
|
||||
<div class="progress-ring-container">
|
||||
<!-- 等级标签 -->
|
||||
<div class="level-labels">
|
||||
<div
|
||||
class="level-label"
|
||||
v-for="(level, index) in levels"
|
||||
:key="index"
|
||||
:class="{ active: currentLevelIndex >= index }"
|
||||
>
|
||||
<span class="level-name">{{ level.name }}</span>
|
||||
<div
|
||||
class="level-dot"
|
||||
:class="{ active: currentLevelIndex >= index }"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 中心头像和信息 -->
|
||||
<div class="center-info">
|
||||
<div class="avatar">
|
||||
<img :src="userAvatar" alt="用户头像" />
|
||||
</div>
|
||||
<div class="experience-info">
|
||||
<div class="current-exp">
|
||||
<span class="exp-number">{{ currentExp }}</span>
|
||||
<span class="exp-label">当前经验</span>
|
||||
</div>
|
||||
<div class="next-level-exp">
|
||||
<span class="exp-number">{{ nextLevelExp }}</span>
|
||||
<span class="exp-label">距离下一个等级</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 进度弧线 -->
|
||||
<svg class="progress-ring" viewBox="0 0 200 200">
|
||||
<circle
|
||||
class="progress-ring-bg"
|
||||
cx="100"
|
||||
cy="100"
|
||||
r="85"
|
||||
fill="none"
|
||||
stroke="#2a2a2a"
|
||||
stroke-width="4"
|
||||
/>
|
||||
<circle
|
||||
class="progress-ring-progress"
|
||||
cx="100"
|
||||
cy="100"
|
||||
r="85"
|
||||
fill="none"
|
||||
stroke="#00ff88"
|
||||
stroke-width="4"
|
||||
stroke-linecap="round"
|
||||
:stroke-dasharray="circumference"
|
||||
:stroke-dashoffset="progressOffset"
|
||||
transform="rotate(-90 100 100)"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 当前等级卡片 -->
|
||||
<div class="current-level-card">
|
||||
<div class="level-badge">
|
||||
<img :src="currentLevel.badge" alt="等级徽章" />
|
||||
</div>
|
||||
<div class="level-info">
|
||||
<h2 class="level-title">{{ currentLevel.name }}</h2>
|
||||
<p class="level-description">{{ currentLevel.description }}</p>
|
||||
<div class="level-progress-bar">
|
||||
<div class="progress-track">
|
||||
<div
|
||||
class="progress-fill"
|
||||
:style="{ width: levelProgress + '%' }"
|
||||
></div>
|
||||
</div>
|
||||
<div class="progress-labels">
|
||||
<span>Lv.{{ currentLevel.level }}</span>
|
||||
<span>Lv.{{ currentLevel.level + 1 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="next-level-requirement">{{ nextLevelRequirement }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 每日奖励 -->
|
||||
<div class="daily-rewards-section">
|
||||
<h3 class="section-title">每日奖励</h3>
|
||||
<div class="reward-item">
|
||||
<div class="reward-icon">
|
||||
<img src="/icons/coin.png" alt="金币" />
|
||||
</div>
|
||||
<div class="reward-info">
|
||||
<p class="reward-title">段位达到富豪8</p>
|
||||
<p class="reward-desc">可每日领取金币</p>
|
||||
</div>
|
||||
<button
|
||||
class="claim-btn"
|
||||
@click="claimDailyReward"
|
||||
:disabled="dailyRewardClaimed"
|
||||
>
|
||||
{{ dailyRewardClaimed ? "已领取" : "立即领取" }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 等级需求及福利 -->
|
||||
<div class="level-benefits-section">
|
||||
<h3 class="section-title">等级需求及福利</h3>
|
||||
<div class="benefits-grid">
|
||||
<div
|
||||
class="benefit-item"
|
||||
v-for="(benefit, index) in levelBenefits"
|
||||
:key="index"
|
||||
>
|
||||
<div class="benefit-icon">
|
||||
<img :src="benefit.icon" alt="福利图标" />
|
||||
</div>
|
||||
<p class="benefit-value">{{ benefit.value }}</p>
|
||||
<p class="benefit-desc">{{ benefit.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 财富特权 -->
|
||||
<div class="wealth-privileges-section">
|
||||
<h3 class="section-title">财富特权</h3>
|
||||
<div class="privileges-grid">
|
||||
<div
|
||||
class="privilege-item"
|
||||
v-for="(privilege, index) in wealthPrivileges"
|
||||
:key="index"
|
||||
>
|
||||
<div class="privilege-icon">
|
||||
<img :src="privilege.icon" alt="特权图标" />
|
||||
</div>
|
||||
<p class="privilege-name">{{ privilege.name }}</p>
|
||||
<p class="privilege-level">{{ privilege.level }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "WealthLevelPage",
|
||||
data() {
|
||||
return {
|
||||
// 用户信息
|
||||
userAvatar: "",
|
||||
currentExp: 1608,
|
||||
nextLevelExp: 1608,
|
||||
currentLevelIndex: 1,
|
||||
dailyRewardClaimed: false,
|
||||
|
||||
// 等级配置
|
||||
levels: [
|
||||
{ name: "新人", value: 0 },
|
||||
{ name: "富豪", value: 1000 },
|
||||
{ name: "星爵", value: 5000 },
|
||||
{ name: "星侯", value: 15000 },
|
||||
{ name: "星王", value: 50000 },
|
||||
],
|
||||
|
||||
// 当前等级信息
|
||||
currentLevel: {
|
||||
name: "星爵",
|
||||
level: 1,
|
||||
description: "进30天保段已成功",
|
||||
badge: "",
|
||||
requirement: 10000,
|
||||
},
|
||||
|
||||
// 等级福利
|
||||
levelBenefits: [
|
||||
{
|
||||
icon: "",
|
||||
value: "100万",
|
||||
description: "所需经验值",
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
value: "100万",
|
||||
description: "保段经验值",
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
value: "100万",
|
||||
description: "每日可领",
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
value: "吉普",
|
||||
description: "专属座驾",
|
||||
},
|
||||
],
|
||||
|
||||
// 财富特权
|
||||
wealthPrivileges: Array(12)
|
||||
.fill()
|
||||
.map((_, index) => ({
|
||||
name: "吉普",
|
||||
level: "富豪6解锁",
|
||||
icon: "",
|
||||
})),
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 计算圆形进度条
|
||||
circumference() {
|
||||
return 2 * Math.PI * 85;
|
||||
},
|
||||
|
||||
progressOffset() {
|
||||
const progress = this.levelProgress / 100;
|
||||
return this.circumference - progress * this.circumference;
|
||||
},
|
||||
|
||||
// 计算当前等级进度
|
||||
levelProgress() {
|
||||
const currentLevelExp = this.levels[this.currentLevelIndex].value;
|
||||
const nextLevelExp =
|
||||
this.levels[this.currentLevelIndex + 1]?.value ||
|
||||
currentLevelExp + 10000;
|
||||
const progress =
|
||||
((this.currentExp - currentLevelExp) /
|
||||
(nextLevelExp - currentLevelExp)) *
|
||||
100;
|
||||
return Math.min(Math.max(progress, 0), 100);
|
||||
},
|
||||
|
||||
// 下一等级需求
|
||||
nextLevelRequirement() {
|
||||
const nextLevel = this.levels[this.currentLevelIndex + 1];
|
||||
if (nextLevel) {
|
||||
const remaining = nextLevel.value - this.currentExp;
|
||||
return `距离下一个段位还差${remaining.toLocaleString()}经验`;
|
||||
}
|
||||
return "已达到最高等级";
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 返回上一页
|
||||
goBack() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
||||
// 显示帮助
|
||||
showHelp() {
|
||||
this.$toast("帮助信息");
|
||||
},
|
||||
|
||||
// 领取每日奖励
|
||||
claimDailyReward() {
|
||||
if (this.dailyRewardClaimed) return;
|
||||
|
||||
this.dailyRewardClaimed = true;
|
||||
this.$toast("领取成功!");
|
||||
|
||||
// 这里可以调用API
|
||||
this.apiClaimDailyReward();
|
||||
},
|
||||
|
||||
// API调用示例
|
||||
async apiClaimDailyReward() {
|
||||
try {
|
||||
// const response = await this.$api.claimDailyReward()
|
||||
console.log("API: 领取每日奖励");
|
||||
} catch (error) {
|
||||
console.error("领取失败:", error);
|
||||
this.dailyRewardClaimed = false;
|
||||
}
|
||||
},
|
||||
|
||||
// 获取用户等级数据
|
||||
async fetchUserLevelData() {
|
||||
try {
|
||||
// const response = await this.$api.getUserLevel()
|
||||
// this.currentExp = response.currentExp
|
||||
// this.currentLevelIndex = response.levelIndex
|
||||
console.log("API: 获取用户等级数据");
|
||||
} catch (error) {
|
||||
console.error("获取数据失败:", error);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.fetchUserLevelData();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wealth-level-page {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #f5f5f5 50%);
|
||||
color: #fff;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* 顶部导航 */
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 44px 20px 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.back-btn,
|
||||
.help-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.back-btn:hover,
|
||||
.help-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.icon-back {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.icon-help {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.title-section {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 等级进度环形图 */
|
||||
.level-progress-section {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.progress-ring-container {
|
||||
position: relative;
|
||||
width: 280px;
|
||||
height: 280px;
|
||||
}
|
||||
|
||||
.level-labels {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.level-label {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.level-label:nth-child(1) {
|
||||
top: 10px;
|
||||
left: 20px;
|
||||
} /* 新人 */
|
||||
.level-label:nth-child(2) {
|
||||
top: 40px;
|
||||
right: 10px;
|
||||
} /* 富豪 */
|
||||
.level-label:nth-child(3) {
|
||||
bottom: 40px;
|
||||
right: 10px;
|
||||
} /* 星爵 */
|
||||
.level-label:nth-child(4) {
|
||||
bottom: 10px;
|
||||
left: 20px;
|
||||
} /* 星侯 */
|
||||
.level-label:nth-child(5) {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
transform: translateY(-50%);
|
||||
} /* 星王 */
|
||||
|
||||
.level-name {
|
||||
margin-bottom: 4px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.level-label.active .level-name {
|
||||
color: #00ff88;
|
||||
}
|
||||
|
||||
.level-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #333;
|
||||
border: 2px solid #555;
|
||||
}
|
||||
|
||||
.level-dot.active {
|
||||
background: #00ff88;
|
||||
border-color: #00ff88;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin: 0 auto 16px;
|
||||
border: 3px solid #00ff88;
|
||||
}
|
||||
|
||||
.avatar img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.experience-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 200px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.current-exp,
|
||||
.next-level-exp {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.exp-number {
|
||||
display: block;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #00ff88;
|
||||
}
|
||||
|
||||
.exp-label {
|
||||
font-size: 10px;
|
||||
color: #999;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.progress-ring {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.progress-ring-progress {
|
||||
transition: stroke-dashoffset 0.5s ease;
|
||||
}
|
||||
|
||||
/* 当前等级卡片 */
|
||||
.current-level-card {
|
||||
margin: 20px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 16px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.level-badge {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.level-badge img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.level-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.level-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 0 0 4px 0;
|
||||
color: #00ff88;
|
||||
}
|
||||
|
||||
.level-description {
|
||||
font-size: 12px;
|
||||
color: #ccc;
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
.level-progress-bar {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.progress-track {
|
||||
height: 4px;
|
||||
background: #333;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #00ff88, #00ccff);
|
||||
border-radius: 2px;
|
||||
transition: width 0.5s ease;
|
||||
}
|
||||
|
||||
.progress-labels {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.next-level-requirement {
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
margin: 8px 0 0 0;
|
||||
}
|
||||
|
||||
/* 每日奖励和福利区域 */
|
||||
.daily-rewards-section,
|
||||
.level-benefits-section,
|
||||
.wealth-privileges-section {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 16px 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.reward-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.reward-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.reward-icon img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.reward-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.reward-title {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
margin: 0 0 2px 0;
|
||||
}
|
||||
|
||||
.reward-desc {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.claim-btn {
|
||||
background: #00ff88;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 20px;
|
||||
padding: 8px 16px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.claim-btn:hover:not(:disabled) {
|
||||
background: #00e67a;
|
||||
}
|
||||
|
||||
.claim-btn:disabled {
|
||||
background: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* 福利网格 */
|
||||
.benefits-grid,
|
||||
.privileges-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.benefit-item,
|
||||
.privilege-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 12px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.benefit-icon,
|
||||
.privilege-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.benefit-icon img,
|
||||
.privilege-icon img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.benefit-value,
|
||||
.privilege-name {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
margin: 0 0 2px 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.benefit-desc,
|
||||
.privilege-level {
|
||||
font-size: 10px;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 375px) {
|
||||
.progress-ring-container {
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
}
|
||||
|
||||
.experience-info {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.benefits-grid,
|
||||
.privileges-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,394 +0,0 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`公会成员`">
|
||||
<template #rightView>
|
||||
<view class="icon-right flex-line"
|
||||
v-if="leaderStatus" @click="application">
|
||||
<view class="font-24" style="color:#333;white-space: nowrap">
|
||||
退出审核
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</navBar>
|
||||
<view class="content_view">
|
||||
<view v-if="leaderStatus">
|
||||
<uni-datetime-picker style="background-color: #f8f8f8;" start-placeholder="开始时间" :end="currentDate"
|
||||
end-placeholder="结束时间" v-model="dateSearch" type="range" rangeSeparator="至"
|
||||
@change="changeDate" />
|
||||
</view>
|
||||
<view class="header-view" v-if="flowDetail && leaderStatus">
|
||||
<view class="flex-line flow-view w-fill flex-spaceB">
|
||||
<view class="flowTitle color-3">
|
||||
总支出
|
||||
</view>
|
||||
</view>
|
||||
<view class="flowNumber">
|
||||
{{flowDetail.total_consumption}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="room-list flex-line mt-24" v-if="dataList && dataList.length">
|
||||
<view class="room-line w-fill" v-for="data in dataList" :key="data.room_id">
|
||||
<view class="w-fill flex-line flex-spaceB" @click="jumpHomePage(data)">
|
||||
<view class="flex-line w-fill">
|
||||
<view class="head-portrait-view">
|
||||
<view class="head-portrait">
|
||||
<img :src="data.avatar || logo" alt="" />
|
||||
|
||||
</view>
|
||||
<view class="tip" v-if="data.is_deacon === 1">
|
||||
<img src="@/static/image/union/ghz_tip.png" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
<view class="color-3 font-32 font-w500">
|
||||
{{data.nickname}}
|
||||
</view>
|
||||
<view class="color-6 font-24" style="margin-top: 12rpx;">
|
||||
ID:{{data.user_code}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-line" v-if="leaderStatus">
|
||||
<view class="flowIcon">
|
||||
<img src="@/static/image/union/flowIcon.png" alt="" />
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
{{data.total_consumption || 0}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-fill operate_button" v-if="leaderStatus && data.is_deacon === 2">
|
||||
<view class="color-f font-24 button" @click="kickGuild(data)">
|
||||
踢出公会
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-24">
|
||||
<uni-load-more :status="loading ? 'loading' : noMore ? 'noMore' : 'more'" />
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
<uni-popup ref="popup" type="center">
|
||||
<view class="popup_view">
|
||||
<view class="color-3 font-32 popup_title">
|
||||
温馨提示
|
||||
</view>
|
||||
<view class="color-3 font-24 messageContent">
|
||||
{{messageContent}}
|
||||
</view>
|
||||
<view class="popup_button flex-line">
|
||||
<view class="close_button flex-line" @click="closePopup">
|
||||
取消
|
||||
</view>
|
||||
<view class="confirm-button flex-line" @click="confirmPopup">
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dateSearch: [new Date(),new Date()],
|
||||
currentDate: +new Date(),
|
||||
logo,
|
||||
loading: false,
|
||||
noMore: false,
|
||||
detailData: null,
|
||||
pageConfig: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
page: 1,
|
||||
page_size: 20
|
||||
},
|
||||
leaderStatus: null,
|
||||
flowDetail: null,
|
||||
msgType: '',
|
||||
messageText: '',
|
||||
messageContent: '',
|
||||
dataList: [],
|
||||
currentUserData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id,
|
||||
leader
|
||||
} = options
|
||||
|
||||
this.leaderStatus = +leader
|
||||
this.searchParams.guild_id = id
|
||||
this.searchParams.start_time = this.formatDate(new Date())
|
||||
this.searchParams.end_time = this.formatDate(new Date())
|
||||
if (id) this.getList()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
application(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/exitApplication?id=${this.searchParams.guild_id}`
|
||||
});
|
||||
},
|
||||
formatDate(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始需+1
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
// 获取成员列表
|
||||
async getList() {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/get_guild_member_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.flowDetail = data
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
// 日期范围
|
||||
changeDate(date) {
|
||||
this.searchParams.start_time = date.length ? date[0] : ''
|
||||
this.searchParams.end_time = date.length ? date[1] : ''
|
||||
this.getList()
|
||||
},
|
||||
// 踢出公会
|
||||
kickGuild(userData) {
|
||||
this.currentUserData = userData
|
||||
this.messageContent = `亲爱的会长,您当前操作将踢出该成员,是否继续?`
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
jumpHomePage(data){
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'jumpWebPage',
|
||||
'data': {
|
||||
userId: data.user_id
|
||||
}
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.jumpWebPage(data.user_id);
|
||||
}
|
||||
},
|
||||
confirmPopup() {
|
||||
this.kickUser()
|
||||
},
|
||||
closePopup() {
|
||||
this.currentUserData = null
|
||||
this.messageContent = ""
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
async kickUser() {
|
||||
http.post('/api/Guild/kick_guild_member', {
|
||||
guild_id: this.currentUserData.guild_id,
|
||||
user_id: this.currentUserData.user_id,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
if (code) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `操作成功`
|
||||
this.$refs.message.open()
|
||||
this.dataList = []
|
||||
this.pageConfig.currentPage = 1
|
||||
this.getList()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
this.currentUserData = null
|
||||
this.closePopup()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
// padding: 24rpx 32rpx;
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.content_view {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.popup_view {
|
||||
width: 550rpx;
|
||||
// height: 40vh;
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.popup_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.messageContent {
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.popup_button {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
|
||||
.close_button,
|
||||
.confirm-button {
|
||||
width: 200rpx;
|
||||
height: 84rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 106rpx;
|
||||
color: #999999;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background: #0DFFB9;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.header-view {
|
||||
padding: 24rpx;
|
||||
margin-top: 24rpx;
|
||||
background-image: url('/static/image/union/flowbg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 152rpx;
|
||||
|
||||
.flow-view {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.flowNumber {
|
||||
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #004D3C;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-list {
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
|
||||
.operate_button {
|
||||
border-top: 1rpx solid #E2E2E2;
|
||||
margin-top: 24rpx;
|
||||
padding-top: 24rpx;
|
||||
|
||||
.button {
|
||||
padding: 12rpx 24rpx;
|
||||
background-color: #333;
|
||||
display: inline-flex;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-line {
|
||||
width: 100%;
|
||||
// background-color: #004D3C;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.flowIcon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.head-portrait {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
|
||||
img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.head-portrait-view {
|
||||
position: relative;
|
||||
.tip {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 5rpx;
|
||||
right: 0;
|
||||
width: 96rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
58
pnpm-lock.yaml
generated
@@ -11,6 +11,12 @@ importers:
|
||||
axios:
|
||||
specifier: ^1.9.0
|
||||
version: 1.10.0
|
||||
office-viewer:
|
||||
specifier: ^0.3.14
|
||||
version: 0.3.14(echarts@5.6.0)
|
||||
video-animation-player:
|
||||
specifier: ^1.0.5
|
||||
version: 1.0.5
|
||||
vue-i18n:
|
||||
specifier: ^11.1.5
|
||||
version: 11.1.9(vue@3.5.17)
|
||||
@@ -106,6 +112,9 @@ packages:
|
||||
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
echarts@5.6.0:
|
||||
resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==}
|
||||
|
||||
entities@4.5.0:
|
||||
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
||||
engines: {node: '>=0.12'}
|
||||
@@ -189,6 +198,17 @@ packages:
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
|
||||
numfmt@2.5.2:
|
||||
resolution: {integrity: sha512-VXrB2bpU9Xa0oCHq8IsqE2CcUx5OLupLC3oryFT4DB9e/xe+OnUzBndhXfNHUzxFE4DYI3Sx4OtzS1Sdaf7tEw==}
|
||||
|
||||
office-viewer@0.3.14:
|
||||
resolution: {integrity: sha512-nm4b1LXvRbgfTllOGOAGNOrX5tAEqv3jxF0YKe5QbeNQhHagd1WTXknqghSGBURyrGTRXsX9zSgbzpu4/XV8dQ==}
|
||||
peerDependencies:
|
||||
echarts: ^5.4.0
|
||||
|
||||
papaparse@5.5.3:
|
||||
resolution: {integrity: sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==}
|
||||
|
||||
picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
|
||||
@@ -203,6 +223,15 @@ packages:
|
||||
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
tslib@2.3.0:
|
||||
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
|
||||
|
||||
tslib@2.8.1:
|
||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||
|
||||
video-animation-player@1.0.5:
|
||||
resolution: {integrity: sha512-KLz+uL6zojOYXEPFxL2AB0iKSLHnmKQPBnXmFWHpGtAdB6/j9EWCbWcUDCg0KVOBTFRHa2UfiSNK0y1I+LEfpA==}
|
||||
|
||||
vue-i18n@11.1.9:
|
||||
resolution: {integrity: sha512-N9ZTsXdRmX38AwS9F6Rh93RtPkvZTkSy/zNv63FTIwZCUbLwwrpqlKz9YQuzFLdlvRdZTnWAUE5jMxr8exdl7g==}
|
||||
engines: {node: '>= 16'}
|
||||
@@ -217,6 +246,9 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
zrender@5.6.1:
|
||||
resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==}
|
||||
|
||||
snapshots:
|
||||
|
||||
'@babel/helper-string-parser@7.27.1': {}
|
||||
@@ -331,6 +363,11 @@ snapshots:
|
||||
es-errors: 1.3.0
|
||||
gopd: 1.2.0
|
||||
|
||||
echarts@5.6.0:
|
||||
dependencies:
|
||||
tslib: 2.3.0
|
||||
zrender: 5.6.1
|
||||
|
||||
entities@4.5.0: {}
|
||||
|
||||
es-define-property@1.0.1: {}
|
||||
@@ -406,6 +443,17 @@ snapshots:
|
||||
|
||||
nanoid@3.3.11: {}
|
||||
|
||||
numfmt@2.5.2: {}
|
||||
|
||||
office-viewer@0.3.14(echarts@5.6.0):
|
||||
dependencies:
|
||||
echarts: 5.6.0
|
||||
numfmt: 2.5.2
|
||||
papaparse: 5.5.3
|
||||
tslib: 2.8.1
|
||||
|
||||
papaparse@5.5.3: {}
|
||||
|
||||
picocolors@1.1.1: {}
|
||||
|
||||
postcss@8.5.6:
|
||||
@@ -418,6 +466,12 @@ snapshots:
|
||||
|
||||
source-map-js@1.2.1: {}
|
||||
|
||||
tslib@2.3.0: {}
|
||||
|
||||
tslib@2.8.1: {}
|
||||
|
||||
video-animation-player@1.0.5: {}
|
||||
|
||||
vue-i18n@11.1.9(vue@3.5.17):
|
||||
dependencies:
|
||||
'@intlify/core-base': 11.1.9
|
||||
@@ -432,3 +486,7 @@ snapshots:
|
||||
'@vue/runtime-dom': 3.5.17
|
||||
'@vue/server-renderer': 3.5.17(vue@3.5.17)
|
||||
'@vue/shared': 3.5.17
|
||||
|
||||
zrender@5.6.1:
|
||||
dependencies:
|
||||
tslib: 2.3.0
|
||||
|
||||
BIN
static/che.mp4
Normal file
BIN
static/image/general/fy_bg.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 584 KiB After Width: | Height: | Size: 585 KiB |
|
Before Width: | Height: | Size: 624 KiB After Width: | Height: | Size: 330 KiB |
BIN
static/image/swiper.jpg
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
static/image/swipers.png
Normal file
|
After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 69 KiB |
@@ -136,7 +136,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
duration: 300,
|
||||
duration: 100,
|
||||
ani: [],
|
||||
showPopup: false,
|
||||
showTrans: false,
|
||||
@@ -248,7 +248,7 @@
|
||||
this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
|
||||
}
|
||||
if (this.animation) {
|
||||
this.duration = 300
|
||||
this.duration = 100
|
||||
} else {
|
||||
this.duration = 0
|
||||
}
|
||||
@@ -315,7 +315,7 @@
|
||||
// this.customOpen && this.customClose()
|
||||
this.timer = setTimeout(() => {
|
||||
this.showPopup = false
|
||||
}, 300)
|
||||
}, 100)
|
||||
},
|
||||
// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
|
||||
touchstart() {
|
||||
|
||||
@@ -1,15 +1,46 @@
|
||||
|
||||
//api 请求路径 本地
|
||||
// http://chat.qxmier.com
|
||||
// http://vschat.qxmier.com
|
||||
const BASE_URL="http://chat.qxmier.com";
|
||||
|
||||
//api 请求路径 测试
|
||||
// const BASE_URL="https://h5.qxcms.com/api";
|
||||
|
||||
// http://1.13.101.98 正式
|
||||
// https://vespa.qxyushen.top 正式api
|
||||
// https://test.vespa.qxyushen.top 测试api
|
||||
// 新 https://yushengapi.qxyushen.top
|
||||
const BASE_NAME = '羽声语音'
|
||||
const BASE_URL = "https://test.vespa.qxyushen.top";
|
||||
const BASE_IMAGE_URL = "https://test.vespa.qxyushen.top/h5/image/"
|
||||
// 前端访问域名
|
||||
// tmdh.xscmmidi.site 测试
|
||||
// mdh.xscmmidi.site 正式
|
||||
const PRIMARY_BGURL = `${BASE_IMAGE_URL}fy_bg.jpg`;
|
||||
// 工会管理员
|
||||
const PRIMARY_BLYURL = `${BASE_IMAGE_URL}fy_gly.png`;
|
||||
const wealth_url = `${BASE_IMAGE_URL}wealth.png`;
|
||||
const charm_url = `${BASE_IMAGE_URL}charm.png`;
|
||||
const kefu_url = `${BASE_IMAGE_URL}kefu.png`;
|
||||
const singer_url = `${BASE_IMAGE_URL}singer.png`;
|
||||
const unicon_url = `${BASE_IMAGE_URL}uniconBack.png`;
|
||||
const coin_url = `${BASE_IMAGE_URL}union/coin.png`;
|
||||
const hongbao_url = `${BASE_IMAGE_URL}union/hongbao.png`;
|
||||
const gift_url = `${BASE_IMAGE_URL}union/gift.png`;
|
||||
const new_unionUrl =`${BASE_IMAGE_URL}union/uniconBG.png`;
|
||||
const not_unionUrl =`${BASE_IMAGE_URL}union/noUnion.png`;
|
||||
//IM app_key
|
||||
const IM_APP_TOKEN="67962a777e2b13bc6a4bde3ccd389d1e";
|
||||
export {
|
||||
const BASR_COLOR = '#3ABC6D';
|
||||
export default {
|
||||
BASE_URL,
|
||||
IM_APP_TOKEN
|
||||
IM_APP_TOKEN,
|
||||
PRIMARY_BGURL,
|
||||
PRIMARY_BLYURL,
|
||||
BASR_COLOR,
|
||||
BASE_NAME,
|
||||
wealth_url,
|
||||
charm_url,
|
||||
kefu_url,
|
||||
singer_url,
|
||||
unicon_url,
|
||||
coin_url,
|
||||
hongbao_url,
|
||||
gift_url,
|
||||
new_unionUrl,
|
||||
not_unionUrl
|
||||
}
|
||||
@@ -1,35 +1,53 @@
|
||||
// src/utils/http.js
|
||||
import axios from 'axios';
|
||||
|
||||
// 创建axios实例
|
||||
const http = axios.create({
|
||||
baseURL: 'https://chat.qxmier.com', // API的基础路径
|
||||
timeout: 5000 // 请求超时时间
|
||||
import config from './config.js';
|
||||
const http = (options = {}) => {
|
||||
console.log(options)
|
||||
// 请求拦截器逻辑
|
||||
const requestConfig = {
|
||||
url: config.BASE_URL + options.url, // 拼接完整请求路径 :cite[1]:cite[2]:cite[7]
|
||||
method: options.method || 'GET',
|
||||
data: options.params || options.data || {},
|
||||
header: { // 注意:key 由 axios 的 `headers` 改为 uni.request 的 `header` :cite[1]
|
||||
'Content-Type': 'application/json', // 明确设置 Content-Type,因为 uni.request 默认可能使用 'application/x-www-form-urlencoded' :cite[1]
|
||||
...options.header, // 合并自定义请求头
|
||||
},
|
||||
timeout: options.timeout || 5000,
|
||||
sslVerify: false
|
||||
};
|
||||
|
||||
// 在发送请求前可以执行的操作,例如添加 token :cite[1]:cite[7]:cite[8]
|
||||
// 示例:添加 Token
|
||||
const token = uni.getStorageSync('token');
|
||||
if (token) {
|
||||
requestConfig.header['Authorization'] = `${token}`; // 或根据你的后端要求调整
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
...requestConfig,
|
||||
success: (response) => {
|
||||
// 响应拦截器逻辑:对响应数据做点什么
|
||||
// 这里根据你的业务需求调整,例如直接返回 data :cite[1]:cite[8]
|
||||
resolve(response.data); // 注意:uni.request 的响应结构 response.data 才是服务端返回的数据体 :cite[1]
|
||||
},
|
||||
fail: (error) => {
|
||||
// 响应错误处理
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// (可选)为方便使用,可以为不同的 HTTP 方法创建快捷方法 :cite[7]
|
||||
['get', 'post', 'put', 'delete'].forEach((method) => {
|
||||
http[method] = (url, data, options = {}) => {
|
||||
return http({
|
||||
url,
|
||||
method: method.toUpperCase(),
|
||||
data,
|
||||
...options
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
// 请求拦截器
|
||||
http.interceptors.request.use(
|
||||
config => {
|
||||
// 在发送请求之前做些什么,例如添加token等
|
||||
// config.headers['token'] = `${uni.getStorageSync('token')?? ''}`;
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
// 对请求错误做些什么
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// 响应拦截器
|
||||
http.interceptors.response.use(
|
||||
response => {
|
||||
// 对响应数据做点什么
|
||||
return response.data; // 根据实际情况可能需要返回response.data或其他处理后的数据
|
||||
},
|
||||
error => {
|
||||
// 对响应错误做点什么
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
export default http;
|
||||
@@ -1,9 +1,12 @@
|
||||
// vue.config.js
|
||||
// http://1.13.101.98 正式
|
||||
//https://test.vespa.qxyushen.top
|
||||
// 新 https://yushengapi.qxyushen.top
|
||||
module.exports = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://chat.qxmier.com',
|
||||
target: 'https://test.vespa.qxyushen.top',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/api': '' }
|
||||
}
|
||||
|
||||