From 1628dadd3c48137b944d348038f60649f28cf760 Mon Sep 17 00:00:00 2001
From: wangxia <779219182@qq.com>
Date: Thu, 14 Dec 2023 17:32:00 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8A=A5=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.wxss | 85 +-
pages/detail/index.js | 2879 ++++++++++++++++++++++---------------------
pages/detail/index.wxml | 757 ++++++------
pages/detail/index.wxss | 160 +--
project.private.config.json | 2 +-
5 files changed, 1992 insertions(+), 1891 deletions(-)
diff --git a/app.wxss b/app.wxss
index 951c700..bd512f3 100644
--- a/app.wxss
+++ b/app.wxss
@@ -4,10 +4,10 @@
page {
height: 100vh;
background: #f5f5f5;
- --color-ysd: #00B666;
- --color-hover: #3393FF;
- --color-be: #ff4400;
- --color-f40: #ff4400;
+ --color-ysd: #00b666;
+ --color-hover: #3393ff;
+ --color-be: #ff4400;
+ --color-f40: #ff4400;
--color-027: #ff4400;
}
::-webkit-scrollbar {
@@ -26,8 +26,8 @@ page {
.ysd-base-color {
color: var(--color-ysd) !important;
}
-.color-f40{
- color: var(--color-f40) !important;
+.color-f40 {
+ color: var(--color-f40) !important;
}
.br8 {
border-radius: 8px;
@@ -122,10 +122,18 @@ page {
.pr16 {
padding-right: 16px;
}
-
+.pl4{
+ padding-left: 4px;
+}
.pl16 {
padding-left: 16px;
}
+.pl32 {
+ padding-left: 32px;
+}
+.pr32 {
+ padding-right: 32px;
+}
.pb12 {
padding-bottom: 12px;
}
@@ -153,8 +161,8 @@ page {
.p1612 {
padding: 16px 12px;
}
-.pb10{
- padding-bottom: 10px;
+.pb10 {
+ padding-bottom: 10px;
}
.ml10 {
margin-left: 10px;
@@ -368,7 +376,9 @@ page {
.mt32 {
margin-top: 32px !important;
}
-
+.mb24 {
+ margin-bottom: 24px;
+}
.f11 {
font-size: 11px;
}
@@ -376,7 +386,9 @@ page {
.f12 {
font-size: 12px;
}
-
+.f15 {
+ font-size: 15px !important;
+}
.f16 {
font-size: 16px !important;
}
@@ -811,6 +823,11 @@ button::after {
align-items: center;
justify-content: space-between;
}
+.fss {
+ display: flex;
+ align-items: center;
+ justify-content: start;
+}
.fsc {
display: flex;
/* flex-direction: column; */
@@ -964,7 +981,7 @@ button::after {
}
.mr16 {
- margin-right: 16px;
+ margin-right: 16px !important;
}
.ml16 {
@@ -1087,11 +1104,11 @@ button::after {
white-space: nowrap;
}
.servicePrice {
- border: 1rpx solid var(--color-ysd);
- background-color: #ffeee7;
- justify-content: space-between;
- border-right-color: transparent;
- border-left-color: transparent;
+ border: 1rpx solid var(--color-ysd);
+ background-color: #ffeee7;
+ justify-content: space-between;
+ border-right-color: transparent;
+ border-left-color: transparent;
}
.newList .iconOut {
margin-right: 12px;
@@ -1772,8 +1789,8 @@ page {
}
.weui-search-bar__box {
height: 32px !important;
- line-height: 32px !important;
- /* top: 8px; */
+ line-height: 32px !important;
+ /* top: 8px; */
}
.weui-search-bar__box .search {
position: relative;
@@ -1969,7 +1986,7 @@ page {
*/
.contact {
width: 80%;
- height: 350px;
+ min-height: 350px;
}
.contact .contact_bottomBtn .v-center {
width: 80px !important;
@@ -1995,3 +2012,31 @@ page {
padding: 0;
width: 100%;
}
+/* 按钮样式 */
+.normalBtn {
+ display: inline-block;
+ border-radius: 18px;
+ font-size: 16px;
+ font-weight: 601;
+ padding: 0;
+ height: 36px;
+ box-sizing: border-box;
+ margin: 0;
+}
+button.bgBtn {
+ color: #ffffff;
+ background-color: var(--color-ysd);
+ line-height: 36px;
+}
+button.nobg_Btn {
+ color: var(--color-ysd);
+ border: 1px solid var(--color-ysd);
+ line-height: 34px;
+}
+/* 按钮样式 end */
+/* 输入框默认显示样式 */
+.input-placeholder{
+ color: #CCCCCC;
+ font-weight: normal;
+}
+/* 输入框默认显示样式 end */
\ No newline at end of file
diff --git a/pages/detail/index.js b/pages/detail/index.js
index dc80802..2e58ee9 100644
--- a/pages/detail/index.js
+++ b/pages/detail/index.js
@@ -5,178 +5,179 @@ var QQMapWX = require("../../utils/qqmap-wx-jssdk.min.js");
var qqmapsdk;
Page({
- data: {
- isLogin:false,
+ data: {
+ isLogin: false,
statusBarHeight: wx.getStorageSync("statusBarHeight"), // 状态栏高度
- navigationBarHeight: wx.getStorageSync("navigationBarHeight"), // 导航栏高度
-
- menuButtonHeight: wx.getStorageSync("menuButtonHeight"), // 胶囊按钮高度
-
- menuButton: wx.getStorageSync("menuButtonInfo"), // 胶囊信息
- backHeight:wx.getMenuButtonBoundingClientRect().top + (wx.getMenuButtonBoundingClientRect().height/2) +'px',
- storeJobId: "",
- iosDialog: false,
- //职位ID
- searchForm: {
- storeJobId: "",
- lng: "",
- lat: "",
- },
- fullScreen: false,
- bclr: "",
- djxx: "",
- currIndex: "1",
- jobDetail: {}, //详情
- wxCode: "",
- pbtm: 0,
- shareTitle: "",
- isCollect: false,
- src: "",
- word: "woca",
- phoneDialog: false,
- isImg: true,
- labelColor: ["#c41d7f", "#096dd9", "#531dab", "#d46b08", "#389e0d", "#08979c", "#cf1322"],
- bgColor: ["#fff0f6", "#e6f7ff", "#f9f0ff", "#fff7e6", "#f6ffed", "#e6fffb", "#fff1f0"],
- wxml: {
- text: "啊啊按",
- },
- addressNew: "",
- citys: "",
- showSexAgeText: "",
- fuWuFei: "",
- isServicePriceShow: true,
- isAgency: true,
- isShareShow: false,
- managerRoleClassify: false, // 管理员权限
- serviceInfo: app.globalData.serviceInfo,
- isMaskShow: false,
- onSiteRemark: "",
- img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/bg.png",
- canvasImg: "",
- isLoading: true,
- iosDialogTobe: false, // 成为代理弹窗显示
- userInfo: {},
- shareListImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/detail830-1.png",
- shareDetailImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/posterbg1.1.png",
+ navigationBarHeight: wx.getStorageSync("navigationBarHeight"), // 导航栏高度
+
+ menuButtonHeight: wx.getStorageSync("menuButtonHeight"), // 胶囊按钮高度
+
+ menuButton: wx.getStorageSync("menuButtonInfo"), // 胶囊信息
+ backHeight: wx.getMenuButtonBoundingClientRect().top + (wx.getMenuButtonBoundingClientRect().height / 2) + 'px',
+ storeJobId: "",
+ iosDialog: false,
+ //职位ID
+ searchForm: {
+ storeJobId: "",
+ lng: "",
+ lat: "",
+ },
+ fullScreen: false,
+ bclr: "",
+ djxx: "",
+ currIndex: "1",
+ jobDetail: {}, //详情
+ wxCode: "",
+ pbtm: 0,
+ shareTitle: "",
+ isCollect: false,
+ src: "",
+ word: "woca",
+ phoneDialog: false,
+ isImg: true,
+ labelColor: ["#c41d7f", "#096dd9", "#531dab", "#d46b08", "#389e0d", "#08979c", "#cf1322"],
+ bgColor: ["#fff0f6", "#e6f7ff", "#f9f0ff", "#fff7e6", "#f6ffed", "#e6fffb", "#fff1f0"],
+ wxml: {
+ text: "啊啊按",
+ },
+ addressNew: "",
+ citys: "",
+ showSexAgeText: "",
+ fuWuFei: "",
+ isServicePriceShow: true,
+ isAgency: true,
+ isShareShow: false,
+ managerRoleClassify: false, // 管理员权限
+ serviceInfo: app.globalData.serviceInfo,
+ isMaskShow: false,
+ onSiteRemark: "",
+ img: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/bg.png",
+ canvasImg: "",
+ isLoading: true,
+ iosDialogTobe: false, // 成为代理弹窗显示
+ userInfo: {},
+ shareListImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/detail830-1.png",
+ shareDetailImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/posterbg1.1.png",
posterImg: "",
- safeBottom:wx.getWindowInfo().screenHeight - wx.getWindowInfo().safeArea.height+'px',
- fromScene:false,
- fromShoucangOrBaoming:''
- },
- showdialog() {
- this.setData({
- iosDialog: true,
- });
- },
- closeDialog() {
- this.setData({
- iosDialog: false,
- });
- },
- onShow() {
+ safeBottom: wx.getWindowInfo().screenHeight - wx.getWindowInfo().safeArea.height + 'px',
+ fromScene: false,
+ fromShoucangOrBaoming: '',
+ recordBillShow: false
+ },
+ showdialog () {
+ this.setData({
+ iosDialog: true,
+ });
+ },
+ closeDialog () {
+ this.setData({
+ iosDialog: false,
+ });
+ },
+ onShow () {
var that = this;
console.log(that.data.safeBottom);
- this.setData({
+ this.setData({
isLogin: app.globalData.isLogin,
// backHeight:wx.getMenuButtonBoundingClientRect().top,
- isLoading: true,
- // userInfo:{...app.globalData.loginUserInfo, agencyStatus:0},
- });
- if (app.globalData.isLogin) {
- that.setData({
- // agencyStatus: app.globalData.agencyStatus,
- userInfo: app.globalData.loginUserInfo,
- });
- } else {
- this.wxLogin();
+ isLoading: true,
+ // userInfo:{...app.globalData.loginUserInfo, agencyStatus:0},
+ });
+ if (app.globalData.isLogin) {
+ that.setData({
+ // agencyStatus: app.globalData.agencyStatus,
+ userInfo: app.globalData.loginUserInfo,
+ });
+ } else {
+ this.wxLogin();
}
that.searchAnimate();
-
- console.log(that.data.userInfo);
- },
- showphone: function () {
- var that = this;
- wx.makePhoneCall({
- // number: that.data.jobDetail.assistantUserTel + ""
- phoneNumber: that.data.serviceInfo.workPhone || "0371-6611 3723",
- });
- },
- close: function () {
- this.setData({
- phoneDialog: false,
- });
- },
- wxLogin() {
- var that = this;
- wx.login({
- success(res) {
- if (res.code) {
- that.setData({
- wxCode: res.code,
- });
- } else {
- console.log("获取code失败!" + res.errMsg);
- }
- },
- });
- },
- showImage(e) {
- let resImg = e.currentTarget.dataset.src;
- var imgArr = [];
-
- this.data.jobDetail.storeImage.forEach((item) => {
- // let regs = /\.(jpg|jpeg|png)(\?.*)?$/;
- // item.isImg = regs.test(item.url.toLowerCase());
- if (item.isImg) {
- imgArr.push(item.url);
- }
- });
- wx.previewImage({
- current: e.currentTarget.dataset.src, // 当前显示图片的http链接
- urls: imgArr,
- });
- },
-
- renderToCanvas() {
- const p1 = this.widget.renderToCanvas({ wxml: wxml(that.data.wxml), style });
- p1.then((res) => {
- console.log("container", res.layoutBox);
- this.container = res;
- console.log(res);
- });
- },
- extraImage() {
- var that = this;
- // return new Promise(function (resolve, reject) {
- that.widget.renderToCanvas({ wxml: wxml(that.data.wxml), style }).then((res1) => {
- const p2 = that.widget.canvasToTempFilePath();
- p2.then((res) => {
- console.log(res);
- that.setData({
- src: res.tempFilePath,
- });
- });
- });
- // });
- },
- onLoad(query) {
+
+ console.log(that.data.userInfo);
+ },
+ showphone: function () {
var that = this;
-
+ wx.makePhoneCall({
+ // number: that.data.jobDetail.assistantUserTel + ""
+ phoneNumber: that.data.serviceInfo.workPhone || "0371-6611 3723",
+ });
+ },
+ close: function () {
+ this.setData({
+ phoneDialog: false,
+ });
+ },
+ wxLogin () {
+ var that = this;
+ wx.login({
+ success (res) {
+ if (res.code) {
+ that.setData({
+ wxCode: res.code,
+ });
+ } else {
+ console.log("获取code失败!" + res.errMsg);
+ }
+ },
+ });
+ },
+ showImage (e) {
+ let resImg = e.currentTarget.dataset.src;
+ var imgArr = [];
+
+ this.data.jobDetail.storeImage.forEach((item) => {
+ // let regs = /\.(jpg|jpeg|png)(\?.*)?$/;
+ // item.isImg = regs.test(item.url.toLowerCase());
+ if (item.isImg) {
+ imgArr.push(item.url);
+ }
+ });
+ wx.previewImage({
+ current: e.currentTarget.dataset.src, // 当前显示图片的http链接
+ urls: imgArr,
+ });
+ },
+
+ renderToCanvas () {
+ const p1 = this.widget.renderToCanvas({ wxml: wxml(that.data.wxml), style });
+ p1.then((res) => {
+ console.log("container", res.layoutBox);
+ this.container = res;
+ console.log(res);
+ });
+ },
+ extraImage () {
+ var that = this;
+ // return new Promise(function (resolve, reject) {
+ that.widget.renderToCanvas({ wxml: wxml(that.data.wxml), style }).then((res1) => {
+ const p2 = that.widget.canvasToTempFilePath();
+ p2.then((res) => {
+ console.log(res);
+ that.setData({
+ src: res.tempFilePath,
+ });
+ });
+ });
+ // });
+ },
+ onLoad (query) {
+ var that = this;
+
-// let systemInfo = wx.getSystemInfoSync();
-// let rect = wx.getMenuButtonBoundingClientRect ? wx.getMenuButtonBoundingClientRect() : null; //胶囊按钮位置信息
-// wx.getMenuButtonBoundingClientRect();
-// let navBarHeight = (function() { //导航栏高度
-// let gap = rect.top - systemInfo.statusBarHeight; //动态计算每台手机状态栏到胶囊按钮间距
-// return 2 * gap + rect.height;
-// })();
+ // let systemInfo = wx.getSystemInfoSync();
+ // let rect = wx.getMenuButtonBoundingClientRect ? wx.getMenuButtonBoundingClientRect() : null; //胶囊按钮位置信息
+ // wx.getMenuButtonBoundingClientRect();
+ // let navBarHeight = (function() { //导航栏高度
+ // let gap = rect.top - systemInfo.statusBarHeight; //动态计算每台手机状态栏到胶囊按钮间距
+ // return 2 * gap + rect.height;
+ // })();
- console.log((wx.getMenuButtonBoundingClientRect().top - wx.getWindowInfo().statusBarHeight) * 2 + wx.getMenuButtonBoundingClientRect().height + wx.getWindowInfo().statusBarHeight);
+ console.log((wx.getMenuButtonBoundingClientRect().top - wx.getWindowInfo().statusBarHeight) * 2 + wx.getMenuButtonBoundingClientRect().height + wx.getWindowInfo().statusBarHeight);
- console.log(wx.getWindowInfo().screenTop)
+ console.log(wx.getWindowInfo().screenTop)
@@ -185,39 +186,39 @@ Page({
- console.log(app.globalData.loginUserInfo);
- qqmapsdk = new QQMapWX({
- key: "5PTBZ-YI7C6-MZGS3-ES7QN-4T5O2-EJFVR",
- });
+ console.log(app.globalData.loginUserInfo);
+ qqmapsdk = new QQMapWX({
+ key: "5PTBZ-YI7C6-MZGS3-ES7QN-4T5O2-EJFVR",
+ });
- that.setData({
- isAgency: app.globalData.loginUserInfo.agencyStatus == 1 ? true : false,
- corpUserFlag: app.globalData.loginUserInfo.corpUserFlag,
- managerRoleClassify: app.globalData.loginUserInfo.managerRoleClassify,
- userInfo: app.globalData.loginUserInfo,
- });
- that.widget = that.selectComponent(".widget");
- wx.getSystemInfo({
- success: (res) => {
- console.log("手机信息res" + res.model);
- let modelmes = res.model;
- console.log(modelmes.search("iPhone X"));
- if (modelmes.search("iPhone 12 Pro") != -1 || modelmes.search("iPhone X") != -1 || modelmes.search("iPhone XR") != -1 || modelmes.search("iPhone XS max") != -1 || modelmes.search("iPhone 11") != -1) {
- that.setData({
- pbtm: 40,
- });
- } else {
- }
- },
- });
+ that.setData({
+ isAgency: app.globalData.loginUserInfo.agencyStatus == 1 ? true : false,
+ corpUserFlag: app.globalData.loginUserInfo.corpUserFlag,
+ managerRoleClassify: app.globalData.loginUserInfo.managerRoleClassify,
+ userInfo: app.globalData.loginUserInfo,
+ });
+ that.widget = that.selectComponent(".widget");
+ wx.getSystemInfo({
+ success: (res) => {
+ console.log("手机信息res" + res.model);
+ let modelmes = res.model;
+ console.log(modelmes.search("iPhone X"));
+ if (modelmes.search("iPhone 12 Pro") != -1 || modelmes.search("iPhone X") != -1 || modelmes.search("iPhone XR") != -1 || modelmes.search("iPhone XS max") != -1 || modelmes.search("iPhone 11") != -1) {
+ that.setData({
+ pbtm: 40,
+ });
+ } else {
+ }
+ },
+ });
console.log(query);
- if(app.isNotEmptyCheck(query.fromShoucangOrBaoming)){
+ if (app.isNotEmptyCheck(query.fromShoucangOrBaoming)) {
that.setData({
- fromShoucangOrBaoming:query.fromShoucangOrBaoming
+ fromShoucangOrBaoming: query.fromShoucangOrBaoming
})
}
- console.log("HHHHHHHHHHHHH" + query.storeJobId);
- if (app.isNotEmptyCheck(query.storeJobId)) {
+ console.log("HHHHHHHHHHHHH" + query.storeJobId);
+ if (app.isNotEmptyCheck(query.storeJobId)) {
console.log("HHHHHHHHHHHHH");
this.data.searchForm.storeJobId = query.storeJobId;
} else if (app.isNotEmptyCheck(query.scene)) {
@@ -227,708 +228,708 @@ Page({
var sceneJson = commonUtil.sceneToJson(sceneStr);
console.log("sceneJson===", sceneJson);
let arr = sceneJson.i.split('_')
- if(arr[0] > 0){
+ if (arr[0] > 0) {
wx.setStorageSync("applyUserId", arr[0]);
}
- if(arr[1] > 0){
+ if (arr[1] > 0) {
wx.setStorageSync("agencyId", arr[1]);
app.globalData.agencyId = arr[1]
}
- if(arr[2] > 0){
+ if (arr[2] > 0) {
this.data.searchForm.storeJobId = arr[2];
}
-
+
// wx.setStorageSync("agencyId", sceneJson.agencyId);
-
+
that.setData({
- fromScene:true
+ fromScene: true
})
}
- if(app.isNotEmptyCheck(query.from)){
+ if (app.isNotEmptyCheck(query.from)) {
that.setData({
- fromScene:true
+ fromScene: true
})
}
-
-
-
- // this.data.wxCode = query.wxCode;
- // this.getLocation();
- this.getStoreJobDetailById();
- // that.setData({
- // wxCode: that.data.wxCode
- // })
- wx.setStorageSync({
- key: "storeJobId",
- data: query.storeJobId,
- });
-
- let agencyUserId = query.agencyUserId;
- if (agencyUserId) {
- wx.setStorageSync("storageSyncAgencyUserId", agencyUserId);
- console.log("agencyUserId", agencyUserId);
- app.globalData.isCommission = 1;
+
+
+
+ // this.data.wxCode = query.wxCode;
+ // this.getLocation();
+ this.getStoreJobDetailById();
+ // that.setData({
+ // wxCode: that.data.wxCode
+ // })
+ wx.setStorageSync({
+ key: "storeJobId",
+ data: query.storeJobId,
+ });
+
+ let agencyUserId = query.agencyUserId;
+ if (agencyUserId) {
+ wx.setStorageSync("storageSyncAgencyUserId", agencyUserId);
+ console.log("agencyUserId", agencyUserId);
+ app.globalData.isCommission = 1;
}
},
- backIndex(){
+ backIndex () {
wx.switchTab({
url: '../index/index',
})
},
- searchAnimate() {
- let that = this;
- wx.createSelectorQuery()
- .select("#listBox")
- .fields(
- {
- scrollOffset: true,
- size: true,
- },
- (res) => {
- this.animate(
- ".navigatorBar",
- [
- {
+ searchAnimate () {
+ let that = this;
+ wx.createSelectorQuery()
+ .select("#listBox")
+ .fields(
+ {
+ scrollOffset: true,
+ size: true,
+ },
+ (res) => {
+ this.animate(
+ ".navigatorBar",
+ [
+ {
opacity: 0
- },
- {
+ },
+ {
opacity: 1
- },
- ],
- 800,
- {
- scrollSource: "#listBox",
- timeRange: 1000,
- startScrollOffset: 0,
- endScrollOffset: 120,
- }
+ },
+ ],
+ 800,
+ {
+ scrollSource: "#listBox",
+ timeRange: 1000,
+ startScrollOffset: 0,
+ endScrollOffset: 120,
+ }
);
this.animate(
- ".noBack",
- [
- {
+ ".noBack",
+ [
+ {
opacity: 1
- },
- {
+ },
+ {
opacity: 0
- },
- ],
- 800,
- {
- scrollSource: "#listBox",
- timeRange: 1000,
- startScrollOffset: 0,
- endScrollOffset: 1,
- }
- );
-
- }
- )
- .exec();
- },
-
-
-
- getAgencyInfo(job) {
- var that = this;
- console.log(job);
- console.log("打印基本信息");
-
- let objAgency = {
- returnFeeDesp: job.returnFeeDesp,
- returnFeeType: job.returnFeeType,
- transferFee: job.transferFee,
- returnFee: job.returnFee != null ? new Number(job.returnFee).toFixed(2) : null,
- };
- let agencyStr = "";
- if (app.isNotEmptyCheck(job.transferFee)) {
- agencyStr = "伯才利润:" + job.transferFee + ";";
- }
- if (job.returnFeeType == 0) {
- agencyStr += `\n服务费:xxx元/时`;
- } else if (job.returnFeeType == 1) {
- agencyStr += `\n服务费:xxx元/天`;
- } else if (job.returnFeeType == 2) {
- agencyStr += `\n服务费:xxx元/月`;
- } else if (job.returnFeeType == 3) {
- agencyStr += `\n服务费:xxx元/次`;
- }
- if (objAgency.returnFee > 0) {
- agencyStr = agencyStr.replace("xxx", objAgency.returnFee);
- } else if (app.isNotEmptyCheck(job.transferFee)) {
- agencyStr = "伯才利润:" + job.transferFee + ";";
- } else {
- agencyStr = "-";
- }
- if (app.isEmptyCheck(objAgency.returnFeeDesp)) {
- // return agencyStr
- that.setData({
- bclr: agencyStr,
- });
- } else {
- that.setData({
- bclr: agencyStr + "\n" + objAgency.returnFeeDesp,
- });
- // return agencyStr + '\n' + objAgency.returnFeeDesp;
- }
- },
- toMapChoice(e) {
- var that = this;
- console.log(e);
- try {
- wx.setStorageSync("onSiteRemark", that.data.onSiteRemark);
- wx.setStorageSync("addressList", e.currentTarget.dataset.address);
- } catch (error) {
- console.log(error);
- }
- wx.navigateTo({
- url: "../mine/addressPage/index",
- });
- },
- // openMap(e) {
- // wx.showLoading({
- // title: "加载中",
- // });
- // console.log(e);
- // let address = e.currentTarget.dataset.address;
- // let lat = e.currentTarget.dataset.lat;
- // var formatted_addresses = "";
- // qqmapsdk.reverseGeocoder({
- // location: `${e.currentTarget.dataset.lat},${e.currentTarget.dataset.lng}`,
- // success: function (res) {
- // console.log(res);
- // formatted_addresses = res.result.formatted_addresses.recommend;
- // },
- // });
- // console.log(formatted_addresses);
- // console.log(lat);
- // wx.getLocation({
- // type: "gcj02", //返回可以用于wx.openLocation的经纬度
- // success(res) {
- // wx.openLocation({
- // latitude: e.currentTarget.dataset.lat - 0,
- // longitude: e.currentTarget.dataset.lng - 0,
- // name: formatted_addresses,
- // address: address,
- // scale: 8,
- // });
- // },
- // complete(res) {
- // wx.hideLoading();
- // console.log(1123213);
- // },
- // });
- // },
- changeMenu(e) {
- let currentIndex = parseInt(e.currentTarget.dataset.id);
- this.setData({
- currIndex: e.currentTarget.dataset.id,
- });
- },
- getLocation() {
- var that = this;
-
- wx.getSetting({
- success: (res) => {
- console.log(res); // res.authSetting.location
-
- if (res.authSetting.location) {
- wx.getLocation({
- success(res1) {
- console.log("获取位置");
- console.log(res1);
-
- if (app.isNotEmptyCheck(res1.latitude) && app.isNotEmptyCheck(res1.longitude)) {
- that.data.searchForm.lat = res1.latitude;
- that.data.searchForm.lng = res1.longitude;
- }
-
- that.getStoreJobDetailById();
- },
-
- fail() {
- that.getStoreJobDetailById();
- },
- });
- } else {
- that.getStoreJobDetailById();
- }
- },
- }); // my.getLocation({
- // success(res) {
- // my.hideLoading();
- // console.log(res)
- // that.data.searchForm.lng = res.longitude;
- // that.data.searchForm.lat = res.latitude;
- // that.getStoreJobDetailById();
- // },
- // fail() {
- // my.hideLoading();
- // that.getStoreJobDetailById();
- // },
- // })
- },
- // onShareAppMessage1: function () {
- // var path = commonUtil.getCurrentPageUrlWithArgs();
- // if (app.globalData.isLogin && app.globalData.agencyStatus - 0 != 0) {
- // //当前用户是代理人
- // path += "&agencyUserId=" + app.globalData.loginUserInfo.id;
- // }
- // var that = this;
- // // const promise = new Promise(resolve => {
- // // that.widget.renderToCanvas({ wxml:wxml(that.data.jobDetail), style }).then(res1 => {
- // // const p2 = that.widget.canvasToTempFilePath()
- // // p2.then(res => {
- // // console.log(res);
- // // resolve({
- // // title:that.data.shareTitle,
- // // imageUrl: res.tempFilePath,
- // // })
-
- // // })
-
- // // });
- // // });
- // return this.getCanvas().then(()=>{
- // return {
- // title: that.data.shareTitle,
- // imageUrl: that.data.canvasImg,
- // path: path,
- // // promise
- // };
- // })
-
- // },
- getCanvas() {
- const that = this;
- return new Promise((resolve) => {
- var mycenter = 0; //文字左右居中显示
- var myheight = 0; //文字高度
- const query = wx.createSelectorQuery();
- query
- .select("#canvasId")
- .fields({ node: true, size: true })
- .exec((res) => {
- console.log(res);
- const canvas = res[0].node;
- const ctx = canvas.getContext("2d");
- new Promise(function (resolve) {
- // 绘制背景图片
- wx.getImageInfo({
- src: that.data.img, //网络图片,如果不行请换一个
- success(res) {
- console.log(res);
- var width = res.width;
- var height = res.height;
- mycenter = width / 2;
- myheight = height;
- canvas.width = width;
- canvas.height = height;
- const img = canvas.createImage();
- console.log(ctx);
- img.src = res.path;
- img.onload = () => {
- ctx.drawImage(img, 0, 0, width, height);
- resolve(true);
- };
- },
- });
- })
- .then(() => {
- ctx.font = "500 70px Arial";
- ctx.textAlign = "left";
- // ctx.fillStyle = "#333";
- ctx.fillStyle = "#fff";
- // console.log(that.data.factoryBill.totalSalary.toString().length);
- // let steNumber = that.data.factoryBill.totalSalary.toString().length
- // ctx.fillRect(40, 168, steNumber * 30, 72);
- ctx.fillText("职位详情", 40, 210);
- })
- .then(function () {
- wx.canvasToTempFilePath({
- canvas: canvas,
- success(res) {
- console.log(res);
- that.setData({
- canvasImg: res.tempFilePath,
- // base64: canvas.toDataURL(),
- });
- resolve();
- // console.log(that.data.canvasImg);
- },
- });
- })
- .catch((err) => {});
- });
- });
- },
- // onShareTimeline: function () {
- // return {
- // title: this.data.shareTitle,
- // query: "?storeJobId=" + this.data.storeJobId,
- // };
- // },
- getCanvas() {
- const that = this;
-
- return new Promise((resolve) => {
- var mycenter = 0; //文字左右居中显示
- var myheight = 0; //文字高度
- const query = wx.createSelectorQuery();
- query
- .select("#canvasId")
- .fields({ node: true, size: true })
- .exec((res) => {
- console.log(res);
- const canvas = res[0].node;
- const ctx = canvas.getContext("2d");
- new Promise(function (resolve) {
- // 绘制背景图片
- wx.getImageInfo({
- src: that.data.shareDetailImg, //网络图片,如果不行请换一个
- success(res) {
- console.log(res);
- var width = res.width;
- var height = res.height;
- mycenter = width / 2;
- myheight = height;
- canvas.width = width;
- canvas.height = height;
- const img = canvas.createImage();
- console.log(ctx);
- img.src = res.path;
- img.onload = () => {
- ctx.drawImage(img, 0, 0, width, height);
- resolve(true);
- };
- },
- });
- }).then(() => {
- console.log(530);
- const fillTextLineBreak = (ctx, text, x, y, lw, lh, color = "#333", font = "32", weight = "500") => {
- var i = 0;
- var n = 0;
- var r = -1;
- var initHeight = 0;
- ctx.font = weight + " " + font + "px Arial"; //字体大小
- ctx.fillStyle = color; //字体颜色
- while (i < text.length) {
- while (ctx.measureText(text.substring(n, i)).width < lw && i < text.length) {
- i++;
- }
- r++;
- ctx.fillText(text.substring(n, i), x, y + lh * r);
- n = i;
- }
- initHeight = lh * r;
- // wx.setStorageSync("initHeight", initHeight);
- };
- const roundRect = (ctx, img, bg_x, bg_y, bg_w, bg_h, bg_r) => {
- // 开始绘制
- ctx.save();
- ctx.beginPath();
- ctx.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5);
- ctx.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2);
- ctx.arc(bg_x + bg_w - bg_r, bg_y + bg_h - bg_r, bg_r, 0, Math.PI * 0.5);
- ctx.arc(bg_x + bg_r, bg_y + bg_h - bg_r, bg_r, Math.PI * 0.5, Math.PI);
- ctx.clip();
- ctx.drawImage(img, bg_x, bg_y, bg_w, bg_h);
- // 恢复之前保存的绘图上下文
- ctx.restore();
- };
- const roundRect_yuan = (ctx, x, y, size) => {
- // 开始绘制
- ctx.save(); // 保存
- ctx.beginPath(); // 开始绘制
- // ctx.arc(100, 75, 50, 0, 2 * Math.PI)
- ctx.arc(size / 2 + x, size / 2 + y, size / 2, 0, Math.PI * 2, false);
- ctx.clip();
- // 恢复之前保存的绘图上下文
- ctx.restore();
- };
- function roundRect1(ctx, x, y, w, h, r, color) {
- //绘制圆角矩形(无填充色))
- ctx.save();
- ctx.fillStyle = color;
- ctx.strokeStyle = color;
- ctx.lineJoin = "round"; //交点设置成圆角
- ctx.lineWidth = r;
- ctx.strokeRect(x + r / 2, y + r / 2, w - r, h - r);
- ctx.fillRect(x + r, y + r, w - r * 2, h - r * 2);
- ctx.stroke();
- ctx.closePath();
- }
- //使用:
- new Promise((imgres) => {
- // that.data.checkedList.forEach((item, index) => {
- console.log(587);
- let labelLeft = 0;
- // ctx.arcTo()
- let baseTop, logoLeft, logoSize, titleSize, ageTop, salaryClassifyValueLeft, salaryClassifyValueTop, monthlyPaySize, position, markTop, roundRectHeight;
- logoLeft = 56 * 2;
- let baseMiddle = 248 * 2;
- // if (that.data.checkedList.length == 1) {
- baseTop = 2 * 370;
- logoSize = 2 * 96;
- titleSize = 2 * 36;
- roundRectHeight = 2 * 260;
- ageTop = 2 * 110;
- salaryClassifyValueLeft = 2 * 176;
- salaryClassifyValueTop = 2 * 54;
- monthlyPaySize = 2 * 28;
- markTop = 2 * 145;
- console.log(603);
-
- // }
- // else {
- // baseTop = 2 * 294;
- // logoSize = 2 * 80;
- // titleSize = 2 * 32;
- // roundRectHeight = 2 * 226;
- // ageTop = 2 * 88;
- // salaryClassifyValueLeft = 2 * 156;
- // salaryClassifyValueTop = 2 * 48;
- // monthlyPaySize = 2 * 24;
- // markTop = 2 * 115;
- // }
- roundRect1(ctx, 24 * 2, baseTop - 100, 1104, roundRectHeight, 32, "#fff");
- console.log(that.data.jobDetail.store);
-
- that.data.jobDetail.storeJob.jobSpecialLabelNames.forEach((item1, index) => {
- // console.log(item1);
- // console.log(ctx.measureText(item1).width);
- if (index <= 2) {
- fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
- roundRect1(ctx, 52 * 2 + labelLeft, baseTop + markTop, ctx.measureText(item1).width + 16 * 2, 40 * 2, 32 * 2, "#00000008");
- labelLeft += ctx.measureText(item1).width + 32 * 2;
- }
- });
- console.log(that.data.jobDetail.store);
- console.log(that.data.jobDetail);
-
- fillTextLineBreak(ctx, that.data.jobDetail.store.aliasName, logoLeft, baseTop, 500 * 2, 20, "#333", titleSize, "600"); // 岗位标题
- console.log(630);
- fillTextLineBreak(ctx, that.data.jobDetail.storeJob.hourlyPay, salaryClassifyValueLeft, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#ff4400", titleSize, "600"); // 时薪
- fillTextLineBreak(ctx, that.data.jobDetail.storeJob.monthlyPay, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.storeJob.monthlyPay).width, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#ff4400", monthlyPaySize, "400"); // 月工资
- fillTextLineBreak(ctx, that.data.jobDetail.store.districtStr + "丨", salaryClassifyValueLeft, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 省市年龄
- fillTextLineBreak(ctx, that.data.jobDetail.storeJob.age, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.store.districtStr + "丨").width, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 省市年龄
+ },
+ ],
+ 800,
+ {
+ scrollSource: "#listBox",
+ timeRange: 1000,
+ startScrollOffset: 0,
+ endScrollOffset: 1,
+ }
+ );
+
+ }
+ )
+ .exec();
+ },
+
+
+
+ getAgencyInfo (job) {
+ var that = this;
+ console.log(job);
+ console.log("打印基本信息");
+
+ let objAgency = {
+ returnFeeDesp: job.returnFeeDesp,
+ returnFeeType: job.returnFeeType,
+ transferFee: job.transferFee,
+ returnFee: job.returnFee != null ? new Number(job.returnFee).toFixed(2) : null,
+ };
+ let agencyStr = "";
+ if (app.isNotEmptyCheck(job.transferFee)) {
+ agencyStr = "伯才利润:" + job.transferFee + ";";
+ }
+ if (job.returnFeeType == 0) {
+ agencyStr += `\n服务费:xxx元/时`;
+ } else if (job.returnFeeType == 1) {
+ agencyStr += `\n服务费:xxx元/天`;
+ } else if (job.returnFeeType == 2) {
+ agencyStr += `\n服务费:xxx元/月`;
+ } else if (job.returnFeeType == 3) {
+ agencyStr += `\n服务费:xxx元/次`;
+ }
+ if (objAgency.returnFee > 0) {
+ agencyStr = agencyStr.replace("xxx", objAgency.returnFee);
+ } else if (app.isNotEmptyCheck(job.transferFee)) {
+ agencyStr = "伯才利润:" + job.transferFee + ";";
+ } else {
+ agencyStr = "-";
+ }
+ if (app.isEmptyCheck(objAgency.returnFeeDesp)) {
+ // return agencyStr
+ that.setData({
+ bclr: agencyStr,
+ });
+ } else {
+ that.setData({
+ bclr: agencyStr + "\n" + objAgency.returnFeeDesp,
+ });
+ // return agencyStr + '\n' + objAgency.returnFeeDesp;
+ }
+ },
+ toMapChoice (e) {
+ var that = this;
+ console.log(e);
+ try {
+ wx.setStorageSync("onSiteRemark", that.data.onSiteRemark);
+ wx.setStorageSync("addressList", e.currentTarget.dataset.address);
+ } catch (error) {
+ console.log(error);
+ }
+ wx.navigateTo({
+ url: "../mine/addressPage/index",
+ });
+ },
+ // openMap(e) {
+ // wx.showLoading({
+ // title: "加载中",
+ // });
+ // console.log(e);
+ // let address = e.currentTarget.dataset.address;
+ // let lat = e.currentTarget.dataset.lat;
+ // var formatted_addresses = "";
+ // qqmapsdk.reverseGeocoder({
+ // location: `${e.currentTarget.dataset.lat},${e.currentTarget.dataset.lng}`,
+ // success: function (res) {
+ // console.log(res);
+ // formatted_addresses = res.result.formatted_addresses.recommend;
+ // },
+ // });
+ // console.log(formatted_addresses);
+ // console.log(lat);
+ // wx.getLocation({
+ // type: "gcj02", //返回可以用于wx.openLocation的经纬度
+ // success(res) {
+ // wx.openLocation({
+ // latitude: e.currentTarget.dataset.lat - 0,
+ // longitude: e.currentTarget.dataset.lng - 0,
+ // name: formatted_addresses,
+ // address: address,
+ // scale: 8,
+ // });
+ // },
+ // complete(res) {
+ // wx.hideLoading();
+ // console.log(1123213);
+ // },
+ // });
+ // },
+ changeMenu (e) {
+ let currentIndex = parseInt(e.currentTarget.dataset.id);
+ this.setData({
+ currIndex: e.currentTarget.dataset.id,
+ });
+ },
+ getLocation () {
+ var that = this;
+
+ wx.getSetting({
+ success: (res) => {
+ console.log(res); // res.authSetting.location
+
+ if (res.authSetting.location) {
+ wx.getLocation({
+ success (res1) {
+ console.log("获取位置");
+ console.log(res1);
+
+ if (app.isNotEmptyCheck(res1.latitude) && app.isNotEmptyCheck(res1.longitude)) {
+ that.data.searchForm.lat = res1.latitude;
+ that.data.searchForm.lng = res1.longitude;
+ }
+
+ that.getStoreJobDetailById();
+ },
+
+ fail () {
+ that.getStoreJobDetailById();
+ },
+ });
+ } else {
+ that.getStoreJobDetailById();
+ }
+ },
+ }); // my.getLocation({
+ // success(res) {
+ // my.hideLoading();
+ // console.log(res)
+ // that.data.searchForm.lng = res.longitude;
+ // that.data.searchForm.lat = res.latitude;
+ // that.getStoreJobDetailById();
+ // },
+ // fail() {
+ // my.hideLoading();
+ // that.getStoreJobDetailById();
+ // },
+ // })
+ },
+ // onShareAppMessage1: function () {
+ // var path = commonUtil.getCurrentPageUrlWithArgs();
+ // if (app.globalData.isLogin && app.globalData.agencyStatus - 0 != 0) {
+ // //当前用户是代理人
+ // path += "&agencyUserId=" + app.globalData.loginUserInfo.id;
+ // }
+ // var that = this;
+ // // const promise = new Promise(resolve => {
+ // // that.widget.renderToCanvas({ wxml:wxml(that.data.jobDetail), style }).then(res1 => {
+ // // const p2 = that.widget.canvasToTempFilePath()
+ // // p2.then(res => {
+ // // console.log(res);
+ // // resolve({
+ // // title:that.data.shareTitle,
+ // // imageUrl: res.tempFilePath,
+ // // })
+
+ // // })
+
+ // // });
+ // // });
+ // return this.getCanvas().then(()=>{
+ // return {
+ // title: that.data.shareTitle,
+ // imageUrl: that.data.canvasImg,
+ // path: path,
+ // // promise
+ // };
+ // })
+
+ // },
+ getCanvas () {
+ const that = this;
+ return new Promise((resolve) => {
+ var mycenter = 0; //文字左右居中显示
+ var myheight = 0; //文字高度
+ const query = wx.createSelectorQuery();
+ query
+ .select("#canvasId")
+ .fields({ node: true, size: true })
+ .exec((res) => {
+ console.log(res);
+ const canvas = res[0].node;
+ const ctx = canvas.getContext("2d");
+ new Promise(function (resolve) {
+ // 绘制背景图片
+ wx.getImageInfo({
+ src: that.data.img, //网络图片,如果不行请换一个
+ success (res) {
+ console.log(res);
+ var width = res.width;
+ var height = res.height;
+ mycenter = width / 2;
+ myheight = height;
+ canvas.width = width;
+ canvas.height = height;
+ const img = canvas.createImage();
+ console.log(ctx);
+ img.src = res.path;
+ img.onload = () => {
+ ctx.drawImage(img, 0, 0, width, height);
+ resolve(true);
+ };
+ },
+ });
+ })
+ .then(() => {
+ ctx.font = "500 70px Arial";
+ ctx.textAlign = "left";
+ // ctx.fillStyle = "#333";
+ ctx.fillStyle = "#fff";
+ // console.log(that.data.factoryBill.totalSalary.toString().length);
+ // let steNumber = that.data.factoryBill.totalSalary.toString().length
+ // ctx.fillRect(40, 168, steNumber * 30, 72);
+ ctx.fillText("职位详情", 40, 210);
+ })
+ .then(function () {
+ wx.canvasToTempFilePath({
+ canvas: canvas,
+ success (res) {
+ console.log(res);
+ that.setData({
+ canvasImg: res.tempFilePath,
+ // base64: canvas.toDataURL(),
+ });
+ resolve();
+ // console.log(that.data.canvasImg);
+ },
+ });
+ })
+ .catch((err) => { });
+ });
+ });
+ },
+ // onShareTimeline: function () {
+ // return {
+ // title: this.data.shareTitle,
+ // query: "?storeJobId=" + this.data.storeJobId,
+ // };
+ // },
+ getCanvas () {
+ const that = this;
+
+ return new Promise((resolve) => {
+ var mycenter = 0; //文字左右居中显示
+ var myheight = 0; //文字高度
+ const query = wx.createSelectorQuery();
+ query
+ .select("#canvasId")
+ .fields({ node: true, size: true })
+ .exec((res) => {
+ console.log(res);
+ const canvas = res[0].node;
+ const ctx = canvas.getContext("2d");
+ new Promise(function (resolve) {
+ // 绘制背景图片
+ wx.getImageInfo({
+ src: that.data.shareDetailImg, //网络图片,如果不行请换一个
+ success (res) {
+ console.log(res);
+ var width = res.width;
+ var height = res.height;
+ mycenter = width / 2;
+ myheight = height;
+ canvas.width = width;
+ canvas.height = height;
+ const img = canvas.createImage();
+ console.log(ctx);
+ img.src = res.path;
+ img.onload = () => {
+ ctx.drawImage(img, 0, 0, width, height);
+ resolve(true);
+ };
+ },
+ });
+ }).then(() => {
+ console.log(530);
+ const fillTextLineBreak = (ctx, text, x, y, lw, lh, color = "#333", font = "32", weight = "500") => {
+ var i = 0;
+ var n = 0;
+ var r = -1;
+ var initHeight = 0;
+ ctx.font = weight + " " + font + "px Arial"; //字体大小
+ ctx.fillStyle = color; //字体颜色
+ while (i < text.length) {
+ while (ctx.measureText(text.substring(n, i)).width < lw && i < text.length) {
+ i++;
+ }
+ r++;
+ ctx.fillText(text.substring(n, i), x, y + lh * r);
+ n = i;
+ }
+ initHeight = lh * r;
+ // wx.setStorageSync("initHeight", initHeight);
+ };
+ const roundRect = (ctx, img, bg_x, bg_y, bg_w, bg_h, bg_r) => {
+ // 开始绘制
+ ctx.save();
+ ctx.beginPath();
+ ctx.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5);
+ ctx.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2);
+ ctx.arc(bg_x + bg_w - bg_r, bg_y + bg_h - bg_r, bg_r, 0, Math.PI * 0.5);
+ ctx.arc(bg_x + bg_r, bg_y + bg_h - bg_r, bg_r, Math.PI * 0.5, Math.PI);
+ ctx.clip();
+ ctx.drawImage(img, bg_x, bg_y, bg_w, bg_h);
+ // 恢复之前保存的绘图上下文
+ ctx.restore();
+ };
+ const roundRect_yuan = (ctx, x, y, size) => {
+ // 开始绘制
+ ctx.save(); // 保存
+ ctx.beginPath(); // 开始绘制
+ // ctx.arc(100, 75, 50, 0, 2 * Math.PI)
+ ctx.arc(size / 2 + x, size / 2 + y, size / 2, 0, Math.PI * 2, false);
+ ctx.clip();
+ // 恢复之前保存的绘图上下文
+ ctx.restore();
+ };
+ function roundRect1 (ctx, x, y, w, h, r, color) {
+ //绘制圆角矩形(无填充色))
+ ctx.save();
+ ctx.fillStyle = color;
+ ctx.strokeStyle = color;
+ ctx.lineJoin = "round"; //交点设置成圆角
+ ctx.lineWidth = r;
+ ctx.strokeRect(x + r / 2, y + r / 2, w - r, h - r);
+ ctx.fillRect(x + r, y + r, w - r * 2, h - r * 2);
+ ctx.stroke();
+ ctx.closePath();
+ }
+ //使用:
+ new Promise((imgres) => {
+ // that.data.checkedList.forEach((item, index) => {
+ console.log(587);
+ let labelLeft = 0;
+ // ctx.arcTo()
+ let baseTop, logoLeft, logoSize, titleSize, ageTop, salaryClassifyValueLeft, salaryClassifyValueTop, monthlyPaySize, position, markTop, roundRectHeight;
+ logoLeft = 56 * 2;
+ let baseMiddle = 248 * 2;
+ // if (that.data.checkedList.length == 1) {
+ baseTop = 2 * 370;
+ logoSize = 2 * 96;
+ titleSize = 2 * 36;
+ roundRectHeight = 2 * 260;
+ ageTop = 2 * 110;
+ salaryClassifyValueLeft = 2 * 176;
+ salaryClassifyValueTop = 2 * 54;
+ monthlyPaySize = 2 * 28;
+ markTop = 2 * 145;
+ console.log(603);
+
+ // }
+ // else {
+ // baseTop = 2 * 294;
+ // logoSize = 2 * 80;
+ // titleSize = 2 * 32;
+ // roundRectHeight = 2 * 226;
+ // ageTop = 2 * 88;
+ // salaryClassifyValueLeft = 2 * 156;
+ // salaryClassifyValueTop = 2 * 48;
+ // monthlyPaySize = 2 * 24;
+ // markTop = 2 * 115;
+ // }
+ roundRect1(ctx, 24 * 2, baseTop - 100, 1104, roundRectHeight, 32, "#fff");
+ console.log(that.data.jobDetail.store);
+
+ that.data.jobDetail.storeJob.jobSpecialLabelNames.forEach((item1, index) => {
+ // console.log(item1);
+ // console.log(ctx.measureText(item1).width);
+ if (index <= 2) {
+ fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
+ roundRect1(ctx, 52 * 2 + labelLeft, baseTop + markTop, ctx.measureText(item1).width + 16 * 2, 40 * 2, 32 * 2, "#00000008");
+ labelLeft += ctx.measureText(item1).width + 32 * 2;
+ }
+ });
+ console.log(that.data.jobDetail.store);
+ console.log(that.data.jobDetail);
+
+ fillTextLineBreak(ctx, that.data.jobDetail.store.aliasName, logoLeft, baseTop, 500 * 2, 20, "#333", titleSize, "600"); // 岗位标题
+ console.log(630);
+ fillTextLineBreak(ctx, that.data.jobDetail.storeJob.hourlyPay, salaryClassifyValueLeft, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#ff4400", titleSize, "600"); // 时薪
+ fillTextLineBreak(ctx, that.data.jobDetail.storeJob.monthlyPay, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.storeJob.monthlyPay).width, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#ff4400", monthlyPaySize, "400"); // 月工资
+ fillTextLineBreak(ctx, that.data.jobDetail.store.districtStr + "丨", salaryClassifyValueLeft, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 省市年龄
+ fillTextLineBreak(ctx, that.data.jobDetail.storeJob.age, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.store.districtStr + "丨").width, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 省市年龄
// let src
// src = that.data.jobDetail.store.logo.indexOf("https") > -1 ? that.data.jobDetail.store.logo : that.data.jobDetail.store.logo.replace("http", "https")
console.log(that.data.jobDetail.store.logo);
- wx.downloadFile({
- url: that.data.jobDetail.store.logo, //网络图片,如果不行请换一个
- success(res) {
- console.log(res);
- const img = canvas.createImage();
- img.src = res.tempFilePath;
- img.onload = () => {
- roundRect(ctx, img, logoLeft, baseTop + 40, logoSize, logoSize, 8);
- // if (index == that.data.checkedList.length - 1) {
- setTimeout(() => {
- imgres();
- }, 200);
- // }
- };
- },
- fail(err){
+ wx.downloadFile({
+ url: that.data.jobDetail.store.logo, //网络图片,如果不行请换一个
+ success (res) {
+ console.log(res);
+ const img = canvas.createImage();
+ img.src = res.tempFilePath;
+ img.onload = () => {
+ roundRect(ctx, img, logoLeft, baseTop + 40, logoSize, logoSize, 8);
+ // if (index == that.data.checkedList.length - 1) {
+ setTimeout(() => {
+ imgres();
+ }, 200);
+ // }
+ };
+ },
+ fail (err) {
console.log(err);
}
- });
- // });
- // setTimeout(() => {
- // },500);
- })
- .then(function () {
- wx.canvasToTempFilePath({
- canvas: canvas,
- success(res) {
- console.log(res);
- that.setData({
- canvasImg: res.tempFilePath,
- });
- resolve(res);
- },
- fail(res) {
- wx.hideLoading();
-
- wx.showToast({
- title: res.errMsg,
- icon: "error",
- });
- },
- });
- })
- .catch((err) => {
- console.log(err);
- });
- });
- });
- });
- },
- /**
- * 分享海报生成海报图并转发
- *
- *
- */
- sharePoster() {
- wx.showLoading({
- title: "生成中...",
- });
- this.getCanvas().then((res) => {
- console.log(res);
- wx.hideLoading();
- this.setData({
- posterImg: res.tempFilePath,
- posterShow: true,
- });
- });
- // this.setData({
- // });
- },
- hidePoster() {
- this.setData({
- posterShow: false,
- });
- },
- saveToalbum() {
- let that = this;
- wx.saveImageToPhotosAlbum({
- filePath: that.data.posterImg,
- success(res) {
- console.log(res);
- if (res.errMsg == "saveImageToPhotosAlbum:ok") {
- wx.showToast({
- title: "图片已保存",
- icon: "none",
- duration: 1500,
- });
- }
- },
- fail(res) {
- console.log(res);
- wx.showToast({
- title: "图片保存失败",
- icon: "none",
- duration: 1500,
- });
- },
- });
+ });
+ // });
+ // setTimeout(() => {
+ // },500);
+ })
+ .then(function () {
+ wx.canvasToTempFilePath({
+ canvas: canvas,
+ success (res) {
+ console.log(res);
+ that.setData({
+ canvasImg: res.tempFilePath,
+ });
+ resolve(res);
+ },
+ fail (res) {
+ wx.hideLoading();
+
+ wx.showToast({
+ title: res.errMsg,
+ icon: "error",
+ });
+ },
+ });
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ });
+ });
+ });
},
- goBack(){
- if(this.data.fromScene){
+ /**
+ * 分享海报生成海报图并转发
+ *
+ *
+ */
+ sharePoster () {
+ wx.showLoading({
+ title: "生成中...",
+ });
+ this.getCanvas().then((res) => {
+ console.log(res);
+ wx.hideLoading();
+ this.setData({
+ posterImg: res.tempFilePath,
+ posterShow: true,
+ });
+ });
+ // this.setData({
+ // });
+ },
+ hidePoster () {
+ this.setData({
+ posterShow: false,
+ });
+ },
+ saveToalbum () {
+ let that = this;
+ wx.saveImageToPhotosAlbum({
+ filePath: that.data.posterImg,
+ success (res) {
+ console.log(res);
+ if (res.errMsg == "saveImageToPhotosAlbum:ok") {
+ wx.showToast({
+ title: "图片已保存",
+ icon: "none",
+ duration: 1500,
+ });
+ }
+ },
+ fail (res) {
+ console.log(res);
+ wx.showToast({
+ title: "图片保存失败",
+ icon: "none",
+ duration: 1500,
+ });
+ },
+ });
+ },
+ goBack () {
+ if (this.data.fromScene) {
wx.switchTab({
url: '../index/index',
})
- }else{
+ } else {
wx.navigateBack({
delta: -1,
})
}
},
- getStoreJobDetailById() {
- var that = this;
- wx.showLoading({
- title: "加载中...",
- });
- wx.request({
- // url: app.globalData.ip + "/store/job/getStoreJobDetailById?storeJobId=" + that.data.searchForm.storeJobId,
- url: app.globalData.ip + "/overall/store/job/getStoreJobDetailById?storeJobId=" + that.data.searchForm.storeJobId,
- method: "POST",
- header: app.globalData.headers,
- data: that.data.searchForm,
- success: function (res) {
- console.log(res);
- if (res.data.status == 200) {
- var result = res.data.data;
- var title = result.storeJob.jobName;
- // var title1 = result.store.aliasName;
- // that.data.logo2
- // wx.setStorageSync({
- // key: "onSiteRemark",
- // data: result.storeJob.onSiteRemark,
- // })
-
- that.setData({
- shareTitle: title,
- onSiteRemark: result.storeJob.onSiteRemark,
- });
+ getStoreJobDetailById () {
+ var that = this;
+ wx.showLoading({
+ title: "加载中...",
+ });
+ wx.request({
+ // url: app.globalData.ip + "/store/job/getStoreJobDetailById?storeJobId=" + that.data.searchForm.storeJobId,
+ url: app.globalData.ip + "/overall/store/job/getStoreJobDetailById?storeJobId=" + that.data.searchForm.storeJobId,
+ method: "POST",
+ header: app.globalData.headers,
+ data: that.data.searchForm,
+ success: function (res) {
+ console.log(res);
+ if (res.data.status == 200) {
+ var result = res.data.data;
+ var title = result.storeJob.jobName;
+ // var title1 = result.store.aliasName;
+ // that.data.logo2
+ // wx.setStorageSync({
+ // key: "onSiteRemark",
+ // data: result.storeJob.onSiteRemark,
+ // })
+
+ that.setData({
+ shareTitle: title,
+ onSiteRemark: result.storeJob.onSiteRemark,
+ });
let regs = /\.(jpg|jpeg|png)(\?.*)?$/;
- res.data.data.storeImage.forEach((item) => {
- item.isImg = regs.test(item.url.toLowerCase());
- });
- result.storeJob.genderRestrict = commonUtil.getGenderByMinAge(result.storeJob);
- if (app.isNotEmptyCheck(title)) {
- title = result.storeJob.jobName;
- } else {
- title = result.store.aliasName;
- }
-
- wx.setNavigationBarTitle({
- title,
- });
-
- result.storeJob.workType = commonUtil.getWorkTypeById(result.storeJob.workTypeMulti);
-
- if (app.isNotEmptyCheck(result.storeJob.calculationSalaryType)) {
- result.storeJob.calculationSalaryType = result.storeJob.calculationSalaryType.split("#")[0];
- }
- if (app.isNotEmptyCheck(result.storeJob.jobDesp)) {
- result.storeJob.jobDesp = result.storeJob.jobDesp.replaceAll("*****", "").split("————————")[0];
- result.storeJob["jobDesp1"] = result.storeJob.jobDesp.replace("⚠", "");
- result.storeJob["jobDesp1"] = result.storeJob.jobDesp1.replace("[红包]", "");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.paymentSalaryType)) {
- result.storeJob.paymentSalaryType = result.storeJob.paymentSalaryType.split(",");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.salaryDesp)) {
- result.storeJob.salaryDesp = result.storeJob.salaryDesp.split(";");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.workDurationDesp)) {
- result.storeJob.workDurationDesp = result.storeJob.workDurationDesp.split(";");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.probationDesp)) {
- result.storeJob.probationDesp = result.storeJob.probationDesp.split(";");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.workingLunchDesp)) {
- result.storeJob.workingLunchDesp = result.storeJob.workingLunchDesp.split(";");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.dormitoryDesp)) {
- result.storeJob.dormitoryDesp = result.storeJob.dormitoryDesp.split(";");
- }
-
- if (app.isNotEmptyCheck(result.storeJob.foregift)) {
- result.storeJob.foregift = result.storeJob.foregift.split(";");
- var arrTemp = [];
- result.storeJob.foregift.forEach((item) => {
- var arr = item.split(",");
-
- if (app.length > 0) {
- arrTemp.push({
- item0: arr[0].split("#")[0],
- item1: arr[1].split("#")[0],
- });
- }
- });
- result.storeJob.foregift = arrTemp;
- } else {
- result.storeJob.foregift = "无押金";
- }
-
- result.store.distance = commonUtil.getDistanceName(result.store.distance);
- if (app.isNotEmptyCheck(result.store.distance)) {
- result.store.distance = "丨" + result.store.distance;
- }
-
- /*if (app.isNotEmptyCheck(result.store.district)) {
+ res.data.data.storeImage.forEach((item) => {
+ item.isImg = regs.test(item.url.toLowerCase());
+ });
+ result.storeJob.genderRestrict = commonUtil.getGenderByMinAge(result.storeJob);
+ if (app.isNotEmptyCheck(title)) {
+ title = result.storeJob.jobName;
+ } else {
+ title = result.store.aliasName;
+ }
+
+ wx.setNavigationBarTitle({
+ title,
+ });
+
+ result.storeJob.workType = commonUtil.getWorkTypeById(result.storeJob.workTypeMulti);
+
+ if (app.isNotEmptyCheck(result.storeJob.calculationSalaryType)) {
+ result.storeJob.calculationSalaryType = result.storeJob.calculationSalaryType.split("#")[0];
+ }
+ if (app.isNotEmptyCheck(result.storeJob.jobDesp)) {
+ result.storeJob.jobDesp = result.storeJob.jobDesp.replaceAll("*****", "").split("————————")[0];
+ result.storeJob["jobDesp1"] = result.storeJob.jobDesp.replace("⚠", "");
+ result.storeJob["jobDesp1"] = result.storeJob.jobDesp1.replace("[红包]", "");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.paymentSalaryType)) {
+ result.storeJob.paymentSalaryType = result.storeJob.paymentSalaryType.split(",");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.salaryDesp)) {
+ result.storeJob.salaryDesp = result.storeJob.salaryDesp.split(";");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.workDurationDesp)) {
+ result.storeJob.workDurationDesp = result.storeJob.workDurationDesp.split(";");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.probationDesp)) {
+ result.storeJob.probationDesp = result.storeJob.probationDesp.split(";");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.workingLunchDesp)) {
+ result.storeJob.workingLunchDesp = result.storeJob.workingLunchDesp.split(";");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.dormitoryDesp)) {
+ result.storeJob.dormitoryDesp = result.storeJob.dormitoryDesp.split(";");
+ }
+
+ if (app.isNotEmptyCheck(result.storeJob.foregift)) {
+ result.storeJob.foregift = result.storeJob.foregift.split(";");
+ var arrTemp = [];
+ result.storeJob.foregift.forEach((item) => {
+ var arr = item.split(",");
+
+ if (app.length > 0) {
+ arrTemp.push({
+ item0: arr[0].split("#")[0],
+ item1: arr[1].split("#")[0],
+ });
+ }
+ });
+ result.storeJob.foregift = arrTemp;
+ } else {
+ result.storeJob.foregift = "无押金";
+ }
+
+ result.store.distance = commonUtil.getDistanceName(result.store.distance);
+ if (app.isNotEmptyCheck(result.store.distance)) {
+ result.store.distance = "丨" + result.store.distance;
+ }
+
+ /*if (app.isNotEmptyCheck(result.store.district)) {
var tempArr = result.store.district.split(",");
if (tempArr.length == 1) {
@@ -939,293 +940,293 @@ Page({
result.store.district = tempArr[1] + "" + tempArr[2];
}
}*/
- // getStoreAddress
+ // getStoreAddress
- that.disposeJobListData(result);
- if (app.isNotEmptyCheck(result.store.logo)) {
- result["logo2"] = result.store.logo.replace("http:", "https:");
+ that.disposeJobListData(result);
+ if (app.isNotEmptyCheck(result.store.logo)) {
+ result["logo2"] = result.store.logo.replace("http:", "https:");
result.store.logo.indexOf("https") > -1 ? result.store.logo : result.store.logo.replace("http", "https")
- } else {
- result["logo2"] = "";
- }
- // console.log(commonUtil.getReturnFeeTypeName1ById(result.storeJob.returnFeeType, result.storeJob.returnFee));
- console.log("isout");
- if (app.isNotEmptyCheck(result.storeJob.returnFeeType) || result.storeJob.returnFeeType == "0" || result.storeJob.returnFee == "0") {
- that.setData({
- fuWuFei: commonUtil.getReturnFeeTypeName1ById(result.storeJob.returnFeeType, result.storeJob.returnFee),
- });
- }
- // else if (result.storeJob.returnFeeType == 7) {
- // that.setData({
- // fuWuFei: commonUtil.getReturnFeeTypeNameById(result.storeJob.returnFeeType),
- // });
- // }
- else {
- that.setData({
- fuWuFei: "-",
- });
- }
-
- console.log(result);
- console.log(commonUtil);
- let citys = commonUtil.setJobInfoPosition(result.store.district);
+ } else {
+ result["logo2"] = "";
+ }
+ // console.log(commonUtil.getReturnFeeTypeName1ById(result.storeJob.returnFeeType, result.storeJob.returnFee));
+ console.log("isout");
+ if (app.isNotEmptyCheck(result.storeJob.returnFeeType) || result.storeJob.returnFeeType == "0" || result.storeJob.returnFee == "0") {
+ that.setData({
+ fuWuFei: commonUtil.getReturnFeeTypeName1ById(result.storeJob.returnFeeType, result.storeJob.returnFee),
+ });
+ }
+ // else if (result.storeJob.returnFeeType == 7) {
+ // that.setData({
+ // fuWuFei: commonUtil.getReturnFeeTypeNameById(result.storeJob.returnFeeType),
+ // });
+ // }
+ else {
+ that.setData({
+ fuWuFei: "-",
+ });
+ }
+
+ console.log(result);
+ console.log(commonUtil);
+ let citys = commonUtil.setJobInfoPosition(result.store.district);
// city = city.replace(/,/g, " | ")
- result.storeImage.splice(0,1)
-
-
-
- that.setData({
- jobDetail: result,
- isMaskShow: !(result.storeJob.recruitment == "1"),
- citys: citys || "-",
- addressNew: result.store.district.replace(/,/g, "") + result.store.detailPosition,
- });
- that.data.jobDetail.storeJob["storeName"] = that.data.jobDetail.store.storeName;
-
- that.showSexAge();
-
- // that.getAgencyInfo(res.data.data.storeJob);
-
- if (app.isEmptyCheck(res.data.data.storeJob.handoverInfo)) {
- that.setData({
- djxx: "暂无对接信息",
- });
- } else {
- that.setData({
- djxx: res.data.data.storeJob.handoverInfo,
- });
- }
- console.log(that.data.jobDetail);
- }
- wx.hideLoading();
- },
- });
- },
-
- showSexAge() {
- var that = this;
- var manStr = "";
- var womanStr = "";
-
- if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeMan) || app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeMan)) {
- manStr = "男 ";
- }
-
- if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeMan)) {
- manStr = manStr + that.data.jobDetail.storeJob.minAgeMan;
- }
- if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeMan)) {
- manStr = manStr + "-" + that.data.jobDetail.storeJob.maxAgeMan;
- }
-
- if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeWoman) || app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeWoman)) {
- womanStr = "女 ";
- }
- if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeWoman)) {
- womanStr = womanStr + that.data.jobDetail.storeJob.minAgeWoman;
- }
- if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeWoman)) {
- womanStr = womanStr + "-" + that.data.jobDetail.storeJob.maxAgeWoman;
- }
-
- if (womanStr != "") {
- manStr = manStr + `${manStr == "" ? "" : ";"}` + womanStr;
- }
-
- that.setData({
- showSexAgeText: manStr,
- });
- },
- /**
- * 处理后台返回的职位列表
- */
- disposeJobListData(jobDetail) {
- var that = this;
-
- // item["workType"] = commonUtil.getWorkTypeById(
- // item.workTypeMulti
- // );
-
- // if (app.isNotEmptyCheck(item.distance)) {
- // item["distanceKm"] = commonUtil.getDistanceName(
- // item.distance
- // );
- // }
- //年龄
- var ageStr = "";
- if (app.isNotEmptyCheck(jobDetail.storeJob.minAge) && app.isNotEmptyCheck(jobDetail.storeJob.maxAge)) {
- ageStr = jobDetail.storeJob.minAge + "-" + jobDetail.storeJob.maxAge + "岁";
- } else if (app.isNotEmptyCheck(jobDetail.storeJob.minAge)) {
- ageStr = jobDetail.storeJob.minAge + "岁以上";
- } else if (app.isNotEmptyCheck(jobDetail.storeJob.maxAge)) {
- ageStr = jobDetail.storeJob.maxAge + "岁以下";
- }
- jobDetail.storeJob["age"] = ageStr;
- //时薪
- // var hourlyPayStr = "";
- var hasHourlyPay = true;
- console.log(jobDetail.storeJob);
- // if (app.isNotEmptyCheck(jobDetail.storeJob.hourlyPay)) {
- // hourlyPayStr = jobDetail.storeJob.hourlyPay + "元/小时";
- // hasHourlyPay = true;
- // } else if (app.isNotEmptyCheck(jobDetail.storeJob.dayPay)) {
- // hourlyPayStr = jobDetail.storeJob.dayPay + "元/日";
- // hasHourlyPay = true;
- // } else {
- // if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay) && app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
- // if (jobDetail.storeJob.minMonthlyPay == jobDetail.storeJob.maxMonthlyPay) {
- // hourlyPayStr = jobDetail.storeJob.minMonthlyPay;
- // } else {
- // hourlyPayStr = jobDetail.storeJob.minMonthlyPay + "-" + jobDetail.storeJob.maxMonthlyPay;
- // }
- // } else if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay)) {
- // hourlyPayStr = jobDetail.storeJob.minMonthlyPay;
- // } else if (app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
- // hourlyPayStr = jobDetail.storeJob.maxMonthlyPay;
- // }
- // }
- // if (app.isNotEmptyCheck(jobDetail.storeJob.dayPay)){
-
- // }
- // if (app.isNotEmptyCheck(jobDetail.storeJob.salaryClassify) && app.isNotEmptyCheck(jobDetail.storeJob.salaryClassifyValue)) {
-
- jobDetail.storeJob["hourlyPay"] = commonUtil.getSalaryClassifyValue(jobDetail.storeJob.salaryClassify, jobDetail.storeJob.salaryClassifyValue);
- // }
- //月薪
- var monthlyPayStr = "";
- if (hasHourlyPay) {
- if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay) && app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
- if (jobDetail.storeJob.minMonthlyPay == jobDetail.storeJob.maxMonthlyPay) {
- monthlyPayStr = jobDetail.storeJob.minMonthlyPay;
- } else {
- monthlyPayStr = jobDetail.storeJob.minMonthlyPay + "-" + jobDetail.storeJob.maxMonthlyPay;
- }
- } else if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay)) {
- monthlyPayStr = jobDetail.storeJob.minMonthlyPay;
- } else if (app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
- monthlyPayStr = jobDetail.storeJob.maxMonthlyPay;
- }
- }
- jobDetail.storeJob["monthlyPay"] = monthlyPayStr;
- //地址深圳丨龙岗区丨
- var districtStr = "";
- if (app.isNotEmptyCheck(jobDetail.store.district)) {
- var districtArr = jobDetail.store.district.split(",");
- if (districtArr.length < 3) {
- districtStr = districtArr[districtArr.length - 1];
- } else {
- districtStr = districtArr[1] + "丨" + districtArr[2];
- }
- //districtStr = districtArr[1] + '丨' + districtArr[2];
- }
- jobDetail.store["districtStr"] = districtStr;
- jobDetail.storeJob["districtDetail"] = commonUtil.getStoreAddress(jobDetail.storeJob.district, jobDetail.storeJob.detailPosition);
- //职位特色
- if (app.isNotEmptyCheck(jobDetail.storeJob.jobSpecialLabelNames)) {
- jobDetail.storeJob["jobSpecialLabelNames"] = that.getJobSpecialLabelNamesArray(jobDetail.storeJob.jobSpecialLabelNames);
- }
- // if (app.isNotEmptyCheck(jobDetail.storeJob.jobRequestLabelNames)) {
- // jobDetail.storeJob['jobRequestLabelNames'] = that.getJobRequestLabelNamesArray(jobDetail.storeJob.jobRequestLabelNames);
- // }
- },
- getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
- if (app.isNotEmptyCheck(jobSpecialLabelNames)) {
- return jobSpecialLabelNames.split(", ");
- }
- return [];
- },
- getJobRequestLabelNamesArray(jobRequestLabelNames) {
- console.log(jobRequestLabelNames);
- if (app.isNotEmptyCheck(jobRequestLabelNames)) {
- return jobRequestLabelNames.split(", ");
- }
- return [];
- },
- goSimilar() {
- var that = this;
-
- console.log(that.data.jobDetail);
- console.log(that.data.jobDetail.storeJob.jobLabelId);
-
- wx.navigateTo({
- url: "../similar/index?brandId=" + that.data.jobDetail.store.brandId + "&jobLabelId=" + that.data.jobDetail.storeJob.jobLabelId + "&classify=99",
- });
- },
-
- makePhoneCall() {
- console.log(1);
- var that = this;
- wx.makePhoneCall({
- // number: that.data.jobDetail.assistantUserTel + ""
- phoneNumber: that.data.serviceInfo.workPhone || "0371-6611 3723",
- });
- // var that = this;
-
- // let res = wx.getStorageSync({
- // key: "assistantUserTel"
- // });
-
- // console.log(res);
- // console.log("缓存获取电话号:" + res.data);
-
- // if (app.isNotEmptyCheck(res.data)) {
- // wx.makePhoneCall({
- // number: res.data
- // });
- // } else {
- // wx.request({
- // url: app.globalData.ip + "/store/job/getOneAssistantUser",
- // method: "POST",
- // header: app.globalData.headers,
- // data: {},
- // success: function (res) {
- // console.log(res.data.data.tel);
-
- // wx.setStorageSync({
- // key: "assistantUserTel",
- // data: res.data.data.tel
- // });
-
- // wx.makePhoneCall({
- // number: res.data.data.tel + ""
- // });
- // }
- // });
- // }
- },
- textPaste() {
- var that = this;
- wx.setClipboardData({
- // data: that.data.jobDetail.assistantUserWechat,
- data: "16619732648",
- success: function (res) {
- wx.getClipboardData({
- success: function (res) {
- wx.showToast({
- icon: "none",
- title: "已复制微信号,快去添加好友吧",
- duration: 0,
- });
- wx.showModal({
- title: "已复制微信号",
- content: "快去搜索添加经纪人好友吧",
- showCancel: false,
- success(res) {
- if (res.confirm) {
- console.log("用户点击确定");
- } else if (res.cancel) {
- console.log("用户点击取消");
- }
- },
- });
-
- console.log(res.data); // data
- },
- });
- },
- });
- },
- /*collectPaste() {
+ result.storeImage.splice(0, 1)
+
+
+
+ that.setData({
+ jobDetail: result,
+ isMaskShow: !(result.storeJob.recruitment == "1"),
+ citys: citys || "-",
+ addressNew: result.store.district.replace(/,/g, "") + result.store.detailPosition,
+ });
+ that.data.jobDetail.storeJob["storeName"] = that.data.jobDetail.store.storeName;
+
+ that.showSexAge();
+
+ // that.getAgencyInfo(res.data.data.storeJob);
+
+ if (app.isEmptyCheck(res.data.data.storeJob.handoverInfo)) {
+ that.setData({
+ djxx: "暂无对接信息",
+ });
+ } else {
+ that.setData({
+ djxx: res.data.data.storeJob.handoverInfo,
+ });
+ }
+ console.log(that.data.jobDetail);
+ }
+ wx.hideLoading();
+ },
+ });
+ },
+
+ showSexAge () {
+ var that = this;
+ var manStr = "";
+ var womanStr = "";
+
+ if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeMan) || app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeMan)) {
+ manStr = "男 ";
+ }
+
+ if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeMan)) {
+ manStr = manStr + that.data.jobDetail.storeJob.minAgeMan;
+ }
+ if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeMan)) {
+ manStr = manStr + "-" + that.data.jobDetail.storeJob.maxAgeMan;
+ }
+
+ if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeWoman) || app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeWoman)) {
+ womanStr = "女 ";
+ }
+ if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.minAgeWoman)) {
+ womanStr = womanStr + that.data.jobDetail.storeJob.minAgeWoman;
+ }
+ if (app.isNotEmptyCheck(that.data.jobDetail.storeJob.maxAgeWoman)) {
+ womanStr = womanStr + "-" + that.data.jobDetail.storeJob.maxAgeWoman;
+ }
+
+ if (womanStr != "") {
+ manStr = manStr + `${manStr == "" ? "" : ";"}` + womanStr;
+ }
+
+ that.setData({
+ showSexAgeText: manStr,
+ });
+ },
+ /**
+ * 处理后台返回的职位列表
+ */
+ disposeJobListData (jobDetail) {
+ var that = this;
+
+ // item["workType"] = commonUtil.getWorkTypeById(
+ // item.workTypeMulti
+ // );
+
+ // if (app.isNotEmptyCheck(item.distance)) {
+ // item["distanceKm"] = commonUtil.getDistanceName(
+ // item.distance
+ // );
+ // }
+ //年龄
+ var ageStr = "";
+ if (app.isNotEmptyCheck(jobDetail.storeJob.minAge) && app.isNotEmptyCheck(jobDetail.storeJob.maxAge)) {
+ ageStr = jobDetail.storeJob.minAge + "-" + jobDetail.storeJob.maxAge + "岁";
+ } else if (app.isNotEmptyCheck(jobDetail.storeJob.minAge)) {
+ ageStr = jobDetail.storeJob.minAge + "岁以上";
+ } else if (app.isNotEmptyCheck(jobDetail.storeJob.maxAge)) {
+ ageStr = jobDetail.storeJob.maxAge + "岁以下";
+ }
+ jobDetail.storeJob["age"] = ageStr;
+ //时薪
+ // var hourlyPayStr = "";
+ var hasHourlyPay = true;
+ console.log(jobDetail.storeJob);
+ // if (app.isNotEmptyCheck(jobDetail.storeJob.hourlyPay)) {
+ // hourlyPayStr = jobDetail.storeJob.hourlyPay + "元/小时";
+ // hasHourlyPay = true;
+ // } else if (app.isNotEmptyCheck(jobDetail.storeJob.dayPay)) {
+ // hourlyPayStr = jobDetail.storeJob.dayPay + "元/日";
+ // hasHourlyPay = true;
+ // } else {
+ // if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay) && app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
+ // if (jobDetail.storeJob.minMonthlyPay == jobDetail.storeJob.maxMonthlyPay) {
+ // hourlyPayStr = jobDetail.storeJob.minMonthlyPay;
+ // } else {
+ // hourlyPayStr = jobDetail.storeJob.minMonthlyPay + "-" + jobDetail.storeJob.maxMonthlyPay;
+ // }
+ // } else if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay)) {
+ // hourlyPayStr = jobDetail.storeJob.minMonthlyPay;
+ // } else if (app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
+ // hourlyPayStr = jobDetail.storeJob.maxMonthlyPay;
+ // }
+ // }
+ // if (app.isNotEmptyCheck(jobDetail.storeJob.dayPay)){
+
+ // }
+ // if (app.isNotEmptyCheck(jobDetail.storeJob.salaryClassify) && app.isNotEmptyCheck(jobDetail.storeJob.salaryClassifyValue)) {
+
+ jobDetail.storeJob["hourlyPay"] = commonUtil.getSalaryClassifyValue(jobDetail.storeJob.salaryClassify, jobDetail.storeJob.salaryClassifyValue);
+ // }
+ //月薪
+ var monthlyPayStr = "";
+ if (hasHourlyPay) {
+ if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay) && app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
+ if (jobDetail.storeJob.minMonthlyPay == jobDetail.storeJob.maxMonthlyPay) {
+ monthlyPayStr = jobDetail.storeJob.minMonthlyPay;
+ } else {
+ monthlyPayStr = jobDetail.storeJob.minMonthlyPay + "-" + jobDetail.storeJob.maxMonthlyPay;
+ }
+ } else if (app.isNotEmptyCheck(jobDetail.storeJob.minMonthlyPay)) {
+ monthlyPayStr = jobDetail.storeJob.minMonthlyPay;
+ } else if (app.isNotEmptyCheck(jobDetail.storeJob.maxMonthlyPay)) {
+ monthlyPayStr = jobDetail.storeJob.maxMonthlyPay;
+ }
+ }
+ jobDetail.storeJob["monthlyPay"] = monthlyPayStr;
+ //地址深圳丨龙岗区丨
+ var districtStr = "";
+ if (app.isNotEmptyCheck(jobDetail.store.district)) {
+ var districtArr = jobDetail.store.district.split(",");
+ if (districtArr.length < 3) {
+ districtStr = districtArr[districtArr.length - 1];
+ } else {
+ districtStr = districtArr[1] + "丨" + districtArr[2];
+ }
+ //districtStr = districtArr[1] + '丨' + districtArr[2];
+ }
+ jobDetail.store["districtStr"] = districtStr;
+ jobDetail.storeJob["districtDetail"] = commonUtil.getStoreAddress(jobDetail.storeJob.district, jobDetail.storeJob.detailPosition);
+ //职位特色
+ if (app.isNotEmptyCheck(jobDetail.storeJob.jobSpecialLabelNames)) {
+ jobDetail.storeJob["jobSpecialLabelNames"] = that.getJobSpecialLabelNamesArray(jobDetail.storeJob.jobSpecialLabelNames);
+ }
+ // if (app.isNotEmptyCheck(jobDetail.storeJob.jobRequestLabelNames)) {
+ // jobDetail.storeJob['jobRequestLabelNames'] = that.getJobRequestLabelNamesArray(jobDetail.storeJob.jobRequestLabelNames);
+ // }
+ },
+ getJobSpecialLabelNamesArray (jobSpecialLabelNames) {
+ if (app.isNotEmptyCheck(jobSpecialLabelNames)) {
+ return jobSpecialLabelNames.split(", ");
+ }
+ return [];
+ },
+ getJobRequestLabelNamesArray (jobRequestLabelNames) {
+ console.log(jobRequestLabelNames);
+ if (app.isNotEmptyCheck(jobRequestLabelNames)) {
+ return jobRequestLabelNames.split(", ");
+ }
+ return [];
+ },
+ goSimilar () {
+ var that = this;
+
+ console.log(that.data.jobDetail);
+ console.log(that.data.jobDetail.storeJob.jobLabelId);
+
+ wx.navigateTo({
+ url: "../similar/index?brandId=" + that.data.jobDetail.store.brandId + "&jobLabelId=" + that.data.jobDetail.storeJob.jobLabelId + "&classify=99",
+ });
+ },
+
+ makePhoneCall () {
+ console.log(1);
+ var that = this;
+ wx.makePhoneCall({
+ // number: that.data.jobDetail.assistantUserTel + ""
+ phoneNumber: that.data.serviceInfo.workPhone || "0371-6611 3723",
+ });
+ // var that = this;
+
+ // let res = wx.getStorageSync({
+ // key: "assistantUserTel"
+ // });
+
+ // console.log(res);
+ // console.log("缓存获取电话号:" + res.data);
+
+ // if (app.isNotEmptyCheck(res.data)) {
+ // wx.makePhoneCall({
+ // number: res.data
+ // });
+ // } else {
+ // wx.request({
+ // url: app.globalData.ip + "/store/job/getOneAssistantUser",
+ // method: "POST",
+ // header: app.globalData.headers,
+ // data: {},
+ // success: function (res) {
+ // console.log(res.data.data.tel);
+
+ // wx.setStorageSync({
+ // key: "assistantUserTel",
+ // data: res.data.data.tel
+ // });
+
+ // wx.makePhoneCall({
+ // number: res.data.data.tel + ""
+ // });
+ // }
+ // });
+ // }
+ },
+ textPaste () {
+ var that = this;
+ wx.setClipboardData({
+ // data: that.data.jobDetail.assistantUserWechat,
+ data: "16619732648",
+ success: function (res) {
+ wx.getClipboardData({
+ success: function (res) {
+ wx.showToast({
+ icon: "none",
+ title: "已复制微信号,快去添加好友吧",
+ duration: 0,
+ });
+ wx.showModal({
+ title: "已复制微信号",
+ content: "快去搜索添加经纪人好友吧",
+ showCancel: false,
+ success (res) {
+ if (res.confirm) {
+ console.log("用户点击确定");
+ } else if (res.cancel) {
+ console.log("用户点击取消");
+ }
+ },
+ });
+
+ console.log(res.data); // data
+ },
+ });
+ },
+ });
+ },
+ /*collectPaste() {
var txt;
var that = this;
if(!this.data.isCollect){
@@ -1245,327 +1246,335 @@ Page({
})
},*/
-
- goNewEnroll(e) {
+ hideModal () {
+ this.setData({
+ recordBillShow: false
+ })
+ },
+ goNewEnroll (e) {
let that = this;
-
- let argument;
+ // this.data.recordBillShow = true
+ this.setData({
+ recordBillShow: true
+ })
+ return
+ let argument;
argument = JSON.stringify(that.data.jobDetail.storeJob).replace(/\=|\&/g, "3D");
-
+
if (!app.globalData.isLogin) {
wx.setStorageSync("comeFromPage", "detailBaoming");
- wx.setStorageSync("baomingDetail",argument);
- wx.navigateTo({
- url: "/pages/login/index",
- });
- return;
- }
-
- wx.navigateTo({
- url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
- });
- // wx.navigateTo({
- // url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
- // });
- },
- emptyMethod() {},
- wxLogin() {
- var that = this;
- wx.login({
- success(res) {
- if (res.code) {
- that.setData({
- wxCode: res.code,
- });
- } else {
- console.log("获取code失败!" + res.errMsg);
- }
- },
- });
- },
- getPhoneNumber(e) {
- var that = this;
- console.log(e);
- console.log(e.detail.errMsg);
- console.log(that.data.jobDetail.storeJob);
- /*wx.setStorageSync({
+ wx.setStorageSync("baomingDetail", argument);
+ wx.navigateTo({
+ url: "/pages/login/index",
+ });
+ return;
+ }
+
+ // wx.navigateTo({
+ // url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
+ // });
+ // wx.navigateTo({
+ // url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
+ // });
+ },
+ emptyMethod () { },
+ wxLogin () {
+ var that = this;
+ wx.login({
+ success (res) {
+ if (res.code) {
+ that.setData({
+ wxCode: res.code,
+ });
+ } else {
+ console.log("获取code失败!" + res.errMsg);
+ }
+ },
+ });
+ },
+ getPhoneNumber (e) {
+ var that = this;
+ console.log(e);
+ console.log(e.detail.errMsg);
+ console.log(that.data.jobDetail.storeJob);
+ /*wx.setStorageSync({
key: "jobDetailStorage",
data: that.data.jobDetail.storeJob,
});*/
- wx.setStorageSync("jobDetailStorage", that.data.jobDetail.storeJob);
- // console.log(e);
- // console.log(e.detail.errMsg)
- console.log(e.detail.iv);
- // console.log(e.detail.encryptedData)
- if ("getPhoneNumber:ok" == e.detail.errMsg) {
- //同意
- var iv = e.detail.iv;
- var encryptedData = e.detail.encryptedData;
- wx.checkSession({
- success() {
- //session_key 未过期,并且在本生命周期一直有效
- wx.request({
- url: app.globalData.ip + "/getWechatTel",
- data: {
- code: that.data.wxCode,
- iv: iv,
- encryptedData: encryptedData,
+ wx.setStorageSync("jobDetailStorage", that.data.jobDetail.storeJob);
+ // console.log(e);
+ // console.log(e.detail.errMsg)
+ console.log(e.detail.iv);
+ // console.log(e.detail.encryptedData)
+ if ("getPhoneNumber:ok" == e.detail.errMsg) {
+ //同意
+ var iv = e.detail.iv;
+ var encryptedData = e.detail.encryptedData;
+ wx.checkSession({
+ success () {
+ //session_key 未过期,并且在本生命周期一直有效
+ wx.request({
+ url: app.globalData.ip + "/getWechatTel",
+ data: {
+ code: that.data.wxCode,
+ iv: iv,
+ encryptedData: encryptedData,
type: "yishoudan",
- appId:app.globalData.appId
- },
- success: function (res) {
- console.log(res);
- app.globalData.openId = res.data.data.openId;
- let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null);
- var collected = e.currentTarget.dataset.collected;
-
- console.log(that.data.isAgency);
- if (collected) {
- promise.then((res) => {
- that.setData({
- isLogin: app.globalData.isLogin,
- });
- that.doCollected(collected, e.currentTarget.dataset.jobid);
- });
- } else {
- /*wx.navigateTo({
+ appId: app.globalData.appId
+ },
+ success: function (res) {
+ console.log(res);
+ app.globalData.openId = res.data.data.openId;
+ let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null);
+ var collected = e.currentTarget.dataset.collected;
+
+ console.log(that.data.isAgency);
+ if (collected) {
+ promise.then((res) => {
+ that.setData({
+ isLogin: app.globalData.isLogin,
+ });
+ that.doCollected(collected, e.currentTarget.dataset.jobid);
+ });
+ } else {
+ /*wx.navigateTo({
url: "../enroll/index?applyType=1&tel=" + res.data.data.phoneNumber
});*/
- promise.then((res) => {
- let argument;
- argument = JSON.stringify(that.data.jobDetail.storeJob).replace(/\=|\&/g, "3D");
- wx.navigateTo({
- url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
- });
- });
- }
- promise.then(() => {
- console.log(app.globalData.loginUserInfo.agencyStatus);
- that.setData({
- isAgency: app.globalData.loginUserInfo.agencyStatus == 1 ? true : false,
- });
- });
- // wx.navigateTo({
- // url: "../enroll/index?applyType=1&tel=" + res.data.data.phoneNumber
- // });
- },
- fail: function (res) {
- console.log("获取用户手机号错误");
- },
- });
- },
- fail() {
- // session_key 已经失效,需要重新执行登录流程
- wx.login({
- success(res) {
- if (res.code) {
- console.log(res.code);
- //发起网络请求
- wx.request({
- url: app.globalData.ip + "/getWechatTel",
- data: {
- code: res.code,
- iv: iv,
- encryptedData: encryptedData,
+ promise.then((res) => {
+ let argument;
+ argument = JSON.stringify(that.data.jobDetail.storeJob).replace(/\=|\&/g, "3D");
+ wx.navigateTo({
+ url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
+ });
+ });
+ }
+ promise.then(() => {
+ console.log(app.globalData.loginUserInfo.agencyStatus);
+ that.setData({
+ isAgency: app.globalData.loginUserInfo.agencyStatus == 1 ? true : false,
+ });
+ });
+ // wx.navigateTo({
+ // url: "../enroll/index?applyType=1&tel=" + res.data.data.phoneNumber
+ // });
+ },
+ fail: function (res) {
+ console.log("获取用户手机号错误");
+ },
+ });
+ },
+ fail () {
+ // session_key 已经失效,需要重新执行登录流程
+ wx.login({
+ success (res) {
+ if (res.code) {
+ console.log(res.code);
+ //发起网络请求
+ wx.request({
+ url: app.globalData.ip + "/getWechatTel",
+ data: {
+ code: res.code,
+ iv: iv,
+ encryptedData: encryptedData,
type: "yishoudan",
- appId:app.globalData.appId
- },
- success: function (res) {
- console.log(res);
-
- let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null);
-
- var collected = e.currentTarget.dataset.collected;
- if (collected) {
- promise.then((res) => {
- that.setData({
- isLogin: app.globalData.isLogin,
- });
- that.doCollected(collected, e.currentTarget.dataset.jobid);
- });
- } else {
- promise.then((res) => {
- let argument;
- argument = JSON.stringify(that.data.jobDetail.storeJob).replace(/\=|\&/g, "3D");
- wx.navigateTo({
- url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
- });
- });
- }
- promise.then(() => {
- console.log(app.globalData.loginUserInfo.agencyStatus);
- that.setData({
- isAgency: app.globalData.loginUserInfo.agencyStatus == 1 ? true : false,
- });
- });
- },
- fail: function (res) {
- console.log("获取用户手机号错误");
- },
- });
- } else {
- console.log("获取手机号失败!" + res.errMsg);
- }
- },
- });
- },
- });
- } else {
- //拒绝
- var collected = e.currentTarget.dataset.collected;
- if (collected) {
- try {
- wx.setStorageSync("comeFromPage", "detail");
- wx.setStorageSync("comeFromPageParam", { storeJobId: that.data.searchForm.storeJobId });
- } catch (e) {
- console.log("detail-页面跳转,设置参数错误:", e);
- }
- wx.navigateTo({
- url: "/pages/login/index",
- });
- } else {
- wx.navigateTo({
- //url: "../enroll/index?applyType=1&tel=" + res.data.data.phoneNumber
- url: "../enroll/index?applyType=1",
- });
- }
- }
- return false;
- },
- setCopy(e) {
- var that = this;
- var contentInfo;
- const query = wx.createSelectorQuery().in(this);
- query
- .select(".contactInfo")
- .boundingClientRect(function (res) {
- contentInfo = res.dataset.info;
- wx.setClipboardData({
- data: e.currentTarget.dataset.content + contentInfo,
- success(res) {
- wx.getClipboardData({
- success(res) {
- console.log(res.data); // data
- wx.showToast({
- title: "内容已复制",
- icon: "none",
- duration: 1500,
- });
- },
- });
- },
- });
- })
- .exec();
- },
- changeContact() {
- console.log(2123);
- wx.navigateTo({
- url: `/pages/configAnnunciate/index`,
- });
- },
- collectPaste(e) {
- var txt;
+ appId: app.globalData.appId
+ },
+ success: function (res) {
+ console.log(res);
+
+ let promise = app.setLoginUserTokenInfo(res.data.data.phoneNumber, null);
+
+ var collected = e.currentTarget.dataset.collected;
+ if (collected) {
+ promise.then((res) => {
+ that.setData({
+ isLogin: app.globalData.isLogin,
+ });
+ that.doCollected(collected, e.currentTarget.dataset.jobid);
+ });
+ } else {
+ promise.then((res) => {
+ let argument;
+ argument = JSON.stringify(that.data.jobDetail.storeJob).replace(/\=|\&/g, "3D");
+ wx.navigateTo({
+ url: `../newEnroll/enroll/index?applyType=1&info=${argument}`,
+ });
+ });
+ }
+ promise.then(() => {
+ console.log(app.globalData.loginUserInfo.agencyStatus);
+ that.setData({
+ isAgency: app.globalData.loginUserInfo.agencyStatus == 1 ? true : false,
+ });
+ });
+ },
+ fail: function (res) {
+ console.log("获取用户手机号错误");
+ },
+ });
+ } else {
+ console.log("获取手机号失败!" + res.errMsg);
+ }
+ },
+ });
+ },
+ });
+ } else {
+ //拒绝
+ var collected = e.currentTarget.dataset.collected;
+ if (collected) {
+ try {
+ wx.setStorageSync("comeFromPage", "detail");
+ wx.setStorageSync("comeFromPageParam", { storeJobId: that.data.searchForm.storeJobId });
+ } catch (e) {
+ console.log("detail-页面跳转,设置参数错误:", e);
+ }
+ wx.navigateTo({
+ url: "/pages/login/index",
+ });
+ } else {
+ wx.navigateTo({
+ //url: "../enroll/index?applyType=1&tel=" + res.data.data.phoneNumber
+ url: "../enroll/index?applyType=1",
+ });
+ }
+ }
+ return false;
+ },
+ setCopy (e) {
+ var that = this;
+ var contentInfo;
+ const query = wx.createSelectorQuery().in(this);
+ query
+ .select(".contactInfo")
+ .boundingClientRect(function (res) {
+ contentInfo = res.dataset.info;
+ wx.setClipboardData({
+ data: e.currentTarget.dataset.content + contentInfo,
+ success (res) {
+ wx.getClipboardData({
+ success (res) {
+ console.log(res.data); // data
+ wx.showToast({
+ title: "内容已复制",
+ icon: "none",
+ duration: 1500,
+ });
+ },
+ });
+ },
+ });
+ })
+ .exec();
+ },
+ changeContact () {
+ console.log(2123);
+ wx.navigateTo({
+ url: `/pages/configAnnunciate/index`,
+ });
+ },
+ collectPaste (e) {
+ var txt;
var that = this;
if (!this.data.isLogin) {
wx.setStorageSync("comeFromPage", "detail");
- wx.navigateTo({
- url: "/pages/login/index",
- });
- return;
- }
- var collected = e.currentTarget.dataset.collected;
- var storeJobId = e.currentTarget.dataset.jobid;
- that.doCollected(collected, storeJobId);
- // console.log(collected);
- // if(!this.data.isCollect){
- // that.setData({
- // isCollect: true,
- // collectTxt:'已收藏'
- // })
- // txt = '收藏成功'
- // }else{
- // that.setData({
- // isCollect: false,
- // collectTxt:'收藏'
- // })
- // }
- },
- doCollected(collected, storeJobId) {
- var that = this;
- var url = "/user/collect/job/add";
- if (collected - 1 == 0) {
- url = "/user/collect/job/remove";
- }
- // console.log(app.globalData.headers);
- //发起网络请求
- wx.request({
- url: app.globalData.ip + url,
- data: {
- storeJobId: storeJobId,
- },
- header: app.globalData.headers,
- method: "GET",
- success: function (res) {
- var txt;
- if (collected - 1 == 0) {
- //取消收藏
- that.data.jobDetail.storeJob.collected = 2;
- txt = "取消收藏";
- } else {
- //收藏
- that.data.jobDetail.storeJob.collected = 1;
- txt = "收藏成功";
+ wx.navigateTo({
+ url: "/pages/login/index",
+ });
+ return;
+ }
+ var collected = e.currentTarget.dataset.collected;
+ var storeJobId = e.currentTarget.dataset.jobid;
+ that.doCollected(collected, storeJobId);
+ // console.log(collected);
+ // if(!this.data.isCollect){
+ // that.setData({
+ // isCollect: true,
+ // collectTxt:'已收藏'
+ // })
+ // txt = '收藏成功'
+ // }else{
+ // that.setData({
+ // isCollect: false,
+ // collectTxt:'收藏'
+ // })
+ // }
+ },
+ doCollected (collected, storeJobId) {
+ var that = this;
+ var url = "/user/collect/job/add";
+ if (collected - 1 == 0) {
+ url = "/user/collect/job/remove";
+ }
+ // console.log(app.globalData.headers);
+ //发起网络请求
+ wx.request({
+ url: app.globalData.ip + url,
+ data: {
+ storeJobId: storeJobId,
+ },
+ header: app.globalData.headers,
+ method: "GET",
+ success: function (res) {
+ var txt;
+ if (collected - 1 == 0) {
+ //取消收藏
+ that.data.jobDetail.storeJob.collected = 2;
+ txt = "取消收藏";
+ } else {
+ //收藏
+ that.data.jobDetail.storeJob.collected = 1;
+ txt = "收藏成功";
}
-
- that.setData({
- jobDetail: that.data.jobDetail,
- isLogin: app.globalData.isLogin,
- });
- console.log(that.data.jobDetail);
- wx.showToast({
- icon: "none",
- title: txt,
- });
- },
- fail: function (res) {
- console.log("操作失败");
- },
- });
- },
- toggleprice(type) {
- console.log(type);
- if (type.target.dataset.index == 1) {
- this.setData({
- isServicePriceShow: false,
- });
- } else {
- this.setData({
- isServicePriceShow: true,
- });
- }
- },
- imageLoad() {
- this.setData({
- isLoading: false,
- });
- },
- /**
- * 阻止滑动穿透
- *
- *
- */
- modalMove() {
- return false;
- },
- showTobe() {
- this.setData({
- iosDialogTobe: true,
- });
- },
- closeTobe() {
- this.setData({
- iosDialogTobe: false,
- });
- },
+
+ that.setData({
+ jobDetail: that.data.jobDetail,
+ isLogin: app.globalData.isLogin,
+ });
+ console.log(that.data.jobDetail);
+ wx.showToast({
+ icon: "none",
+ title: txt,
+ });
+ },
+ fail: function (res) {
+ console.log("操作失败");
+ },
+ });
+ },
+ toggleprice (type) {
+ console.log(type);
+ if (type.target.dataset.index == 1) {
+ this.setData({
+ isServicePriceShow: false,
+ });
+ } else {
+ this.setData({
+ isServicePriceShow: true,
+ });
+ }
+ },
+ imageLoad () {
+ this.setData({
+ isLoading: false,
+ });
+ },
+ /**
+ * 阻止滑动穿透
+ *
+ *
+ */
+ modalMove () {
+ return false;
+ },
+ showTobe () {
+ this.setData({
+ iosDialogTobe: true,
+ });
+ },
+ closeTobe () {
+ this.setData({
+ iosDialogTobe: false,
+ });
+ },
});
diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml
index f072c08..b4231b4 100644
--- a/pages/detail/index.wxml
+++ b/pages/detail/index.wxml
@@ -1,322 +1,309 @@
-
-
+
{{jobDetail.storeJob.jobName}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- {{jobDetail.storeJob.jobName}}
+
+
+
-
-
-
-
-
-
-
- {{citys}}{{jobDetail.store.distance}}
-
+ -->
+
+
+
+ {{citys}}{{jobDetail.store.distance}}
+
+
+
+
+ {{jobDetail.storeJob.genderRestrict}}
+ 丨{{jobDetail.storeJob.age}}
+
+
+
-
-
- {{jobDetail.storeJob.genderRestrict}}
- 丨{{jobDetail.storeJob.age}}
-
+
+
+
+ {{jobDetail.storeJob.hourlyPay || '--'}}
+
+
+
+ {{jobDetail.storeJob.monthlyPay || '--'}}
+
-
-
-
-
- {{jobDetail.storeJob.hourlyPay || '--'}}
-
-
-
- {{jobDetail.storeJob.monthlyPay || '--'}}
-
-
-
-
-
-
-
- {{item1}}
-
-
- {{item1}}
-
-
-
-
-
-
-
- {{jobDetail.poses.store.posContent ? jobDetail.poses.store.posContent :'暂无地址信息'}}
-
-
-
-
-
-
-
-
- 温馨提示
- {{jobDetail.storeJob.notes}}
-
- 薪资待遇
-
-
- 薪资明细
- {{jobDetail.storeJob.salaryDetail}}
-
-
- 薪资发放
- {{jobDetail.storeJob.payDay}}
-
-
- 银行卡
- {{jobDetail.storeJob.bankInfo}}
-
-
- 押金
- {{jobDetail.storeJob.mealCardDeposit}}
-
-
- 培训
- {{jobDetail.storeJob.training}}
-
-
- 试用期
- {{jobDetail.storeJob.probation}}
-
-
- 福利待遇
- {{jobDetail.storeJob.boon}}
+ -->
+
+
+ {{item1}}
-
- 薪资说明
- {{jobDetail.storeJob.salaryDesp}}
+
+ {{item1}}
- 招聘要求
-
-
- 性别年龄
- {{showSexAgeText}}
-
-
- 文化学历
- {{jobDetail.storeJob.education}}
-
+
+
+
+
+
+ {{jobDetail.poses.store.posContent ? jobDetail.poses.store.posContent :'暂无地址信息'}}
+
+
+
+
+
+
+
+
+ 温馨提示
+ {{jobDetail.storeJob.notes}}
+
+ 薪资待遇
+
+
+ 薪资明细
+ {{jobDetail.storeJob.salaryDetail}}
+
+
+ 薪资发放
+ {{jobDetail.storeJob.payDay}}
+
+
+ 银行卡
+ {{jobDetail.storeJob.bankInfo}}
+
+
+ 押金
+ {{jobDetail.storeJob.mealCardDeposit}}
+
+
+ 培训
+ {{jobDetail.storeJob.training}}
+
+
+ 试用期
+ {{jobDetail.storeJob.probation}}
+
+
+ 福利待遇
+ {{jobDetail.storeJob.boon}}
+
+
+ 薪资说明
+ {{jobDetail.storeJob.salaryDesp}}
+
+
+ 招聘要求
+
+
+ 性别年龄
+ {{showSexAgeText}}
+
+
+ 文化学历
+ {{jobDetail.storeJob.education}}
+
-
+ -->
-
- 证件
- {{jobDetail.storeJob.idCard}}
-
+
+ 证件
+ {{jobDetail.storeJob.idCard}}
+
-
- 疑难杂症
- {{jobDetail.storeJob.otherRequire}}
-
+
+ 疑难杂症
+ {{jobDetail.storeJob.otherRequire}}
+
-
- 体检
- {{jobDetail.storeJob.healthRequire}}
-
-
- 岗位说明
-
-
- 工作内容
- {{jobDetail.storeJob.workContent}}
-
-
- 工作方式
- {{jobDetail.storeJob.workMode}}
-
-
- 班次工时
- {{jobDetail.storeJob.workClasses}}
-
-
- 工作衣
- {{jobDetail.storeJob.workClothes}}
-
-
- 车间
- {{jobDetail.storeJob.securityCheck}}
-
-
- 保险
- {{jobDetail.storeJob.employeeInsurance}}
-
-
- 换岗调班
- {{jobDetail.storeJob.otherDesp}}
-
-
- 吃饭住宿
-
-
-
-
- 吃饭
- {{jobDetail.storeJob.workingLunch}}
+ 体检
+ {{jobDetail.storeJob.healthRequire}}
-
-
-
-
-
+ 岗位说明
+
- 住宿费用
- {{jobDetail.storeJob.dormitory}}
+ 工作内容
+ {{jobDetail.storeJob.workContent}}
- 宿舍设施
- {{jobDetail.storeJob.dormitoryFacilities}}
+ 工作方式
+ {{jobDetail.storeJob.workMode}}
- 宿舍距离
- {{jobDetail.storeJob.dormDistance}}
+ 班次工时
+ {{jobDetail.storeJob.workClasses}}
-
+
+
+ 吃饭
+ {{jobDetail.storeJob.workingLunch}}
+
+
+
+
+
+
+
+
+ 住宿费用
+ {{jobDetail.storeJob.dormitory}}
+
+
+ 宿舍设施
+ {{jobDetail.storeJob.dormitoryFacilities}}
+
+
+ 宿舍距离
+ {{jobDetail.storeJob.dormDistance}}
+
+
-
+
-
- 入住要求
- {{jobDetail.storeJob.dormitoryDesp}}
+ -->
+
+ 入住要求
+ {{jobDetail.storeJob.dormitoryDesp}}
+
+
-
-
- 对接信息
-
-
-
-
+ 对接信息
+
- 面试时间
- {{jobDetail.storeJob.interviewDuration}}
-
-
+
+
+ 面试时间
+ {{jobDetail.storeJob.interviewDuration}}
+
+
-
+
-
+
-
- 面试说明
- {{jobDetail.storeJob.interviewDesp}}
-
-
- 入职说明
- {{jobDetail.storeJob.entryDesp}}
-
-
- 离职说明
- {{jobDetail.storeJob.leaveRequire}}
+ -->
+
+ 面试说明
+ {{jobDetail.storeJob.interviewDesp}}
+
+
+ 入职说明
+ {{jobDetail.storeJob.entryDesp}}
+
+
+ 离职说明
+ {{jobDetail.storeJob.leaveRequire}}
+
+
-
-
-
- 其它信息
- {{jobDetail.storeJob.OtherInfo}}
-
-
-
+
+ 其它信息
+ {{jobDetail.storeJob.OtherInfo}}
+
-
-
- 面试
-
-
- 面试时间
- {{jobDetail.storeJob.interviewDuration}}
-
-
-
+
-
- 出行方式
- {{jobDetail.storeJob.tripMode}}
-
-
+
+ 出行方式
+ {{jobDetail.storeJob.tripMode}}
+
+
-
- 面试说明
- {{jobDetail.storeJob.interviewDesp}}
-
-
- 入离职
-
-
+
+ 面试说明
+ {{jobDetail.storeJob.interviewDesp}}
+
+
+ 入离职
+
+
-
- 入职说明
- {{jobDetail.storeJob.entryDesp}}
-
-
- 入职说明
- {{jobDetail.storeJob.leaveRequire}}
-
-
- 返厂
- {{jobDetail.storeJob.leaveDesp}}
-
-
-
+
+ 入职说明
+ {{jobDetail.storeJob.entryDesp}}
+
+
+ 入职说明
+ {{jobDetail.storeJob.leaveRequire}}
+
+
+ 返厂
+ {{jobDetail.storeJob.leaveDesp}}
+
+
+
-
-
- 报名须知
- {{jobDetail.storeJob.agencyStatement}}
-
+
+
+ 报名须知
+ {{jobDetail.storeJob.agencyStatement}}
+
-
-
- 财务信息
-
-
+
+
+ 财务信息
+
+
-
+
-
+
-
+
-
+
-
+
-
- 服务费详情
- {{jobDetail.storeJob.agencyProfit}}
-
-
- 扣税说明
- {{jobDetail.storeJob.deductTaxDesp}}
-
-
-
- 账单日
- (出名单时间)
+ -->
+
+ 服务费详情
+ {{jobDetail.storeJob.agencyProfit}}
+
+
+ 扣税说明
+ {{jobDetail.storeJob.deductTaxDesp}}
+
+
+
+ 账单日
+ (出名单时间)
+
+ {{jobDetail.storeJob.outListTime}}
+
+
+
+ 结算日
+ (结算时间)
+
+ {{jobDetail.storeJob.settlementTime}}
+
- {{jobDetail.storeJob.outListTime}}
-
-
-
- 结算日
- (结算时间)
+ 仅代理可见
+
+
+
+
+
+ 复制
+
+
+ {{userInfo.agencyStatus == 1 ? (userInfo.noticeEndStr ? userInfo.noticeEndStr : ('详情咨询:' + userInfo.tel)) : ('详情咨询:' + serviceInfo.aliasName + (serviceInfo.workPhone || '-'))}}
+
+ 以上联系人,可以
+ 改成我的
+
- {{jobDetail.storeJob.settlementTime}}
-
-
- 仅代理可见
-
-
-
-
-
- 复制
-
-
- {{userInfo.agencyStatus == 1 ? (userInfo.noticeEndStr ? userInfo.noticeEndStr : ('详情咨询:' + userInfo.tel)) : ('详情咨询:' + serviceInfo.aliasName + (serviceInfo.workPhone || '-'))}}
-
- 以上联系人,可以
- 改成我的
-
-
-
-
-
-
+
+
+
-
-
-
+ -->
+
+
该职位暂时停招
@@ -477,20 +463,69 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+ 报名确认
+
+
+ 报名岗位
+ {{jobDetail.storeJob.jobName}}
+
+
+ 薪资待遇
+ {{jobDetail.storeJob.monthlyPay + '元/月'}}
+
+
+
+ *姓名
+
+
+
+
+
+
+
+
+
+ *身份证
+
+
+
+
+
+
+
+
+
+
+ *联系电话
+
+
+
+
+
+
+
+ 注意:不同的报名人如果填写同一个手机号,报名提交将会失败。
+
+
+
+
+
+
+
diff --git a/pages/detail/index.wxss b/pages/detail/index.wxss
index 435daa0..867c259 100644
--- a/pages/detail/index.wxss
+++ b/pages/detail/index.wxss
@@ -1,43 +1,43 @@
- .goback {
- position: absolute;
- color: #000;
- left: 0px;
- /* top: 40px; */
- /* transform: translateY(-50%); */
- margin-left: 6px;
- font-size: 18px;
- font-weight: bold;
- z-index: 99999;
+.goback {
+ position: absolute;
+ color: #000;
+ left: 0px;
+ /* top: 40px; */
+ /* transform: translateY(-50%); */
+ margin-left: 6px;
+ font-size: 18px;
+ font-weight: bold;
+ z-index: 99999;
}
page,
.pb180 {
padding-bottom: 120px;
background-color: #fff;
}
-.p14{
- padding: 14px;
+.p14 {
+ padding: 14px;
}
.mg020 {
- margin: 0 20px;
+ margin: 0 20px;
}
-.pb10{
- padding-bottom: 10px;
+.pb10 {
+ padding-bottom: 10px;
}
.desp-copy {
- color: #FF4400;
- font-size: 12px;
- float: right;
- /* top: 11px;
+ color: #ff4400;
+ font-size: 12px;
+ float: right;
+ /* top: 11px;
right: 8px;
position: relative; */
- border: 1px solid #FF4400;
- border-radius: 25rpx;
- padding: 0px 8px;
- height: 16px;
- line-height: 16px;
+ border: 1px solid #ff4400;
+ border-radius: 25rpx;
+ padding: 0px 8px;
+ height: 16px;
+ line-height: 16px;
- margin-top: 16px;
- margin-right: 16px;
+ margin-top: 16px;
+ margin-right: 16px;
}
.jobMoney {
font-size: 18px;
@@ -56,7 +56,6 @@ page,
justify-content: start;
}
-
.servicePrice {
border: 1rpx solid var(--color-ysd);
background-color: #ffeee7;
@@ -145,9 +144,11 @@ button::after {
margin: 12px 5px;
overflow: hidden;
}
-.scrollImg,swiper,.theVideo {
- width: 100vw;
- height: calc(100vw * 281 / 375);
+.scrollImg,
+swiper,
+.theVideo {
+ width: 100vw;
+ height: calc(100vw * 281 / 375);
/* position: absolute;
top: 50%;
left: 50%;
@@ -187,23 +188,23 @@ button::after {
}
button.loginOut {
width: 136px;
- line-height: 36px;
- height: 36px;
- margin-right:16px;
- margin-left: 0;
- background-color: var(--color-ysd);
+ line-height: 36px;
+ height: 36px;
+ margin-right: 16px;
+ margin-left: 0;
+ background-color: var(--color-ysd);
}
.wxBtn {
- background-color: #fff !important;
- color: var(--color-ysd);
- border: 1px solid var(--color-ysd);
+ background-color: #fff !important;
+ color: var(--color-ysd);
+ border: 1px solid var(--color-ysd);
}
-.loginBtnHov{
- background-color: var(--color-ysd) !important;
- color: #fff !important;
+.loginBtnHov {
+ background-color: var(--color-ysd) !important;
+ color: #fff !important;
}
-.bottomBox{
- /* padding-bottom: 16px; */
+.bottomBox {
+ /* padding-bottom: 16px; */
}
.button-hover[type="primary"] {
color: #ffffff;
@@ -295,17 +296,17 @@ button.collectBtn {
font-weight: 400;
color: #787878;
line-height: 21px;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.btext {
font-size: 11px;
font-weight: 400;
color: #444444;
line-height: 16px;
- margin-top: 2px;
+ margin-top: 2px;
}
.flex-3 {
flex: 3;
@@ -388,16 +389,16 @@ button.collectBtn {
margin-bottom: 8px;
}
.rb1 {
- font-size: 14px;
- color: #666;
- text-align: center;
- width: 60px;
- border-right: 1px solid #f3f3f3;
- border-bottom: 1px solid #f3f3f3;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- padding: 0 8px;
+ font-size: 14px;
+ color: #666;
+ text-align: center;
+ width: 60px;
+ border-right: 1px solid #f3f3f3;
+ border-bottom: 1px solid #f3f3f3;
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ padding: 0 8px;
}
.textb1 {
white-space: pre-line;
@@ -416,26 +417,26 @@ button.collectBtn {
}
.navigatorBar {
- position: relative;
- letter-spacing:1px;
+ position: relative;
+ letter-spacing: 1px;
/* z-index: 999; */
/* background-color: var(--color-ysd); */
padding-bottom: 8px;
}
.navigatorBar {
position: absolute;
- letter-spacing:1px;
+ letter-spacing: 1px;
background-color: #fff;
- padding-bottom: 8px;
- z-index: 999;
- left: 0;
- right: 0;
+ padding-bottom: 8px;
+ z-index: 999;
+ left: 0;
+ right: 0;
}
.navigatorBar .tabs {
position: relative;
left: 50%;
- color: #000;
- font-size: 35rpx;
+ color: #000;
+ font-size: 35rpx;
transform: translateX(-50%);
/* justify-content: center; */
box-sizing: border-box;
@@ -471,9 +472,9 @@ button.collectBtn {
color: #fff;
/* display: none; */
}
-.transparentBtn{
- background-color: transparent !important;
- color: #FF4400 !important;
+.transparentBtn {
+ background-color: transparent !important;
+ color: #ff4400 !important;
}
.drawerMask {
position: fixed;
@@ -553,13 +554,24 @@ button.collectBtn {
.drawerBox .bottom {
position: sticky;
bottom: 24px;
- width: 100%;
+ width: 100%;
text-align: center;
}
.drawerBox .bottom .loginOut {
- width: 260px !important;
+ width: 260px !important;
}
.posterImg {
- height: 75vh;
- width: calc(75vh * .52);
+ height: 75vh;
+ width: calc(75vh * 0.52);
+}
+
+/* 报名弹窗相关 */
+.billInput {
+ height: 40px;
+ width: 90%;
+ padding-left: 12px;
+ box-sizing: border-box;
+ background: #f9f9f9;
+ border-radius: 4px;
+ margin-top: 4px;
}
diff --git a/project.private.config.json b/project.private.config.json
index ac64285..9d1933f 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -4,7 +4,7 @@
"urlCheck": false
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "projectname": "signupAssistant",
+ "projectname": "signupHelper",
"condition": {
"miniprogram": {
"list": [