wangxia 4 months ago
commit f7695bc729

@ -4,8 +4,8 @@
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "报名助手",
"backgroundColor": "#caf1e0",
"backgroundColorTop": "#caf1e0"
"backgroundColor": "#fff",
"backgroundColorTop": "#fff"
}
},
{

@ -8,7 +8,7 @@
<!-- 列表区 -->
<!-- <div @click="showPop = true"> 1123 </div> -->
<!-- `calc(${navInfo.windowHeight}px - ${navInfo.navigationBarHeight + navInfo.statusBarHeight}px)` -->
<scroll-view class="m-list" id="listBox" :scroll-into-view="scrollTo" :style="{ height: `calc(${navInfo.windowHeight}px)` }" :scroll-y="true" @scrolltolower="reachBottom">
<scroll-view class="m-list" id="listBox" :scroll-into-view="scrollTo" :style="{ height: `100vh ` }" :scroll-y="true" @scrolltolower="reachBottom" @scroll="checkScroll">
<div class hover-class="none" hover-stop-propagation="false">
<div class="g_position_rela g_flex_row_between">
<div class="the_city g_flex_column_center" style hover-class="thover" @click="goCity">
@ -27,12 +27,12 @@
</div>
<div>
<div class="sticky">
<div class="g_bg_f_5 g_flex_row_between flex_center" id="tttop">
<div class="g_flex_row_between flex_center" :class="toTop ? 'g_bg_f' : 'g_bg_f_5'" :style="{ 'box-shadow': toTop ? '0px 2px 3px 0px rgba(214, 214, 214, 0.3)' : '' }" id="tttop">
<div class="g_flex_1">
<u-tabs bg-color="transparent" from="index" gutter="20" :list="tabInfo.list" :is-scroll="true" :current="tabInfo.active" active-color="#00b666" bar-width="64" bar-height="6" @change="handleUpdateTab" font-size="34" duration="0.05" height="76"></u-tabs>
</div>
<div class="g_flex_row_end">
<div class="csbf" @click="chooseNl('sort')">
<div class="csbf" :class="toTop ? 'g_bg_f_5' : 'g_bg_f'" @click="chooseNl('sort')">
{{ sortList.list[sortList.active].showName }}
<span class="iconfont icon-shouqi g_fs_12 g_c_9 fst g_ml_4" v-if="whichOneShow == 'sort'"></span>
<span class="iconfont icon-zhankai g_fs_12 g_c_9 fst g_ml_4" v-if="whichOneShow != 'sort'"></span>
@ -42,7 +42,7 @@
</div>
</div>
</div>
<view class="csbf" style="z-index: 99999999" @click="chooseNl('special')" data-type="special">
<view class="csbf" :class="toTop ? 'g_bg_f_5' : 'g_bg_f'" style="z-index: 99999999" @click="chooseNl('special')" data-type="special">
筛选
<span class="iconfont icon-shouqi g_fs_12 g_c_9 fst g_ml_4" v-if="whichOneShow == 'special'"></span>
<span class="iconfont icon-zhankai g_fs_12 g_c_9 fst g_ml_4" v-if="whichOneShow != 'special'"></span>
@ -214,6 +214,7 @@ export default {
return {
scrollTo: "",
selectedCity: "全国",
toTop: false, //
getFilterData: {
sex: "-1",
ageRangeStr: "",
@ -223,7 +224,7 @@ export default {
jobCategoryLabelObjects: [],
},
background: {
backgroundColor: "#caf1e0",
backgroundColor: "#fff",
},
customList: [
{
@ -364,6 +365,23 @@ export default {
}
}
},
checkScroll() {
let that = this;
uni
.createSelectorQuery()
.select("#tttop")
.boundingClientRect((data) => {
// console.log("data", data);
if (data.top <= 0) {
that.toTop = true;
} else {
that.toTop = false;
}
// domTopInfo.value[id] = data.top;
// scrollTop.value = data.top - 200;
})
.exec();
},
handleOpenCamera() {
let that = this;
that.G.handleScanCode();

@ -328,7 +328,7 @@ export default {
return new Promise((resolve) => {
var mycenter = 0; //
var myheight = 0; //
var baseColor = this.agencyInfo.themeColor || '#52cd8d'; //
var baseColor = this.agencyInfo.themeColor || "#52cd8d"; //
const query = uni.createSelectorQuery().in(this);
query
.select("#canvasId")
@ -358,39 +358,38 @@ export default {
//
that.G.roundRect1(ctx, 0, 0, canvas.width, canvas.height, 0, baseColor);
//
that.G.roundRect1(ctx, (mycenter - canvas.width + 120 ) / 2, 280, (canvas.width - 120), (canvas.height - 360), 180, "#fff");
that.G.roundRect1(ctx, (mycenter - canvas.width + 120) / 2, 280, canvas.width - 120, canvas.height - 360, 180, "#fff");
//
that.G.roundRect1(ctx, (mycenter - 800 ) / 2, canvas.height - 300, 800, 136, 135 , baseColor);
let qrTop = 1195
that.G.roundRect1(ctx, (mycenter - 800) / 2, canvas.height - 300, 800, 136, 135, baseColor);
let qrTop = 1195;
//
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 - 5, qrTop, 136, 136, 80, baseColor);
that.G.roundRect1(ctx, (mycenter - 600) / 2 - 5, qrTop, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 + 470, qrTop, 136, 136, 80, baseColor);
that.G.roundRect1(ctx, (mycenter - 600) / 2 + 470, qrTop, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 - 5, qrTop + 475, 136, 136, 80, baseColor);
that.G.roundRect1(ctx, (mycenter - 600) / 2 - 5, qrTop + 475, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 + 470, qrTop + 475, 136, 136, 80, baseColor);
that.G.fillTextLineBreak(ctx, '扫一扫关注我的发单号',(mycenter - '扫一扫关注我的发单号'.length * 54) / 2 + 40, canvas.height - 215, '扫一扫关注我的发单号'.length * 54, 58, "#333", 54, 600); //
that.G.roundRect1(ctx, (mycenter - 600) / 2 + 470, qrTop + 475, 136, 136, 80, baseColor);
that.G.fillTextLineBreak(ctx, "扫一扫关注我的发单号", (mycenter - "扫一扫关注我的发单号".length * 54) / 2 + 40, canvas.height - 215, "扫一扫关注我的发单号".length * 54, 58, "#333", 54, 600); //
//
that.G.roundRect_yuan(ctx, (mycenter - 360 ) / 2, 110, 360, "#ffffff");
that.G.roundRect_yuan(ctx, (mycenter - 360) / 2, 110, 360, "#ffffff");
uni.getImageInfo({
src: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png', //
src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png", //
success(res) {
const img = canvas.createImage();
console.log("res333", res);
img.src = res.path;
img.onload = () => {
that.G.roundRect(ctx, img, (mycenter - 800 ) / 2 + 100, canvas.height - 265, 70, 70, 0);
that.G.roundRect(ctx, img, (mycenter - 800) / 2 + 100, canvas.height - 265, 70, 70, 0);
resolve(true);
}
}
})
};
},
});
};
},
fail(err) {
console.log('errerrerrerrerrerrerr',err);
console.log("errerrerrerrerrerrerr", err);
},
});
}).then(() => {
@ -494,35 +493,23 @@ export default {
// info.jobNum = 10000
// info.recruitmentJobNum = 1000
// info.downNum = 32
let numBase = 150
let numBase2 = numBase + (ctx.measureText(info.jobNum.toString()).width + ctx.measureText("总职位").width + 150)
let numBase3 = numBase2 + (ctx.measureText(info.recruitmentJobNum.toString()).width + ctx.measureText("在招数").width + 150)
let numBase = 150;
let numBase2 = numBase + (ctx.measureText(info.jobNum.toString()).width + ctx.measureText("总职位").width + 150);
let numBase3 = numBase2 + (ctx.measureText(info.recruitmentJobNum.toString()).width + ctx.measureText("在招数").width + 150);
that.G.roundRect(ctx, img, (mycenter - 300) / 2, 140, 300, 300, 150); // logo
that.G.fillTextLineBreak(ctx, info.fullName, (mycenter - info.fullName.length * 80) / 2, 600, info.fullName.length * 80, 200, "#333", 80, 600, "left"); //
that.G.fillTextLineBreak(ctx, info.agencyDesp ,numBase , 870,mycenter - 360, 86, "#666", 56, 500,'left'); // slogan
that.G.fillTextLineBreak(ctx, info.agencyDesp, numBase - 40, 870, mycenter - 240, 86, "#666", 56, 500, "center"); // slogan
// that.G.fillTextLineBreak(ctx, "" + info.jobUpdateNum, 140, 400, ("" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
let jobL =info.jobNum.toString().length
let recL =info.recruitmentJobNum.toString().length
let downL =info.downNum.toString().length
// if(){
// }
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), numBase, 760, info.jobNum.toString().length * 80, 88, "#000", 80, 500); //
that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), numBase2, 760, info.recruitmentJobNum.toString().length * 80, 88, "#000", 80, 500); //
that.G.fillTextLineBreak(ctx, info.downNum.toString(),numBase3, 760, info.downNum.toString().length * 80, 88, "#000", 80, 500); //
console.log('info.jobNum.toString().length * 88',info.jobNum.toString().length * 88);
// that.G.fillTextLineBreak(ctx, "",numBase + (info.jobNum.toString().length <=1 ?70 * 2 :info.jobNum.toString().length * 70), 755, "".length * 56, 56, "#666", 56, 400); //
// that.G.fillTextLineBreak(ctx, "", numBase2 + (info.recruitmentJobNum.toString().length <=1 ?70 * 2 :info.recruitmentJobNum.toString().length * 70), 755, "".length * 56, 56, "#666", 56, 400); //
// that.G.fillTextLineBreak(ctx, "", numBase3 + (info.downNum.toString().length <=1 ?60 * 2 :info.downNum.toString().length * 60), 755, "".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "总职位",numBase + (info.jobNum.toString().length <=1 ?60 * 2 :info.jobNum.toString().length * 50), 755, "总职位".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "在招数", numBase2 + (info.recruitmentJobNum.toString().length <=1 ?60 * 2 :info.recruitmentJobNum.toString().length * 50), 755, "在招数".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "粉丝", numBase3 + (info.downNum.toString().length <=1 ?40 * 2 :info.downNum.toString().length * 50), 755, "粉丝".length * 56, 56, "#666", 56, 400); //
const textSegments = [
{ content: info.jobNum.toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 20 },
{ content: "总职位", color: "#666", fontWeight: 500, fontSize: 56, space: 80 },
{ content: info.recruitmentJobNum.toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 20 },
{ content: "在招数", color: "#666", fontWeight: 500, fontSize: 56, space: 80 },
{ content: info.downNum.toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 20 },
{ content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 },
];
that.G.drawCenteredText(ctx, mycenter , 745, textSegments);
imgres(canvas);
};
},

@ -107,7 +107,8 @@
</template>
</g-panel-form-slot>
<view class="g_h_10"></view>
<g-panel-form-slot :list="[
<g-panel-form-slot
:list="[
{
icon: '',
label: '老乡电话',
@ -120,7 +121,20 @@
pColumn: 8,
require: false,
},
]" @changeMobile="handleClickMobile"></g-panel-form-slot>
]"
@changeMobile="handleClickMobile"
></g-panel-form-slot>
<view class="g_flex_column_between g_flex_1 g_pb_24">
<view class="g_fs_12 g_c_9 g_flex_row_center g_mb_32" style="align-items: center; margin-top: 16px">
<radio-group class="dib">
<radio :checked="switchChecked" @click="switchChecked = !switchChecked" value="0" class="dib biggerSize" color="#00b666" style="transform: scale(0.7)" />
</radio-group>
我已阅读并同意
<navigator url="/root/person/agreeUser" class="g_c_sub">用户服务协议</navigator>
<navigator url="/root/person/agreePrive" class="g_c_sub">隐私政策</navigator>
</view>
</view>
<g-panel-fixed>
<slot>
<view class="g_pl_12 g_pr_12">
@ -135,31 +149,32 @@
<script>
// import gPanelFormSlot from "@/components/formSlot.vue";
import { nationlist } from '../../utils/nation.js'
import { nationlist } from "../../utils/nation.js";
export default {
onReady() {
this.G.setNavStyle()
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun()
return this.G.shareFun();
},
components: {
// gPanelFormSlot,
},
data() {
return {
switchChecked: false,
cdnBaseImg: this.G.store().cdnBaseImg,
info: {
nation: '汉族',
nation: "汉族",
},
nation: nationlist.map((item, index) => {
return item.name
return item.name;
}),
nationIndex: 0,
imgList: [],
newAddImg: [],
}
};
},
props: {
// info: {
@ -168,27 +183,27 @@ export default {
// },
},
onLoad(options) {
let that = this
console.log('快速报名:', options)
let that = this;
console.log("快速报名:", options);
if (options) {
if (options.sex) {
options.sex = Number(options.sex)
options.sex = Number(options.sex);
} else {
options.sex = 1
options.sex = 1;
}
if (!options.nation) {
options.nation = '汉族'
options.nation = "汉族";
}
this.info = options
this.info = options;
// if (this.info.imgs) {
// this.imgList = this.info.imgs.split(",");
// }
}
console.log('获取老乡信息:', options)
console.log("获取老乡信息:", options);
},
onShow() {
let that = this
that.getImg()
let that = this;
that.getImg();
// that.nation.forEach((item, index) => {
// if (item == that.info.nation) {
// console.log(that.info.nation);
@ -201,202 +216,204 @@ export default {
// }, 300);
},
created() {
let that = this
let that = this;
},
methods: {
handleClickName(e) {
this.info.name = this.info.userName = e
this.changeInfo()
this.info.name = this.info.userName = e;
this.changeInfo();
},
handleClickSex(e) {
this.info.sex = e
this.changeInfo()
this.info.sex = e;
this.changeInfo();
},
handleClickAge(e) {
this.info.age = e
this.changeInfo()
this.info.age = e;
this.changeInfo();
},
handleClickMobile(e) {
this.info.tel = e
this.changeInfo()
this.info.tel = e;
this.changeInfo();
},
handleClickNation(e) {
let that = this
console.log(e.name)
this.info.nation = e.name
let that = this;
console.log(e.name);
this.info.nation = e.name;
that.nation.forEach((item, index) => {
if (item == e.name) {
// console.log(that.info.nation)
// console.log(index)
that.nationIndex = index
that.nationIndex = index;
}
})
this.changeInfo()
});
this.changeInfo();
},
changeInfo() {
this.$emit('changeInfo', this.info)
this.$emit("changeInfo", this.info);
},
/**
* 获取上传的身份信息
*/
handlerIDInfo(res) {
console.log('res', res)
let that = this
that.info.name = res.info.name
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : ''
that.info.age = res.info.age
that.info.nation = res.info.nationality + '族'
that.info.idCard = res.info.num
that.info.idCardImageUrl = res.image
that.info.userName = res.info.name
that.info.address = res.info.address
console.log("res", res);
let that = this;
that.info.name = res.info.name;
that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
that.info.age = res.info.age;
that.info.nation = res.info.nationality + "族";
that.info.idCard = res.info.num;
that.info.idCardImageUrl = res.image;
that.info.userName = res.info.name;
that.info.address = res.info.address;
that.nation.forEach((item, index) => {
console.log('item1', item)
console.log('that.info.nation + "族"', that.info.nation + '族')
console.log("item1", item);
console.log('that.info.nation + "族"', that.info.nation + "族");
if (item == that.info.nation) {
console.log('item2', item)
console.log("item2", item);
that.nationIndex = index
that.nationIndex = index;
}
})
this.changeInfo()
console.log('that.info', that.info)
console.log('that.nationIndex', that.nationIndex)
});
this.changeInfo();
console.log("that.info", that.info);
console.log("that.nationIndex", that.nationIndex);
},
getImg() {
let that = this
let that = this;
uni.request({
url: that.G.ajaxUrl + `/imgs/list/${that.info.userId}?type=20`,
method: 'GET',
method: "GET",
header: Object.assign(
{
Authorization: 'Bearer ' + uni.getStorageSync('apply-token'),
Authorization: "Bearer " + uni.getStorageSync("apply-token"),
},
that.G.setPublicParams()
),
success: (res) => {
if (res.statusCode === 200) {
console.log(res.data.data.userImgs)
if(that.info.fujian){
that.imgList = that.info.fujian.split(',').map(item => {
console.log(res.data.data.userImgs);
if (that.info.fujian) {
that.imgList = that.info.fujian
.split(",")
.map((item) => {
return {
url:item
}
}).concat(res.data.data.userImgs);
}else{
that.imgList = res.data.data.userImgs
url: item,
};
})
.concat(res.data.data.userImgs);
} else {
that.imgList = res.data.data.userImgs;
}
console.log(that.imgList)
console.log(that.imgList);
} else {
console.error('Failed to fetch images:', res)
console.error("Failed to fetch images:", res);
}
},
fail: (error) => {
console.error('Error fetching images:', error)
console.error("Error fetching images:", error);
},
})
});
},
//
delImg(ind, id) {
let that = this
let that = this;
uni.showModal({
title: '提示',
content: '确定要删除该图片?',
title: "提示",
content: "确定要删除该图片?",
success: function (res) {
if (res.confirm) {
that.imgList.splice(
that.imgList.findIndex((item, index) => index == ind),
1
)
);
uni.request({
url: that.G.ajaxUrl + `/imgs/del/${id}`,
method: 'GET',
method: "GET",
header: Object.assign(
{
Authorization: 'Bearer ' + uni.getStorageSync('apply-token'),
Authorization: "Bearer " + uni.getStorageSync("apply-token"),
},
that.G.setPublicParams()
),
success: (res) => {
if (res.statusCode === 200) {
console.log(res.data.data.userImgs)
console.log(res.data.data.userImgs);
// imgList
// that.imgList = res.data.data.userImgs;
} else {
console.error('Failed to fetch images:', res)
console.error("Failed to fetch images:", res);
}
},
fail: (error) => {
console.error('Error fetching images:', error)
console.error("Error fetching images:", error);
},
})
});
} else if (res.cancel) {
console.log('用户点击取消')
console.log("用户点击取消");
}
},
})
});
},
//
updateFile(e) {
let that = this
let that = this;
if (that.imgList.length < 4) {
that.imgList.push({ url: e, id: -999 })
that.imgList.push({ url: e, id: -999 });
// that.info.imgs = that.imgList;
that.newAddImg.push(e)
that.changeInfo()
uni.hideLoading()
that.newAddImg.push(e);
that.changeInfo();
uni.hideLoading();
} else {
uni.showToast({
title: '最多只能上传4张',
icon: 'none',
})
title: "最多只能上传4张",
icon: "none",
});
}
},
handleClickIDcard(e) {
this.info.idCard = e
this.info.idCard = e;
if (this.info.idCard.length == 15 || this.info.idCard.length == 18) {
let info = this.G.getInfoByIDcard(this.info.idCard)
this.info.age = info.age
this.info.sex = info.sex ? (info.sex == '男' ? 1 : 2) : ''
let info = this.G.getInfoByIDcard(this.info.idCard);
this.info.age = info.age;
this.info.sex = info.sex ? (info.sex == "男" ? 1 : 2) : "";
}
this.changeInfo()
this.changeInfo();
// console.log(this.G.getInfoByIDcard(this.info.idCard));
},
handleClickAddress(e) {
this.info.address = e
this.changeInfo()
this.info.address = e;
this.changeInfo();
},
goReturn() {
uni.navigateBack()
uni.navigateBack();
},
handleSubmit() {
let that = this
console.log('that.info.imgs', that.info.imgs)
console.log('that.imgList', that.imgList)
let that = this;
console.log("that.info.imgs", that.info.imgs);
console.log("that.imgList", that.imgList);
if (!that.info.name) {
uni.showToast({
icon: 'none',
title: '请输入姓名',
})
return false
icon: "none",
title: "请输入姓名",
});
return false;
}
if (!that.info.tel && !that.info.idCard) {
uni.showToast({
icon: 'none',
title: '请输入手机号或身份证号',
})
return false
icon: "none",
title: "请输入手机号或身份证号",
});
return false;
}
if (that.info.tel &&!that.G.setReg(that.info.tel, 'tel')) {
if (that.info.tel && !that.G.setReg(that.info.tel, "tel")) {
uni.showToast({
icon: 'none',
title: '请输入正确的手机号',
})
return false
icon: "none",
title: "请输入正确的手机号",
});
return false;
}
if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
uni.showToast({
@ -405,9 +422,9 @@ export default {
});
return false;
}
console.log(that.info)
console.log(that.info);
if (that.imgList.length > 0) {
that.info.imgs = that.newAddImg.toString()
that.info.imgs = that.newAddImg.toString();
}
let submitInfo = {
name: that.info.userName,
@ -417,49 +434,52 @@ export default {
tel: that.info.tel,
idCard: that.info.idCard,
address: that.info.address,
idCardImageUrl: that.info.idCardImageUrl ? that.info.idCardImageUrl : '',
idCardImageUrl: that.info.idCardImageUrl ? that.info.idCardImageUrl : "",
userName: that.info.userName,
userId: that.info.userId,
orderId: that.info.id,
userApplyOrderFiles:(that.imgList && that.imgList.length > 0)
?
that.imgList.map(item => { return item.url }).join(',')
:
''
}
let url = 'order_submitFellowNew'
userApplyOrderFiles:
that.imgList && that.imgList.length > 0
? that.imgList
.map((item) => {
return item.url;
})
.join(",")
: "",
};
let url = "order_submitFellowNew";
that.G.Post(that.api[url], submitInfo, (res) => {
uni.showToast({
icon: 'success',
title: '保存成功',
})
uni.$emit('infoUpdate')
uni.navigateBack()
})
icon: "success",
title: "保存成功",
});
uni.$emit("infoUpdate");
uni.navigateBack();
});
// uni.$emit("getTownsman", { info: that.info });
// uni.navigateBack();
},
handleClickInfo() {
let that = this
let that = this;
that.G.uploadImg((res) => {
console.log('res', res)
that.info.name = res.info.name
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : ''
that.info.age = res.info.age
that.info.nation = res.info.nationality
that.info.idCard = res.info.num
that.info.idCardImageUrl = res.image
that.info.userName = res.info.name
that.info.address = res.info.address
console.log("res", res);
that.info.name = res.info.name;
that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
that.info.age = res.info.age;
that.info.nation = res.info.nationality;
that.info.idCard = res.info.num;
that.info.idCardImageUrl = res.image;
that.info.userName = res.info.name;
that.info.address = res.info.address;
that.nation.forEach((item, index) => {
if (item == that.info.nation) {
that.nationIndex = index
that.nationIndex = index;
}
})
}, 'idcard')
});
}, "idcard");
},
},
}
};
</script>
<style>

@ -1,7 +1,7 @@
<template>
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou">
<u-navbar backIconColor="#333" :borderBottom="false" :immersive="true" :customBack="goHome" :background="{ background: navColor }" :backIconName="fromShare ? 'home' : 'arrow-left'"></u-navbar>
<view class="g_h_136 u-navbar-fixed" style="background-color: #caf1e0 !important"></view>
<view class=" u-navbar-fixed" style="background-color: #caf1e0 !important;height:160px"></view>
<div class style="background-color: #caf1e0 !important">
<view class="m-info g_p_20 g_pt_12 g_pb_0 g_bg_f g_position_rela" hover-class="none" style="margin-top: 0; border-radius: 8px 8px 0 0">
<view class="g_flex_row_start">

@ -225,7 +225,7 @@
},
{
icon: "",
label: "预约面试时间",
label: "面试时间",
result: "",
path: "",
value: that.updateInfo.interviewTimeStr,
@ -348,7 +348,7 @@
},
{
icon: "",
label: "预约面试时间",
label: "面试时间",
result: "",
path: "",
value: that.updateInfo.interviewTimeStr,

@ -26,6 +26,10 @@
<div class="g_w_160">
<g-button btnText="去添加" size="auto" type="primary" @clickBtn="goPage('/root/person/teamManage')"></g-button>
<!-- <g-button btnText="手动添加" size="auto" @clickBtn="goPage('/root/person/addOrUpdataMember')"></g-button> -->
</div>
<div class="g_w_160 g_ml_12">
<g-button btnText="回首页" size="auto" type="default" @clickBtn="goHome('/pages/home/index')"></g-button>
<!-- <g-button btnText="手动添加" size="auto" @clickBtn="goPage('/root/person/addOrUpdataMember')"></g-button> -->
</div>
<!-- <div class="g_w_120">
<g-button btnText="微信邀请" size="auto" type="primary" class="" @clickBtn="goPage('/root/person/memberApplyQRCode')"></g-button>
@ -63,6 +67,11 @@ export default {
url,
})
},
goHome(url){
uni.switchTab({
url
});
}
},
}
</script>

@ -162,7 +162,7 @@ let data = {
setNavStyle ($form = 'default') {
if ($form == 'home') {
uni.setNavigationBarColor({
backgroundColor: "#caf1e0",
backgroundColor: "#fff",
frontColor: "#000000"
})
}
@ -1237,7 +1237,7 @@ let data = {
/**
* 文字绘制
*/
fillTextLineBreak (ctx, text, x, y, lw, lh, color = "#333", font = "32", weight = "500", align = "center") {
fillTextLineBreak (ctx, text, x, y, lw, lh, color = "#333", font = "32", weight = "500", align = "left") {
var i = 0;
var n = 0;
var r = -1;
@ -1255,6 +1255,42 @@ let data = {
n = i;
}
},
// 计算总体宽度
calculateTotalWidth (ctx, segments) {
let totalWidth = 0;
segments.forEach((segment) => {
ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`;
totalWidth += ((ctx.measureText(segment.content).width) + segment.space || 0);
});
return totalWidth;
},
// 绘制单行居中的拼接文本
drawCenteredText (ctx, x, y, textSegments) {
// 计算总宽度
const totalWidth = this.calculateTotalWidth(ctx, textSegments);
// 计算起始X坐标居中位置
const centerX = x;
const startX = (centerX - totalWidth) / 2;
const centerY = y;
// 绘制拼接文本
let currentX = startX;
textSegments.forEach((segment) => {
ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`;
ctx.fillStyle = segment.color;
// 文本基线设为中间,使垂直方向也居中
// ctx.textBaseline = "middle";
// 绘制当前文本片段
ctx.fillText(segment.content, currentX, centerY);
// 更新X坐标为下一段文本做准备, 文本长度为1的时候使用字体大小
currentX += ((ctx.measureText(segment.content).width) + segment.space || 0);
});
},
/**
* 背景图绘制
*/
@ -1298,6 +1334,80 @@ let data = {
ctx.stroke();
ctx.closePath();
},
// 绘制折线
setZigzag (ctx) {
// 定义折线的点坐标 (形成90度角)
const points = [
{ x: 100, y: 100 }, // 起点
{ x: 200, y: 100 }, // 转折点
{ x: 200, y: 200 } // 终点
];
let cornerRadius = -10
// 设置线条样式
ctx.lineWidth = lineWidth;
ctx.strokeStyle = strokeColor;
ctx.lineCap = 'round';
// 开始绘制路径
ctx.beginPath();
// 从第一个点开始
ctx.moveTo(points[0].x, points[0].y);
// 遍历所有点,处理转折点
for (let i = 1; i < points.length - 1; i++) {
const prev = points[i - 1];
const curr = points[i];
const next = points[i + 1];
// 计算进入和离开转折点的方向向量
const inVector = { x: curr.x - prev.x, y: curr.y - prev.y };
const outVector = { x: next.x - curr.x, y: next.y - curr.y };
// 归一化向量
const inLength = Math.sqrt(inVector.x ** 2 + inVector.y ** 2);
const outLength = Math.sqrt(outVector.x ** 2 + outVector.y ** 2);
const normalizedIn = {
x: inVector.x / inLength,
y: inVector.y / inLength,
};
const normalizedOut = {
x: outVector.x / outLength,
y: outVector.y / outLength,
};
// 计算拐角的起点和终点距离转折点cornerRadius的位置
const start = {
x: curr.x - normalizedIn.x * cornerRadius,
y: curr.y - normalizedIn.y * cornerRadius,
};
const end = {
x: curr.x + normalizedOut.x * cornerRadius,
y: curr.y + normalizedOut.y * cornerRadius,
};
// 绘制到拐角起点
ctx.lineTo(start.x, start.y);
// 计算切线方向,绘制贝塞尔曲线作为圆角
const control1 = {
x: start.x + normalizedOut.x * cornerRadius,
y: start.y + normalizedOut.y * cornerRadius,
};
const control2 = {
x: end.x - normalizedIn.x * cornerRadius,
y: end.y - normalizedIn.y * cornerRadius,
};
ctx.bezierCurveTo(control1.x, control1.y, control2.x, control2.y, end.x, end.y);
}
// 绘制到最后一个点
ctx.lineTo(points[points.length - 1].x, points[points.length - 1].y);
// 描边路径
ctx.stroke();
},
/**
* canvas绘图 end
*/

Loading…
Cancel
Save