合并代码

This commit is contained in:
sx 2025-02-08 18:25:43 +08:00
parent 42072a546e
commit 35d0dde6c4
11 changed files with 81 additions and 33 deletions

View File

@ -232,6 +232,35 @@ const mine = {
method: 'POST',
})
},
/**
* 获取im用户资料
* @param {Object} param
*/
getImUserInfo(param) {
return util.request({
url: `/user/chat/getImUserInfo`,
query: param.query,
method: 'GET',
})
},
/**
* 修改im用户资料
* @param {Object} param
*/
setImUserInfo(param) {
return util.request({
url: `/user/chat/setImUserInfo`,
query: param.query,
data: param.data,
method: 'POST',
load: true,
header: {
// 'Content-Type': 'multipart/form-data',
}
})
},
}
export default mine

View File

@ -91,8 +91,8 @@ const shop = {
*/
removeProduct(param) {
return util.request({
url: `/webProduct`,
method: 'POST',
url: `/shopify/webProduct`,
method: 'DELETE',
path: param.path,
load: true,
})

View File

@ -227,9 +227,9 @@ const video = {
*/
followVideo(param) {
return util.request({
url: `/homecommon/followVideo`,
url: `/video/video/attentionList`,
query: param.query,
method: 'POST',
method: 'GET',
})
},

View File

@ -7,8 +7,8 @@ const config = {
// #endif
// #ifndef H5
// host: 'http://91f.xyz:8080',
host: 'http://192.168.0.110:8080',
// host: 'http://192.168.0.100:8080',
// host: 'http://bg8fnj.natappfree.cc',
host: 'http://79c97567.r24.cpolar.top',
// #endif
// 支付方式配置
payType: {

View File

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

View File

@ -31,7 +31,7 @@
function getDetail() {
api.getArticle({
query: {
agreementId: 4,
agreementId: wrapId.value,
},
}).then(rs => {
if (rs.code == 200) {

View File

@ -496,7 +496,7 @@
function handle_tab(index) {
if (tabIndex.value === index) return
// 如果是关注 但是没有用户id
if (tab[index].name == '关注' && !userinfo.value.userId) {
if (tab[index].name == '关注' && !userinfo.value.id) {
uni.navigateTo({
url: '/pages/login/loginPhone'
})

View File

@ -11,24 +11,23 @@
} from '@dcloudio/uni-app'
//
import util from '@/common/js/util.js'
// api
import api from '@/api/index.js'
//
import TencentCloudChat from '@tencentcloud/chat';
//
const store = useStore()
//
const userinfo = computed(() => {
let result = store.state.userinfo
return result
})
const userinfo = computed(() => store.state.userinfo)
//
const allowType = [{
id: TencentCloudChat.TYPES.ALLOW_TYPE_ALLOW_ANY,
id: 'AllowType_Type_AllowAny',
name: '允许任何人添加',
}, {
id: TencentCloudChat.TYPES.ALLOW_TYPE_NEED_CONFIRM,
id: 'AllowType_Type_NeedConfirm',
name: '需要确认才能添加',
}, {
id: TencentCloudChat.TYPES.ALLOW_TYPE_DENY_ANY,
id: 'AllowType_Type_DenyAny',
name: '不允许任何人添加 ',
}, ]
//
@ -60,20 +59,39 @@
//
function getAddType() {
//
uni.$chat.getMyProfile().then((rs) => {
const result = rs.data
imUserinfo.value = result
//
allowTypeIndex.value = allowType.findIndex(node => node.id == result.allowType)
api.mine.getImUserInfo({
query: {
userIds: userinfo.value.id
}
}).then(rs => {
if (rs.code === 200) {
console.log('rs', rs)
const result = JSON.parse(rs.msg)
allowTypeIndex.value = allowType.findIndex(item => item.id === result.UserProfileItem[0]
.ProfileItem[0].Value)
return
}
util.alert({
content: rs.msg,
showCancel: false
})
})
}
// im
// im
function updateMyProfile() {
//
uni.$chat.updateMyProfile({
allowType: allowType[allowTypeIndex.value].id
api.mine.setImUserInfo({
query: {
'allowType': allowType[allowTypeIndex.value].id,
userId: userinfo.value.id,
},
}).then(rs => {
if (rs.code != 200)
util.alert({
content: rs.msg,
showCancel: false
})
})
}
@ -182,7 +200,7 @@
</view>
</view>
<view class="line" v-if="imUserinfo.userID">
<view class="line" v-if="userinfo.id">
<picker :range="allowType" range-key="name" @change="handleAllowType" :value="allowTypeIndex">
<view class=" rows">
<view class="">好友验证方式</view>

View File

@ -106,6 +106,7 @@
//
function getFriendList() {
uni.$chat.getFriendApplicationList().then(rs => {
console.log('getFriendApplicationList',rs)
if (rs.code === 0) {
const result = rs.data
userList.data = result.friendApplicationList.map(node => {

View File

@ -99,8 +99,9 @@
/**
* 删除发布的商品
* @param {Object} item 商品对象
* @param {Object} index 操作的下标
*/
function handleRemove(item) {
function handleRemove(item, index) {
util.alert({
content: '确定删除该商品吗?',
}).then(res => {
@ -110,8 +111,7 @@
path: [item.id]
}).then(rs => {
if (rs.code === 200) {
//
refeshList()
product.list.splice(index, 1)
return
}
util.alert({
@ -160,7 +160,7 @@
<!-- <view class="btn sm bar closeHollow plr30">下架</view> -->
<!-- <view class="btn sm bar closeHollow plr30">改价</view> -->
<!-- 在没有进行中的订单才能删除 -->
<view class="btn sm bar closeHollow plr30" @click="handleRemove(item)">删除</view>
<view class="btn sm bar closeHollow plr30" @click="handleRemove(item,index)">删除</view>
<view class="btn sm bar warmHollow plr30" @click="handleEdit(item)">编辑</view>
</view>
</view>

View File

@ -4,8 +4,8 @@ import {
import uni from '@dcloudio/vite-plugin-uni';
// let target = 'http://91f.xyz:8080'
let target = 'http://192.168.0.110:8080'
// let target = 'http://192.168.0.100:8080'
// let target = 'http://bg8fnj.natappfree.cc'
let target = 'http://79c97567.r24.cpolar.top'
export default defineConfig({
plugins: [uni()],