diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 9d354e7..cd9a338 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -1,7 +1,7 @@ const install = (Vue, vm) => { uni.setStorageSync('deptId', 100); Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.1.15:4101', //键辉本地 + // baseUrl: 'http://192.168.1.3:4101', //键辉本地 // baseUrl: 'http://192.168.2.221:4101', //景森本地 baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid: wx8a05cf95418a6859 小兔骑骑appid:wx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe // baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上 diff --git a/page_fenbao/huiyuan/huiyuanlist.vue b/page_fenbao/huiyuan/huiyuanlist.vue index d31be6a..b963c33 100644 --- a/page_fenbao/huiyuan/huiyuanlist.vue +++ b/page_fenbao/huiyuan/huiyuanlist.vue @@ -118,6 +118,11 @@ { name: 'platinum', className: 'theme-platinum', iconColor: '#fff' }, // 铂金 { name: 'gold', className: 'theme-gold', iconColor: '#fff' }, // 黄金 { name: 'silver', className: 'theme-silver', iconColor: '#fff' }, // 白银 + { name: 'emerald', className: 'theme-emerald', iconColor: '#fff' }, // 翡翠 + { name: 'ruby', className: 'theme-ruby', iconColor: '#fff' }, // 红宝石 + { name: 'violet', className: 'theme-violet', iconColor: '#fff' }, // 紫罗兰 + { name: 'cyan', className: 'theme-cyan', iconColor: '#fff' }, // 青色 + { name: 'pink', className: 'theme-pink', iconColor: '#fff' }, // 粉红 { name: 'normal', className: 'theme-normal', iconColor: '#fff' } // 普通 ] } @@ -420,7 +425,7 @@ background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%); // 在浅色背景下,黑色卡片稍微浅一点点可能更有质感 border: 2rpx solid #333; - .vip-name { color: #FFD700; background: linear-gradient(to right, #FFD700, #FDB931); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } + .vip-name { color: #FFD700; background: linear-gradient(to right, #FFD700, #FDB931); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .progress-bar-fill { background: linear-gradient(90deg, #FFD700, #FDB931); } .icon-box { background: rgba(255, 215, 0, 0.15); border: 1px solid rgba(255, 215, 0, 0.3); } .c1 { background: #FFD700; top: -20%; right: -10%; width: 300rpx; height: 300rpx; opacity: 0.15; } @@ -457,7 +462,52 @@ .decoration-badge { opacity: 0.3; } } - // 5. 普通 (天蓝) + // 5. 翡翠 (翠绿) + &.theme-emerald { + background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); + box-shadow: 0 16rpx 32rpx rgba(17, 153, 142, 0.3); + + .c1 { background: #fff; top: -30%; right: -10%; width: 350rpx; height: 350rpx; opacity: 0.25; } + .c2 { background: #38ef7d; bottom: -20%; left: -10%; width: 250rpx; height: 250rpx; opacity: 0.2; } + } + + // 6. 红宝石 (玫瑰红) + &.theme-ruby { + background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%); + box-shadow: 0 16rpx 32rpx rgba(235, 51, 73, 0.3); + + .c1 { background: #fff; top: 0; right: 0; width: 300rpx; height: 300rpx; opacity: 0.2; } + .c2 { background: #f45c43; bottom: -30%; left: 10%; width: 280rpx; height: 280rpx; opacity: 0.25; } + } + + // 7. 紫罗兰 (深紫) + &.theme-violet { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + box-shadow: 0 16rpx 32rpx rgba(102, 126, 234, 0.3); + + .c1 { background: #fff; top: -20%; right: -5%; width: 320rpx; height: 320rpx; opacity: 0.2; } + .c2 { background: #764ba2; bottom: -25%; left: -5%; width: 240rpx; height: 240rpx; opacity: 0.3; } + } + + // 8. 青色 (青绿) + &.theme-cyan { + background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%); + box-shadow: 0 16rpx 32rpx rgba(0, 210, 255, 0.3); + + .c1 { background: #fff; top: 10%; right: 10%; width: 280rpx; height: 280rpx; opacity: 0.25; } + .c2 { background: #3a7bd5; bottom: -15%; left: 5%; width: 220rpx; height: 220rpx; opacity: 0.2; } + } + + // 9. 粉红 (樱花粉) + &.theme-pink { + background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); + box-shadow: 0 16rpx 32rpx rgba(240, 147, 251, 0.3); + + .c1 { background: #fff; top: -10%; right: 0; width: 300rpx; height: 300rpx; opacity: 0.3; } + .c2 { background: #f5576c; bottom: -20%; left: 0; width: 260rpx; height: 260rpx; opacity: 0.25; } + } + + // 10. 普通 (天蓝) &.theme-normal { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); box-shadow: 0 16rpx 32rpx rgba(79, 172, 254, 0.3); diff --git a/page_shanghu/gonggao.vue b/page_shanghu/gonggao.vue index 71d2515..a7413a3 100644 --- a/page_shanghu/gonggao.vue +++ b/page_shanghu/gonggao.vue @@ -1,6 +1,6 @@ @@ -42,17 +42,27 @@ }, areaId:'', token:'', - obj:{}, - id:'' + obj:{ + title: '', + duration: 0 + }, + id:'', + agreementType: 0, // 0-公告 1-协议 + isEdit: false // 是否为编辑模式 }; }, components: { piaoyiEditor }, onLoad(option) { - this.id = option.id + this.id = option.id || '' + this.areaId = option.areaId || '' + this.agreementType = option.agreementType ? Number(option.agreementType) : 0 + this.isEdit = !!this.id this.getqiniuyun() - this.getxieyi() + if (this.isEdit) { + this.getxieyi() + } }, methods: { saveContens(e) { @@ -77,30 +87,104 @@ }, // 点击保存 btnbc(){ - let data = { - id:this.id, - title:this.obj.title, - duration:Number(this.obj.duration) || 0, - content:this.txt || this.values + // 验证标题 + if (!this.obj.title || !this.obj.title.trim()) { + uni.showToast({ + title: '请输入标题', + icon: 'none', + duration: 2000 + }) + return } - this.$u.put(`/bst/agreement`,data).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: '保存成功', - icon: 'success', - duration:3000 - }) - setTimeout(()=>{ - uni.navigateBack() - },1500) - }else{ - uni.showToast({ - title: res.msg, - icon: 'none', - duration:3000 - }) + + // 验证内容 + const content = this.txt || this.values || '' + if (!content || !content.trim()) { + uni.showToast({ + title: '请输入内容', + icon: 'none', + duration: 2000 + }) + return + } + + if (this.isEdit) { + // 编辑模式 - PUT请求 + let data = { + id: this.id, + title: this.obj.title, + duration: Number(this.obj.duration) || 0, + content: content } - }) + this.$u.put(`/bst/agreement`, data).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '保存成功', + icon: 'success', + duration: 3000 + }) + setTimeout(() => { + uni.navigateBack() + }, 1500) + } else { + uni.showToast({ + title: res.msg || '保存失败', + icon: 'none', + duration: 3000 + }) + } + }).catch((err) => { + uni.showToast({ + title: '保存失败,请重试', + icon: 'none', + duration: 3000 + }) + }) + } else { + // 添加模式 - POST请求 + // 验证areaId + if (!this.areaId) { + uni.showToast({ + title: '区域ID不能为空', + icon: 'none', + duration: 2000 + }) + return + } + + let data = { + title: this.obj.title, + agreementType: this.agreementType, + areaId: this.areaId, + contentType: 2, + content: content, + duration: Number(this.obj.duration) || 0 + } + this.$u.post(`/bst/agreement`, data).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '添加成功', + icon: 'success', + duration: 3000 + }) + setTimeout(() => { + uni.navigateBack() + }, 1500) + } else { + uni.showToast({ + title: res.msg || '添加失败', + icon: 'none', + duration: 3000 + }) + } + }).catch((err) => { + uni.showToast({ + title: '添加失败,请重试', + icon: 'none', + duration: 3000 + }) + }) + } } }, onShareAppMessage(res) { diff --git a/page_shanghu/gonggaolist.vue b/page_shanghu/gonggaolist.vue index 9affb6e..6cea084 100644 --- a/page_shanghu/gonggaolist.vue +++ b/page_shanghu/gonggaolist.vue @@ -6,17 +6,51 @@ 加载中… - - 暂无数据 - - {{ item.title }} - - {{ item.areaName || '-' }} - {{ item.duration || '-' }}秒 - 公告 - 协议 + + + + 公告 + + 已设置 + + + + + {{ noticeItem.title }} + + {{ noticeItem.areaName || '-' }} + {{ noticeItem.duration || '-' }}秒 + + + + + 暂未设置公告 + + + + + + + + 协议 + + 已设置 + + + + + {{ agreementItem.title }} + + {{ agreementItem.areaName || '-' }} + {{ agreementItem.duration || '-' }}秒 + + + + + 暂未设置协议 + @@ -34,7 +68,10 @@ areaId:'', list: [], loading: false, - isEmpty: false, + noticeItem: null, // 公告项 + agreementItem: null, // 协议项 + hasNotice: false, // 是否有公告 + hasAgreement: false, // 是否有协议 }; }, onLoad(option) { @@ -51,14 +88,25 @@ if (res && res.code == 200) { const rows = (res.data && (res.data.rows || res.data.list)) || res.rows || [] this.list = Array.isArray(rows) ? rows : [] - this.isEmpty = this.list.length === 0 + + // 判断是否有公告和协议 + this.noticeItem = this.list.find(item => item.agreementType == 0) || null + this.agreementItem = this.list.find(item => item.agreementType == 1) || null + this.hasNotice = !!this.noticeItem + this.hasAgreement = !!this.agreementItem } else { this.list = [] - this.isEmpty = true + this.hasNotice = false + this.hasAgreement = false + this.noticeItem = null + this.agreementItem = null } }).catch(() => { this.list = [] - this.isEmpty = true + this.hasNotice = false + this.hasAgreement = false + this.noticeItem = null + this.agreementItem = null }).finally(() => { this.loading = false }) @@ -67,6 +115,12 @@ uni.navigateTo({ url:'/page_shanghu/gonggao?id=' + id }) + }, + // 跳转到添加页面 + goToAdd(agreementType){ + uni.navigateTo({ + url:`/page_shanghu/gonggao?areaId=${this.areaId}&agreementType=${agreementType}` + }) } }, } @@ -83,8 +137,7 @@ box-sizing: border-box; } - .loading, - .empty { + .loading { text-align: center; color: #999; padding: 48rpx 0; @@ -94,36 +147,127 @@ max-height: 100%; } - .item { - padding: 28rpx 24rpx; - border-radius: 16rpx; - background: #f1f1f1; + .card-wrapper { + background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); + border-radius: 20rpx; + padding: 32rpx; margin-bottom: 24rpx; + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06); + border: 2rpx solid #f0f0f0; } - .item__title { + .card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24rpx; + padding-bottom: 20rpx; + border-bottom: 2rpx solid #f0f0f0; + } + + .card-title { + font-size: 36rpx; + font-weight: 700; + color: #262B37; + position: relative; + padding-left: 16rpx; + } + + .card-title::before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 6rpx; + height: 28rpx; + background: linear-gradient(180deg, #4297F3 0%, #5BA3F5 100%); + border-radius: 3rpx; + } + + .card-status { + background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); + padding: 8rpx 20rpx; + border-radius: 20rpx; + } + + .status-text { + font-size: 24rpx; + color: #4caf50; + font-weight: 600; + } + + + .card-item { + padding: 24rpx; + background: #ffffff; + border-radius: 16rpx; + border: 2rpx solid #e8e8e8; + transition: all 0.3s ease; + } + + .card-item:active { + transform: scale(0.98); + box-shadow: 0 2rpx 12rpx rgba(66, 151, 243, 0.2); + border-color: #4297F3; + } + + .card-item__title { font-size: 32rpx; font-weight: 600; color: #262B37; - margin-bottom: 12rpx; + margin-bottom: 16rpx; + line-height: 1.5; } - .item__meta { + .card-item__meta { font-size: 24rpx; color: #7A7F8A; display: flex; align-items: center; - gap: 12rpx; - margin-bottom: 8rpx; + gap: 16rpx; } - .meta__dot { color: #bbb; } - .meta__time { margin-left: auto; } + .meta__area { + padding: 4rpx 12rpx; + background: #f5f5f5; + border-radius: 8rpx; + } - .item__brief { - font-size: 26rpx; - color: #4A4F59; - margin-top: 8rpx; - line-height: 1.6; + .meta__time { + margin-left: auto; + color: #4297F3; + font-weight: 500; + } + + .card-empty { + text-align: center; + padding: 60rpx 0; + } + + .empty-text { + display: block; + font-size: 28rpx; + color: #999; + margin-bottom: 32rpx; + } + + .add-btn { + width: 240rpx; + height: 72rpx; + line-height: 72rpx; + background: linear-gradient(135deg, #4297F3 0%, #5BA3F5 100%); + color: #ffffff; + border: none; + border-radius: 36rpx; + font-size: 28rpx; + font-weight: 600; + box-shadow: 0 8rpx 20rpx rgba(66, 151, 243, 0.3); + transition: all 0.3s ease; + } + + .add-btn:active { + transform: translateY(2rpx); + box-shadow: 0 4rpx 12rpx rgba(66, 151, 243, 0.3); } \ No newline at end of file diff --git a/page_shanghu/gongzuotai/AccountDetails.vue b/page_shanghu/gongzuotai/AccountDetails.vue index e1cb6e3..b3c19ec 100644 --- a/page_shanghu/gongzuotai/AccountDetails.vue +++ b/page_shanghu/gongzuotai/AccountDetails.vue @@ -40,12 +40,12 @@ class="type-option" :class="{active: currentindex == index}" @click="payxz(index,item)"> - + - {{item.outName}} - {{item.remark}} + {{item.channelOutName}} + {{item.channelRemark == null ? '' : item.channelRemark}} - 已绑定 + 已绑定 未绑定 @@ -233,34 +233,34 @@ url:'/page_shanghu/mingxi' }) }, - + // 点击绑定提现方式 payxz(index, val) { - if (this.userInfo.authTypes.some(item => item == 1)) { //判断是否有实名认证 - const hasMatched = this.txlist.some(item => item.channelId == val.id); - if (hasMatched) { - const matchedItem = this.txlist.find(item => item.channelId == val.id); - this.channelId = matchedItem.id; - this.currentindex = index; - if (this.amount != '') { - this.ckinpt(); - } + if (this.userInfo.authTypes.some(item => item == 1)) { //判断是否有实名认证 + const hasMatched = this.txlist.some(item => item.channelId == val.channelId) + if (hasMatched) { + const matchedItem = this.txlist.find(item => item.channelId == val.channelId) + this.channelId = matchedItem.id + this.currentindex = index + if (this.amount != '') { + this.ckinpt() + } + } else { + uni.navigateTo({ + url: '/page_user/shoukuan/addsk?activeType=' + val.channelApiType + '&id=' + val.channelId + }) + } } else { - uni.navigateTo({ - url: '/page_user/shoukuan/addsk?activeType=' + val.apiType + '&id=' + val.id - }); + uni.navigateTo({ + url:'/page_user/shiming' + }) } - } else { - uni.navigateTo({ - url:'/page_user/shiming' - }) - } }, // 获取渠道列表 getqudao(){ - this.$u.get(`/app/withdrawChannel/listSimple?appId=${this.$store.state.appid}`).then(res =>{ - if(res.code == 200){ - this.zhanghulist = res.data - } + this.$u.get(`/app/userWithdrawChannel/enabledList?appId=${this.$store.state.appid}`).then(res =>{ + if(res.code == 200){ + this.zhanghulist = res.data + } }) }, // 请求提现方式 @@ -283,11 +283,10 @@ getUserInfo(){ this.$u.get(`/getInfo`).then((res) => { if (res.code == 200) { - this.userInfo = res.user - // this.getlist() - this.gettxfs() - this.successAmount = res.stat.withdraw.successAmount == null ? 0 : res.stat.withdraw.successAmount - this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount + this.userInfo = res.user + this.gettxfs() + this.successAmount = res.stat.withdraw.successAmount == null ? 0 : res.stat.withdraw.successAmount + this.waitDivideAmount = res.stat.bonus.waitDivideAmount == null ? 0 : res.stat.bonus.waitDivideAmount } }) }, @@ -364,7 +363,6 @@ this.price = 0 this.list = [] this.pageNum = 1 - // this.getlist() this.getUserInfo() uni.showToast({ title: '提现成功', diff --git a/page_shanghu/gongzuotai/ChargingDetail.vue b/page_shanghu/gongzuotai/ChargingDetail.vue index bbd3542..30d8adc 100644 --- a/page_shanghu/gongzuotai/ChargingDetail.vue +++ b/page_shanghu/gongzuotai/ChargingDetail.vue @@ -165,7 +165,7 @@ -