合并代码

This commit is contained in:
sx 2025-02-11 09:34:58 +08:00
parent f8b2923b57
commit 28843fa3d3
10 changed files with 123 additions and 38 deletions

View File

@ -7,7 +7,7 @@ const team = {
* 我的团队
* @param {Object} param
*/
myTeam(param = {}) {
myTeam(param) {
return util.request({
url: `/user/team/get`,
query: param,
@ -15,11 +15,16 @@ const team = {
})
},
lowTeam(param) {
/**
* 修改我的上级推荐人
* @param {Object} param
*/
updateReferrer(param) {
return util.request({
url: `/home/lowTeam`,
method: 'post',
url: `/user/user/updateReferrer`,
query: param.query,
method: 'PUT',
load: true,
})
},
}

View File

@ -7,8 +7,8 @@ const config = {
// #endif
// #ifndef H5
host: 'http://91f.xyz:8080',
// host: 'http://ybfhhn.natappfree.cc',
// host: 'http://hnjcg2.natappfree.cc',
// host: 'http://22vn9z.natappfree.cc',
// host: 'https://63fdb472.r24.cpolar.top',
// #endif
// 支付方式配置
payType: {

View File

@ -21,6 +21,9 @@
// api
import api from '@/api/index.js'
import pinyin from 'js-pinyin'
import {
forEach
} from 'lodash';
const {
proxy
} = getCurrentInstance();
@ -198,14 +201,15 @@
function addlistener() {
let onFriendListUpdated = (event) => {
console.log('onFriendListUpdated', event.data);
getFriendList()
}
uni.$chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onFriendListUpdated);
uni.$chat.on(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, onFriendListUpdated);
}
//
function removelistener() {
uni.$chat.off(TencentCloudChat.EVENT.MESSAGE_RECEIVED);
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED);
}
//
@ -220,21 +224,12 @@
return
}
//
api.news.getFriendList().then(rs => {
if (rs.code == 200) {
const result = rs.data
userList.data.length = 0
//
userList.data.push(...result.map(item => {
//
let char = pinyin.getCamelChars(item.remark || item.userNickname);
return {
key: char.charAt(0),
letter: char.charAt(0),
child: [item]
}
}))
console.log('userList', userList.data)
userList.data = handleUserList(result)
return
}
util.alert({
@ -244,6 +239,47 @@
})
}
/**
* 用户列表排序
* @param {Object} userList
*/
function handleUserList(userList) {
//
const userArr = []
//
for (let i = 0; i < userList.length; i++) {
const user = userList[i]
//
let char = pinyin.getCamelChars(user.remark || user.userNickname);
//
const letter = char.charAt(0)
//
let find_index = userArr.findIndex(item => {
return item.key === letter
})
//
if (find_index == -1) {
userArr.push({
letter: letter,
key: letter,
child: [user]
})
} else {
userArr[find_index].child.push(user)
}
}
//
// userArr.sort((a, b) => {
// const surnameA = a.key;
// const surnameB = b.key;
// return surnameA.localeCompare(surnameB);
// });
return userArr;
}
//
function getLetterProperty() {
const query = uni.createSelectorQuery().in(proxy);

View File

@ -2,8 +2,8 @@
"name" : "九亿",
"appid" : "__UNI__08B31BC",
"description" : "",
"versionName" : "1.0.3",
"versionCode" : 1003,
"versionName" : "1.0.4",
"versionCode" : 1004,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -37,6 +37,10 @@
const team = ref({})
//
const showTeam = ref(false)
//
const editTigger = ref(false)
//
const edit = ref('')
onLoad(() => {
myQrcode()
@ -68,6 +72,28 @@
qrData.value = `data:image/png;base64, ${uni.arrayBufferToBase64(rs)}`
})
}
//
function updateReferrer() {
api.team.updateReferrer({
query: {
invitationCode: edit.value,
},
}).then(rs => {
if (rs.code == 200) {
//
edit.value = ''
editTigger.value = false
//
myTeam()
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
</script>
<template>
@ -89,7 +115,21 @@
</view>
<view class="log mtb60 f28" v-if="team.referrerReferrerUser">
<view class="title tac f32">我的推荐人</view>
<view class="title rows">
<view class="f1"></view>
<view class="tac f32 mlr20">我的推荐人</view>
<view class="f1 df aic">
<uni-icons type="compose" @click="editTigger = !editTigger" />
</view>
</view>
<view class="editBox rows mtb10 ptb20 plr20" v-if="editTigger">
<view class="f1">
<input type="text" v-model="edit" placeholder="请输入需要修改的上级邀请码" />
</view>
<view class="btn sm colourful plr20" @click="updateReferrer">修改</view>
</view>
<view class="list">
<view class="item rows mtb20">
<view class="f1">
@ -171,6 +211,12 @@
}
}
//
.editBox {
background-color: #eee;
border-radius: 20rpx;
}
//
.team {
background-color: #FFFBF3;

View File

@ -61,10 +61,6 @@
util.alert('请输入密码')
return
}
if (!data.invitationCode) {
util.alert('请输入推荐码')
return
}
if (!read.value) {
util.alert('请阅读并勾选服务协议》和《隐私政策》')
return

View File

@ -51,10 +51,6 @@
util.alert('请输入密码')
return
}
if (!data.invitationCode) {
util.alert('请输入推荐码')
return
}
if (!read.value) {
util.alert('请阅读并勾选服务协议》和《隐私政策》')
return

View File

@ -48,11 +48,11 @@
name: '视讯消息',
load: false,
},
{
key: 'video',
name: '商城消息',
load: false,
},
// {
// key: 'video',
// name: '',
// load: false,
// },
])
//
const menuIndex = ref('')
@ -202,7 +202,8 @@
<!-- 群组 -->
<swiper-item>
<groupList v-if="menuList[1].load" />
<!-- <groupList v-if="menuList[1].load" /> -->
<msgList v-if="menuList[1].load" />
<view class="loading" v-else>正在加载</view>
</swiper-item>

View File

@ -92,6 +92,11 @@ node拓展
md5加密
npm install crypto-js --save-dev
---
九亿后台
网址91f.xyz
账号admin
密码91f.xyz9191@9
第三方

View File

@ -4,8 +4,8 @@ import {
import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080'
// let target = 'http://ybfhhn.natappfree.cc'
// let target = 'http://hnjcg2.natappfree.cc'
// let target = 'http://22vn9z.natappfree.cc'
// let target = 'https://63fdb472.r24.cpolar.top'
export default defineConfig({
plugins: [uni()],