Compare commits

...

2 Commits

@ -242,6 +242,51 @@ export function createApp () {
}, $sourceType); }, $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 = () => { }) { uploadTmpImg ($fileName, callback = () => { }) {

@ -1174,7 +1174,47 @@ export default {
}, },
goIm(cusData) { goIm(cusData) {
let that = this; 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.F.wyyxPost(
that.api.wyyx_create, that.api.wyyx_create,
{ {

@ -5,8 +5,13 @@
</view> </view>
<view class="g_pt_23 g_pb_12 g_fs_19 g_c_3 g_fw_600 g_flex_row_center"> 已报名成功 </view> <view class="g_pt_23 g_pb_12 g_fs_19 g_c_3 g_fw_600 g_flex_row_center"> 已报名成功 </view>
<view class="g_pt_12 g_pb_106 g_fs_14 g_flex_row_center" style="color: #8f8f8f"> 您已成功报名该岗位请等待发单号审核 </view> <view class="g_pt_12 g_pb_106 g_fs_14 g_flex_row_center" style="color: #8f8f8f"> 您已成功报名该岗位请等待发单号审核 </view>
<view> <view class="g_flex_row_center g_pl_20 g_pr_20">
<g-button btnText="继续报名" type="primary" @clickBtn="goReturn" /> <view class="g_flex_1 g_mr_12">
<g-button btnText="继续报名" type="primary" size="small_auto" @clickBtn="goReturn" />
</view>
<view class="g_flex_1">
<g-button btnText="联系客服" size="small_auto" @clickBtn="sendJobInfo" />
</view>
</view> </view>
<view class="g_flex_row_center"> <view class="g_flex_row_center">
<view class="g_c_sub g_mt_16 g_fs_14 g_text_c g_w_all g_fw_700" style="position: fixed; bottom: 56px; width: calc(100vw - 20px); left: 50%; transform: translateX(-50%)" hover-class="thover" @click="goList"></view> <view class="g_c_sub g_mt_16 g_fs_14 g_text_c g_w_all g_fw_700" style="position: fixed; bottom: 56px; width: calc(100vw - 20px); left: 50%; transform: translateX(-50%)" hover-class="thover" @click="goList"></view>
@ -16,6 +21,13 @@
<script> <script>
export default { export default {
onLoad(options) {
console.log(options);
if (options.jobId) {
this.jobId = options.jobId;
this.getDetail();
}
},
onReady() { onReady() {
this.G.setNavStyle(); this.G.setNavStyle();
}, },
@ -24,6 +36,9 @@ export default {
}, },
data() { data() {
return { return {
jobId: "",
jobDetail: {},
goImLoading: false,
cdnBaseImg: this.G.store().cdnBaseImg, cdnBaseImg: this.G.store().cdnBaseImg,
}; };
}, },
@ -32,6 +47,103 @@ export default {
uni.$emit("resetTownsman", { reset: true }); uni.$emit("resetTownsman", { reset: true });
uni.navigateBack(); uni.navigateBack();
}, },
sendJobInfo() {
let that = this;
if (that.goImLoading) {
return false;
}
that.goImLoading = true;
that.F.wyyxGet(that.api.job_get_cus + "?jobId=" + that.jobId, {}, (cusData) => {
that.F.wyyxPost(
that.api.wyyx_create,
{
senderAccid: uni.getStorageSync("im-accid"),
receiverAccid: cusData.accid,
},
(res) => {
console.log("res", res);
uni.$UIKitStore.uiStore.selectConversation(res.conversationId);
let list = ["addss", "genderRestrict", "genderAge"];
let newList = [];
list.forEach((item) => {
if (that.jobDetail[item]) {
newList.push(that.jobDetail[item]);
}
});
that.jobDetail.info = newList.join("丨");
const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage(
"",
JSON.stringify({
type: 100000,
title: that.jobDetail.jobName,
info: that.jobDetail.info,
label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : [],
salaryClassifyValue: that.jobDetail.priceStr,
serviceFee: that.jobDetail.serverPrice,
monthPay: that.jobDetail.monthPay,
jobId: that.jobId,
})
);
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;
let sendParams = {
conversationType: 1,
senderAccid: uni.getStorageSync("im-accid"),
receiverAccid: cusData.accid,
type: 100000,
jobDetail: {
title: that.jobDetail.jobName,
info: that.jobDetail.info,
label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : [],
salaryClassifyValue: that.jobDetail.priceStr,
serviceFee: that.jobDetail.serverPrice,
monthPay: that.jobDetail.monthPay,
jobId: that.jobId,
},
};
uni.setStorageSync("im_sendParams", JSON.stringify(sendParams));
uni.navigateTo({
url: "/root/NEUIKit/pages/Chat/index",
});
that.goImLoading = false;
},
() => {}
);
});
},
getDetail() {
let that = this;
that.speed = 0;
return new Promise((resolve) => {
that.G.Get(that.api.job_detail + "/" + that.jobId, "", (res) => {
res = { ...res, ...res.record };
if (!res.hasOwnProperty("storeJobDetail")) {
res.storeJobDetail = {
jobDesp: "",
};
}
res.serverPrice = that.G.setReturnFee(res.returnFee, res.returnFeeType);
let setData = that.G.disposeJobListData(res);
res.genderRestrict = that.G.getGenderByMinAge(res);
res.addss = that.G.setJobInfoPositionv3(res.storeAddr);
res.monthPay = res.minMonthlyPay / 100 + "-" + res.maxMonthlyPay / 100;
res.priceStr = res.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(res.salaryClassify, res.salaryClassifyValue) : that.G.getSalaryClassifyValue(res.salaryClassify, res.minMonthlyPay, res.maxMonthlyPay);
that.jobDetail = res;
});
});
},
goList() { goList() {
uni.setStorageSync("apply-tab-active", 1); uni.setStorageSync("apply-tab-active", 1);
uni.navigateTo({ uni.navigateTo({
@ -43,10 +155,10 @@ export default {
</script> </script>
<style> <style>
.g_pt_159{ .g_pt_159 {
padding-top: 159px; padding-top: 159px;
} }
.g_pb_106{ .g_pb_106 {
margin-bottom: 106px; margin-bottom: 106px;
} }
</style> </style>

@ -459,6 +459,11 @@ export default {
handleClickMobile() {}, handleClickMobile() {},
submitForm() { submitForm() {
let that = this; let that = this;
uni.navigateTo({
url: "/root/home/applicationSuccess?jobId=" + that.updateInfo.jobId,
});
return
if (!that.agreeRadio) { if (!that.agreeRadio) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",

@ -14,7 +14,7 @@ let data = {
loginText: '请登录', loginText: '请登录',
coziID: '7537572244600471579', coziID: '7537572244600471579',
baseUrl: "https://daotian.matripe.com.cn",// 网络请求的基础路径 baseUrl: "https://daotian.matripe.com.cn",// 网络请求的基础路径
// baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径 // baseUrl: "http://192.168.1.87:8001", // 网络请求的基础路径
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
version: uni.getAccountInfoSync().miniProgram.version || "1.0.16", version: uni.getAccountInfoSync().miniProgram.version || "1.0.16",
// #endif // #endif
@ -118,6 +118,7 @@ let data = {
} }
}); });
}, },
/* /*
*/ */
uploadImage ($num = 1, callback = () => { }, $sourceType = ['album', 'camera']) { uploadImage ($num = 1, callback = () => { }, $sourceType = ['album', 'camera']) {

Loading…
Cancel
Save