|
|
|
@ -1,87 +1,87 @@
|
|
|
|
<script lang="ts">
|
|
|
|
<script lang="ts">
|
|
|
|
import RootStore from "@xkit-yx/im-store-v2";
|
|
|
|
import RootStore from '@xkit-yx/im-store-v2'
|
|
|
|
import V2NIM, { V2NIMConst } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK";
|
|
|
|
import V2NIM, { V2NIMConst } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK'
|
|
|
|
import { getMsgContentTipByType } from "./pages/NEUIKit/utils/msg";
|
|
|
|
import { getMsgContentTipByType } from './pages/NEUIKit/utils/msg'
|
|
|
|
import { STORAGE_KEY } from "./pages/NEUIKit/utils/constants";
|
|
|
|
import { STORAGE_KEY } from './pages/NEUIKit/utils/constants'
|
|
|
|
import { isWxApp } from "./pages/NEUIKit/utils";
|
|
|
|
import { isWxApp } from './pages/NEUIKit/utils'
|
|
|
|
import { V2NIMMessage, V2NIMMessagePushConfig } from "nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService";
|
|
|
|
import { V2NIMMessage, V2NIMMessagePushConfig } from 'nim-web-sdk-ng/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService'
|
|
|
|
import { unix } from "dayjs";
|
|
|
|
import { unix } from 'dayjs'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
globalData: {
|
|
|
|
globalData: {
|
|
|
|
timer: null, // 定时器变量
|
|
|
|
timer: null, // 定时器变量
|
|
|
|
themeColor: "#00b666",
|
|
|
|
themeColor: '#00b666',
|
|
|
|
themeBackgroundColor: "#00b66621",
|
|
|
|
themeBackgroundColor: '#00b66621',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onShow: function (options) {
|
|
|
|
onShow: function (options) {
|
|
|
|
let that = this;
|
|
|
|
let that = this
|
|
|
|
console.log("show 项目init:", options, decodeURIComponent(options.query.scene));
|
|
|
|
console.log('show 项目init:', options, decodeURIComponent(options.query.scene))
|
|
|
|
// 清除扫码获取的id信息
|
|
|
|
// 清除扫码获取的id信息
|
|
|
|
uni.removeStorageSync("scene");
|
|
|
|
uni.removeStorageSync('scene')
|
|
|
|
uni.removeStorageSync("user_scene");
|
|
|
|
uni.removeStorageSync('user_scene')
|
|
|
|
uni.removeStorageSync("user_options", options);
|
|
|
|
uni.removeStorageSync('user_options', options)
|
|
|
|
|
|
|
|
|
|
|
|
if (options.query.id) {
|
|
|
|
if (options.query.id) {
|
|
|
|
uni.setStorageSync("apply-jobdetail-id", options.query.id);
|
|
|
|
uni.setStorageSync('apply-jobdetail-id', options.query.id)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
uni.setStorageSync("apply-jobdetail-id", 0);
|
|
|
|
uni.setStorageSync('apply-jobdetail-id', 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (options.query.scene) {
|
|
|
|
if (options.query.scene) {
|
|
|
|
let str = decodeURIComponent(options.query.scene);
|
|
|
|
let str = decodeURIComponent(options.query.scene)
|
|
|
|
uni.setStorageSync(
|
|
|
|
uni.setStorageSync(
|
|
|
|
"apply-invite-code",
|
|
|
|
'apply-invite-code',
|
|
|
|
JSON.stringify({
|
|
|
|
JSON.stringify({
|
|
|
|
key: str.split("=")[0],
|
|
|
|
key: str.split('=')[0],
|
|
|
|
value: str.split("=")[1],
|
|
|
|
value: str.split('=')[1],
|
|
|
|
})
|
|
|
|
})
|
|
|
|
);
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
uni.setStorageSync("apply-invite-code", "");
|
|
|
|
uni.setStorageSync('apply-invite-code', '')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (uni.getStorageSync("apply-token")) {
|
|
|
|
if (uni.getStorageSync('apply-token')) {
|
|
|
|
this.G.checkToken();
|
|
|
|
this.G.checkToken()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!that.globalData.timer) {
|
|
|
|
if (!that.globalData.timer) {
|
|
|
|
if (uni.getStorageSync("apply-token")) {
|
|
|
|
if (uni.getStorageSync('apply-token')) {
|
|
|
|
that.checkNum();
|
|
|
|
that.checkNum()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
that.globalData.timer = setInterval(() => {
|
|
|
|
that.globalData.timer = setInterval(() => {
|
|
|
|
console.log("inner++++++++++++++++++++ +++++++++++++++++++++++++++");
|
|
|
|
console.log('inner++++++++++++++++++++ +++++++++++++++++++++++++++')
|
|
|
|
if (uni.getStorageSync("apply-token")) {
|
|
|
|
if (uni.getStorageSync('apply-token')) {
|
|
|
|
that.checkNum();
|
|
|
|
that.checkNum()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 1 * 30 * 1000);
|
|
|
|
}, 1 * 30 * 1000)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uni.$on("isGlogin", function (data) {
|
|
|
|
uni.$on('isGlogin', function (data) {
|
|
|
|
console.log("app.vue 接收", data);
|
|
|
|
console.log('app.vue 接收', data)
|
|
|
|
if (uni.getStorageSync("apply-uid")) {
|
|
|
|
if (uni.getStorageSync('apply-uid')) {
|
|
|
|
that.initWyyx();
|
|
|
|
that.initWyyx()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
if (uni.getStorageSync("apply-token")) {
|
|
|
|
if (uni.getStorageSync('apply-token')) {
|
|
|
|
console.log("app.vue 是否调用");
|
|
|
|
console.log('app.vue 是否调用')
|
|
|
|
that.initWyyx();
|
|
|
|
that.initWyyx()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onHide: function () {},
|
|
|
|
onHide: function () {},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
initWyyx() {
|
|
|
|
initWyyx() {
|
|
|
|
let that = this;
|
|
|
|
let that = this
|
|
|
|
|
|
|
|
|
|
|
|
that.F.wyyxPost(
|
|
|
|
that.F.wyyxPost(
|
|
|
|
that.api.wyyx_getConfig,
|
|
|
|
that.api.wyyx_getConfig,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
userId: uni.getStorageSync("apply-uid"),
|
|
|
|
userId: uni.getStorageSync('apply-uid'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
(res) => {
|
|
|
|
(res) => {
|
|
|
|
console.log("wyyx_getConfig", res);
|
|
|
|
console.log('wyyx_getConfig', res)
|
|
|
|
let resData = {
|
|
|
|
let resData = {
|
|
|
|
appkey: res.appKey,
|
|
|
|
appkey: res.appKey,
|
|
|
|
accid: res.accid,
|
|
|
|
accid: res.accid,
|
|
|
|
token: res.token,
|
|
|
|
token: res.token,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
const imOptions = {
|
|
|
|
const imOptions = {
|
|
|
|
appkey: resData.appkey, // 请填写您的 appkey
|
|
|
|
appkey: resData.appkey, // 请填写您的 appkey
|
|
|
|
account: resData.accid, // 请填写您的 account
|
|
|
|
account: resData.accid, // 请填写您的 account
|
|
|
|
@ -89,40 +89,40 @@ export default {
|
|
|
|
// appkey: "7e19d679085266aa872a8de12f0c1ae5", // 请填写您的 appkey
|
|
|
|
// appkey: "7e19d679085266aa872a8de12f0c1ae5", // 请填写您的 appkey
|
|
|
|
// account: "9", // 请填写您的 account
|
|
|
|
// account: "9", // 请填写您的 account
|
|
|
|
// token: "2d4ca36cca6293cf3a81d6ca1b8026f7", // 请填写您的 token
|
|
|
|
// token: "2d4ca36cca6293cf3a81d6ca1b8026f7", // 请填写您的 token
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if (imOptions) {
|
|
|
|
if (imOptions) {
|
|
|
|
this.initNim(imOptions);
|
|
|
|
this.initNim(imOptions)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// 需要登录, 跳转登录页
|
|
|
|
// 需要登录, 跳转登录页
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async initNim(opts) {
|
|
|
|
async initNim(opts) {
|
|
|
|
let that = this;
|
|
|
|
let that = this
|
|
|
|
// 初始化 nim sdk
|
|
|
|
// 初始化 nim sdk
|
|
|
|
const nim = (uni.$UIKitNIM = V2NIM.getInstance(
|
|
|
|
const nim = (uni.$UIKitNIM = V2NIM.getInstance(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
appkey: opts.appkey,
|
|
|
|
appkey: opts.appkey,
|
|
|
|
needReconnect: true,
|
|
|
|
needReconnect: true,
|
|
|
|
// "reconnectionAttempts": 5,
|
|
|
|
// "reconnectionAttempts": 5,
|
|
|
|
debugLevel: "debug",
|
|
|
|
debugLevel: 'debug',
|
|
|
|
apiVersion: "v2",
|
|
|
|
apiVersion: 'v2',
|
|
|
|
enableV2CloudConversation: true,
|
|
|
|
enableV2CloudConversation: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
V2NIMLoginServiceConfig: {
|
|
|
|
V2NIMLoginServiceConfig: {
|
|
|
|
lbsUrls: isWxApp ? ["https://lbs.netease.im/lbs/wxwebconf.jsp"] : ["https://lbs.netease.im/lbs/webconf.jsp"],
|
|
|
|
lbsUrls: isWxApp ? ['https://lbs.netease.im/lbs/wxwebconf.jsp'] : ['https://lbs.netease.im/lbs/webconf.jsp'],
|
|
|
|
linkUrl: isWxApp ? "wlnimsc0.netease.im" : "weblink.netease.im",
|
|
|
|
linkUrl: isWxApp ? 'wlnimsc0.netease.im' : 'weblink.netease.im',
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 使用固定设备 ID,
|
|
|
|
* 使用固定设备 ID,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
isFixedDeviceId: true,
|
|
|
|
isFixedDeviceId: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
));
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
that.globalData.nim = nim;
|
|
|
|
that.globalData.nim = nim
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化 store
|
|
|
|
// 初始化 store
|
|
|
|
const store = (uni.$UIKitStore = new RootStore(
|
|
|
|
const store = (uni.$UIKitStore = new RootStore(
|
|
|
|
@ -138,27 +138,27 @@ export default {
|
|
|
|
const pushContent = getMsgContentTipByType({
|
|
|
|
const pushContent = getMsgContentTipByType({
|
|
|
|
text: options.msg.text,
|
|
|
|
text: options.msg.text,
|
|
|
|
messageType: options.msg.messageType,
|
|
|
|
messageType: options.msg.messageType,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
const yxAitMsg = options.serverExtension ? options.serverExtension.yxAitMsg : { forcePushIDsList: "[]", needForcePush: false };
|
|
|
|
const yxAitMsg = options.serverExtension ? options.serverExtension.yxAitMsg : { forcePushIDsList: '[]', needForcePush: false }
|
|
|
|
|
|
|
|
|
|
|
|
// 如果是 at 消息,需要走离线强推
|
|
|
|
// 如果是 at 消息,需要走离线强推
|
|
|
|
|
|
|
|
|
|
|
|
const { forcePushIDsList, needForcePush } = yxAitMsg
|
|
|
|
const { forcePushIDsList, needForcePush } = yxAitMsg
|
|
|
|
? // @ts-ignore
|
|
|
|
? // @ts-ignore
|
|
|
|
store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text)
|
|
|
|
store.msgStore._formatExtAitToPushInfo(yxAitMsg, options.msg.text)
|
|
|
|
: { forcePushIDsList: "[]", needForcePush: false };
|
|
|
|
: { forcePushIDsList: '[]', needForcePush: false }
|
|
|
|
|
|
|
|
|
|
|
|
console.log("forcePushIDsList: ", forcePushIDsList);
|
|
|
|
console.log('forcePushIDsList: ', forcePushIDsList)
|
|
|
|
|
|
|
|
|
|
|
|
const { conversationId } = options;
|
|
|
|
const { conversationId } = options
|
|
|
|
const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId);
|
|
|
|
const conversationType = nim.V2NIMConversationIdUtil.parseConversationType(conversationId)
|
|
|
|
const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId);
|
|
|
|
const targetId = nim.V2NIMConversationIdUtil.parseConversationTargetId(conversationId)
|
|
|
|
|
|
|
|
|
|
|
|
const pushPayload = JSON.stringify({
|
|
|
|
const pushPayload = JSON.stringify({
|
|
|
|
// oppo
|
|
|
|
// oppo
|
|
|
|
oppoField: {
|
|
|
|
oppoField: {
|
|
|
|
click_action_type: 4, // 参考 oppo 官网
|
|
|
|
click_action_type: 4, // 参考 oppo 官网
|
|
|
|
click_action_activity: "", // 各端不一样 TODO
|
|
|
|
click_action_activity: '', // 各端不一样 TODO
|
|
|
|
action_parameters: {
|
|
|
|
action_parameters: {
|
|
|
|
sessionId: targetId,
|
|
|
|
sessionId: targetId,
|
|
|
|
sessionType: conversationType,
|
|
|
|
sessionType: conversationType,
|
|
|
|
@ -174,10 +174,10 @@ export default {
|
|
|
|
hwField: {
|
|
|
|
hwField: {
|
|
|
|
click_action: {
|
|
|
|
click_action: {
|
|
|
|
type: 1,
|
|
|
|
type: 1,
|
|
|
|
action: "", // 各端不一样 TODO
|
|
|
|
action: '', // 各端不一样 TODO
|
|
|
|
},
|
|
|
|
},
|
|
|
|
androidConfig: {
|
|
|
|
androidConfig: {
|
|
|
|
category: "IM",
|
|
|
|
category: 'IM',
|
|
|
|
data: JSON.stringify({
|
|
|
|
data: JSON.stringify({
|
|
|
|
sessionId: targetId,
|
|
|
|
sessionId: targetId,
|
|
|
|
sessionType: conversationType,
|
|
|
|
sessionType: conversationType,
|
|
|
|
@ -188,7 +188,7 @@ export default {
|
|
|
|
// 通用
|
|
|
|
// 通用
|
|
|
|
sessionId: targetId,
|
|
|
|
sessionId: targetId,
|
|
|
|
sessionType: conversationType,
|
|
|
|
sessionType: conversationType,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const pushConfig: V2NIMMessagePushConfig = {
|
|
|
|
const pushConfig: V2NIMMessagePushConfig = {
|
|
|
|
pushEnabled: true,
|
|
|
|
pushEnabled: true,
|
|
|
|
@ -196,99 +196,99 @@ export default {
|
|
|
|
forcePush: needForcePush,
|
|
|
|
forcePush: needForcePush,
|
|
|
|
forcePushContent: pushContent,
|
|
|
|
forcePushContent: pushContent,
|
|
|
|
forcePushAccountIds: forcePushIDsList,
|
|
|
|
forcePushAccountIds: forcePushIDsList,
|
|
|
|
pushPayload: "{}",
|
|
|
|
pushPayload: '{}',
|
|
|
|
pushContent,
|
|
|
|
pushContent,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return { ...options, pushConfig };
|
|
|
|
return { ...options, pushConfig }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"UniApp"
|
|
|
|
'UniApp'
|
|
|
|
));
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
const nimPushPlugin = uni.requireNativePlugin("NIMUniPlugin-PluginModule");
|
|
|
|
const nimPushPlugin = uni.requireNativePlugin('NIMUniPlugin-PluginModule')
|
|
|
|
nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, {
|
|
|
|
nim.V2NIMSettingService.setOfflinePushConfig(nimPushPlugin, {
|
|
|
|
miPush: {
|
|
|
|
miPush: {
|
|
|
|
appId: "2882303761520397320",
|
|
|
|
appId: '2882303761520397320',
|
|
|
|
appKey: "5102039734320",
|
|
|
|
appKey: '5102039734320',
|
|
|
|
certificateName: "xiaomiCertificateName",
|
|
|
|
certificateName: 'xiaomiCertificateName',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
vivoPush: {
|
|
|
|
vivoPush: {
|
|
|
|
certificateName: "vivoCertificateName",
|
|
|
|
certificateName: 'vivoCertificateName',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
oppoPush: {
|
|
|
|
oppoPush: {
|
|
|
|
appId: "32967155",
|
|
|
|
appId: '32967155',
|
|
|
|
appKey: "b98618cb272944dea324af6421d42a79",
|
|
|
|
appKey: 'b98618cb272944dea324af6421d42a79',
|
|
|
|
secret: "0b7ce705a2304a17b78f20011c18890c",
|
|
|
|
secret: '0b7ce705a2304a17b78f20011c18890c',
|
|
|
|
certificateName: "opopCertificateName",
|
|
|
|
certificateName: 'opopCertificateName',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
honorPush: {
|
|
|
|
honorPush: {
|
|
|
|
certificateName: "rongyaoCertificateName",
|
|
|
|
certificateName: 'rongyaoCertificateName',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
apns: {
|
|
|
|
apns: {
|
|
|
|
// certificateName: 'AuthKey_98P8URRXUD_test', //测试用:
|
|
|
|
// certificateName: 'AuthKey_98P8URRXUD_test', //测试用:
|
|
|
|
certificateName: "AuthKey_98P8URRXUD", //正式用
|
|
|
|
certificateName: 'AuthKey_98P8URRXUD', //正式用
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
})
|
|
|
|
console.log("是否执行 推送");
|
|
|
|
console.log('是否执行 推送')
|
|
|
|
// #endif
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
|
|
nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {});
|
|
|
|
nim.V2NIMLoginService.login(opts.account, opts.token).then(() => {})
|
|
|
|
|
|
|
|
|
|
|
|
nim.V2NIMConversationService.on("onConversationChanged", function (conversationList: V2NIMConversation[]) {
|
|
|
|
nim.V2NIMConversationService.on('onConversationChanged', function (conversationList: V2NIMConversation[]) {
|
|
|
|
console.log("初始化监听会话:", conversationList);
|
|
|
|
console.log('初始化监听会话:', conversationList)
|
|
|
|
let _bool = conversationList.filter((item) => {
|
|
|
|
let _bool = conversationList.filter((item) => {
|
|
|
|
return Number(item.unreadCount) > 0;
|
|
|
|
return Number(item.unreadCount) > 0
|
|
|
|
});
|
|
|
|
})
|
|
|
|
console.log("初始化监听会话bool:", _bool);
|
|
|
|
console.log('初始化监听会话bool:', _bool)
|
|
|
|
if (_bool && _bool.length > 0) {
|
|
|
|
if (_bool && _bool.length > 0) {
|
|
|
|
that.playAudio(); // 播放音频
|
|
|
|
that.playAudio() // 播放音频
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
playAudio() {
|
|
|
|
playAudio() {
|
|
|
|
let that = this;
|
|
|
|
let that = this
|
|
|
|
const innerAudioContext = uni.createInnerAudioContext();
|
|
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
|
|
innerAudioContext.autoplay = true;
|
|
|
|
innerAudioContext.autoplay = true
|
|
|
|
innerAudioContext.src = "https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/tip.mp3";
|
|
|
|
innerAudioContext.src = 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/tip.mp3'
|
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
|
console.log("开始播放");
|
|
|
|
console.log('开始播放')
|
|
|
|
});
|
|
|
|
})
|
|
|
|
uni.vibrateShort();
|
|
|
|
uni.vibrateShort()
|
|
|
|
|
|
|
|
|
|
|
|
innerAudioContext.onError((res) => {
|
|
|
|
innerAudioContext.onError((res) => {
|
|
|
|
console.log(res.errMsg);
|
|
|
|
console.log(res.errMsg)
|
|
|
|
console.log(res.errCode);
|
|
|
|
console.log(res.errCode)
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
checkNum() {
|
|
|
|
checkNum() {
|
|
|
|
let that = this;
|
|
|
|
let that = this
|
|
|
|
if (uni.getStorageSync("apply-token")) {
|
|
|
|
if (uni.getStorageSync('apply-token')) {
|
|
|
|
that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
|
|
|
|
that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
|
|
|
|
console.log("获取待处理数量:", res);
|
|
|
|
console.log('获取待处理数量:', res)
|
|
|
|
if (res.approvePassHasNotRed > 0) {
|
|
|
|
if (res.approvePassHasNotRed > 0) {
|
|
|
|
uni.setTabBarBadge({
|
|
|
|
uni.setTabBarBadge({
|
|
|
|
index: 3,
|
|
|
|
index: 2,
|
|
|
|
text: String(res.approvePassHasNotRed),
|
|
|
|
text: String(res.approvePassHasNotRed),
|
|
|
|
});
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
uni.removeTabBarBadge({
|
|
|
|
uni.removeTabBarBadge({
|
|
|
|
index: 3,
|
|
|
|
index: 2,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
<style lang="scss">
|
|
|
|
@import "./static/css/iconfont.css";
|
|
|
|
@import './static/css/iconfont.css';
|
|
|
|
@import "./uni_modules/vk-uview-ui/index.scss";
|
|
|
|
@import './uni_modules/vk-uview-ui/index.scss';
|
|
|
|
@import "./static/css/base.scss";
|
|
|
|
@import './static/css/base.scss';
|
|
|
|
@import "./static/font/iconfont-weapp-icon.css";
|
|
|
|
@import './static/font/iconfont-weapp-icon.css';
|
|
|
|
|
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
|
page {
|
|
|
|
page {
|
|
|
|
@ -333,16 +333,16 @@ page {
|
|
|
|
bottom: -2px !important;
|
|
|
|
bottom: -2px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.g_bg_f_5{
|
|
|
|
.g_bg_f_5 {
|
|
|
|
background-color: #ededed !important;
|
|
|
|
background-color: #ededed !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.g_mt_30{
|
|
|
|
.g_mt_30 {
|
|
|
|
margin-top: 30px;
|
|
|
|
margin-top: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.g_mt_84{
|
|
|
|
.g_mt_84 {
|
|
|
|
margin-top: 84px;
|
|
|
|
margin-top: 84px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.g_pt_90{
|
|
|
|
.g_pt_90 {
|
|
|
|
padding-top: 90px;
|
|
|
|
padding-top: 90px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|