no message

cyl/master-apply
jscyl13849007907 2 months ago
parent 9a716b9e9e
commit d9ba116173

@ -257,13 +257,13 @@ import { nationlist } from "../../utils/nation.js";
export default {
data() {
return {
cdnBaseImg: this.G.store().cdnBaseImg,
localBaseImg: this.G.store().localBaseImg,
cdnBaseImg: 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/',
localBaseImg: 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/APP/',
msgCode: {
//
code: "",
btnText: "获取验证码", // 6s
btnText: "获取验证码", // 6s
countdown: -1,
timer: null,
},
@ -310,7 +310,7 @@ export default {
},
},
created() {
this.localBaseImg = this.G.store().localBaseImg;
this.localBaseImg = 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/APP/';
this.nationData.list = nationlist.map((item, index) => {
return item.name;
});

@ -1,3 +1,7 @@
## 1.0.9202026-01-15
迭代
## 1.0.9192026-01-15
迭代
## 1.0.9182026-01-15
迭代
## 1.0.9172026-01-14

@ -61,7 +61,7 @@
<view>
<view class="card-tip g_pt_24 g_pb_8 g_pl_20 g_c_6">职位信息</view>
<view class="fs_top text-wrap">
<g-panel-form-slot :list="jobData" @clickResult="changePage" @changeTime="getInviteTime" @changeAddress="changeAddress" @chooseAddress="chooseAddress"> </g-panel-form-slot>
<rh-form-slot :list="jobData" @clickResult="changePage" @changeTime="getInviteTime" @changeAddress="changeAddress" @chooseAddress="chooseAddress"> </rh-form-slot>
</view>
</view>
<view>
@ -84,7 +84,7 @@
</u-checkbox-group>
</view>
<view class="g_h_84"></view>
<g-panel-fixed v-if="useform == 'root'">
<rh-fixed v-if="useform == 'root'">
<slot>
<view class="g_flex_row_between g_pl_16 g_pr_16" style="z-index: 99">
<div class="" style="width:82px">
@ -95,7 +95,7 @@
</div>
</view>
</slot>
</g-panel-fixed>
</rh-fixed>
<view v-if="useform == 'pages'">
<view class="g_flex_row_center g_pl_16 g_pr_16" style="z-index: 99">
<rh-button btnText="立即报名" type="primary" :loading="btnLoading" @clickBtn="submitForm" />
@ -108,6 +108,7 @@
<script>
import { nationlist } from "../../libs/utils/nation.js";
import dateUtil from "../../libs/utils/dateUtil.js";
import rhJS from '../../libs/utils/base.js';
export default {
onReady() {
this.G.setNavStyle();
@ -264,7 +265,7 @@ export default {
that.detailRes = res.record;
let policyStr;
if (that.isFans == 2) {
policyStr = "1. 佣金:" + (res.record.returnFeeType !== "" ? that.G.setReturnFee(res.record.returnFee, res.record.returnFeeType) : "费用待定") + " \n\n" + "2. 佣金详情:" + (res.record.returnFeeDesp || "费用待定") + " \n\n" + "3. 薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
policyStr = "1. 佣金:" + (res.record.returnFeeType !== "" ? rhJS.setReturnFee(res.record.returnFee, res.record.returnFeeType) : "费用待定") + " \n\n" + "2. 佣金详情:" + (res.record.returnFeeDesp || "费用待定") + " \n\n" + "3. 薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
} else {
policyStr = "薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
}
@ -447,7 +448,7 @@ export default {
}
if (info) {
uni.navigateTo({
url: "/root/home/editTownsman?" + that.G.objToStr(params),
url: "/root/home/editTownsman?" + rhJS.objToStr(params),
});
} else {
uni.navigateTo({

@ -0,0 +1,35 @@
<template>
<view class="g-rh-fixed g-components-panel-fixed" :style="{ backgroundColor }" :class="[border ? 'g_border_e_t' : '']">
<slot></slot>
</view>
</template>
<script>
export default {
props: {
border: {
type: Boolean,
default: true,
},
backgroundColor: {
type: String,
default: "#fff",
},
},
};
</script>
<style>
.g-components-panel-fixed {
position: fixed;
width: 100%;
bottom: 0;
left: 0;
padding-top: 12px;
padding-bottom: calc(constant(safe-area-inset-bottom)); /*兼容 IOS<11.2*/
padding-bottom: calc(env(safe-area-inset-bottom)); /*兼容 IOS>11.2*/
min-height: 72px;
z-index: 999;
box-sizing: border-box;
}
</style>

@ -0,0 +1,795 @@
<template>
<div class="g-rh-form-slot g-components-item">
<div class="m-set g_bg_f g_radius_8" :style="{ overflow: 'hidden' }">
<block v-for="(item, index) in list" :key="index">
<div
class="item g_flex_row_start"
:style="{
'padding-top': (item.pColumn ? item.pColumn : 19) + 'px',
'padding-bottom': (item.pColumn ? item.pColumn : 19) + 'px',
'padding-left': (item.pRow ? item.pRow : 10) + 'px',
'padding-right': (item.pRow ? item.pRow : 10) + 'px',
}"
v-if="item"
>
<div class="g_flex_none g_pr_10 g_flex_column_center">
<div class="g_flex_1 g_flex_row_start">
<div class="t-icon g_h_22 g_w_22 g_pl_7 g_mr_5" style="width: 22px; height: 22px" v-if="item.icon" :class="'t-' + item.icon"></div>
<div
class="g_flex_column_center g_c_3 g_fs_16"
:class="{
labelRequire: item.require,
customRequire: item.customRequire,
}"
>
{{ item.label }}
</div>
</div>
</div>
<div class="g_flex_1 g_flex_column_center">
<div class="g_flex_row_end 1" style="width: 100%">
<slot></slot>
<div class="g_flex_row_end 2 from-type" style="width: 100%">
<!-- 通用类型 -->
<div class="form-base g_fs_16 g_ell_1 g_lh_1_2 g_w_all g_text_r g_flex_1" :class="item.fontColor" v-if="item.result" @click="handleResult(item)">{{ item.result }}</div>
<!-- 迷你二维码 -->
<div class="form-wx-code g_flex_rowRight_columnCenter" v-if="item.tip == 'code'">
<i class="iconfont icon-a-erweimabeifen2 g_fs_21 g_c_c" style="font-size: 21px"></i>
</div>
<!-- 头像类 -->
<div class="form-avatar g_flex_rowRight_columnCenter" v-if="item.tip == 'avatar'">
<img :src="item.value" alt="" class="g_w_48 g_h_48 g_radius_50" />
</div>
<!-- 上传图片头像类 -->
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
<button v-if="item.tip == 'update-avatar'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0" @click="handleOpenAvatar">
<img :src="item.value || localBaseImg + 'default.svg'" class="g_w_32 g_h_32" />
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
</button>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<!-- handleStartChangeAvatar -->
<button @click="handleOpenAvatar" v-if="item.tip == 'update-avatar'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0">
<img :src="item.value || localBaseImg + 'default.svg'" class="g_w_32 g_h_32" />
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
</button>
<button @click="uploadQRCode" v-if="item.tip == 'update-QRCode'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0">
<img :src="item.img || localBaseImg + 'default.svg'" class="g_w_48 g_h_48 g_radius_4" />
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
</button>
<!-- #endif -->
<!-- 指定输入框场景当有多个list时使用若list只有一个使用slot即可 -->
<div
:style="{
width: item.type != 'slot' ? 'calc(100% - 16px)' : item.tip == 'slot-choose-address' ? 'calc(100% - 22px)' : '100%',
}"
class="form-code"
v-if="item.tip && item.tip.indexOf('slot') > -1"
>
<!-- 验证码() -->
<div class="g_flex_column_center" v-if="item.tip == 'slot-code'">
<div class="g_flex_row_end">
<div class="g_flex_1 g_mr_16">
<u-input maxlength="4" type="number" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r" placeholder-style="color:#999;font-size:16px;" v-model="item.value" @input="(e) => handleCode(e, item, index)" />
</div>
<div
class="btn-text g_flex_c g_flex_none"
@click="handleSendMsg(item.tel, item.verifyTel)"
:style="{
'background-color': msgCode.countdown >= 0 && msgCode.countdown < 60 ? '#dddddd' : '#00b666',
}"
>
<button class="btn-con g_fs_14 g_c_9 g_flex_row_center" style="width: 100px">{{ msgCode.btnText }}</button>
</div>
</div>
</div>
<!-- 新密码 -->
<div class="form-new-pwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-new-pwd'">
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleNewPwd(e, item, index)" />
</div>
<!-- 确认密码 -->
<div class="form-new-conpwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-confirm-pwd'">
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleConfirmPwd(e, item, index)" />
</div>
<!-- 姓名输入框 -->
<div class="form-new-name g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-name' || item.tip == 'slot-upID' || item.tip == 'slot-weChat'">
<u-input type="text" :hover-stop-propagation="true" :maxlength="30" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleName(e, item, index)" @blur="(e) => handleName(e, item, index)" />
<div class="form-new-why g_flex_column_center" style="" @click="chooseImgType('IDCard')" v-if="item.tip == 'slot-upID'">
<image class="g_ml_4 g_w_24 g_h_22" :src="item.img || cdnBaseImg + 'mock_photo1.svg'"></image>
</div>
</div>
<!-- 性别输入框 -->
<div class="form-new-sex g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-sex'">
<u-radio-group v-model="item.value" @change="(e) => handleSex(e, item, index)" active-color="#6A81FF">
<u-radio :mr="sexItem.mr" v-for="(sexItem, sexIndex) in sexList" :key="sexIndex" :name="sexItem.tip">
{{ sexItem.name }}
</u-radio>
</u-radio-group>
</div>
<!-- 年龄输入框 -->
<div class="form-new-age g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-age'">
<u-input type="number" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" :custom-style="{ fontSize: item.fontSize || ' 16px' }" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleAge(e, item, index)" />
</div>
<!-- 民族picker -->
<div class="form-new-nation g_flex_rowRight_columnCenter g_fs_16" v-if="item.tip == 'slot-nation'" style="width: calc(100% - 0px)">
<picker @change="(e) => handleNation(e, item, index)" :value="item.nationIndex" :range="nationData.list" style="width: 100%; text-align: right">
<div class="g_flex_row_end flex_center">
<div class="uni-input" :class="nationData.list[item.nationIndex] ? 'g_c_3' : 'g_c_9'">{{ nationData.list[item.nationIndex] || "请选择民族" }}</div>
<div class="g_flex_column_center">
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
</div>
</div>
</picker>
</div>
<!-- 身份证号输入框 -->
<div class="form-new-idcard g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-code-idcard'">
<u-input type="idcard" :clearable="false" :maxlength="18" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleIDcard(e, item, index)" @blur="(e) => handleIDcard(e, item, index)" />
</div>
<!-- 家庭住址输入框 -->
<div class="form-new-address g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-address'">
<u-input type="text" :clearable="false" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleAddress(e, item, index)" />
</div>
<!-- 地址选择框 -->
<div class="form-new-choose g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-choose-address'">
<div class="g_text_r g_w_all g_fs_16" :class="item.value ? 'g_c_3' : 'g_c_9'" @click="chooseAddress(item)">{{ item.value || item.placeholder }}</div>
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="chooseAddress(item)"></i>
</div>
<!-- 地址选择输入框 -->
<div class="" v-if="item.tip == 'slot-choose&input-address'">
<view v-if="item.uneditable" class="g_br_6 g_text_r g_pt_8 g_pb_8">
{{ item.value || "-" }}
</view>
<view class="form-new-choose g_flex_rowRight_columnCenter" v-else>
<u-input v-model="item.value" @input="(e) => handleAddress(e, item, index)" class="g_flex_1 g_ml_8" maxlength="1000" type="textarea" :placeholder="item.placeholder" placeholder-style="color:#999;line-height:24px" :clearable="false" :customStyle="{ fontSize: '16px', 'text-align': 'right', 'min-height': '24px', 'line-height': '24px' }" />
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="chooseAddress(item)"></i>
</view>
</div>
<!-- 手机号 -->
<div class="form-new-tel g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-mobile'">
<u-input type="number" :disabled="item.disabled" :custom-style="{ fontSize: item.fontSize || ' 16px', color: item.disabled ? '#999' : '#333' }" :clearable="false" :password-icon="false" :maxlength="13" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleMobile(e, item, index)" />
</div>
<!-- 多文本输入 -->
<div class="form-new-textarea g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-more-word'" style="width: calc(100%)">
<u-input v-model="item.value" @input="(e) => handleMoreWord(e, item, index)" @blur="(e) => handleMoreWord(e, item, index)" class="g_flex_1 g_ml_8" maxlength="1000" type="textarea" :placeholder="item.placeholder" placeholder-style="color:#999" :clearable="false" :customStyle="{ fontSize: '16px', 'text-align': 'right', 'min-height': '24px', 'line-height': '24px' }" />
<!-- <textarea class="g_text_r g_fs_16" v-model="item.value" :placeholder="item.placeholder" placeholder-style="color:#999999;font-size:16px;line-height: 24px" :maxlength="item.maxlength || -1" auto-height style="min-height: 24px; width: 200px; line-height: 24px" @input="(e) => handleMoreWord(e, item, index)" @blur="(e) => handleMoreWord(e, item, index)"></textarea> -->
</div>
<!-- 时间 -->
<div class="form-new-time g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-time'">
<g-panel-time :timeval="item.value" :from="item.from" @confirmChooseTime="handleMianshi" />
<!-- <g-panel-detail-item :from="item.from" style="width: 100%" label=" " :isShowBottom="false" :value="item.value" afterType="time" @confirmChooseTime="handleMianshi" /> -->
</div>
<!-- 附件上传 -->
<div class="g_flex_rowRight_columnCenter g_w_all" @click="chooseImgType('img')" v-if="item.tip == 'slot-update-file'">
<div class="g_flex_1 g_c_9 g_text_r g_fs_16">请选附件上传</div>
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
</div>
<!-- 财务信息显示 -->
<div class="g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-caiwu'">
<div class="g_flex_1 g_c_3 g_text_l g_fs_16 g_pl_6" :class="[caiwuToggle ? '' : 'g_ell_3', item.value.length > 1 ? 'g_text_l' : 'g_text_r']" style="white-space: pre-line">{{ item.value || "-" }}</div>
</div>
<!-- 选择政策 -->
<div class="g_flex_rowRight_columnCenter g_w_all" @click="uploadZhengce" v-if="item.tip == 'slot-zhengce'">
<div class="g_flex_1 g_c_3 g_text_r g_fs_16">{{ item.value }}</div>
</div>
</div>
<!-- 右箭头 -->
<div class="form-new-right g_flex_column_center" v-if="item.type != 'slot'" @click.capture="item.path ? handleResult(item) : ''">
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
</div>
<div class="form-new-why g_flex_column_center" v-if="item.tip == 'slot-zhengce'">
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="uploadZhengce"></i>
</div>
</div>
</div>
</div>
</div>
</block>
<slot name="after"></slot>
<div
v-if="
list.filter((item) => {
return item && item.tip == 'slot-caiwu';
}).length
"
@click="caiwuToggle = !caiwuToggle"
style="height: 45px"
class="g_flex_column_center tog"
>
<div class="g_flex_c">
<div class="g_flex_row_center">
<div class="g_fs_14 g_c_9 g_flex_column_center">{{ caiwuToggle ? "收起" : "展开" }}</div>
<div class="g_fs_14 g_flex_column_center">
<i class="iconfont icon-gengduo11 g_c_c g_ml_4" style="font-size: 14px" :class="caiwuToggle ? 'icon_down' : 'icon_up'"></i>
</div>
</div>
</div>
</div>
</div>
<u-popup v-model="chooseImg.chooseImgShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" @close="chooseImg.chooseImgShow = false">
<div class="g_text_c g_bg_f_5 g_fs_17">
<div class="g_bg_f">
<div class="g_c_3">
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('camera')"></div>
<div class="g_p_16 g_border_e_t" @click="uploadPhotoByChat"></div>
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('album')"></div>
</div>
</div>
<div class="g_p_16 g_mt_10 g_bg_f" style="padding-bottom: calc(constant(safe-area-inset-bottom) + 16px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px)" @click="chooseImg.chooseImgShow = false">取消</div>
</div>
</u-popup>
<u-popup v-model="zhengceModal.isShow" mode="bottom" border-radius="16" height="980" :mask-close-able="true">
<div class="g_fs_18 g_c_3 g_flex_row_center g_pt_16">选择政策</div>
<scroll-view scroll-y="true" style="height: 710rpx">
<div class="g_pl_12 g_pr_12">
<div class="g_flex_row_between g_pt_16 g_pb_16 g_border_d_b" v-for="(item, index) in zhengceList" :key="index" @click="handleChooseZhengce(item, index)">
<div class="g_fs_17 g_c_3">{{ item.name }}</div>
<div class="g_flex_column_center">
<i
class="iconfont icon-a-duigoubeifen2"
style="font-size: 24px"
:style="{
color: item.isSelected ? '#6A81FF' : '#fff',
}"
></i>
</div>
</div>
</div>
</scroll-view>
<g-panel-fixed>
<slot>
<div class="g_flex_row_center">
<rh-button primaryColor="#00b666" btnText="确定" type="primary" @clickBtn="submitZhengce" />
</div>
</slot>
</g-panel-fixed>
</u-popup>
</div>
</template>
<script>
/* item
* 示例我的页面中的设置展示UI
*/
import { nationlist } from "../../libs/utils/nation.js";
import rhJS from '../../libs/utils/base.js';
export default {
data() {
return {
cdnBaseImg: 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/',
localBaseImg: 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/APP/',
msgCode: {
//
code: "",
btnText: "获取验证码", // 6s
countdown: -1,
timer: null,
},
nationData: {
list: null,
index: 0,
},
sexList: [
{
name: "男",
tip: 1,
mr: 24,
},
{
name: "女",
tip: 2,
mr: 0,
},
],
caiwuToggle: false,
zhengceModal: {
isShow: false,
},
zhengceList: [],
chooseImg: { chooseImgShow: false, type: "" }, //
};
},
props: {
list: {
type: Array,
default: () => {
return [];
},
},
defaultOption: {
type: Array,
default: () => {
return [];
},
},
jobInfo: {
type: Number,
default: 0,
},
},
created() {
this.localBaseImg = 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/APP/';
this.nationData.list = nationlist.map((item, index) => {
return item.name;
});
this.zhengceList = this.defaultOption;
},
watch: {
defaultOption(val) {
this.zhengceList = val;
},
},
onHide() {
if (this.msgCode.timer) {
clearInterval(this.msgCode.timer);
}
},
methods: {
//
handleCode(e, $item, $index) {
this.$emit("changeCode", e);
},
//
handleNewPwd(e, $item, $index) {
this.$emit("changeNewPwd", e);
},
handleChangeNewPwd(e, $item, $index) {
// this.$emit("changeNewPwd", e);
console.log(e);
},
//
handleConfirmPwd(e, $item, $index) {
this.$emit("changeConfirmPwd", e);
},
//
handleName(e, $item, $index) {
console.log(e);
if (e && e.trim().length > 30) {
uni.showToast({
title: "不能超过30个字",
icon: "none",
});
}
if ($item.tip == "slot-weChat") {
this.$emit("changeWeChat", e, $item);
} else {
this.$emit("changeName", e, $item);
}
},
//
handleSex(e, $item, $index) {
console.log("性别选择", e);
$item.value = e;
this.$emit("changeSex", e);
},
//
handleAge(e, $item, $index) {
this.$emit("changeAge", e);
},
//
handleNation(e, $item, $index) {
let that = this;
that.list.filter((item, index) => {
return index == $index;
})[0].value = that.nationData.list[e.detail.value];
that.list.filter((item, index) => {
return index == $index;
})[0].nationIndex = e.detail.value;
that.$emit("changeNation", {
e: e,
name: that.nationData.list[e.detail.value],
index: e.detail.value,
});
},
//
handleIDcard(e, $item, $index) {
console.log("123123132", e);
this.$emit("changeIDcard", e);
},
//
handleAddress(e, $item, $index) {
console.log("eeeeeeeee", e);
this.$emit("changeAddress", e);
},
//
handleMoreWord(e, $item, $index) {
console.log(e);
console.log($item);
if ($item.maxlength && $item.value && $item.value.trim().length >= $item.maxlength) {
uni.showToast({
title: `不能超过${$item.maxlength}个字`,
icon: "none",
});
}
this.$emit("changeMoreWord", e, $item);
},
//
chooseAddress(_item) {
let that = this;
console.log(_item);
let obj = {};
if (_item.addressDetail) {
obj = {
latitude: _item.addressDetail.latitude,
longitude: _item.addressDetail.longitude,
};
}
// #ifdef MP-WEIXIN
uni.chooseLocation({
...obj,
success(e) {
console.log(e);
let res = {};
var reg = /.+?(省|市|自治区|自治州|县|区)/g; //
if (e.address) {
let arr = e.address.match(reg);
res.district = [arr[0], arr[1]].join(" ");
res.address = e.address;
res.addressName = e.name;
}
res.lat = e.latitude;
res.lng = e.longitude;
console.log("resresresres", res);
that.$emit("chooseAddress", res);
},
fail(e) {
console.log("err", e);
},
});
// #endif
// #ifdef APP-PLUS
that.$emit("chooseAddress", {
district: "",
address: "",
addressName: "",
lat: "",
lng: "",
});
// #endif
},
//
handleSendMsg(tel, verifyTel) {
let that = this;
if (this.msgCode.countdown > 0 || !rhJS.setReg(tel, "tel")) {
if (!rhJS.setReg(tel, "tel")) {
uni.showToast({
icon: "none",
title: "请输入正确的手机号",
});
}
return;
}
if (verifyTel && verifyTel != tel) {
uni.showToast({
icon: "none",
title: "请输入对应的手机号",
});
return;
}
that.G.Get(
that.api.login_sendMsg,
{
tel: tel,
type: "assistant",
},
(res) => {
that.msgCode.countdown = 59;
that.msgCode.btnText = that.msgCode.countdown + "s";
clearInterval(that.msgCode.timer);
that.msgCode.timer = setInterval(() => {
if (that.msgCode.countdown > 0) {
that.msgCode.countdown--;
that.msgCode.btnText = that.msgCode.countdown + "s";
} else {
clearInterval(that.msgCode.timer);
that.msgCode.timer = null;
that.msgCode.btnText = "获取验证码";
}
}, 1000);
}
);
},
//
updateImg(sourceType) {
let that = this;
console.log("updateImg");
if (sourceType == "camera") {
that.G.uploadImgByCamera((res) => {
console.log("身份证信息:", res);
if (res.status == "上传成功") {
that.$emit("updateIDInfo", res);
} else {
that.showToast({
title: "上传失败请重试",
icon: "none",
});
}
uni.hideLoading();
that.chooseImg.chooseImgShow = false;
}, "idcard");
} else {
that.G.uploadImgByAlbum((res) => {
console.log("身份证信息:", res);
if (res.status == "上传成功") {
that.$emit("updateIDInfo", res);
} else {
that.showToast({
title: "上传失败请重试",
icon: "none",
});
}
uni.hideLoading();
that.chooseImg.chooseImgShow = false;
}, "idcard");
}
},
//
uploadQRCode() {
let that = this;
that.G.cropBeforeUpload({
cropScale: "1:1",
success: (res) => {
console.log(res);
that.$emit("updateFile", res.image);
},
fail: (err) => {
console.log(err);
},
});
},
chooseImgType(type) {
uni.hideKeyboard();
this.chooseImg.chooseImgShow = true;
this.chooseImg.type = type;
},
//
uploadPhotoByChat() {
let that = this;
let count = 1;
if (this.chooseImg.type == "img") {
count = 5;
}
uni.chooseMessageFile({
count,
type: "image",
success(res) {
console.log("successsuccesssuccesssuccess", res);
if (res.errMsg == "chooseMessageFile:ok") {
res.tempFiles.forEach((item, index) => {
if (that.chooseImg.type == "img") {
that.G.uploadTmpImg(item.path, (imgRes) => {
that.$emit("updateFile", imgRes.image);
});
} else if (that.chooseImg.type == "IDCard") {
// ,
that.G.recognizeTmpIDcard([item.path], (cardData) => {
if (cardData.status == "上传成功") {
that.$emit("updateIDInfo", cardData);
} else {
that.showToast({
title: "上传失败请重试",
icon: "none",
});
}
});
}
});
}
that.chooseImg.chooseImgShow = false;
// that.G.uploadTmpImg(res, () => {});
},
});
},
//
uploadPhoto(sourceType) {
let that = this;
if (that.chooseImg.type == "img") {
if (sourceType == "camera") {
that.G.uploadImgByCamera((res) => {
console.log("uploadImgByCamera", res);
that.$emit("updateFile", res.image);
that.chooseImg.chooseImgShow = false;
});
} else {
that.G.uploadImgByAlbum((res) => {
console.log("uploadImgByAlbum", res);
that.$emit("updateFile", res.image);
that.chooseImg.chooseImgShow = false;
});
}
} else if (that.chooseImg.type == "IDCard") {
that.updateImg(sourceType);
}
},
//
uploadZhengce() {
let that = this;
//
let ids = "";
if (this.jobInfo == 0) {
uni.showToast({
icon: "none",
title: "请选择职位",
});
return false;
}
that.zhengceList
.filter((item) => {
return ids.indexOf(item.id) > -1;
})
.forEach((item, index) => {
item.isSelected = true;
});
that.zhengceModal.isShow = true;
},
handleChooseZhengce($item, $index) {
let that = this;
that.zhengceList.forEach((item, index) => {
if (index == $index) {
if (item.isSelected) {
item.isSelected = false;
} else {
item.isSelected = true;
}
} else {
item.isSelected = false;
}
});
},
submitZhengce() {
let that = this;
let ids = [];
ids = that.zhengceList
.filter((item) => {
return item.isSelected;
})
.map((item) => {
return item.id;
});
if (ids.length == 0) {
uni.showToast({
title: "请选择一个政策",
icon: "none",
});
return false;
}
that.zhengceModal.isShow = false;
that.$emit("updateZhengce", {
onSiteUserIds: ids.join(","),
item: that.zhengceList.filter((item) => {
return item.isSelected;
})[0],
});
},
handleStartChangeAvatar(e) {
let that = this;
console.log(e);
that.G.uploadTmpImg(e.detail.avatarUrl, (res) => {
console.log("微信:", res.image);
that.$emit("updateImg", res.image);
});
},
handleOpenAvatar() {
let that = this;
uni.showActionSheet({
itemList: ["从相册选择", "使用相机"],
success: function (res) {
if (res.tapIndex == 0) {
console.log("点击相册");
//
that.setAvatar(["album"]);
} else {
console.log("点击拍照");
//
that.setAvatar(["camera"]);
}
},
fail: function (res) {},
});
},
setAvatar($type) {
let that = this;
that.G.uploadImg(
(res) => {
console.log("其他:", res.image);
that.$emit("updateImg", res.image);
},
"default",
1,
$type
);
},
handleResult(e) {
this.$emit("clickResult", e);
},
handleMobile(e, $item, $index) {
this.$emit("changeMobile", e, $item);
},
handleMianshi(e, $item, $index) {
this.$emit("changeTime", e);
},
},
};
</script>
<style lang="scss">
.g-components-item {
.m-set {
width: calc(100% - 40rpx);
margin: 0 auto;
.item {
position: relative;
// border-bottom: 1rpx solid #eee;
&:after {
content: "";
position: absolute;
bottom: 0;
left: 10px;
border-bottom: 1rpx solid #eee;
height: 1rpx solid #eee;
width: calc(100% - 20px);
}
&:last-child {
border-bottom: none;
&:after {
content: none;
}
}
}
.labelRequire {
position: relative;
&::after {
position: absolute;
right: -8px;
top: 50%;
transform: translateY(-50%);
content: "*";
color: #ff4400;
}
}
.customRequire {
&::after {
// top: 4px;
}
}
}
.btn-text {
background-color: #00b666;
text-align: center;
border-radius: 126px;
.btn-con {
// border-left: 1rpx solid #eee;
// padding: 0 0 0 16px;
background-color: transparent;
border-radius: 0;
height: 40rpx;
line-height: 40rpx;
color: #fff;
}
}
}
.icon_up {
transform: rotate(90deg);
}
.icon_down {
transform: rotate(-90deg);
}
.safe-area-inset-bottom {
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
</style>

@ -0,0 +1,59 @@
let data = {
setReg($str, $type = 'default') {
if ($type == 'tel') {
return /^1[3-9]\d{9}$/.test($str);
}
if ($type == 'idcard') {
return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test($str);
}
},
/**
* 获取服务费类型
* @params returnFeeType 类型
* @params $type 1共享 0 普通
*/
setReturnFee(returnFee, returnFeeType, $type) {
// // console.log('here');
let servetype = '-',
$num = 1;
if ($type == 1) {
$num = 1;
} else {
$num = 100;
}
if (returnFeeType === 0) {
servetype = `${returnFee / $num || "--"}元/小时`;
} else if (returnFeeType === 1) {
servetype = `${returnFee / $num || "--"}元/日`;
} else if (returnFeeType === 2) {
servetype = `${returnFee / $num || "--"}元/月`;
} else if (returnFeeType === 3) {
servetype = `${returnFee / $num || "--"}元/次`;
} else if (returnFeeType === 4) {
servetype = `${returnFee / $num || "--"}元/件`;
} else if (returnFeeType === 5) {
servetype = `工人收入${returnFee / $num || "--"}%`;
} else if (returnFeeType === 6) {
servetype = `${returnFee / $num || "--"}`;
} else if (returnFeeType === 7) {
servetype = `费用待定`;
}
return servetype
},
/* 对象重组成字符串 */
objToStr(obj = {}, type = 'url') {
let str = '';
if (type == 'url') {
str = Object.keys(obj)
.map(key => `${key}=${obj[key]}`)
.join('&');
} else if (type == 'copy') {
str = Object.keys(obj)
.map(key => `${key}${obj[key]}`)
.join('');
}
return str;
},
}
export default data;

@ -1,7 +1,7 @@
{
"id": "rh-ui",
"displayName": "rh-ui",
"version": "1.0.918",
"version": "1.0.920",
"description": "公司内部UI框架",
"keywords": [
"ui框架"
@ -61,11 +61,11 @@
},
"nvue": "-",
"android": {
"extVersion": "1.0.918",
"extVersion": "1.0.920",
"minVersion": "19"
},
"ios": {
"extVersion": "1.0.918",
"extVersion": "1.0.920",
"minVersion": "12"
},
"harmony": "-"

Loading…
Cancel
Save