diff --git a/main.js b/main.js index b6999b1..4881722 100644 --- a/main.js +++ b/main.js @@ -34,7 +34,7 @@ export function createApp () { app.config.productionTip = false; app.component('g-empty', gEmpty); - app.component('g-tabbar', gTabbar); + app.component('g-tabbar', gTabbar); app.component('g-loading', gLoading); app.component('g-button', gButton); app.component('g-list-job', gListJob); @@ -100,7 +100,7 @@ export function createApp () { uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 if (res.agencyId) { - // if (res.agencyStatus == 1) { + // if (res.agencyStatus == 1) { G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员 uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员 @@ -242,6 +242,51 @@ export function createApp () { }, $sourceType); }, /** +* 上传到oss +*/ + uploadImgToOss (callback = () => { }, customDir = '', type = 'default', $num = 1, $sourceType = ['album', 'camera']) { + var that = this; + G.uploadImage($num, (imgRes) => { + uni.showLoading({ + title: '上传中...', + }) + console.log('imgRes', imgRes); + let imgPath = JSON.parse(imgRes)[0] + console.log('imgPath', imgPath); + G.Get(apiInfo.getOssInfo, { prefix: customDir }, ({ data }) => { + console.log('uploadImgToOssresresresres', data); + const { policy, signature, accessid, dir, host } = data; + let key = dir + that.getUUID() + const formData = { + "key": key + "_${filename}", + "policy": policy, + "OSSAccessKeyId": accessid, + signature, + "success_action_status": "200", + }; + + uni.uploadFile({ + url: host, + filePath: imgPath, + name: "file", + + formData: formData, + success: function (res) { + if (res.errMsg = "uploadFile:ok") { + const imgUrl = `${host}/${key}_${imgPath.split('/').pop()}`; + callback({ + status: '上传成功', + image: imgUrl + }); + } + console.log('resresresresresresres', res); + }, + fail: function (res) { }, + }); + }) + }) + }, + /** * 上传临时文件(不需要选择图库) */ uploadTmpImg ($fileName, callback = () => { }) { diff --git a/pages.json b/pages.json index 4ad6e15..428bed4 100644 --- a/pages.json +++ b/pages.json @@ -676,25 +676,25 @@ { "pagePath": "pages/home/index", "iconPath": "static/image/home.png", - "selectedIconPath": "static/image/home-active.png", + "selectedIconPath": "static/image/home.png", "text": "首页" }, { "pagePath": "pages/home/order", - "iconPath": "static/image/apply.png", - "selectedIconPath": "static/image/apply-active.png", + "iconPath": "static/image/home.png", + "selectedIconPath": "static/image/home.png", "text": "发单号" }, { - "iconPath": "static/image/message.png", - "selectedIconPath": "static/image/message_active.png", + "iconPath": "static/image/home.png", + "selectedIconPath": "static/image/home.png", "pagePath": "pages/message/index", "text": "消息" }, { "pagePath": "pages/workBench/index", - "iconPath": "static/image/apply.png", - "selectedIconPath": "static/image/apply-active.png", + "iconPath": "static/image/home.png", + "selectedIconPath": "static/image/home.png", "text": "工单" }, // { ai @@ -705,8 +705,8 @@ // }, { "pagePath": "pages/person/index", - "iconPath": "static/image/person.png", - "selectedIconPath": "static/image/person-active.png", + "iconPath": "static/image/home.png", + "selectedIconPath": "static/image/home.png", "text": "我的" } ] diff --git a/root/detail/apply.vue b/root/detail/apply.vue index fe05930..adb12d4 100644 --- a/root/detail/apply.vue +++ b/root/detail/apply.vue @@ -1174,7 +1174,47 @@ export default { }, goIm(cusData) { let that = this; + that.F.wyyxPost( + that.api.wyyx_create, + { + // senderUserId: uni.getStorageSync("apply-uid"), + // receiverUserId: cusData, + senderAccid: uni.getStorageSync("im-accid"), + receiverAccid: cusData.accid, + }, + (res) => { + uni.$UIKitStore.uiStore.selectConversation(res.conversationId); + const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage( + "", + JSON.stringify({ + type: 100002, + userName: that.orderDetail.userName + that.G.titleToStr(that.orderDetail) || "-", + idCard: that.orderDetail.idCard || "-", + storeJobName: that.orderDetail.storeJobName || "-", + interviewTime: that.G.getPointTime(that.orderDetail.interviewTime, "YY--MM--DD HH:MM") || "-", + tel: that.orderDetail.tel || "-", + applyId: that.orderDetail.id || null, + relationId: that.orderDetail.relationId || null, + active: that.orderDetail.active, + }) + ); + console.log("customMsg", customMsg); + uni.$UIKitStore.msgStore.sendMessageActive({ + msg: customMsg, + conversationId: res.conversationId, + sendBefore: () => { + uni.navigateTo({ + url: "/root/NEUIKit/pages/Chat/index", + }); + that.goImLoading = false; + // scrollBottom(); + }, + }); + }, + () => {} + ); + return; that.F.wyyxPost( that.api.wyyx_create, { @@ -1196,7 +1236,7 @@ export default { that.F.wyyxPost( that.api.wyyx_sendMessage, { - conversationType: 1, + conversationType: 1, senderAccid: uni.getStorageSync("im-accid"), receiverAccid: cusData.accid, text: that.G.objToStr(params, "copy"), diff --git a/root/home/applicationSuccess.vue b/root/home/applicationSuccess.vue index 5d8ab2b..52c637b 100644 --- a/root/home/applicationSuccess.vue +++ b/root/home/applicationSuccess.vue @@ -5,8 +5,13 @@ 已报名成功 您已成功报名该岗位,请等待发单号审核。 - - + + + + + + + 查看报名工单 @@ -16,6 +21,13 @@ diff --git a/root/home/quickApplication.vue b/root/home/quickApplication.vue index 01db7fd..c613eb3 100644 --- a/root/home/quickApplication.vue +++ b/root/home/quickApplication.vue @@ -459,6 +459,11 @@ export default { handleClickMobile() {}, submitForm() { let that = this; + + uni.navigateTo({ + url: "/root/home/applicationSuccess?jobId=" + that.updateInfo.jobId, + }); + return if (!that.agreeRadio) { uni.showToast({ icon: "none", diff --git a/static/image/apply-active.png b/static/image/apply-active.png deleted file mode 100644 index d5a0a74..0000000 Binary files a/static/image/apply-active.png and /dev/null differ diff --git a/static/image/apply.png b/static/image/apply.png deleted file mode 100644 index a105aef..0000000 Binary files a/static/image/apply.png and /dev/null differ diff --git a/static/image/home-active.png b/static/image/home-active.png deleted file mode 100644 index 53c1a40..0000000 Binary files a/static/image/home-active.png and /dev/null differ diff --git a/static/image/message.png b/static/image/message.png deleted file mode 100644 index c3db319..0000000 Binary files a/static/image/message.png and /dev/null differ diff --git a/static/image/message_active.png b/static/image/message_active.png deleted file mode 100644 index 9c312c1..0000000 Binary files a/static/image/message_active.png and /dev/null differ diff --git a/static/image/person-active.png b/static/image/person-active.png deleted file mode 100644 index c7b087c..0000000 Binary files a/static/image/person-active.png and /dev/null differ diff --git a/static/image/person.png b/static/image/person.png deleted file mode 100644 index 85b109b..0000000 Binary files a/static/image/person.png and /dev/null differ diff --git a/utils/common.js b/utils/common.js index 9b0b693..a32ecf9 100644 --- a/utils/common.js +++ b/utils/common.js @@ -14,7 +14,7 @@ let data = { loginText: '请登录', coziID: '7537572244600471579', baseUrl: "https://daotian.matripe.com.cn",// 网络请求的基础路径 - // baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径 + // baseUrl: "http://192.168.1.87:8001", // 网络请求的基础路径 // #ifdef MP-WEIXIN version: uni.getAccountInfoSync().miniProgram.version || "1.0.16", // #endif @@ -118,6 +118,7 @@ let data = { } }); }, + /* 上传图片 */ uploadImage ($num = 1, callback = () => { }, $sourceType = ['album', 'camera']) {