法大大实名认证的情况

发布时间:2024年01月05日
<template>
	<view class="task-detail dstyle col-center">
		<section class="task-item col-center">
			<view class="first row-center">
				<view class="left row-center">
					<image class="icon" src="../../static/live-serve.png" mode="scaleToFill" />
					<text class="type">{{ item.taskTypeName }}</text>
				</view>
				<view class="right">
					<text>{{ item.createTime }}</text>
				</view>
			</view>
			<view class="two row-center">
				{{ item.taskName }}
			</view>
			<view class="xia-zoom row-center">
				<view class="left">
					<view class="three">
						{{ item.platformName }}
					</view>
				</view>
				<view class="right">
					<image class="icon" v-show="taskInfo.shipStatus == 1" src="../../static/waiting.png"
						mode="scaleToFill" />
					<image class="icon" v-show="taskInfo.shipStatus == 2" src="../../static/doing.png" mode="scaleToFill" />
					<image class="icon" v-show="taskInfo.shipStatus == 3" src="../../static/end.png" mode="scaleToFill" />
					<!-- <zBtn name="去领取" bcolor="#E9F4FE" borderColor="#E9F4FE" color="#2B92F5"></zBtn> -->
				</view>
			</view>
			<u-line class="line" length="630rpx" color="#E8E9EC"></u-line>
			<view class="title row-center w-100" v-if="item.taskDesc">任务内容:</view>
			<view class="t-content w-100" v-if="item.taskDesc">
				<view class="one">{{ item.taskDesc }}</view>
				<!-- <view class="one">2,进行仓库可存盘点、快递跟踪、货品收发的工作。</view> -->
				<!-- <view class="one">3,管理货物进出库,负责仓库管理。</view> -->
			</view>
			<view class="title row-center w-100" v-if="item.requirements">报名要求:</view>
			<view class="t-content w-100" v-if="item.requirements">
				<view class="one">{{ item.requirements }}</view>
			</view>
			<view class="title row-center w-100" v-if="item.acceptanceCriteria">验收标准:</view>
			<view class="t-content w-100" v-if="item.acceptanceCriteria">
				<view class="one">{{ item.acceptanceCriteria }}</view>
			</view>
			<view class="title row-center w-100" v-if="item.otherDescription">其他说明:</view>
			<view class="t-content w-100" v-if="item.otherDescription">
				<view class="one">{{ item.otherDescription }}</view>
			</view>
			<view class="line-two col-center">
				<u-line length="630rpx" color="#E8E9EC"></u-line>
			</view>
			<view class="other-box w-100 row-center" v-if="item.taskStartDate">
				<view class="left">任务有效期:</view>
				<view class="right">{{ item.taskStartDate + '~' + item.taskEndDate }} </view>
			</view>
			<view class="other-box w-100 row-center" v-if="item.unitPrice">
				<view class="left">任务单价:</view>
				<view class="right">{{ item.unitPrice }}/</view>
			</view>
			<view class="other-box w-100 row-center" v-if="item.minPrice">
				<view class="left">结算区间:</view>
				<view class="right"> {{ `${item.minPrice}~¥${item.maxPrice}` }}</view>
			</view>
			<view class="other-box w-100 row-center" v-if="item.freelanceCount">
				<view class="left">用工人数:</view>
				<view class="right">{{ item.freelanceCount }}</view>
			</view>
			<view class="other-box w-100 row-center" v-if="item.workCityName">
				<view class="left">工作地点:</view>
				<view class="right">{{ item.workCityName }}</view>
			</view>
		</section>
		
		<view class="lingqu xy-center" v-show="!isLogin || taskInfo.shipStatus == 1">
			<zBtn slot="value" :width="690" @click="lingquTask()" name="领取任务" bcolor="#3F8CFE" borderColor="#3F8CFE"
				color="#FFF">
			</zBtn>
		</view>
	</view>
</template>

<script>
import zBtn from '../../components/zBtn/zBtn.vue';
import { taskDrawDown, getShipInfo, getDetails, queryDrawTaskAuth, generatePfm2PerContractInfo } from '../../api/api.js'
import mixin from '@/mixin/index.js';
export default {
	components: {
		zBtn
	},
	mixins: [mixin],
	data() {
		return {
			taskId: "",
			isLogin: "",
			taskRealPfmSignStatus: "",
			group: {
				'border': 'solid 1px red',
				'padding-left': 0,
				'width': '100%'
			},
			item: {},
			taskInfo: {}

		}
	},
	onLoad(options) {
		this.taskId = options.id || options.taskId
		uni.setStorageSync('newTaskId', this.taskId)
		console.log("任务id---")
		console.log(options.id)
	},
	onShow() {
		if (!this.taskId) {
			this.taskId = uni.getStorageSync('newTaskId')
		}
		console.log("存储的id---", uni.getStorageSync('newTaskId'))
		console.log("最新任务获取后id---", this.taskId)
		this.getUserInfo()
		this.getDetailsWay()
		this.getIsSign()
	},
	methods: {
		async getDetailsWay() {
			let params = {
				"taskId": this.taskId,
			}
			this.item = await getDetails({ params, custom: { auth: false } })
			this.getShipInfoWay()
		},
		async getShipInfoWay() {
			let params = {
				"taskId": this.taskId,
			}
			if (uni.getStorageSync('isLogin')) {
				this.taskInfo = await getShipInfo({ params, custom: { auth: true } })
			}
		},
		async getIsSign() {
			this.isLogin = uni.getStorageSync('isLogin');
			if (!this.isLogin) return
			let params = {
				personalId: uni.getStorageSync('personalId'),
				"taskId": this.taskId,
			}
			let res = await queryDrawTaskAuth({ params, custom: { auth: true } })
			this.taskRealPfmSignStatus = res.taskRealPfmSignStatus
		},
		async goSignWay() {
			let personalId = uni.getStorageSync('personalId');
			let returnUrl = "/pages/middlePage/middlePage?taskId="+this.taskId
			let params = {
				"personId": personalId,
				"platformId": this.item.platformId,
				"returnUrl": returnUrl
			}
			console.log("签署后回退地址")
			console.log(returnUrl)
			let res = await generatePfm2PerContractInfo(params, { custom: { auth: true } })
			let url = encodeURIComponent(res.contractSignUrl)
			uni.navigateTo({ url: '/pages/contractPre/contractPre?url=' + url })

		},
		async lingquTask() {
			let isLogin = uni.getStorageSync('isLogin');
			if (!isLogin) {
				uni.navigateTo({ url: '/pages/login/login' })
				return
			}
			if (!this.userInfo.isRealName) {
				uni.showModal({
					content: '您还没有进行实名认证,认证通过后才能领取任务',
					cancelText: "暂不认证",
					confirmText: "立即认证",
					success: async (res) => {
						if (res.confirm) {
							this.goRenzhengWay('wx://pages/middlePage/middlePage?taskId='+this.taskId)
						}
					},
				})
				return
			}
			if (this.taskRealPfmSignStatus == 0) {
				// 如果当前用户未与财税服务商签署协议,则需先签署协议,签署完毕后跳回该页面
				uni.showModal({
					content: '您还未签署与该财税服务商的合作协议,签署后才能领取任务',
					cancelText: "暂不签署",
					confirmText: "立即签署",
					success: async (res) => {
						if (res.confirm) {
							this.goSignWay()
						}
					},
				})
				return
			}
			let params = {
				"shipId": this.taskInfo.shipId,
			}
			await taskDrawDown({ params, custom: { auth: true } })
			uni.$u.toast('领取成功')
			this.getShipInfoWay()
		},
	}

}
</script>
``
任务详情的页面,调法大大的实名认证返回路径要加wx//  可以是菜单也,也可以是非菜单页。
后面可以加参数,利用中间页面接受。然后回到详情页面,
如果是签署合同。就可以不用加wx://。
中间页面用mouted去触发跳转方法。
文章来源:https://blog.csdn.net/weixin_42814869/article/details/135416628
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。