wangxia 8 months ago
commit f7695bc729

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

@ -8,7 +8,7 @@
<!-- 列表区 --> <!-- 列表区 -->
<!-- <div @click="showPop = true"> 1123 </div> --> <!-- <div @click="showPop = true"> 1123 </div> -->
<!-- `calc(${navInfo.windowHeight}px - ${navInfo.navigationBarHeight + navInfo.statusBarHeight}px)` --> <!-- `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 hover-class="none" hover-stop-propagation="false">
<div class="g_position_rela g_flex_row_between"> <div class="g_position_rela g_flex_row_between">
<div class="the_city g_flex_column_center" style hover-class="thover" @click="goCity"> <div class="the_city g_flex_column_center" style hover-class="thover" @click="goCity">
@ -27,12 +27,12 @@
</div> </div>
<div> <div>
<div class="sticky"> <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"> <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> <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>
<div class="g_flex_row_end"> <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 }} {{ 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-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> <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> </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-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> <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 { return {
scrollTo: "", scrollTo: "",
selectedCity: "全国", selectedCity: "全国",
toTop: false, //
getFilterData: { getFilterData: {
sex: "-1", sex: "-1",
ageRangeStr: "", ageRangeStr: "",
@ -223,7 +224,7 @@ export default {
jobCategoryLabelObjects: [], jobCategoryLabelObjects: [],
}, },
background: { background: {
backgroundColor: "#caf1e0", backgroundColor: "#fff",
}, },
customList: [ 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() { handleOpenCamera() {
let that = this; let that = this;
that.G.handleScanCode(); that.G.handleScanCode();

@ -328,7 +328,7 @@ export default {
return new Promise((resolve) => { return new Promise((resolve) => {
var mycenter = 0; // var mycenter = 0; //
var myheight = 0; // var myheight = 0; //
var baseColor = this.agencyInfo.themeColor || '#52cd8d'; // var baseColor = this.agencyInfo.themeColor || "#52cd8d"; //
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query query
.select("#canvasId") .select("#canvasId")
@ -355,43 +355,42 @@ export default {
img.src = res.path; img.src = res.path;
console.log("img111", img); console.log("img111", img);
img.onload = (info) => { img.onload = (info) => {
// //
that.G.roundRect1(ctx, 0, 0, canvas.width, canvas.height, 0, baseColor); 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); that.G.roundRect1(ctx, (mycenter - 800) / 2, canvas.height - 300, 800, 136, 135, baseColor);
let qrTop = 1195 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.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.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({ 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) { success(res) {
const img = canvas.createImage(); const img = canvas.createImage();
console.log("res333", res); console.log("res333", res);
img.src = res.path; img.src = res.path;
img.onload = () => { 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); resolve(true);
} };
} },
}) });
}; };
}, },
fail(err) { fail(err) {
console.log('errerrerrerrerrerrerr',err); console.log("errerrerrerrerrerrerr", err);
}, },
}); });
}).then(() => { }).then(() => {
//使 //使
@ -466,7 +465,7 @@ export default {
}, },
}); });
}, },
// //
setShareJobImg(ctx, canvas, mycenter, funObj) { setShareJobImg(ctx, canvas, mycenter, funObj) {
let that = this; let that = this;
return new Promise((imgres) => { return new Promise((imgres) => {
@ -491,38 +490,26 @@ export default {
const img = canvas.createImage(); const img = canvas.createImage();
img.src = res.path; img.src = res.path;
img.onload = () => { img.onload = () => {
// info.jobNum = 10000 // info.jobNum = 10000
// info.recruitmentJobNum = 1000 // info.recruitmentJobNum = 1000
// info.downNum = 32 // info.downNum = 32
let numBase = 150 let numBase = 150;
let numBase2 = numBase + (ctx.measureText(info.jobNum.toString()).width + ctx.measureText("总职位").width + 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 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.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.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.jobUpdateNum, 140, 400, ("" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), numBase, 760, info.jobNum.toString().length * 80, 88, "#000", 80, 500); // const textSegments = [
that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), numBase2, 760, info.recruitmentJobNum.toString().length * 80, 88, "#000", 80, 500); // { content: info.jobNum.toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 20 },
that.G.fillTextLineBreak(ctx, info.downNum.toString(),numBase3, 760, info.downNum.toString().length * 80, 88, "#000", 80, 500); // { 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 },
console.log('info.jobNum.toString().length * 88',info.jobNum.toString().length * 88); { content: info.downNum.toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 20 },
{ content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 },
];
// 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.drawCenteredText(ctx, mycenter , 745, textSegments);
// 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); //
imgres(canvas); imgres(canvas);
}; };
}, },

@ -1,9 +1,9 @@
<template> <template>
<view class="p-root-detail-fellow g_w_all g_h_all g_bg_f_5 g_kuaishou"> <view class="p-root-detail-fellow g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view> <view>
<view class="g_h_10"></view> <view class="g_h_10"></view>
<g-panel-form-slot <g-panel-form-slot
:list="[ :list="[
{ {
icon: '', icon: '',
label: '姓名', label: '姓名',
@ -88,26 +88,27 @@
pColumn: 16, pColumn: 16,
}, },
]" ]"
@changeName="handleClickName" @changeName="handleClickName"
@changeSex="handleClickSex" @changeSex="handleClickSex"
@changeAge="handleClickAge" @changeAge="handleClickAge"
@changeNation="handleClickNation" @changeNation="handleClickNation"
@changeIDcard="handleClickIDcard" @changeIDcard="handleClickIDcard"
@changeAddress="handleClickAddress" @changeAddress="handleClickAddress"
@updateFile="updateFile" @updateFile="updateFile"
@updateIDInfo="handlerIDInfo" @updateIDInfo="handlerIDInfo"
> >
<template v-slot:after> <template v-slot:after>
<view class="g_flex_row_start g_p_10" v-if="imgList.length > 0"> <view class="g_flex_row_start g_p_10" v-if="imgList.length > 0">
<view v-for="(item, index) in imgList" class="g_position_rela g_mr_10 g_mt_4" :key="index"> <view v-for="(item, index) in imgList" class="g_position_rela g_mr_10 g_mt_4" :key="index">
<i class="iconfont icon-guanbi img-close" @click="delImg(index, item.id)"></i> <i class="iconfont icon-guanbi img-close" @click="delImg(index, item.id)"></i>
<image :src="item.url" class="g_w_56 g_h_56 g_radius_8" /> <image :src="item.url" class="g_w_56 g_h_56 g_radius_8" />
</view> </view>
</view> </view>
</template> </template>
</g-panel-form-slot> </g-panel-form-slot>
<view class="g_h_10"></view> <view class="g_h_10"></view>
<g-panel-form-slot :list="[ <g-panel-form-slot
:list="[
{ {
icon: '', icon: '',
label: '老乡电话', label: '老乡电话',
@ -120,361 +121,380 @@
pColumn: 8, pColumn: 8,
require: false, require: false,
}, },
]" @changeMobile="handleClickMobile"></g-panel-form-slot> ]"
<g-panel-fixed> @changeMobile="handleClickMobile"
<slot> ></g-panel-form-slot>
<view class="g_pl_12 g_pr_12"> <view class="g_flex_column_between g_flex_1 g_pb_24">
<!-- <g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button> --> <view class="g_fs_12 g_c_9 g_flex_row_center g_mb_32" style="align-items: center; margin-top: 16px">
<g-button btnText="确定" class @clickBtn="handleSubmit" size="auto" type="primary"></g-button> <radio-group class="dib">
</view> <radio :checked="switchChecked" @click="switchChecked = !switchChecked" value="0" class="dib biggerSize" color="#00b666" style="transform: scale(0.7)" />
</slot> </radio-group>
</g-panel-fixed> 我已阅读并同意
</view> <navigator url="/root/person/agreeUser" class="g_c_sub">用户服务协议</navigator>
</view>
<navigator url="/root/person/agreePrive" class="g_c_sub">隐私政策</navigator>
</view>
</view>
<g-panel-fixed>
<slot>
<view class="g_pl_12 g_pr_12">
<!-- <g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button> -->
<g-button btnText="确定" class @clickBtn="handleSubmit" size="auto" type="primary"></g-button>
</view>
</slot>
</g-panel-fixed>
</view>
</view>
</template> </template>
<script> <script>
// import gPanelFormSlot from "@/components/formSlot.vue"; // import gPanelFormSlot from "@/components/formSlot.vue";
import { nationlist } from '../../utils/nation.js' import { nationlist } from "../../utils/nation.js";
export default { export default {
onReady() { onReady() {
this.G.setNavStyle() this.G.setNavStyle();
}, },
onShareAppMessage() { onShareAppMessage() {
return this.G.shareFun() return this.G.shareFun();
}, },
components: { components: {
// gPanelFormSlot, // gPanelFormSlot,
}, },
data() { data() {
return { return {
cdnBaseImg: this.G.store().cdnBaseImg, switchChecked: false,
info: { cdnBaseImg: this.G.store().cdnBaseImg,
nation: '汉族', info: {
}, nation: "汉族",
nation: nationlist.map((item, index) => { },
return item.name nation: nationlist.map((item, index) => {
}), return item.name;
nationIndex: 0, }),
imgList: [], nationIndex: 0,
newAddImg: [], imgList: [],
} newAddImg: [],
}, };
props: { },
// info: { props: {
// type: Object, // info: {
// default: {}, // type: Object,
// }, // default: {},
}, // },
onLoad(options) { },
let that = this onLoad(options) {
console.log('快速报名:', options) let that = this;
if (options) { console.log("快速报名:", options);
if (options.sex) { if (options) {
options.sex = Number(options.sex) if (options.sex) {
} else { options.sex = Number(options.sex);
options.sex = 1 } else {
} options.sex = 1;
if (!options.nation) { }
options.nation = '汉族' if (!options.nation) {
} options.nation = "汉族";
this.info = options }
// if (this.info.imgs) { this.info = options;
// this.imgList = this.info.imgs.split(","); // if (this.info.imgs) {
// } // this.imgList = this.info.imgs.split(",");
} // }
console.log('获取老乡信息:', options) }
}, console.log("获取老乡信息:", options);
onShow() { },
let that = this onShow() {
that.getImg() let that = this;
// that.nation.forEach((item, index) => { that.getImg();
// if (item == that.info.nation) { // that.nation.forEach((item, index) => {
// console.log(that.info.nation); // if (item == that.info.nation) {
// console.log(index); // console.log(that.info.nation);
// that.nationIndex = index; // console.log(index);
// } // that.nationIndex = index;
// }); // }
// that.speed = 0; // });
// setTimeout(() => { // that.speed = 0;
// }, 300); // setTimeout(() => {
}, // }, 300);
created() { },
let that = this created() {
}, let that = this;
methods: { },
handleClickName(e) { methods: {
this.info.name = this.info.userName = e handleClickName(e) {
this.changeInfo() this.info.name = this.info.userName = e;
}, this.changeInfo();
handleClickSex(e) { },
this.info.sex = e handleClickSex(e) {
this.changeInfo() this.info.sex = e;
}, this.changeInfo();
handleClickAge(e) { },
this.info.age = e handleClickAge(e) {
this.changeInfo() this.info.age = e;
}, this.changeInfo();
handleClickMobile(e) { },
this.info.tel = e handleClickMobile(e) {
this.changeInfo() this.info.tel = e;
}, this.changeInfo();
handleClickNation(e) { },
let that = this handleClickNation(e) {
console.log(e.name) let that = this;
this.info.nation = e.name console.log(e.name);
that.nation.forEach((item, index) => { this.info.nation = e.name;
if (item == e.name) { that.nation.forEach((item, index) => {
// console.log(that.info.nation) if (item == e.name) {
// console.log(index) // console.log(that.info.nation)
that.nationIndex = index // console.log(index)
} that.nationIndex = index;
}) }
this.changeInfo() });
}, this.changeInfo();
changeInfo() { },
this.$emit('changeInfo', this.info) changeInfo() {
}, this.$emit("changeInfo", this.info);
/** },
* 获取上传的身份信息 /**
*/ * 获取上传的身份信息
handlerIDInfo(res) { */
console.log('res', res) handlerIDInfo(res) {
let that = this console.log("res", res);
that.info.name = res.info.name let that = this;
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : '' that.info.name = res.info.name;
that.info.age = res.info.age that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
that.info.nation = res.info.nationality + '族' that.info.age = res.info.age;
that.info.idCard = res.info.num that.info.nation = res.info.nationality + "族";
that.info.idCardImageUrl = res.image that.info.idCard = res.info.num;
that.info.userName = res.info.name that.info.idCardImageUrl = res.image;
that.info.address = res.info.address that.info.userName = res.info.name;
that.nation.forEach((item, index) => { that.info.address = res.info.address;
console.log('item1', item) that.nation.forEach((item, index) => {
console.log('that.info.nation + "族"', that.info.nation + '族') console.log("item1", item);
if (item == that.info.nation) { console.log('that.info.nation + "族"', that.info.nation + "族");
console.log('item2', item) if (item == that.info.nation) {
console.log("item2", item);
that.nationIndex = index that.nationIndex = index;
} }
}) });
this.changeInfo() this.changeInfo();
console.log('that.info', that.info) console.log("that.info", that.info);
console.log('that.nationIndex', that.nationIndex) console.log("that.nationIndex", that.nationIndex);
}, },
getImg() { getImg() {
let that = this let that = this;
uni.request({ uni.request({
url: that.G.ajaxUrl + `/imgs/list/${that.info.userId}?type=20`, url: that.G.ajaxUrl + `/imgs/list/${that.info.userId}?type=20`,
method: 'GET', method: "GET",
header: Object.assign( header: Object.assign(
{ {
Authorization: 'Bearer ' + uni.getStorageSync('apply-token'), Authorization: "Bearer " + uni.getStorageSync("apply-token"),
}, },
that.G.setPublicParams() that.G.setPublicParams()
), ),
success: (res) => { success: (res) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
console.log(res.data.data.userImgs) console.log(res.data.data.userImgs);
if(that.info.fujian){ if (that.info.fujian) {
that.imgList = that.info.fujian.split(',').map(item => { that.imgList = that.info.fujian
return { .split(",")
url:item .map((item) => {
return {
url: item,
};
})
.concat(res.data.data.userImgs);
} else {
that.imgList = res.data.data.userImgs;
}
console.log(that.imgList);
} else {
console.error("Failed to fetch images:", res);
}
},
fail: (error) => {
console.error("Error fetching images:", error);
},
});
},
//
delImg(ind, id) {
let that = this;
uni.showModal({
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",
header: Object.assign(
{
Authorization: "Bearer " + uni.getStorageSync("apply-token"),
},
that.G.setPublicParams()
),
success: (res) => {
if (res.statusCode === 200) {
console.log(res.data.data.userImgs);
// imgList
// that.imgList = res.data.data.userImgs;
} else {
console.error("Failed to fetch images:", res);
}
},
fail: (error) => {
console.error("Error fetching images:", error);
},
});
} else if (res.cancel) {
console.log("用户点击取消");
} }
}).concat(res.data.data.userImgs); },
}else{ });
that.imgList = res.data.data.userImgs },
//
updateFile(e) {
let that = this;
if (that.imgList.length < 4) {
that.imgList.push({ url: e, id: -999 });
// that.info.imgs = that.imgList;
that.newAddImg.push(e);
that.changeInfo();
uni.hideLoading();
} else {
uni.showToast({
title: "最多只能上传4张",
icon: "none",
});
} }
},
handleClickIDcard(e) {
console.log(that.imgList) this.info.idCard = e;
} else { if (this.info.idCard.length == 15 || this.info.idCard.length == 18) {
console.error('Failed to fetch images:', res) let info = this.G.getInfoByIDcard(this.info.idCard);
} this.info.age = info.age;
}, this.info.sex = info.sex ? (info.sex == "男" ? 1 : 2) : "";
fail: (error) => { }
console.error('Error fetching images:', error) this.changeInfo();
}, // console.log(this.G.getInfoByIDcard(this.info.idCard));
}) },
}, handleClickAddress(e) {
// this.info.address = e;
delImg(ind, id) { this.changeInfo();
let that = this },
uni.showModal({ goReturn() {
title: '提示', uni.navigateBack();
content: '确定要删除该图片?', },
success: function (res) { handleSubmit() {
if (res.confirm) { let that = this;
that.imgList.splice( console.log("that.info.imgs", that.info.imgs);
that.imgList.findIndex((item, index) => index == ind), console.log("that.imgList", that.imgList);
1
)
uni.request({
url: that.G.ajaxUrl + `/imgs/del/${id}`,
method: 'GET',
header: Object.assign(
{
Authorization: 'Bearer ' + uni.getStorageSync('apply-token'),
},
that.G.setPublicParams()
),
success: (res) => {
if (res.statusCode === 200) {
console.log(res.data.data.userImgs)
// imgList
// that.imgList = res.data.data.userImgs;
} else {
console.error('Failed to fetch images:', res)
}
},
fail: (error) => {
console.error('Error fetching images:', error)
},
})
} else if (res.cancel) {
console.log('用户点击取消')
}
},
})
},
//
updateFile(e) {
let that = this
if (that.imgList.length < 4) {
that.imgList.push({ url: e, id: -999 })
// that.info.imgs = that.imgList;
that.newAddImg.push(e)
that.changeInfo()
uni.hideLoading()
} else {
uni.showToast({
title: '最多只能上传4张',
icon: 'none',
})
}
},
handleClickIDcard(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) : ''
}
this.changeInfo()
// console.log(this.G.getInfoByIDcard(this.info.idCard));
},
handleClickAddress(e) {
this.info.address = e
this.changeInfo()
},
goReturn() {
uni.navigateBack()
},
handleSubmit() {
let that = this
console.log('that.info.imgs', that.info.imgs)
console.log('that.imgList', that.imgList)
if (!that.info.name) { if (!that.info.name) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '请输入姓名', title: "请输入姓名",
}) });
return false return false;
} }
if (!that.info.tel && !that.info.idCard) { if (!that.info.tel && !that.info.idCard) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '请输入手机号或身份证号', title: "请输入手机号或身份证号",
}) });
return false 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({ uni.showToast({
icon: 'none', icon: "none",
title: '请输入正确的手机号', title: "请输入正确的手机号",
}) });
return false return false;
} }
if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) { if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: "请输入正确的身份证号", title: "请输入正确的身份证号",
}); });
return false; return false;
} }
console.log(that.info) console.log(that.info);
if (that.imgList.length > 0) { if (that.imgList.length > 0) {
that.info.imgs = that.newAddImg.toString() that.info.imgs = that.newAddImg.toString();
} }
let submitInfo = { let submitInfo = {
name: that.info.userName, name: that.info.userName,
sex: that.info.sex, sex: that.info.sex,
age: that.info.age, age: that.info.age,
nation: that.info.nation, nation: that.info.nation,
tel: that.info.tel, tel: that.info.tel,
idCard: that.info.idCard, idCard: that.info.idCard,
address: that.info.address, address: that.info.address,
idCardImageUrl: that.info.idCardImageUrl ? that.info.idCardImageUrl : '', idCardImageUrl: that.info.idCardImageUrl ? that.info.idCardImageUrl : "",
userName: that.info.userName, userName: that.info.userName,
userId: that.info.userId, userId: that.info.userId,
orderId: that.info.id, orderId: that.info.id,
userApplyOrderFiles:(that.imgList && that.imgList.length > 0) userApplyOrderFiles:
? that.imgList && that.imgList.length > 0
that.imgList.map(item => { return item.url }).join(',') ? that.imgList
: .map((item) => {
'' return item.url;
} })
let url = 'order_submitFellowNew' .join(",")
that.G.Post(that.api[url], submitInfo, (res) => { : "",
uni.showToast({ };
icon: 'success', let url = "order_submitFellowNew";
title: '保存成功', that.G.Post(that.api[url], submitInfo, (res) => {
}) uni.showToast({
uni.$emit('infoUpdate') icon: "success",
uni.navigateBack() title: "保存成功",
}) });
// uni.$emit("getTownsman", { info: that.info }); uni.$emit("infoUpdate");
// uni.navigateBack(); uni.navigateBack();
}, });
handleClickInfo() { // uni.$emit("getTownsman", { info: that.info });
let that = this // uni.navigateBack();
that.G.uploadImg((res) => { },
console.log('res', res) handleClickInfo() {
that.info.name = res.info.name let that = this;
that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : '' that.G.uploadImg((res) => {
that.info.age = res.info.age console.log("res", res);
that.info.nation = res.info.nationality that.info.name = res.info.name;
that.info.idCard = res.info.num that.info.sex = res.info.sex ? (res.info.sex == "男" ? 1 : 2) : "";
that.info.idCardImageUrl = res.image that.info.age = res.info.age;
that.info.userName = res.info.name that.info.nation = res.info.nationality;
that.info.address = res.info.address that.info.idCard = res.info.num;
that.nation.forEach((item, index) => { that.info.idCardImageUrl = res.image;
if (item == that.info.nation) { that.info.userName = res.info.name;
that.nationIndex = index that.info.address = res.info.address;
} that.nation.forEach((item, index) => {
}) if (item == that.info.nation) {
}, 'idcard') that.nationIndex = index;
}, }
}, });
} }, "idcard");
},
},
};
</script> </script>
<style> <style>
.img-close { .img-close {
position: absolute; position: absolute;
width: 18px; width: 18px;
height: 18px; height: 18px;
right: -6px; right: -6px;
top: -6px; top: -6px;
z-index: 99; z-index: 99;
background-color: #666; background-color: #666;
color: #fff; color: #fff;
font-size: 8px; font-size: 8px;
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
border-radius: 50%; border-radius: 50%;
} }
</style> </style>

@ -1,7 +1,7 @@
<template> <template>
<div class="p-root-detail-user g_w_all g_bg_page g_kuaishou"> <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> <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"> <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="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"> <view class="g_flex_row_start">

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

@ -26,6 +26,10 @@
<div class="g_w_160"> <div class="g_w_160">
<g-button btnText="去添加" size="auto" type="primary" @clickBtn="goPage('/root/person/teamManage')"></g-button> <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> --> <!-- <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>
<!-- <div class="g_w_120"> <!-- <div class="g_w_120">
<g-button btnText="微信邀请" size="auto" type="primary" class="" @clickBtn="goPage('/root/person/memberApplyQRCode')"></g-button> <g-button btnText="微信邀请" size="auto" type="primary" class="" @clickBtn="goPage('/root/person/memberApplyQRCode')"></g-button>
@ -63,6 +67,11 @@ export default {
url, url,
}) })
}, },
goHome(url){
uni.switchTab({
url
});
}
}, },
} }
</script> </script>

@ -162,7 +162,7 @@ let data = {
setNavStyle ($form = 'default') { setNavStyle ($form = 'default') {
if ($form == 'home') { if ($form == 'home') {
uni.setNavigationBarColor({ uni.setNavigationBarColor({
backgroundColor: "#caf1e0", backgroundColor: "#fff",
frontColor: "#000000" 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 i = 0;
var n = 0; var n = 0;
var r = -1; var r = -1;
@ -1255,6 +1255,42 @@ let data = {
n = i; 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.stroke();
ctx.closePath(); 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 * canvas绘图 end
*/ */

Loading…
Cancel
Save