合并代码
This commit is contained in:
parent
42072a546e
commit
35d0dde6c4
|
@ -232,6 +232,35 @@ const mine = {
|
||||||
method: 'POST',
|
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
|
export default mine
|
|
@ -91,8 +91,8 @@ const shop = {
|
||||||
*/
|
*/
|
||||||
removeProduct(param) {
|
removeProduct(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/webProduct`,
|
url: `/shopify/webProduct`,
|
||||||
method: 'POST',
|
method: 'DELETE',
|
||||||
path: param.path,
|
path: param.path,
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
|
|
|
@ -227,9 +227,9 @@ const video = {
|
||||||
*/
|
*/
|
||||||
followVideo(param) {
|
followVideo(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/homecommon/followVideo`,
|
url: `/video/video/attentionList`,
|
||||||
query: param.query,
|
query: param.query,
|
||||||
method: 'POST',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ const config = {
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// host: 'http://91f.xyz:8080',
|
// host: 'http://91f.xyz:8080',
|
||||||
host: 'http://192.168.0.110:8080',
|
// host: 'http://bg8fnj.natappfree.cc',
|
||||||
// host: 'http://192.168.0.100:8080',
|
host: 'http://79c97567.r24.cpolar.top',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "九亿",
|
"name" : "九亿",
|
||||||
"appid" : "__UNI__08B31BC",
|
"appid" : "__UNI__08B31BC",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "2.0.0",
|
"versionName" : "1.0.3",
|
||||||
"versionCode" : 200,
|
"versionCode" : 1003,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
function getDetail() {
|
function getDetail() {
|
||||||
api.getArticle({
|
api.getArticle({
|
||||||
query: {
|
query: {
|
||||||
agreementId: 4,
|
agreementId: wrapId.value,
|
||||||
},
|
},
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
|
|
@ -496,7 +496,7 @@
|
||||||
function handle_tab(index) {
|
function handle_tab(index) {
|
||||||
if (tabIndex.value === index) return
|
if (tabIndex.value === index) return
|
||||||
// 如果是关注 但是没有用户id
|
// 如果是关注 但是没有用户id
|
||||||
if (tab[index].name == '关注' && !userinfo.value.userId) {
|
if (tab[index].name == '关注' && !userinfo.value.id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/loginPhone'
|
url: '/pages/login/loginPhone'
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,24 +11,23 @@
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
|
// api
|
||||||
|
import api from '@/api/index.js'
|
||||||
// 腾讯云聊天
|
// 腾讯云聊天
|
||||||
import TencentCloudChat from '@tencentcloud/chat';
|
import TencentCloudChat from '@tencentcloud/chat';
|
||||||
// 仓库
|
// 仓库
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => {
|
const userinfo = computed(() => store.state.userinfo)
|
||||||
let result = store.state.userinfo
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
// 添加好友方式
|
// 添加好友方式
|
||||||
const allowType = [{
|
const allowType = [{
|
||||||
id: TencentCloudChat.TYPES.ALLOW_TYPE_ALLOW_ANY,
|
id: 'AllowType_Type_AllowAny',
|
||||||
name: '允许任何人添加',
|
name: '允许任何人添加',
|
||||||
}, {
|
}, {
|
||||||
id: TencentCloudChat.TYPES.ALLOW_TYPE_NEED_CONFIRM,
|
id: 'AllowType_Type_NeedConfirm',
|
||||||
name: '需要确认才能添加',
|
name: '需要确认才能添加',
|
||||||
}, {
|
}, {
|
||||||
id: TencentCloudChat.TYPES.ALLOW_TYPE_DENY_ANY,
|
id: 'AllowType_Type_DenyAny',
|
||||||
name: '不允许任何人添加 ',
|
name: '不允许任何人添加 ',
|
||||||
}, ]
|
}, ]
|
||||||
// 添加好友下标
|
// 添加好友下标
|
||||||
|
@ -60,20 +59,39 @@
|
||||||
|
|
||||||
// 获取添加好友方式
|
// 获取添加好友方式
|
||||||
function getAddType() {
|
function getAddType() {
|
||||||
//
|
api.mine.getImUserInfo({
|
||||||
uni.$chat.getMyProfile().then((rs) => {
|
query: {
|
||||||
const result = rs.data
|
userIds: userinfo.value.id
|
||||||
imUserinfo.value = result
|
}
|
||||||
// 添加好友下标
|
}).then(rs => {
|
||||||
allowTypeIndex.value = allowType.findIndex(node => node.id == result.allowType)
|
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() {
|
function updateMyProfile() {
|
||||||
// 修改个人标配资料
|
// 修改个人标配资料
|
||||||
uni.$chat.updateMyProfile({
|
api.mine.setImUserInfo({
|
||||||
allowType: allowType[allowTypeIndex.value].id
|
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>
|
</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">
|
<picker :range="allowType" range-key="name" @change="handleAllowType" :value="allowTypeIndex">
|
||||||
<view class=" rows">
|
<view class=" rows">
|
||||||
<view class="">好友验证方式</view>
|
<view class="">好友验证方式</view>
|
||||||
|
|
|
@ -106,6 +106,7 @@
|
||||||
// 获取添加朋友列表
|
// 获取添加朋友列表
|
||||||
function getFriendList() {
|
function getFriendList() {
|
||||||
uni.$chat.getFriendApplicationList().then(rs => {
|
uni.$chat.getFriendApplicationList().then(rs => {
|
||||||
|
console.log('getFriendApplicationList',rs)
|
||||||
if (rs.code === 0) {
|
if (rs.code === 0) {
|
||||||
const result = rs.data
|
const result = rs.data
|
||||||
userList.data = result.friendApplicationList.map(node => {
|
userList.data = result.friendApplicationList.map(node => {
|
||||||
|
|
|
@ -99,8 +99,9 @@
|
||||||
/**
|
/**
|
||||||
* 删除发布的商品
|
* 删除发布的商品
|
||||||
* @param {Object} item 商品对象
|
* @param {Object} item 商品对象
|
||||||
|
* @param {Object} index 操作的下标
|
||||||
*/
|
*/
|
||||||
function handleRemove(item) {
|
function handleRemove(item, index) {
|
||||||
util.alert({
|
util.alert({
|
||||||
content: '确定删除该商品吗?',
|
content: '确定删除该商品吗?',
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
@ -110,8 +111,7 @@
|
||||||
path: [item.id]
|
path: [item.id]
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code === 200) {
|
if (rs.code === 200) {
|
||||||
// 重构商品列表
|
product.list.splice(index, 1)
|
||||||
refeshList()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
util.alert({
|
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">改价</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 class="btn sm bar warmHollow plr30" @click="handleEdit(item)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -4,8 +4,8 @@ import {
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
// let target = 'http://91f.xyz:8080'
|
// let target = 'http://91f.xyz:8080'
|
||||||
let target = 'http://192.168.0.110:8080'
|
// let target = 'http://bg8fnj.natappfree.cc'
|
||||||
// let target = 'http://192.168.0.100:8080'
|
let target = 'http://79c97567.r24.cpolar.top'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue