123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <template>
- <view>
- <!-- 胶囊 -->
- <mvBar :mysNavConfig="mysNavConfig"></mvBar>
- <view :style="{marginTop:navH}"></view>
- <view class="basicInfo">
- <image :src="mainImg" style="width: 150rpx;height: 150rpx;" mode="">
- </image>
- <view class="basicInfo_txt">
- <p style="margin-bottom: 10rpx;font-size: 35rpx;">{{project.project_name}}</p>
- <p style="font-size: 30rpx;">商品价值:{{project.Product.ProductPrice}}元</p>
- </view>
- </view>
- <view class="address">
- <view>
- <image class="address_icon" :src="picture.icon_loc" mode="">
- </image>
- </view>
- <view style="width: 70%;">
- <view style="display: flex;">
- <p class='ipon' style="padding-right: 100rpx;">{{address.receiver_name}}</p>
- <p class='ipon'>{{address.phone_number}}</p>
- </view>
- <p class='ipon'>{{address.full_detail_addr}}</p>
- </view>
- <view class="address_edit" @click="editAddress()">
- <image :src="picture.icon_edit" mode="">
- </image>
- </view>
- </view>
- <view class="keyInfo">
- <!-- <p style="margin-bottom: 30rpx;font-size: 36rpx;">关键任务信息</p> -->
- <p style="margin-top: 10rpx;">合作佣金</p>
- <view style="padding-top: 10rpx;">
- <p>粉丝量:{{strategy.show_followers_low}}-{{strategy.show_followers_up}}
- </p>
- </view>
- <view style="display: flex;">
- <p>
- 稿费:{{strategy.fee_form_t}}
- </p>
- <view v-if="strategy.fee_form==3">
- <p>{{strategy.showOffer}}元</p>
- </view>
- </view>
- <!-- <view style="border-bottom: #dfdfdf 1px solid;margin: 10rpx 0 0;"></view>
- <p style="margin-top: 10rpx;">社媒平台</p>
- <view style="display: flex;padding-top: 10rpx;">
- <p>{{project.PlatformInfo.platform_name}}</p>
- </view>
- <view style="border-bottom: #dfdfdf 1px solid;margin: 10rpx 0 0;"></view>
- <p style="margin-top: 10rpx;">任务要求</p>
- <view class="keyInfo_task">
- <view style="display: flex;align-items: center;margin: 5rpx 0;">
- <p>内容形式:</p>
- <p class="keyInfo_task_txt">{{project.content}}</p>
- </view>
- <view style="display: flex;align-items: center;margin: 5rpx 0;">
- <p>任务形式:</p>
- <p class="keyInfo_task_txt">{{project.project_form}}</p>
- </view>
- <p style="margin: 5rpx 0;">商品描述:</p>
- <text class="keyInfo_task_txt">{{project.Product.ProductDetail}}</text>
- <p style="margin: 35rpx 0 0rpx;">任务详情:</p>
- <text class="keyInfo_task_txt">{{project.project_detail}}</text>
- </view> -->
- </view>
- <view class="account" @click="editAccount()">
- <view class="account_txt">
- <image :src="project.PlatformInfo.platform_icon" mode=""></image>
- <span>{{account.platform_nickname}}</span>
- </view>
- <view class="account_fans">
- <p style="padding-right: 20rpx;color:#A8A8A8;">粉丝数</p>
- <p>{{account.show_fans_count}}</p>
- </view>
- <view class="account_btn">
- <image :src="picture.togoimg" mode="" style="width: 16rpx;height: 30rpx;"></image>
- </view>
- </view>
- <view class="block"></view>
- <view class="submit">
- <button type="default" class="submit_btn" @click="submit()"> 确认报名</button>
- </view>
- </view>
- </template>
- <script>
- import region from '@/components/pca-code.json';
- import mvBar from "@/components/mys_navBar/mysNavBar";
- import {
- fansview
- } from '@/components/utils.js';
- export default {
- components: {
- mvBar
- },
- data() {
- return {
- navH: getApp().globalData.navHeight,
- mainImg: "https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/bb531ede-28b5-49a0-8431-a1608fd35890.png",
- account_id: -1,
- address_id: -1,
- address: null,
- project: null,
- account: null,
- strategy: null,
- picture: {
- togoimg: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task16.png',
- icon_edit: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-edit.png',
- icon_loc: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-loc.png',
- home8: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home8.png',
- home10: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home10.png',
- home11: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home11.png',
- },
- thirdPlatform: [],
- mysNavConfig: {
- isHome: false,
- /* 固定导航 */
- navFixed: true,
- /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
- navTitle: {
- text: "信息确认",
- color: "",
- fontSize: "32rpx", // px upx rpx
- fontWeight: "", // 100 - 700
- },
- btnType: "type2",
- onLeftClick: '',
- /* type2 按钮 */
- type2Config: {
- // 左图标
- leftPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png2.png",
- // 右图标
- rightPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png4.png",
- // 圆角
- radius: "40rpx",
- },
- },
- }
- },
- onShow() {
- // 根据address_id查询address
- this.getDefaultAddress();
- // 查询account
- this.getAccount();
- },
- onLoad(options) {
- this.textObj = options.textObj.replace(/""/g, "");
- this.textObj = JSON.parse(decodeURIComponent(this.textObj))
- console.log(this.textObj)
- this.project = this.textObj.information
- this.strategy = this.textObj.strategy
- // console.log(this.project)
- for (let i = 0; i < this.project.Product.ProductPhoto.length; ++i) {
- if (this.project.Product.ProductPhoto[i].Symbol === 1) {
- this.mainImg = this.project.Product.ProductPhoto[i].PhotoUrl
- }
- }
- this.strategy.show_followers_low = fansview(this.strategy.followers_low)
- this.strategy.show_followers_up = fansview(this.strategy.followers_up)
- },
- methods: {
- getAccount() {
- this.$https.get('/youngee/c/t/g/get-talent-account')
- .then(res => {
- console.log(res)
- if (res.data.code !== -3) {
- let account = res.data.data
- while (this.project == null) {}
- for (var i = 0; i < account.length; i++) {
- if (this.project.project_platform == account[i].platform_id) {
- this.account = account[i]
- }
- }
- this.account.show_fans_count = fansview(this.account.fans_count)
- }
- })
- },
- getDefaultAddress() {
- this.$https.get('/youngee/c/t/g/get-talent-default-address').then(res => {
- console.log(res.data.data)
- this.address = res.data.data;
- let a = this.address.region_code.toString().slice(0, 2)
- let b = this.address.region_code.toString().slice(0, 4)
- let c = 0
- for (var i = 0; i < region.length; i++) {
- if (region[i].code == a) {
- a = region[i].name
- for (var j = 0; j < region[i].children.length; j++) {
- if (region[i].children[j].code == b) {
- b = region[i].children[j].name
- for (var o = 0; o < region[i].children[j].children.length; o++) {
- if (region[i].children[j].children[o].code == this.address
- .region_code) {
- c = region[i].children[j].children[o].name
- }
- }
- }
- }
- }
- }
- this.address.full_detail_addr = a + b + c + this.address.detail_addr
- })
- },
- editAddress() {
- uni.navigateTo({
- url: '/pages/mycenter/myinformation/addlocation?address_id=' + this.address.address_id +
- '&ismodify=1'
- });
- },
- editAccount() {
- uni.navigateTo({
- url: '/pages/mycenter/myinformation/bindaccount?platform_id=' + this.account.platform_id +
- '&account_id=' +
- this.account.account_id
- });
- },
- debugSubmit() {
- uni.navigateTo({
- url: '/pages/tasksquare/success'
- });
- },
- // 提交确认报名
- submit() {
- console.log(this.project)
- // 1. 判断任务是否截止
- this.$https.get('/youngee/c/t/g/get-project-detail' +
- "?" +
- "projectid" +
- "=" +
- this.project.project_id
- ).then(res => {
- console.log(res)
- // 当前时间
- var newdate = new Date()
- // 截止时间
- var endTime = new Date(res.data.data.recruit_ddl.replace(/-/g, "/"));
- console.log(endTime)
- if (endTime - newdate < 0) {
- // 招募截止
- uni.showToast({
- title: "任务已结束",
- duration: 1000,
- });
- uni.navigateTo({
- url: '/pages/tasksquare/tasksquare'
- });
- }
- })
- // 2. 判断粉丝量是否符合条件
- if (this.account.fans_count < this.strategy.followers_low) {
- // 招募截止
- uni.showToast({
- title: "粉丝量不达标",
- duration: 1000,
- });
- } else {
- // 3. 插入一条任务
- this.$https.post('/youngee/c/t/p/sign-up-task', {
- address_id: this.address.address_id,
- project_id: this.project.project_id,
- strategy_id: this.strategy.strategy_id,
- offer: this.strategy.offer,
- }).then(res => {
- if (res.data.code == 0) {
- var data = {
- task_id: res.data.data
- };
- data = JSON.stringify(data)
- uni.navigateTo({
- url: '/pages/tasksquare/success?textObj=' + encodeURIComponent(data)
- });
- } else {
- uni.showModal({
- content: '网络繁忙,请小主稍后再试~',
- });
- }
- })
- }
- },
- // 信息表
- getInfoList() {
- this.$http.get('/youngee/c/g/get-info-tables')
- .then(res => {
- this.hobby = []
- console.log(res)
- this.thirdPlatform = res.data.data.ThirdPlatform
- for (var i = 0; i < this.listsrc.length; i++) {
- var obj = {}
- obj.text = this.listsrc[i].platform_name
- obj.value = this.listsrc[i].id
- this.hobby.push(obj)
- }
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- text {
- font-size: 30rpx;
- }
- .basicInfo {
- display: flex;
- margin: 0 40rpx;
- padding: 30rpx 0;
- .basicInfo_txt {
- margin-left: 40rpx;
- padding-top: 20rpx;
- }
- }
- .address {
- display: flex;
- margin: 30rpx 40rpx 0;
- padding: 30rpx 0;
- justify-content: space-around;
- .address_icon {
- vertical-align: middle;
- width: 50rpx;
- height: 50rpx;
- display: inline-block;
- padding-right: 30rpx;
- }
- .address_edit {}
- .address_edit image {
- vertical-align: middle;
- width: 50rpx;
- height: 50rpx;
- display: inline-block;
- padding-right: 14rpx;
- }
- .ipon {
- color: #333333;
- font-size: 30rpx;
- margin-bottom: 10rpx;
- }
- }
- .keyInfo {
- margin: 30rpx 40rpx;
- .keyInfo_task {
- color: #000;
- .keyInfo_task_txt {
- border-radius: 10rpx;
- }
- }
- }
- .keyInfo h3 {}
- .keyInfo p {
- font-size: 30rpx;
- }
- .account {
- display: flex;
- align-items: center;
- width: 690rpx;
- padding: 24rpx 0;
- margin: 0 auto;
- .account_txt {
- display: inline-block;
- padding: 0 0 0 1%;
- width: 400rpx;
- }
- .account_txt span {
- color: #333333;
- font-weight: 550;
- text-indent: 2em;
- font-size: 30rpx;
- }
- .account_txt image {
- vertical-align: middle;
- width: 50rpx;
- height: 50rpx;
- display: inline-block;
- padding-right: 14rpx;
- }
- .account_fans {
- display: flex;
- width: 250rpx;
- }
- .account_fans p {
- display: inline-block;
- font-size: 30rpx;
- color: #333333;
- font-weight: 550;
- }
- .account_btn {}
- }
- .block {
- width: 100%;
- height: 100rpx;
- margin-top: 5%;
- }
- .submit {
- box-shadow: 0rpx 5rpx 40rpx #ccc;
- width: 100%;
- position: fixed;
- bottom: 0rpx;
- display: flex;
- height: 90rpx;
- padding-top: 2%;
- background-color: #FFFFFF;
- .submit_btn {
- width: 60%;
- background-color: #FCCF41;
- border-radius: 20rpx;
- font-size: 36rpx;
- line-height: 200%;
- letter-spacing: 10rpx;
- height: 80%;
- }
- }
- </style>
|