This commit is contained in:
cansnow
2025-12-08 18:10:51 +08:00
parent 22ee59cd3d
commit b2e1b8930e
19 changed files with 218 additions and 300 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
</template> </template>
<script> <script>
import defaultGroupIcon from "static/images/contact_my_group.png"; import defaultGroupIcon from "@/static/images/contact_my_group.png";
import defaultNotifyIcon from "static/images/default_notify_icon.png"; import defaultNotifyIcon from "@/static/images/default_notify_icon.png";
import util from "@/util"; import util from "@/util";
export default { export default {
name: "MyAvatar", name: "MyAvatar",
+1 -1
View File
@@ -17,7 +17,7 @@
<!--preload-links--> <!--preload-links-->
<!--app-context--> <!--app-context-->
</head> </head>
<body> <body class="body">
<div id="app"><!--app-html--></div> <div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script> <script type="module" src="/main.js"></script>
</body> </body>
+3 -1
View File
@@ -54,6 +54,8 @@ const app = new Vue({
}); });
// 引入请求封装 // 引入请求封装
require("./util/request/index")(app); import request from "./util/request/index";
request(app)
//require("./util/request/index")(app);
app.$mount(); app.$mount();
+1
View File
@@ -269,6 +269,7 @@
{ {
"path": "pages/common/webview", "path": "pages/common/webview",
"style": { "style": {
"navigationStyle": "default",
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
+46 -13
View File
@@ -1,7 +1,25 @@
<template> <template>
<view class="scan_page"> <view class="scan_page" :style="{height:windowHeight+'px'}">
<uni-nav-bar left-icon="back" fixed backgroundColor="transparent" statusBar></uni-nav-bar> <uni-nav-bar
<barcode id='1' class="barcode" autostart="true" ref="barcode" background="rgb(0,0,0)" frameColor="#1C86EE" scanbarColor="#1C86EE" :filters="fil" @marked="success1" @error="fail1"></barcode> left-icon="back"
@clickLeft="back"
fixed
backgroundColor="#FFF"
statusBar
>
</uni-nav-bar>
<barcode id='1'
class="barcode"
ref="barcode"
:autostart="true"
background="rgb(0,0,0)"
frameColor="#07c160"
scanbarColor="#07c160"
:style="{height:windowHeight+'px'}"
:filters="fil"
@marked="success"
@error="fail">
</barcode>
<view class="overlay"> <view class="overlay">
<button class="btn" @click="toStart">开始扫码识别</button> <button class="btn" @click="toStart">开始扫码识别</button>
<button class="btn" @click="tocancel">取消扫码识别</button> <button class="btn" @click="tocancel">取消扫码识别</button>
@@ -13,20 +31,30 @@
<script> <script>
export default { export default {
onLoad() {
},
data() { data() {
return { return {
fil: [0, 2, 1] fil: [0, 2, 1,3,4,12],
windowHeight:500,
} }
}, },
onLoad() {
uni.scanCode({
complete(res) {
console.log(res)
}
})
},
created() {
const info = uni.getSystemInfoSync();
console.log(info);
this.windowHeight = info.screenHeight;
},
methods: { methods: {
success1(e) { success(e) {
console.log("success1:" + JSON.stringify(e)); console.log("success1:" + JSON.stringify(e));
}, },
fail1(e) { fail(e) {
console.log("fail1:" + JSON.stringify(e)); console.log("fail1:" + JSON.stringify(e));
}, },
toStart: function() { toStart: function() {
@@ -49,6 +77,9 @@
,(e)=>{ ,(e)=>{
console.log("scan_error:"+JSON.stringify(e)); console.log("scan_error:"+JSON.stringify(e));
}); });
},
back(){
uni.navigateBack();
} }
} }
} }
@@ -57,12 +88,9 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.scan_page{ .scan_page{
width: 750rpx; width: 750rpx;
height: 100vh;
position: relative; position: relative;
background: #800000;
.barcode { .barcode {
width: 100vw; width: 750rpx;
height: 100vh;
background-color: #808080; background-color: #808080;
} }
@@ -76,6 +104,11 @@
} }
.overlay{ .overlay{
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
position: absolute;
bottom: 100rpx;
left: 0;
right: 0;
height: 200rpx;
} }
} }
</style> </style>
+4 -2
View File
@@ -9,8 +9,10 @@
linkUrl: "", linkUrl: "",
}; };
}, },
onShow() { onLoad(opt) {
this.linkUrl = 'https://doc.rentsoft.cn/' if(opt.url){
this.linkUrl = opt.url;
}
}, },
onReady() { onReady() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
+6 -3
View File
@@ -12,6 +12,9 @@
<script> <script>
import CustomNavBar from "@/components/CustomNavBar/index.vue"; import CustomNavBar from "@/components/CustomNavBar/index.vue";
import ActionItem from "./ActionItem.vue"; import ActionItem from "./ActionItem.vue";
import contact_add_search_user_img from "static/images/contact_add_search_user.png"
import contact_add_join_group_img from "static/images/contact_add_join_group.png"
import contact_add_create_group_img from "static/images/contact_add_create_group.png"
export default { export default {
components: { components: {
CustomNavBar, CustomNavBar,
@@ -24,13 +27,13 @@
idx: 0, idx: 0,
title: "创建群聊", title: "创建群聊",
desc: "创建群聊,全面使用OpenIM", desc: "创建群聊,全面使用OpenIM",
icon: require("static/images/contact_add_create_group.png"), icon: contact_add_create_group_img,
}, },
{ {
idx: 1, idx: 1,
title: "添加群聊", title: "添加群聊",
desc: "向管理员或团队成员询问ID", desc: "向管理员或团队成员询问ID",
icon: require("static/images/contact_add_join_group.png"), icon: rcontact_add_join_group_img,
}, },
], ],
friendActionMenus: [ friendActionMenus: [
@@ -38,7 +41,7 @@
idx: 0, idx: 0,
title: "添加好友", title: "添加好友",
desc: "通过手机号/ID号/搜索添加", desc: "通过手机号/ID号/搜索添加",
icon: require("static/images/contact_add_search_user.png"), icon: contact_add_search_user_img,
}, },
], ],
}; };
@@ -30,6 +30,10 @@
<script> <script>
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
import {ContactMenuTypes} from "@/constant"; import {ContactMenuTypes} from "@/constant";
import contact_new_friend_img from "@/static/images/contact_new_friend.png";
import contact_new_group_img from "@/static/images/contact_new_group.png";
import contact_my_friend_img from "@/static/images/contact_my_friend.png";
import contact_my_group_img from "@/static/images/contact_my_group.png";
export default { export default {
name: "", name: "",
@@ -43,13 +47,13 @@
idx: 0, idx: 0,
type: ContactMenuTypes.NewFriend, type: ContactMenuTypes.NewFriend,
title: "新的好友", title: "新的好友",
icon: require("static/images/contact_new_friend.png"), icon: contact_new_friend_img,
}, },
// { // {
// idx: 1, // idx: 1,
// type: ContactMenuTypes.NewGroup, // type: ContactMenuTypes.NewGroup,
// title: "新的群组", // title: "新的群组",
// icon: require("static/images/contact_new_group.png"), // icon: contact_new_group_img,
// }, // },
]; ];
}, },
@@ -59,14 +63,14 @@
// idx: 2, // idx: 2,
// type: ContactMenuTypes.MyFriend, // type: ContactMenuTypes.MyFriend,
// title: "我的好友", // title: "我的好友",
// icon: require("static/images/contact_my_friend.png"), // icon: contact_my_friend_img,
// badge: 0, // badge: 0,
// }, // },
{ {
idx: 3, idx: 3,
type: ContactMenuTypes.MyGroup, type: ContactMenuTypes.MyGroup,
title: "群聊", title: "群聊",
icon: require("static/images/contact_my_group.png"), icon: contact_my_group_img,
badge: 0, badge: 0,
}, },
]; ];
+2 -1
View File
@@ -24,6 +24,7 @@
<script> <script>
import CustomNavBar from "@/components/CustomNavBar/index.vue"; import CustomNavBar from "@/components/CustomNavBar/index.vue";
import ActionItem from "../contactAdd/ActionItem.vue"; import ActionItem from "../contactAdd/ActionItem.vue";
import switch_join_id_img from "@/static/images/switch_join_id.png";
export default { export default {
components: { components: {
CustomNavBar, CustomNavBar,
@@ -36,7 +37,7 @@ export default {
idx: 1, idx: 1,
title: "群ID号加入", title: "群ID号加入",
desc: "向管理员或团队成员询问ID", desc: "向管理员或团队成员询问ID",
icon: require("static/images/switch_join_id.png"), icon: switch_join_id_img,
}, },
], ],
}; };
@@ -9,7 +9,8 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view style="padding:0rpx 20rpx;position: absolute;bottom: 1rpx;right: 10rpx; <view style="padding:0rpx 20rpx;position: absolute;bottom: 1rpx;right: 10rpx;
width: 250rpx;height: 150rpx;z-index: 1000;opacity: 0.9;" class="u-flex u-row-right u-col-center"> width: 250rpx;height: 150rpx;z-index: 1000;opacity: 0.9;"
class="u-flex u-row-right u-col-center">
<view class="u-flex u-row-center u-col-center" <view class="u-flex u-row-center u-col-center"
style="border: 1px solid #f1f1f1;border-radius: 10rpx; background-color: #82848a;width: 100rpx;padding: 15rpx 20rpx;margin-right: 8rpx;"> style="border: 1px solid #f1f1f1;border-radius: 10rpx; background-color: #82848a;width: 100rpx;padding: 15rpx 20rpx;margin-right: 8rpx;">
<view @click="delSendStr()" @longpress="clearSendStr()"> <view @click="delSendStr()" @longpress="clearSendStr()">
@@ -25,7 +26,7 @@
<u-row class="action_row" v-else> <u-row class="action_row" v-else>
<u-col v-for="item in actionList" :key="item.idx" @click="actionClick(item)" span="3"> <u-col v-for="item in actionList" :key="item.idx" @click="actionClick(item)" span="3">
<view class="action_item"> <view class="action_item">
<image :src="item.icon" alt="" srcset="" /> <image class="img" :src="item.icon" alt="" srcset="" />
<text class="action_item_title">{{ item.title }}</text> <text class="action_item_title">{{ item.title }}</text>
</view> </view>
</u-col> </u-col>
@@ -36,6 +37,10 @@
<script> <script>
import {ChatingFooterActionTypes,} from "@/constant"; import {ChatingFooterActionTypes,} from "@/constant";
import emojis from "@/common/emojis.js" import emojis from "@/common/emojis.js"
import chating_action_image from "@/static/images/chating_action_image.png";
import chating_action_camera from "@/static/images/chating_action_camera.png";
import chating_action_call from "@/static/images/chating_action_call.png";
import chating_action_location from "@/static/images/chating_action_location.png";
export default { export default {
props:{ props:{
@@ -59,37 +64,37 @@
idx: 0, idx: 0,
type: ChatingFooterActionTypes.Album, type: ChatingFooterActionTypes.Album,
title: "照片", title: "照片",
icon: require("static/images/chating_action_image.png"), icon: chating_action_image,
}, },
{ {
idx: 1, idx: 1,
type: ChatingFooterActionTypes.Camera, type: ChatingFooterActionTypes.Camera,
title: "拍摄", title: "拍摄",
icon: require("static/images/chating_action_camera.png"), icon: chating_action_camera,
}, },
{ {
idx: 2, idx: 2,
type: ChatingFooterActionTypes.Video, type: ChatingFooterActionTypes.Video,
title: "视频通话", title: "视频通话",
icon: require("static/images/chating_action_call.png"), icon: chating_action_call,
}, },
{ {
idx: 3, idx: 3,
type: ChatingFooterActionTypes.Location, type: ChatingFooterActionTypes.Location,
title: "位置", title: "位置",
icon: require("static/images/chating_action_location.png"), icon: chating_action_location,
}, },
// { // {
// idx: 0, // idx: 0,
// type: ChatingFooterActionTypes.Album, // type: ChatingFooterActionTypes.Album,
// title: "红包", // title: "红包",
// icon: require("static/images/chating_action_image.png"), // icon: chating_action_image,
// }, // },
// { // {
// idx: 0, // idx: 0,
// type: ChatingFooterActionTypes.Album, // type: ChatingFooterActionTypes.Album,
// title: "转账", // title: "转账",
// icon: require("static/images/chating_action_image.png"), // icon: chating_action_image,
// } // }
], ],
}; };
@@ -138,7 +143,7 @@
flex-direction: column; flex-direction: column;
margin-top: 24rpx; margin-top: 24rpx;
image { .img {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
} }
@@ -58,8 +58,8 @@
import {ChatingFooterActionTypes,UpdateMessageTypes,} from "@/constant"; import {ChatingFooterActionTypes,UpdateMessageTypes,} from "@/constant";
import IMSDK, {IMMethods,MessageStatus,MessageType,} from "openim-uniapp-polyfill"; import IMSDK, {IMMethods,MessageStatus,MessageType,} from "openim-uniapp-polyfill";
import UParse from "@/components/gaoyia-parse/parse.vue"; import UParse from "@/components/gaoyia-parse/parse.vue";
import CustomEditor from "./CustomEditor.vue"; import CustomEditor from "./CustomEditor";
import ChatingActionBar from "./ChatingActionBar.vue"; import ChatingActionBar from "./ChatingActionBar";
const needClearTypes = [MessageType.TextMessage]; const needClearTypes = [MessageType.TextMessage];
@@ -1,7 +1,7 @@
<template> <template>
<u-navbar @click="click" placeholder class="chating_header" bgColor="transparent"> <u-navbar @click="click" placeholder class="chating_header" bgColor="transparent">
<view @click="routeBack" class="u-nav-slot" slot="left"> <view @click="routeBack" class="u-nav-slot" slot="left">
<img class="back_icon" width="12" height="20" src="static/images/common_left_arrow.png" alt="" srcset="" /> <image class="back_icon" style="width: 12px; height: 20px;" src="/static/images/common_left_arrow.png"></image>
</view> </view>
<view class="u-nav-slot" slot="center"> <view class="u-nav-slot" slot="center">
<view class="chating_info" :class="{ chating_info_single: isSingle }"> <view class="chating_info" :class="{ chating_info_single: isSingle }">
@@ -25,7 +25,7 @@
<script> <script>
import {mapGetters,mapActions} from "vuex"; import {mapGetters,mapActions} from "vuex";
import MessageItemRender from "./MessageItem/index.vue"; import MessageItemRender from "./MessageItem/index";
export default { export default {
name: "", name: "",
@@ -12,7 +12,7 @@
<view style="height: 100%;display: flex;justify-items: center;align-items: center;"> <view style="height: 100%;display: flex;justify-items: center;align-items: center;">
<view class="message_send_state"> <view class="message_send_state">
<u-loading-icon v-if="showSending && !isPreview" /> <u-loading-icon v-if="showSending && !isPreview" />
<image v-if="isFailedMessage && !isPreview" src="@/static/images/chating_message_failed.png" /> <image v-if="isFailedMessage && !isPreview" class="state_img" src="@/static/images/chating_message_failed.png" />
</view> </view>
</view> </view>
<view class="message_content_wrap message_content_wrap_shadow" :id="`message_content_wrap_${source.clientMsgID}`" @longtap.stop.prevent="longtapEvent($event)"> <view class="message_content_wrap message_content_wrap_shadow" :id="`message_content_wrap_${source.clientMsgID}`" @longtap.stop.prevent="longtapEvent($event)">
@@ -23,12 +23,6 @@
</view> </view>
</view> </view>
<!-- 长按菜单 -->
<chunLei-popups v-model="toolTipFlag" :popData="toolTipData" @tapPopup="tapPopup"
:x="toolTipX" :y="toolTipY" :placement="popPostion"
:triangle="false"
direction="row" theme="dark" :dynamic="true">
</chunLei-popups>
</view> </view>
<view v-else class="notice_message_container" style="margin: 0 auto;" :id="`auchor${source.clientMsgID}`"> <view v-else class="notice_message_container" style="margin: 0 auto;" :id="`auchor${source.clientMsgID}`">
@@ -39,11 +33,10 @@
<script> <script>
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
import {MessageStatus,MessageType,SessionType,} from "openim-uniapp-polyfill"; import {MessageStatus,MessageType,SessionType,} from "openim-uniapp-polyfill";
import chunLeiPopups from "@/components/chunLei-popups.vue";
import MyAvatar from "@/components/MyAvatar/index.vue"; import MyAvatar from "@/components/MyAvatar/index.vue";
import TextMessageRender from "./TextMessageRender.vue"; import TextMessageRender from "./TextMessageRender";
import MediaMessageRender from "./MediaMessageRender.vue"; import MediaMessageRender from "./MediaMessageRender";
import ErrorMessageRender from "./ErrorMessageRender.vue"; import ErrorMessageRender from "./ErrorMessageRender";
import {noticeMessageTypes} from "@/constant"; import {noticeMessageTypes} from "@/constant";
import {tipMessaggeFormat,formatMessageTime} from "@/util/imCommon"; import {tipMessaggeFormat,formatMessageTime} from "@/util/imCommon";
@@ -56,8 +49,7 @@
MyAvatar, MyAvatar,
TextMessageRender, TextMessageRender,
MediaMessageRender, MediaMessageRender,
ErrorMessageRender, ErrorMessageRender
chunLeiPopups
}, },
props: { props: {
source: Object, source: Object,
@@ -139,124 +131,10 @@
}, },
longtapEvent(e){ longtapEvent(e){
console.log('longtapEvent'); console.log('longtapEvent');
// console.log("#"+e.currentTarget.id,e);
// let view = uni.createSelectorQuery().in(this).select("#"+e.currentTarget.id.replace('message_content_wrap_','auchor'));
// console.log(e.touches[0].clientX,e.touches[0].clientY);
// view.boundingClientRect((data) => {
// console.log(data.left,data.top);
// //console.log("得到布局位置信息" + JSON.stringify(data));
// }).exec();
this.$emit('userEvent',{type:"longtapMsgContent"},this.source); this.$emit('userEvent',{type:"longtapMsgContent"},this.source);
//this.showToolTip(e);
}, },
//操作项
showToolTip: function(e) {
let that = this;
that.toolTipData=[
{
id: 1,
icon: '/static/images/chat/longTipIcon/copy.png',
title: '复制',
disabled: false
},
{
id: 4,
icon: '/static/images/chat/longTipIcon/zhuanfa.png',
title: '转发',
disabled: false
},
{
id: 6,
icon: '/static/images/chat/longTipIcon/select.png',
title: '多选',
disabled: false
},
{
id: 7,
icon: '/static/images/chat/longTipIcon/delete.png',
title: '删除',
disabled: false
},
// {
// id: 5,
// icon: '/static/images/chat/longTipIcon/tag.png',
// title: '编辑',
// disabled: false
// }
];
that.toolTipX =e.touches[0].clientX;
that.toolTipY = e.touches[0].clientY-20;
that.toolTipFlag = !that.toolTipFlag;
if(that.toolTipFlag==true){
let nowTime=new Date().getTime();
let msgTime=that.source.createTime;
let diff= nowTime-msgTime;
if(this.isSender&&diff<120000){
that.toolTipData.push({
id: 3,
icon: '/static/images/chat/longTipIcon/revert.png',
title: '撤回',
disabled: false
})
}
}
},
tapPopup(e) {
let that = this;
let currentHandleMsg=that.source;
console.log(currentHandleMsg);
if (e.title == "撤回") {
that.toolTipFlag = false;
that.$emit('userEvent',{type:'revokeMessage'},that.source);
}
if (e.title == "复制") {
let content = currentHandleMsg.textElem?.content;
if (content) {
let copyContent =content.text;
let formatStr = copyContent;
//let formatStr = this.replaceReseverEmoji(copyContent);
uni.setClipboardData({
data:formatStr,
success: (res) => {
uni.showToast({
title: res,
icon: 'none'
})
},
error: (e) => {
uni.showToast({
title: e,
icon: 'none',
duration: 3000,
})
}
})
}
that.toolTipFlag = false;
return;
}
if (e.title == "转发") {
that.$emit('userEvent',{type:'forward'},that.source);
that.toolTipFlag = false;
return
}
if(e.title=="调换"){
that.toolTipFlag = false;
return;
}
if (e.title == "多选") {
that.$emit('userEvent',{type:'select'},that.source);
that.toolTipFlag = false;
return
}
if (e.title == "删除") {
that.toolTipFlag = false;
that.$emit('userEvent',{type:'deleteMsg'},that.source);
return
}
}, },
},
}; };
</script> </script>
@@ -346,7 +224,7 @@
color: #999; color: #999;
} }
image { .state_img {
width: 16px; width: 16px;
height: 16px; height: 16px;
} }
+8 -9
View File
@@ -1,8 +1,8 @@
<template> <template>
<view class="chating_container"> <view class="chating_container">
<SelectHeader v-if="selectFlag" :count="selectItems.length" @leftClick="onUserMessageEvent({type:'cancelSelect'})" ref="selectHeaderRef" /> <SelectHeader v-if="selectFlag" :count="selectItems.length" @leftClick="onUserMessageEvent({type:'cancelSelect'})" ref="selectHeaderRef" />
<chating-header v-else @click="pageClick" ref="chatingHeaderRef" /> <ChatingHeader v-else @click="pageClick" ref="chatingHeaderRef" />
<chating-list <ChatingList
@userEvent="onUserMessageEvent" @userEvent="onUserMessageEvent"
@click="pageClick" @click="pageClick"
:selectItems="selectItems" :selectItems="selectItems"
@@ -10,7 +10,7 @@
ref="chatingListRef" ref="chatingListRef"
@initSuccess="initSuccess" /> @initSuccess="initSuccess" />
<SelectFooter v-if="selectFlag" ref="selectFooterRef" @userEvent="onUserMessageEvent" /> <SelectFooter v-if="selectFlag" ref="selectFooterRef" @userEvent="onUserMessageEvent" />
<chating-footer v-else ref="chatingFooterRef" :footerOutsideFlag="footerOutsideFlag" <ChatingFooter v-else ref="chatingFooterRef" :footerOutsideFlag="footerOutsideFlag"
@scrollToBottom="scrollToBottom" /> @scrollToBottom="scrollToBottom" />
<u-loading-page :loading="initLoading"></u-loading-page> <u-loading-page :loading="initLoading"></u-loading-page>
</view> </view>
@@ -20,14 +20,13 @@
import {mapActions,mapGetters} from "vuex"; import {mapActions,mapGetters} from "vuex";
import {offlinePushInfo} from "@/util/imCommon"; import {offlinePushInfo} from "@/util/imCommon";
import {PageEvents,ContactChooseTypes } from "@/constant"; import {PageEvents,ContactChooseTypes } from "@/constant";
import ChatingHeader from "./components/ChatingHeader.vue"; import ChatingHeader from "./components/ChatingHeader";
import ChatingFooter from "./components/ChatingFooter/index.vue"; import ChatingFooter from "./components/ChatingFooter/index";
import ChatingList from "./components/ChatingList.vue"; import ChatingList from "./components/ChatingList";
import SelectHeader from "./components/SelectHeader.vue"; import SelectHeader from "./components/SelectHeader";
import SelectFooter from "./components/SelectFooter.vue"; import SelectFooter from "./components/SelectFooter";
import {markConversationAsRead} from "@/util/imCommon"; import {markConversationAsRead} from "@/util/imCommon";
import IMSDK, {MessageType} from "openim-uniapp-polyfill"; import IMSDK, {MessageType} from "openim-uniapp-polyfill";
export default { export default {
components: { components: {
ChatingHeader, ChatingHeader,
+3 -14
View File
@@ -1,19 +1,8 @@
import store from "@/store"; import store from "@/store";
import { import {CustomType,GroupSystemMessageTypes,AddFriendQrCodePrefix,AddGroupQrCodePrefix} from "@/constant";
CustomType, import IMSDK, {GroupAtType,MessageType,SessionType} from "openim-uniapp-polyfill";
GroupSystemMessageTypes,
AddFriendQrCodePrefix,
AddGroupQrCodePrefix,
} from "@/constant";
import IMSDK, {
GroupAtType,
MessageType,
SessionType,
} from "openim-uniapp-polyfill";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { import {isThisYear} from "date-fns";
isThisYear
} from "date-fns";
import calendar from "dayjs/plugin/calendar"; import calendar from "dayjs/plugin/calendar";
import relativeTime from "dayjs/plugin/relativeTime"; import relativeTime from "dayjs/plugin/relativeTime";
+4 -3
View File
@@ -6,8 +6,9 @@ uni.$u.http.setConfig((defaultConfig) => {
defaultConfig.baseURL = config.getRegisterUrl(); /* 根域名 */ defaultConfig.baseURL = config.getRegisterUrl(); /* 根域名 */
return defaultConfig; return defaultConfig;
}); });
import requestInterceptors from "./requestInterceptors";
import responseInterceptors from "./responseInterceptors";
module.exports = (vm) => { module.exports = (vm) => {
require("./requestInterceptors")(vm); requestInterceptors(vm);
require("./responseInterceptors")(vm); responseInterceptors(vm);
}; };