123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418 |
- <template>
- <view style="position: relative;">
- <!-- 胶囊 -->
- <mvBar :mysNavConfig="mysNavConfig"></mvBar>
- <view :style="{marginTop:navH}"></view>
- <view class="" id="wrap0" v-show="!loading">
- <view class="home">
- <view class="uni-margin-wrap">
- <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000"
- :duration="1000">
- <swiper-item v-for="item in carouselImages">
- <image :src="item.photo_url" mode="aspectFill" style="width: 100%;height: 100%;"
- @click="handlePreviewImage1(item.photo_url)" v-if="item.Symbol !== 3">
- </image>
- <video :src="item.photo_url" style="width: 100%;height: 100%;" v-if="item.Symbol === 3">
- </video>
- </swiper-item>
- </swiper>
- <view class="">
- <view class="Tasktext">
- <!-- <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/pingtai2.png" mode=""> -->
- <image :src="selection.PlatformInfo.platform_icon" mode="">
- </image>
- <!-- <span>PUYU朴郁小树茶冻干茶粉PUYU朴郁小树茶冻干茶粉</span> -->
- <span>{{selection.selection_name}}</span>
- </view>
- <view class="introduction">
- <view class="rleft">
- <!-- <p>余<span style="color: #c4c1c1;">123567</span>件</p> -->
- <p style="margin-left: 20rpx; color:#787474 ;">售价</p>
- </view>
- <view class="rright">
- <!-- <p>距离任务有效期还有<span style="color: #f70606;">1107</span>天</p> -->
- <p v-if="selection.remain_days <= 0 && selection.remain_hours <= 0"><span
- style="color: #f70606;">任务已结束</span></p>
- <!-- <p v-else>距离任务有效期还有<span style="color: #f70606;">{{selection.remain_days}}</span>天</p> -->
- <p v-else><span style="color: #999999;">距离任务结束还有</span><span
- style="color: #f70606;">{{ selection.remain_days }}<span
- style="color: #999999;">天</span>{{ selection.remain_hours }}<span
- style="color: #999999;">小时</span></span></p>
- </view>
- </view>
- <!-- 售价具体金额和总销量 -->
- <view class="introduction1">
- <view class="rleft1">
- <!-- <p>余<span style="color: #c4c1c1;">123567</span>件</p> -->
- <p style="color:#787474 ;">¥{{product.product_price}}</p>
- </view>
- <view class="rright1">
- <!-- <p>距离任务有效期还有<span style="color: #f70606;">1107</span>天</p> -->
- <p style="color:#c4c4c4 ;">近30日销量:{{product.sales_count}}</p>
- </view>
- </view>
- <!-- 重要信息展示 -->
- <view>
- <!-- 样机高佣和公开 两个有色框 -->
- <view class="importentInfo1">
- <!-- 高佣 这个margin带着整个有色边框一起移动-->
- <view style="display: flex; margin: 25rpx 20rpx;">
- <!-- 与边框离开距离 这个margin仅带着内容移动 -->
- <view style="display: flex; margin-top: 10rpx;">
- <view
- style="background-color: #e99d42; width: 140rpx; height: 45rpx; border-radius: 15rpx; line-height: 40rpx;text-align: center;">
- <p style="color: white;font-size: 25rpx;">样叽高佣</p>
- </view>
- <view style="margin-left: 25rpx;line-height: 40rpx">
- <p style="color: red;font-size: 25rpx;">
- 每单赚:{{selection.high_estimated_income}}¥
- (佣金比例:{{product.exclusive_commission}}%)</p>
- </view>
- </view>
- </view>
- <!-- 公开 这个margin带着整个有色边框一起移动-->
- <view style="display: flex; margin: 25rpx 20rpx;">
- <!-- 与边框离开距离 这个margin仅带着内容移动 -->
- <view style="display: flex;">
- <view
- style="background-color: #9a9a9a; width: 140rpx; height: 45rpx; border-radius: 15rpx; line-height: 40rpx;text-align: center;">
- <p style="color: white;font-size: 25rpx;">公开</p>
- </view>
- <view style="margin-left: 25rpx;line-height: 40rpx">
- <p style="color: #444d5e;font-size: 25rpx;">
- 每单赚:{{selection.normal_estimated_income}}¥
- (佣金比例:{{product.public_commission}}%)</p>
- </view>
- </view>
- </view>
- </view>
- <!-- 悬赏任务 -->
- <view class="importentInfo2" v-if="selection.task_mode==1">
- <!-- 高佣 这个margin带着整个有色边框一起移动-->
- <view style="display: flex; margin: 25rpx 20rpx;">
- <!-- 与边框离开距离 这个margin仅带着内容移动 -->
- <view style="display: flex; margin-top: 10rpx;">
- <view
- style="background-color: #1f63ff; width: 140rpx; height: 45rpx; border-radius: 15rpx; line-height: 40rpx;text-align: center;">
- <p style="color: white;font-size: 25rpx;">悬赏任务</p>
- </view>
- <view style="margin-left: 25rpx;line-height: 45rpx">
- <p style="color: #444d5e;font-size: 25rpx;">
- 有效期内实际成交≥{{rewardStrategy.sale_actual}}单,额外奖励<span
- style="color: red;">¥{{rewardStrategy.per_reward}}</span>元
- </p>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- <view class="interval"></view> -->
- <view class="home" style="padding-top: 0;">
- <!-- <view>
- <view class="circularmark">
- <p>任务&领样形式</p>
- </view>
- <view class="markcontent">
- <p>任务形式:{{selection.show_task_mode}}</p>
- <p>领样形式:{{selection.show_sample_mode}}</p>
- </view>
- </view> -->
- <!-- 领样要求 -->
- <view class="" v-if="selection.sample_mode==1">
- <view class="circularmark">
- <p>领样要求</p>
- </view>
- <!-- 具体领样品要求(粉丝数量) -->
- <view class="markcontent">
- <view class="" v-for="item in freeStrategy">
- <p style="color: #9a9a9a ; margin-top: 20rpx; margin-bottom: 20rpx;">
- 粉丝量{{getFansLabel(item.fans_num)}},近30天橱窗销量≥{{item.sale_num}}单</p>
- </view>
- </view>
- <!-- 领样进度条 -->
- <view style="display: flex; justify-content: space-between;">
- <view style="font-size:22rpx;line-height:44rpx;margin-left: 27rpx;margin-right: 27rpx;">
- <p>样品余量:剩余<span style="color: red;">{{selection.remain_num}}</span>件</p>
- </view>
- <view style="width: 55%;margin: auto;">
- <liu-progressbar :progress="selection.sample_percent" color="#ffffff" :height="'40rpx'"
- dsColor="#e0e3ea" bgColor="#1f63ff" />
- </view>
- </view>
- </view>
- <!-- 悬赏要求 -->
- <view class="" v-if="selection.task_mode==1">
- <view class="circularmark">
- <p>悬赏条件</p>
- </view>
- <view class="markcontent">
- <view class="">
- <p style="color: #9a9a9a ;">
- 任务有效期内实际成交≥{{rewardStrategy.sale_actual}}单,额外奖励¥{{rewardStrategy.per_reward}}元</p>
- </view>
- </view>
- <!-- 悬赏进度条 -->
- <view style="display: flex; justify-content: space-between;">
- <view style="font-size:22rpx;line-height:44rpx;margin-left: 27rpx;margin-right: 3rpx;">
- <p>悬赏奖金池:剩余<span style="color: red;">{{selection.remain_poll}}</span>¥</p>
- </view>
- <view style="width: 55%;margin: auto;">
- <liu-progressbar :progress="selection.reward_percent" color="#ffffff" :height="'40rpx'"
- dsColor="#e0e3ea" bgColor="#1f63ff" />
- </view>
- </view>
- </view>
- <!-- <view class="">
- <view class="circularmark">
- <p>任务要求</p>
- </view>
- <view class="markcontent">
- <p>内容形式:{{selection.show_content_type}}</p>
- <p>带货链接:{{product.product_url|ellipsis}}
- <image :src="picture.icon_copy" mode="" class="copy-img"
- @click="handleCopy(selection.product_url)" />
- </p>
- </view>
- </view> -->
- </view>
- <view class="" id="wrap1">
- <view class="home" style="padding-top: 0;">
- <view class="">
- <view class="circularmark">
- <p>卖点总结</p>
- </view>
- <view class="markcontent">
- <text class="wvp" style="margin: 10rpx 0;" decode="true" user-select="true">
- {{selection.detail}} </text>
- </view>
- </view>
- </view>
- </view>
- <view class="" id="wrap2">
- <view class="home" style="padding-top: 0;">
- <view class="">
- <view class="circularmark">
- <p>BRIEF</p>
- </view>
- <view class="markcontent1">
- <view v-if="hasNoProjectPhoto">
- <view class="diagram" style="font-size: 32rpx;margin: 0 30rpx;">
- <!-- 可上传任务的brief,word、pfd等等 -->
- <p>暂无详情说明</p>
- </view>
- </view>
- <view v-else>
- <view v-if="briefType == 'pdf'">
- <view class="diagram-pdf" v-for="item in briefFiles">
- <image :src="picture.icon_pdf"></image>
- <p>{{item.file_name}}</p>
- <button type="default"
- @tap="downloadFile(item.file_url, item.file_name)">点击下载</button>
- </view>
- </view>
- <view v-else-if="briefType == 'doc' || briefType == 'docx'">
- <view class="diagram-pdf" v-for="item in briefFiles">
- <image :src="picture.icon_word"></image>
- <p>{{item.file_name}}</p>
- <button type="default"
- @tap="downloadFile(item.file_url, item.file_name)">点击下载</button>
- </view>
- </view>
- <view v-else class="diagram" v-for="item in briefFiles">
- <image :src="item.file_url" mode="widthFix"></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="" id="wrap2">
- <view class="home" style="padding-top: 0;">
- <view class="">
- <view class="circularmark">
- <p>素材</p>
- </view>
- <view class="markcontent1">
- <view v-if="isPhoto == 0">
- <view class="diagram" style="font-size: 32rpx;margin: 0 30rpx;">
- <p>无</p>
- </view>
- </view>
- <view style="display:flex;justify-content: center;" v-if="isPhoto == 2">
- <!-- <video class="videos" :src="url" @error="ErrorCallback" controls> </video> -->
- <video class="videos" :src="exampleImgs[0].file_url" @error="ErrorCallback" controls>
- </video>
- </view>
- <view style="display:flex;justify-content: center;" v-if="isPhoto == 2">
- <view type="default" @click="downloadVideo(exampleImgs[0].file_url)">下载视频</view>
- </view>
- <view class="diagram" v-for="item in exampleImgs" v-if="isPhoto == 1">
- <image :src="item.file_url" mode="widthFix"></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="" id="wrap2">
- <view class="home" style="padding-top: 0;">
- <view class="">
- <view class="circularmark">
- <p>商品详情图</p>
- </view>
- <view class="markcontent1">
- <view v-if="hasNoProductPhoto">
- <view class="diagram" style="font-size: 32rpx;margin: 0 30rpx;">
- <p>无</p>
- </view>
- </view>
- <view class="diagram" v-for="item in carouselImages" v-else>
- <image :src="item.photo_url" mode="widthFix"></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="interval2"></view>
- <view class="signup">
- <view style="display: flex;justify-content: space-between;align-items: center;">
- <view
- style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin: 0 20rpx; "
- @click="toggle1('bottom')">
- <image style="width: 50rpx;height: 50rpx;" :src="picture.icon_share2"></image>
- <p style="font-size: 28rpx;">分享</p>
- </view>
- <view
- style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin: 0 20rpx; "
- @click="handleCopy(selection.product_url)">
- <image style="width: 50rpx;height: 50rpx;" :src="picture.icon_copy2"></image>
- <p style="font-size: 28rpx;">带货链接</p>
- </view>
- </view>
- <!-- //添加橱窗 走添加橱窗流程 -->
- <view>
- <button type="default" class="but1" @click="addwindow" :disabled="ddl">添加橱窗</button>
- </view>
- <!-- //免费领样 判断是否有免费领样 -->
- <view v-if="selection.sample_mode==1">
- <button type="default" class="but1" :disabled="isDisabled" @click="submit()">{{buttonText}}</button>
- <!-- <button type="default" class="but1" :disabled="isDisabled"
- @click="submit()">666</button> -->
- </view>
- </view>
- <view>
- <!-- 底部普通弹窗 -->
- <uni-popup ref="popup1" background-color="#fff" @change="change" style="border-radius: 20rpx;">
- <view class="popup-content1" :class="{ 'popup-height': type === 'left' || type === 'right' }">
- <view
- style="display: flex; justify-content: space-around; margin-top: 10% ;margin-bottom: 3% ;">
- <view>
- <button class="tii2" data-name="shareBtn" open-type="share">
- <view class="circular" style="margin-top: 10% ;">
- <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/taskw.png"
- mode=""></image>
- </view>
- <p class="tii">发送给朋友</p>
- </button>
- </view>
- <view>
- <button class="tii2" @click="toggle2('center')">
- <view class="circular" style="margin-top: 10% ;">
- <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/taske.png"
- mode=""></image>
- </view>
- <p class="tii">生成分享码</p>
- </button>
- </view>
- </view>
- <button type="default" class="errar" @click="cancel()">取消</button>
- </view>
- </uni-popup>
- </view>
- <uni-popup ref="popup2" class="share1" background-color="#fff" @change="change">
- <view class="popup-content">
- <image :src="canvasUrl" mode="widthFix" style="width: 300px;height: 420px;margin-top: 30rpx;">
- </image>
- <mosoweCanvas ref="mosoweCanvasComponents" @canvasImage="_canvasImage" :lists="lists" height="420"
- width="300" imgType="png" />
- <view class="" style="text-align: center;margin: 5% 0;">
- <button class="butmin" size="mini" @tap="saveImage">保存</button>
- </view>
- </view>
- </uni-popup>
- </view>
- </view>
- </template>
- <script>
- import mosoweCanvas from "@/components/mosowe-canvas-image/mosowe-canvas-image";
- import mvBar from "@/components/mys_navBar/mysNavBar";
- import zSwiper from '@/components/z-swiper/index.vue'; // npm安装
- import {
- getQueryString,
- fansview,
- money,
- getDaysBetweenDates,
- getDaysAndHoursBetweenDates
- } from '@/components/utils.js';
- import {
- saveImageToPhotosAlbum,
- showToast,
- downloadFile
- } from '@/uni_modules/sakura-canvas/js_sdk/util'
- export default {
- filters: {
- ellipsis(value) {
- if (!value) return "";
- if (value.length > 30) {
- return value.slice(0, 30) + "...";
- }
- return value;
- },
- },
- components: {
- mvBar,
- zSwiper,
- mosoweCanvas
- },
- data() {
- return {
- // nav
- navH: getApp().globalData.navHeight,
- picture: getApp().globalData.picture,
- mysNavConfig: {
- /* 占位开启 */
- // navPadding: true,
- /* 背景 */
- // bgColor: "#f8f8f8",
- /* 开启单页显示首页图标 */
- 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",
- },
- },
- isPhoto: 0,
- url: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400',
- coopStrategy: "点击报名后显示",
- canvasUrl: '',
- hackReset: true,
- showWarning: false,
- arrowMargin: 0,
- cotainerMargin: 0,
- screenWidth: 0,
- ddl: false,
- loading: true,
- isSign: 0,
- strategy_id: 0,
- strategy: null,
- input_offer: 0.0,
- chooseBtn: 0,
- share: {
- title: "",
- path: '',
- imageUrl: '',
- desc: '',
- content: ''
- },
- mainPhoto: '',
- content_type_info: ["图文", "视频"],
- sample_mode_info: ["免费领样", "不提供样品"],
- task_mode_info: ["悬赏任务", "纯佣带货"],
- // 免费领养按钮条件
- buttonText: '免费领样',
- isDisabled: false,
- tabBarStyle: {},
- activeTab: 0,
- hei: '',
- hei1: '',
- topp0: '',
- topp1: '',
- topp2: '',
- scrollTop: '',
- activeColor: '#f2d22d',
- value: '',
- value1: '',
- coop_choice: [],
- type: 'center',
- type1: 'center',
- type2: 'center',
- item: {
- title: '0'
- },
- // 指示器样式
- mode: 'circle',
- indicatorPos: 'bottomCenter',
- carousel_images: ['https://img2.baidu.com/it/u=2141851239,1037607188&fm=26&fmt=auto&gp=0.jpg',
- 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png',
- ],
- dotIndex: 0, //指示器索引
- dotFloatIndex: 0, //位置指示器索引
- // 视频轮播
- fullScreen: true,
- topFloat: true,
- fotterFloat: true,
- swiper: {
- margin: "150rpx",
- index: 0,
- list: [
- ]
- },
- tar: false,
- token: '',
- // 测试数据
- carouselImages: [{
- Symbol: 1,
- photo_url: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/a69be940-e294-4dd4-9b09-d80274c75a15.png'
- },
- {
- Symbol: 2,
- photo_url: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/e1a40241-a566-4227-9b3c-afefe88f4b69.png'
- },
- {
- Symbol: 2,
- photo_url: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/deb21a8b-1517-4352-823b-b70e0cd6883d.png'
- },
- ],
- productUrl: 'https://haohuo.jinritemai.com/views/product/detail?id=3519429421675223776&origin_type=604',
- productDetail: 'puyu朴郁小树茶是朴郁公司的一款茶饮,采用先进的冻干粉末技术,将红茶/绿茶精华萃取并制作成冻干茶粉。外包装申请了国家专利,一花一树造型更符合时下追求品味的年轻人的审美。本品获得2021年国家创新美食银奖。',
- projectPhoto: [{
- Symbol: 1,
- photo_url: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/a69be940-e294-4dd4-9b09-d80274c75a15.png'
- },
- {
- Symbol: 2,
- photo_url: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/e1a40241-a566-4227-9b3c-afefe88f4b69.png'
- },
- {
- Symbol: 2,
- photo_url: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/deb21a8b-1517-4352-823b-b70e0cd6883d.png'
- },
- ],
- options: [{
- value: '1',
- label: '所有人均可领取'
- },
- {
- value: '2',
- label: '1w下'
- },
- {
- value: '3',
- label: '1w-10w'
- },
- {
- value: '4',
- label: '10w-100w'
- },
- {
- value: '5',
- label: '100w-500w'
- },
- {
- value: '6',
- label: '500w-1000w'
- },
- {
- value: '7',
- label: '1000w以上'
- },
- ],
- // 数据
- suc_flag: 0, //0表示access_token失效
- condition_flag: 0, //0表示未达到领样条件
- kuaishouFansNum: 0, //判断是否满足领样条件时调用得到的粉丝数
- saleNum_30: 0,
- qrcode: '',
- selectionId: '',
- kuaishou_productId: '',
- talent: {},
- account: [],
- selection: {},
- product: {},
- younggeeProductPhoto: {},
- productPhoto: [],
- freeStrategy: [],
- rewardStrategy: [],
- briefFiles: [],
- exampleImgs: [],
- hasNoProductPhoto: true,
- hasNoProjectPhoto: true,
- briefType: "",
- youngLeadTeamId: "",
- youngTeamId: "",
- };
- },
- onShareAppMessage(res) {
- return {
- title: this.share.title,
- path: 'page_selectionsquare/selectiondetail/selectiondetail?id=' + this.selectionId,
- imageUrl: this.share.imageUrl,
- desc: '',
- content: '',
- success(res) {
- uni.showToast({
- title: '分享成功'
- })
- },
- fail(res) {
- uni.showToast({
- title: '分享失败',
- icon: 'none'
- })
- }
- }
- },
- computed: {
- lists: {
- get() {
- let tmplist = [
- // 大图
- {
- type: 'image',
- content: this.mainPhoto,
- width: 300,
- height: 320,
- x: 0,
- y: 0,
- },
- // 标题
- {
- type: 'text',
- content: this.selection.selection_name,
- color: '#333333',
- weight: 'bold',
- size: '12px',
- width: 200,
- height: 20,
- x: 20,
- y: 340,
- },
- // 文案1
- {
- type: 'text',
- content: "样品数量:" + this.selection.sample_num,
- color: '#333333',
- size: '10px',
- width: 60,
- height: 20,
- x: 20,
- y: 370,
- },
- // 文案2
- {
- type: 'text',
- content: "扫码立即报名",
- color: '#333333',
- size: '10px',
- width: 60,
- height: 20,
- x: 110,
- y: 370,
- },
- {
- type: 'text',
- content: "发布任务请登录",
- color: '#333333',
- size: '10px',
- width: 70,
- height: 20,
- x: 20,
- y: 400,
- },
- {
- type: 'text',
- content: "www.younggee.com",
- color: '#333333',
- size: '10px',
- // style: 'italic',
- width: 60,
- height: 20,
- x: 90,
- y: 400,
- },
- // 二维码
- {
- type: 'qr',
- content: this.qrcode,
- projectid: this.selectionId,
- width: 80,
- height: 80,
- x: 215,
- y: 325,
- },
- ]
- return tmplist
- },
- set() {}
- }
- },
- async created() {
- console.log("进入create")
- },
- async onShow() {
- console.log("进入onshow")
- // 判断登录
- await this.isLogin();
- if (this.token === '') {
- uni.showModal({
- content: '请先登录',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/login/login'
- });
- } else if (res.cancel) {
- uni.navigateBack();
- }
- }
- });
- } else {
- this.loading = true;
- uni.showLoading({
- title: '加载中'
- });
- this.getLeadTeam();
- this.getTalentInfo();
- await this.getSelectionDetail();
- await this.getTalentAccountInfo();
- if (this.account.length != 0) {
- await this.isSignUp();
- await this.checkToken()
- //token没有过期
- if (this.suc_flag == 1) {
- await this.checkSampleCondition()
- }
- }
- await this.handleButtonText();
- this.loading = false;
- uni.hideLoading();
- }
- },
- // options是上一个页面传递的数据
- onLoad(options) {
- console.log("onLoad加载********** *")
- console.log("options:----->", options)
- this.selectionId = options.id
- this.productId = options.pid
- // const scene = decodeURIComponent(options.scene);
- // console.log("scene: ", scene)
- // if (scene != "undefined") {
- // this.selectionId = scene;
- // } else {
- // this.selectionId = options.id
- // this.productId = options.pid
- // }
- this.share.path = 'https://younggee.com/wxapp/taskdetail?action=taskdetail&id=' + this.selectionId
- console.log("share path: ", this.share.path)
- this.postlist()
- },
- onReady() { // 注意:想要拿到元素实例,需要在实例已经挂载到页面上才可以
- this.init();
- },
- methods: {
- //走到这一步的token必然有效
- getFansNum() {
- return this.$https.get('/youngee/c/t/g/get-kuaishou-fans-num')
- .then(res => {
- console.log("get-kuaishou-fans-num------", res); // 这行会输出响应对象到控制台
- this.kuaishouFansNum = res.data.data.fan
- })
- },
- get30daysSaleNum() {
- return this.$https.get('/youngee/c/t/g/query-sales-for30-days')
- .then(res => {
- console.log("query-sales-for30-days------", res); // 这行会输出响应对象到控制台
- this.saleNum_30 = res.data.data
- })
- },
- handleButtonText() {
- console.log('into handleButtonText,this.isSign--->', this.isSign)
- // 领样条件判断
- if (this.selection.sample_mode === 3) {
- // 未开放免费领样
- this.buttonText = '';
- this.isDisabled = true;
- } else if (this.selection.sample_mode === 1) {
- // 开放免费领样
- if (this.ddl) {
- // 任务已结束
- this.buttonText = '任务结束';
- this.isDisabled = true;
- } else if (this.selection.remain_num === 0) {
- // 样品库存不足
- this.buttonText = '免费领样';
- this.isDisabled = true;
- } else if (this.isSign === 1) {
- //4. 若开放免费领样,但已经申请过,则按钮文字为“已申请”且置灰不可点击
- //特殊情况:如果查到了数据,并且sectask的sample_mode也为1,说明是真申请过了
- console.log("come in")
- this.buttonText = '已申请';
- this.isDisabled = true;
- } else {
- //不满足领取条件
- //授权过期
- console.log("按钮可点击")
- }
- } else {
- console.log("sample_mode不可为2")
- }
- },
- getFansLabel(fansNum) {
- //// 在 options 数组中查找 value 属性等于 fansNum.toString() 的对象 fansNum在表中为int类型
- const option = this.options.find(o => o.value === fansNum.toString());
- // 如果找到这样的对象,则返回其 label 属性值,否则返回 fansNum
- return option ? option.label : fansNum;
- },
- handleCopy(content) {
- wx.setClipboardData({
- data: content,
- success: function(res) {
- console.log("复制成功");
- }
- });
- },
- handlePreviewImage1(item) {
- var urls = [];
- this.carouselImages.forEach(function(image) {
- urls.push(image.photo_url);
- });
- wx.previewImage({
- current: item, // 当前显示图片的http链接
- urls: urls
- })
- },
- init() {
- let rect = uni.getMenuButtonBoundingClientRect();
- let screenWidth = uni.getSystemInfoSync().screenWidth;
- this.arrowMargin = rect.width * 0.75 + 4;
- this.cotainerMargin = screenWidth - rect.right;
- },
- // 判断登陆是否过期
- isLogin() {
- return this.$https.get('/youngee/c/t/g/is-login')
- .then(res => {
- console.log('进入详情页,判断是否登录res:****** ', res)
- if (res.data.code === 403) {
- // 登陆已失效
- this.token = ""
- } else {
- this.token = uni.getStorageSync('token')
- }
- })
- },
- postlist() {
- // uni.showModal({
- // content: "项目id为:"+this.projectid,
- // })
- this.$https.post('/youngee/c/p/get-qrcode', {
- scene: this.selectionId,
- page: 'page_selectionsquare/selectiondetail/selectiondetail',
- // scene: this.taskid,
- // page: 'pages/task/taskdetails',
- })
- .then(res => {
- console.log(res)
- this.qrcode = 'data:image/png;base64,' + res.data.data;
- })
- },
- getLeadTeam() {
- this.$https.get('/youngee/c/t/g/get-lead-young-team-id' +
- "?" +
- "project_type=2" +
- "&selection_id" +
- "=" +
- this.selectionId
- ).then(res => {
- if (res.data.code === 0) {
- if (res.data.data.num != 0) {
- this.youngLeadTeamId = res.data.data.team_id
- }
- }
- })
- },
- getSelectionDetail() {
- console.log('into getSelectionDetail')
- return this.$https.get('/youngee/c/t/g/get-selection-detail' +
- "?" +
- "selectionid" +
- "=" +
- this.selectionId +
- "&" +
- "productid" +
- "=" +
- this.productId
- ).then(res => {
- if (res.data.code === 0) {
- this.selection = res.data.data
- console.log("this.selection---->", this.selection)
- this.product = this.selection.YounggeeProduct[0]
- this.younggeeProductPhoto = this.selection.YounggeeProductPhoto
- this.freeStrategy = this.selection.FreeStrategy
- if (this.selection.RewardStrategy[0] != null) {
- this.rewardStrategy = this.selection.RewardStrategy[0]
- }
- // if (this.selection.reward_condition === "")
- // this.selection.reward_condition = "无"
- this.share.title = this.selection.selection_name
- // 提取分享图、主图、轮播图
- this.carouselImages = []
- for (let i = 0; i < this.younggeeProductPhoto.length; i++) {
- if (this.younggeeProductPhoto[i].Symbol === 1) {
- this.mainPhoto = this.younggeeProductPhoto[i].photo_url
- this.share.imageUrl = this.mainPhoto
- }
- if (this.younggeeProductPhoto[i].Symbol !== 3) {
- this.carouselImages.push(this.younggeeProductPhoto[i])
- }
- }
- console.log("carouselImages----->", this.carouselImages)
- this.hasNoProductPhoto = this.carouselImages.length === 0 ? true : false;
- // brief、素材图
- console.table(this.selection.SelectionBrief)
- this.hasNoProjectPhoto = this.selection.SelectionBrief === null ? true : false;
- if (!this.hasNoProjectPhoto) {
- for (let i = 0; i < this.selection.SelectionBrief.length; ++i) {
- let url = this.selection.SelectionBrief[i].file_url
- this.briefType = url.split('.').pop()
- }
- }
- this.briefFiles = this.selection.SelectionBrief
- this.exampleImgs = this.selection.SelectionExample
- if (this.exampleImgs !== null) {
- for (let i = 0; i < this.exampleImgs.length; i++) {
- if (this.exampleImgs[i].file_url.endsWith("jpg") || this.exampleImgs[i].file_url
- .endsWith("png")) {
- this.isPhoto = 1
- } else {
- this.isPhoto = 2
- }
- }
- } else {
- this.isPhoto = 0
- }
- //样品总数量进度条
- //动态绑定属性
- this.selection.high_estimated_income = this.product.exclusive_commission * this.product
- .product_price / 100
- this.selection.normal_estimated_income = this.product.public_commission * this.product
- .product_price / 100
- //领样进度
- this.selection.sample_percent = (this.selection.remain_num / this.selection.sample_num) *
- 100
- //悬赏进度
- this.selection.remain_poll=this.rewardStrategy.reward-this.selection.settlement_amount
- this.selection.reward_percent = (this.selection.remain_poll / this.rewardStrategy
- .reward) *
- 100
- // this.selection.task_reward=this.selection.task_reward
- console.log("this.selection----->", this.selection)
- // 判断任务是否已结束
- var timeNow = new Date()
- var ddl = new Date(this.selection.task_ddl.replace(/-/g, "/"));
- // this.selection.remain_days = getDaysBetweenDates(timeNow, ddl)
- var diff = getDaysAndHoursBetweenDates(timeNow, ddl);
- this.selection.remain_days = diff.days;
- this.selection.remain_hours = diff.hours;
- //判断任务是否结束
- this.ddl = (this.selection.remain_days <= 0 && this.selection.remain_hours <= 0) ? true :
- false
- }
- })
- },
- // 达人信息
- getTalentInfo() {
- return this.$https.get('/youngee/c/t/g/get-talent-info')
- .then(res => {
- this.talent = res.data.data
- console.log("this.talent---->", this.talent)
- })
- },
- //账号信息
- getTalentAccountInfo() {
- return this.$https.get('/youngee/c/t/g/get-talent-account-kuaishou')
- .then(res => {
- var accounts = res.data.data
- this.account = []
- // -3表示未绑定任何平台
- if (res.data.code != -3) {
- for (var i = 0; i < accounts.length; i++) {
- console.log("kuaishouaccount数组——————: ", accounts[i])
- // 此带货商品的平台与用户绑定的三方平台一致,才会加入到this.account中
- if (this.selection.platform === accounts[i].platform_id) {
- this.account.push(accounts[i])
- }
- }
- }
- })
- // console.log("account数组——————: ",res)
- },
- isSignUp() {
- console.log("into isSignUp")
- return this.$https.get('/youngee/c/t/g/is-sign-up-sec-task' +
- "?" +
- "selection_id" +
- "=" +
- this.selectionId)
- .then(res => {
- let task;
- if (res.data.code === 0) {
- this.isSign = res.data.data.is_sign;
- console.log("is-sign-up-sec-task--->", this.isSign)
- task = res.data.data.sec_task_info
- if (this.isSign === 1) {
- this.youngLeadTeamId = task.lead_team_id
- this.youngTeamId = task.team_id
- }
- }
- })
- },
- checkToken() {
- //进入页面就发送一个请求,看是否过期
- return this.$https.get('/youngee/c/t/g/check-token-exp')
- .then(res => {
- console.log("checkToken___", res)
- if (res.data.code == -2) {
- this.suc_flag = 0
- } else {
- this.suc_flag = 1
- }
- })
- },
- onPageScroll(res) {
- uni.$emit('onPageScroll', res.scrollTop);
- this.scrollTop = res.scrollTop;
- // console.log(res.scrollTop);
- if (res.scrollTop <= this.topp1 - this.hei1) {
- // console.log(0)
- this.activeTab = 0
- }
- if (res.scrollTop > this.topp1 - this.hei1 && res.scrollTop < this.topp2 - this.hei1) {
- // console.log(1)
- this.activeTab = 1
- }
- if (res.scrollTop > this.topp2 - this.hei1) {
- // console.log(2)
- this.activeTab = 2
- }
- },
- //获取节点离顶部高度
- getInfo() {
- const query = uni.createSelectorQuery().in(this);
- query.select('#wrap0').boundingClientRect(data => {
- this.topp0 = data.top
- }).exec();
- query.select('#wrap1').boundingClientRect(data => {
- this.topp1 = data.top
- }).exec();
- query.select('#wrap2').boundingClientRect(data => {
- this.topp2 = data.top
- // console.log(this.topp2)
- }).exec();
- query.select('#wap').boundingClientRect(data => {
- // console.log(data)
- this.hei = data.height
- this.tabBarStyle = {
- height: data.height + data.height + 'px',
- width: '100% ',
- }
- }).exec();
- query.select('#wa').boundingClientRect(data => {
- // console.log(data)
- this.hei1 = data.height
- }).exec();
- },
- //视频轮播
- effect3dMarginMethed() {
- this.effect3dMargin++
- },
- //swiper滑动事件
- swiperChange: function(e) {
- this.swiper.index = e.detail.current;
- },
- //底部弹出层
- change(e) {
- console.log('当前模式:' + e.type + ',状态:' + e.show);
- },
- // 添加橱窗
- addwindow() {
- console.log('ino addwindow')
- let that = this
- //1.账号绑定情况
- if (that.account.length === 0) {
- uni.showModal({
- content: '您尚未绑定快手账号,请绑定快手账号后重试',
- confirmText: '去绑定',
- success: function(res) {
- if (res.confirm) {
- //绑定快手平台
- if (that.selection.platform == 4) {
- uni.navigateTo({
- url: '/page_mycenter/bindaccounts/kuaishoubind'
- });
- } else {
- uni.navigateTo({
- url: '/page_mycenter/myinformation/bindaccount?platform_id=' +
- that.selection.platform
- });
- };
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else if (that.suc_flag == 0) {
- //2.token无效情况
- uni.showModal({
- content: '您快手账号授权已过期,请刷新快手账号授权后重试',
- confirmText: '去刷新',
- success: function(res) {
- if (res.confirm) {
- //刷新快手平台
- if (that.selection.platform == 4) {
- uni.navigateTo({
- url: '/page_mycenter/bindaccounts/kuaishoubind'
- });
- } else {
- uni.navigateTo({
- url: '/page_mycenter/myinformation/bindaccount?platform_id=' +
- that.selection.platform
- });
- };
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- })
- //token有效
- } else {
- console.log("api----", this.product.kuaishou_product_id)
- //调用加入橱窗api
- this.$https.get('/youngee/c/t/g/add-window' +
- "?" +
- "product_id" +
- "=" +
- this.product.kuaishou_product_id
- ).then(res => {
- console.log("add window res****", res)
- //未开通
- let api_result = res.data.data.data[0]
- if (api_result.result == 1800533) {
- uni.showModal({
- content: '选品不存在或已下线', // 这里设置弹窗的内容
- showCancel: false, // 不显示取消按钮
- confirmText: '知道了', // 设置确认按钮的文本
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击知道了');
- }
- }
- });
- } else if (api_result.result == 1800550) {
- uni.showModal({
- content: '您未开通快手橱窗,请开通后重试', // 这里设置弹窗的内容
- showCancel: false, // 不显示取消按钮
- confirmText: '知道了', // 设置确认按钮的文本
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击知道了');
- }
- }
- });
- } else {
- uni.showModal({
- content: '添加橱窗成功,已创建带货任务!', // 这里设置弹窗的内容
- showCancel: false, // 不显示取消按钮
- confirmText: '知道了', // 设置确认按钮的文本
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击知道了');
- }
- }
- });
- //添加到seltask带货任务中
- console.log("提交报名")
- // 直接报名
- console.log("********", this.selection.product_id)
- console.log("this.kuaishouFansNum********111", this.kuaishouFansNum)
- console.log("this.saleNum_30********111", this.saleNum_30)
- this.$https.post('/youngee/c/t/p/sign-up-sec-task-from-window', {
- selection_id: this.selection.selection_id,
- product_id: this.selection.product_id,
- //新增
- saleNum: this.saleNum_30,
- fans: this.kuaishouFansNum,
- }).then(res => {
- console.log("addwindow succuss",res)
- })
-
- }
- })
- }
- },
- // 免费领样
- submit(type) {
- // this在页面刚展示时,已经被赋值了必要的信息
- let that = this;
- //绑定收获地址,这样详情页就不用考虑没有地址的情况了
- if (that.talent.is_bind_location === 0) {
- // 前往个人信息绑定三合一界面
- uni.showModal({
- content: '请先绑定个人信息',
- success: function(res) {
- if (res.confirm) {
- if (that.account.length === 0) {
- uni.navigateTo({
- url: '/page_tasksquare/bindinfo?platform_id=' + that
- .selection.platform
- })
- } else {
- uni.navigateTo({
- url: '/page_tasksquare/bindinfo?platform_id=' +
- that.selection.platform +
- '&account_id=' +
- that.account[0].account_id
- })
- };
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else if (that.account.length === 0) {
- uni.showModal({
- content: '您尚未绑定快手账号,请绑定快手账号后重试',
- confirmText: '去绑定',
- success: function(res) {
- if (res.confirm) {
- // 绑定快手平台
- if (that.selection.platform == 4) {
- uni.navigateTo({
- url: '/page_mycenter/bindaccounts/kuaishoubind'
- });
- } else {
- uni.navigateTo({
- url: '/page_mycenter/myinformation/bindaccount?platform_id=' +
- that.selection.platform
- });
- }
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- } else if (this.suc_flag == 0) {
- // token无效情况
- uni.showModal({
- content: '您快手账号授权已过期,请刷新快手账号授权后重试',
- confirmText: '去刷新',
- success: function(res) {
- if (res.confirm) {
- // 刷新快手平台
- if (that.selection.platform == 4) {
- uni.navigateTo({
- url: '/page_mycenter/bindaccounts/kuaishoubind'
- });
- } else {
- uni.navigateTo({
- url: '/page_mycenter/myinformation/bindaccount?platform_id=' +
- that.selection.platform
- });
- }
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- //token有效
- } else if (this.condition_flag == 0) {
- // 未到达领样条件
- uni.showModal({
- content: '您的账号暂未达到领样要求,若在快手平台已达标,请刷新快手账号授权后重试', // 这里设置弹窗的内容
- showCancel: false, // 不显示取消按钮
- confirmText: '知道了', // 设置确认按钮的文本
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击知道了');
- }
- }
- });
- } else {
- // 达到领样条件 ,进入信息确认页
- var data = {
- selectionId: this.selectionId,
- selection: this.selection,
- youngTeamId: this.youngTeamId,
- youngLeadTeamId: this.youngLeadTeamId,
- saleNum_30: this.saleNum_30,
- fansNum: this.kuaishouFansNum,
- };
- data = JSON.stringify(data);
- // console.log("此页面传递给信息确认页的信息: ", data);
- uni.navigateTo({
- url: '/page_selectionsquare/selectiondetail/information?textObj=' +
- encodeURIComponent(data)
- });
- }
- },
- async checkSampleCondition() {
- //获取粉丝数, 获取30天销量
- await this.getFansNum()
- await this.get30daysSaleNum()
- console.log("get30daysSaleNum()", this.saleNum_30)
- console.log("after this.getFansNum()", this.kuaishouFansNum)
- // 将区间映射到最小粉丝数
- //声明对象,声明键和值
- const fansCountRanges = {
- 1: 0,
- 2: 0,
- 3: 10000,
- 4: 100000,
- 5: 1000000,
- 6: 5000000,
- 7: 10000000 // 对于 1000w以上, 设置一个大的默认值,比如无穷大
- };
- for (let strategy of this.freeStrategy) {
- console.log("strategy", strategy)
- let requiredFans = fansCountRanges[strategy.fans_num];
- console.log("this.kuaishouFansNum", this.kuaishouFansNum)
- console.log("requiredFans", requiredFans)
- console.log("this.saleNum_30", this.saleNum_30)
- console.log("strategy.sale_num", strategy.sale_num)
- if (this.kuaishouFansNum >= requiredFans && this.saleNum_30 >= strategy.sale_num) {
- console.log("条件满足")
- this.condition_flag = 1;
- return;
- }
- }
- this.condition_flag = 0;
- },
- // 下载视频
- downloadVideo(url) {
- // 自定义 文件名称
- let fileName = new Date().valueOf();
- const task = uni.downloadFile({
- url: url,
- filePath: wx.env.USER_DATA_PATH + '/' + fileName + '.mp4', // 拼接本地文件路径
- success: (res) => {
- let filePath = res.filePath
- uni.saveVideoToPhotosAlbum({
- filePath,
- success: (res) => {
- uni.showToast({
- title: '下载成功',
- icon: 'success',
- })
- let fileMgr = wx.getFileSystemManager();
- // 删除本地文件
- fileMgr.unlink({
- filePath: wx.env.USER_DATA_PATH + '/' +
- fileName +
- '.mp4',
- success: function(r) {
- console.log(
- 'unlink-getFileSystemManager'
- )
- console.log(r)
- },
- })
- },
- complete(res) {
- console.log('saveVideoToPhotosAlbum-complete')
- console.log(res)
- }
- })
- },
- complete(res) {
- console.log('downloadFiledownloadFiledownloadFiledownloadFiledownloadFile')
- console.log(res)
- uni.hideLoading()
- }
- })
- task.onProgressUpdate(this.onProgress)
- },
- // 提示下载进度
- onProgress(res) {
- uni.showToast({
- icon: 'loading',
- mask: true,
- title: res.progress + "%"
- })
- },
- toggle1(type) {
- // if (this.youngLeadTeamId === "") {
- // this.$https.post('/youngee/c/t/p/add-young-team', {
- // selection_id: this.selectionId,
- // project_type: 2,
- // })
- // .then(res => {
- // console.log(res)
- // this.youngLeadTeamId = res.data.data;
- // })
- // }
- this.type1 = type
- // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
- this.$refs.popup1.open(type)
- },
- cancel() {
- this.$refs.popup1.close()
- },
- // 更新账号
- Reset() {
- console.log("Reset func running")
- uni.navigateTo({
- url: '/pages/mycenter/myinformation/bindaccount?platform_id=' + this
- .information
- .project_platform + '&account_id=' + this.account[0].account_id,
- success(res) {
- console.log(res);
- },
- fail(err) {
- console.log(err);
- }
- });
- },
- beginCanvas() {
- this.$refs.mosoweCanvasComponents.createCanvas();
- },
- _canvasImage(e) {
- console.log("url", e)
- this.canvasUrl = e;
- },
- // 保存图片
- async saveImage() {
- let {
- canvasUrl
- } = this
- let res = await saveImageToPhotosAlbum(canvasUrl)
- if (!res.success) return
- showToast('保存成功')
- this.$refs.popup2.close()
- },
- toggle2(type) {
- if (this.canvasUrl !== '') {
- this.type2 = type
- // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
- this.$refs.popup2.open(type)
- this.$refs.popup1.close()
- } else {
- this.beginCanvas()
- this.type2 = type
- // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
- this.$refs.popup2.open(type)
- this.$refs.popup1.close()
- }
- },
- deletContract() {
- try {
- let file = wx.getFileSystemManager();
- file.readdir({
- dirPath: `${wx.env.USER_DATA_PATH}`,
- success: res => {
- console.log(res);
- if (res.files.length > 2) {
- file.unlink({
- filePath: `${wx.env.USER_DATA_PATH}/${res.files[0]}`,
- complete: res => {
- }
- })
- }
- }
- })
- } catch (error) {
- }
- },
- downloadFile(url, file) {
- let that = this
- console.log(url, file)
- // const fileName = url.split('/').pop()
- const newPath = `${wx.env.USER_DATA_PATH}/${file}`;
- that.deletContract();
- wx.showLoading({
- title: '正在打开',
- mask: true
- })
- wx.downloadFile({
- url: url,
- filePath: newPath,
- header: {},
- success: function(res) {
- var filePath = res.filePath;
- console.log(filePath);
- wx.openDocument({
- filePath: filePath,
- showMenu: true,
- success: function(res) {
- console.log('打开文档成功')
- wx.hideLoading()
- },
- fail: function(res) {
- console.log(res);
- wx.hideLoading()
- },
- complete: function(res) {
- console.log(res);
- }
- })
- },
- fail: function(res) {
- console.log('文件下载失败');
- console.log(res)
- },
- complete: function(res) {},
- })
- },
- }
- };
- </script>
- <style>
- /deep/ .share1 .uni-popup .uni-popup__wrapper {
- width: 300px !important;
- /* height: 500px !important; */
- display: flex;
- flex-direction: column;
- align-items: center;
- border-radius: 15rpx !important;
- }
- /deep/ .share.uni-popup .uni-popup__wrapper {
- width: 70%;
- border-radius: 15rpx;
- }
- </style>
- <style lang="scss" scoped>
- text {
- font-size: 24rpx;
- }
- #coop_box {
- // display: flex;
- margin-top: 15rpx;
- }
- #coop_box .coop_box_btn {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- // width: 700rpx;
- background-color: #f4f4f4;
- border-radius: 15rpx;
- font-size: 30rpx;
- text-align: center;
- cursor: pointer;
- margin: 40rpx 0;
- padding: auto 10rpx;
- }
- .borderColor {
- border: 2px solid #f7d43c !important;
- }
- .offer_input {
- width: 120rpx;
- border: 1px solid #cccccc;
- }
- .wvp {
- color: #000;
- margin: 0 5rpx;
- }
- .wvp1 {
- padding: 0 30rpx;
- border-radius: 10rpx;
- margin: 0 10rpx;
- background-color: #f2d22d;
- border: 10rpx;
- }
- .my-canvas {
- position: fixed;
- top: -99999999999rpx;
- left: -99999999999rpx;
- z-index: -99999999999;
- opacity: 0;
- }
- .poster {
- width: 100vw;
- height: 100vh;
- display: flex;
- flex-flow: column nowrap;
- justify-content: center;
- overflow: hidden;
- }
- .butmin {
- width: 200rpx;
- height: 65rpx;
- background-color: #f2d22d;
- border-radius: 20rpx;
- font-size: 36rpx;
- line-height: 2;
- }
- //视频轮播
- .full {
- position: relative;
- .btns {
- position: absolute;
- background-color: rgba(255, 255, 255, 0.5);
- z-index: 1;
- left: 100rpx;
- top: 50rpx;
- right: 100rpx;
- display: flex;
- justify-content: space-around;
- flex-wrap: wrap;
- >view {
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- padding: 0 20rpx;
- }
- &.full {
- position: relative;
- left: 0;
- right: 0;
- >view {
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- padding: 0 20rpx;
- background-color: rgba(0, 0, 0, 0.1);
- margin-bottom: 10rpx;
- }
- }
- }
- }
- //轮播图
- page {
- background-color: #fff;
- }
- .top-swiper {
- margin-bottom: 30rpx;
- .bg {
- padding-top: var(--status-bar-height);
- box-sizing: content-box;
- width: 100%;
- position: relative;
- .image {
- box-sizing: content-box;
- position: absolute;
- z-index: 1;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- overflow: hidden;
- &::after {
- content: '';
- position: absolute;
- width: 100%;
- height: 100%;
- z-index: 1;
- bottom: 0;
- left: 0;
- height: 65%;
- background-image: linear-gradient(to bottom, transparent, #FFF);
- }
- >image {
- position: absolute;
- box-sizing: content-box;
- padding: 60px;
- top: 0;
- left: 0;
- width: 100%;
- height: 80%;
- top: -60px;
- left: -60px;
- filter: blur(50px);
- }
- }
- }
- .box {
- padding-top: var(--status-bar-height);
- box-sizing: content-box;
- // position: absolute;
- z-index: 5;
- top: 0;
- left: 0;
- width: 100%;
- height: auto;
- }
- .swiper {
- height: 450rpx;
- margin: 0 20rpx;
- .le-img {
- width: 100%;
- height: 100%;
- display: block;
- transform: scale(0.8);
- transition: transform 0.3s ease-in-out 0s;
- border-radius: 4px;
- &.le-active {
- transform: scale(1);
- }
- }
- }
- }
- //其他的
- /deep/ .uni-data-checklist .checklist-group .checklist-box {
- border-radius: 20rpx !important;
- padding: 8rpx 30rpx !important;
- border: 0 !important;
- }
- /deep/ .uni-data-checklist .checklist-group .checklist-box .checklist-content .checklist-text {
- font-size: 24rpx;
- color: #333333;
- }
- .butto {
- text-align: center;
- }
- .option {
- padding: 20rpx;
- }
- //轮播图
- .uni-margin-wrap {
- width: 690rpx;
- width: 100%;
- }
- .swiper {
- height: 750rpx;
- display: flex;
- justify-content: center;
- }
- .swiper-item {
- display: block;
- width: 100%;
- height: 750rpx;
- line-height: 750rpx;
- text-align: center;
- }
- .swiper-list {
- margin-bottom: 0;
- }
- .uni-common-mt {
- margin-top: 60rpx;
- position: relative;
- }
- .info {
- position: absolute;
- right: 20rpx;
- }
- .uni-padding-wrap {
- width: 550rpx;
- padding: 0 100rpx;
- }
- .Tasktext {
- // padding-top: 5% ;
- padding: 0 0 0 1%;
- // height: 80rpx;
- margin-top: 2%;
- }
- .Tasktext span {
- color: #333333;
- font-size: 100%;
- font-weight: 550;
- text-indent: 2em;
- }
- .Tasktext image {
- vertical-align: middle;
- width: 50rpx;
- height: 50rpx;
- display: inline-block;
- padding-right: 14rpx;
- }
- .TitleText {
- height: 30rpx;
- background-color: #FDD442;
- border-radius: 20rpx;
- display: inline-block;
- padding: 0rpx 20rpx 0rpx 20rpx;
- line-height: 30rpx;
- margin-right: 20rpx;
- margin-top: 6%;
- }
- .TitleText p {
- color: #C49A0A;
- font-size: 50%;
- }
- .introduction {
- width: 90%;
- margin: 0 auto;
- display: flex;
- justify-content: space-between;
- margin-top: 2%;
- }
- .introduction1 {
- width: 90%;
- margin: 0 auto;
- display: flex;
- justify-content: space-between;
- margin-top: 2%;
- }
- .rleft p {
- font-size: 24rpx;
- }
- .rright p {
- font-size: 24rpx;
- }
- .rleft1 p {
- font-size: 30rpx;
- }
- .rright1 p {
- font-size: 24rpx;
- line-height: 45rpx
- }
- .importentInfo1 {
- margin: 25rpx 11rpx;
- background-color: #fbedd9;
- border-radius: 8px;
- width: 700rpx;
- height: 130rpx;
- }
- .importentInfo2 {
- margin: 2rpx 11rpx;
- background-color: #bbd0ff;
- border-radius: 8px;
- width: 700rpx;
- height: 65rpx;
- }
- .projectinfo {
- margin: 30rpx 0;
- display: flex;
- justify-content: space-around;
- }
- .projectinfotxt {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .projectinfotxt p {
- color: #767272;
- font-size: 32rpx;
- margin: 5rpx 0;
- }
- .interval {
- width: 100%;
- height: 40rpx;
- background-color: #E4E4E4;
- margin-top: 5%;
- }
- .circularmark {
- // display: inline-block;
- width: 250rpx;
- margin: 10rpx auto;
- padding: 10rpx;
- background-color: #f2d22d;
- border-radius: 10rpx;
- position: relative;
- margin-top: 30rpx;
- }
- .circularmark p {
- font-size: 85%;
- text-align: center;
- font-weight: 800;
- }
- .circularmark image {
- width: 60rpx;
- height: 68rpx;
- position: absolute;
- top: -30%;
- left: -10%;
- }
- .btnn {
- background-color: #3296FA;
- border-radius: 20rpx;
- font-size: 25rpx;
- line-height: 34rpx;
- }
- .markcontent {
- // width: 100%;
- // background-color: #E4E4E4;
- margin: 0 30rpx;
- border-radius: 20rpx;
- padding-top: 2%;
- padding-bottom: 2%;
- }
- .markcontent p {
- font-size: 24rpx;
- margin: 10rpx 0;
- }
- .markcontent span {
- font-size: 24rpx;
- // color: #333333;
- // margin: 3% ;
- }
- .getsamcondi {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .interval2 {
- width: 100%;
- height: 100rpx;
- background-color: #E4E4E4;
- margin-top: 5%;
- }
- .markcontent1 {
- width: 100%;
- border-radius: 20rpx;
- padding-top: 2%;
- padding-bottom: 2%;
- }
- .markcontent1 p {
- font-size: 24rpx;
- // color: #333333;
- // margin: 3% ;
- // text-indent: 2em;
- }
- .trademark {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- background-color: #f2d22d;
- margin: 0 auto;
- }
- .trademark image {
- width: 100%;
- height: 100%;
- }
- .diagram {
- width: 100%;
- // height: 1000rpx;
- }
- .diagram image {
- width: 100%;
- // height: 100% ;
- }
- .diagram-pdf {
- padding: 0 20rpx;
- width: 100%;
- height: 100rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .diagram-pdf image {
- width: 60rpx;
- height: 60rpx;
- }
- .diagram-pdf p {
- width: 50%;
- font-size: 32rpx;
- }
- .diagram-pdf button {
- background-color: #FFFFFF;
- border: 2rpx solid #f2d22d;
- border-radius: 20rpx;
- font-size: 32rpx;
- // letter-spacing: 5rpx;
- font-weight: 500;
- position: relative;
- }
- .but1 {
- width: 220rpx;
- background-color: #f2d22d;
- border-radius: 20rpx;
- font-size: 32rpx;
- line-height: 200%;
- // letter-spacing: 10rpx;
- font-weight: 500;
- height: 80%;
- // padding: 0 50rpx;
- &.on {
- background-color: #C0C0C0;
- }
- }
- .but5 {
- background-color: #f2d22d;
- border-radius: 20rpx;
- font-size: 32rpx;
- line-height: 200%;
- letter-spacing: 10rpx;
- font-weight: 500;
- height: 80%;
- text-align: center;
- padding: 0 10rpx;
- &.on {
- background-color: #C0C0C0;
- }
- }
- /** 必须提升样式优先权(!important) **/
- button[disabled] {
- // width: 60%;
- border-radius: 20rpx;
- font-size: 36rpx;
- line-height: 200%;
- // letter-spacing: 10rpx;
- font-weight: 500;
- height: 80%;
- color: white !important;
- background: #c4c1c1 !important;
- }
- .but2 {
- // width: 25%;
- background-color: #FFFFFF;
- border: 2rpx solid #f2d22d;
- border-radius: 20rpx;
- font-size: 36rpx;
- line-height: 180%;
- // letter-spacing: 10rpx;
- font-weight: 500;
- position: relative;
- // text-indent: 0.5em;
- height: 80%;
- }
- .but2 image {
- width: 19%;
- height: 56%;
- position: absolute;
- left: 9%;
- top: 21%;
- }
- .signup {
- box-shadow: 0rpx 5rpx 40rpx #ccc;
- width: 100%;
- position: fixed;
- height: 90rpx;
- padding: 2% 0;
- background-color: #ffffff;
- bottom: 0rpx;
- display: flex;
- justify-content: space-around;
- align-items: center;
- }
- .pick {
- width: 50rpx;
- height: 50rpx;
- vertical-align: middle;
- }
- .nex {
- width: 100rpx;
- height: 20rpx;
- vertical-align: middle;
- }
- .sampledrawing {
- display: flex;
- width: 96%;
- margin: 0 auto 50rpx;
- }
- .samplecharacter {
- flex: 1;
- margin-top: 2%;
- }
- .samplecharacter p {
- padding: 1%;
- }
- /deep/.uni-popup__content {
- background-color: #4CD964;
- border-radius: 20rpx !important;
- }
- /deep/.uni-popup__mask {
- background: rgba(0, 0, 0, 0.5) !important;
- }
- .butto {
- text-align: center;
- }
- /deep/ .mini-btn1 {
- height: 75rpx;
- width: 270rpx;
- line-height: 70rpx;
- margin: 10rpx 0;
- font-size: 30rpx;
- // box-shadow: 0rpx 0rpx 0rpx 5rpx #f2d22d;
- border: 1rpx solid #f2d22d !important;
- }
- /deep/ .mini-btn2 {
- height: 75rpx;
- width: 350rpx;
- line-height: 70rpx;
- margin: 10rpx 0;
- font-size: 30rpx;
- background-color: #f2d22d;
- // box-shadow: 0rpx 0rpx 0rpx 5rpx #f2d22d;
- }
- /deep/ .uni-data-checklist .checklist-group .checklist-box.is--tag {
- background-color: #FFFFFF !important;
- box-shadow: 0rpx 0rpx 6rpx 0rpx #464100;
- border-radius: 10rpx !important;
- }
- /deep/ .uni-data-checklist .checklist-group .checklist-box.is--tag.is-checked {
- background-color: #f2d22d !important;
- }
- /deep/.uni-data-checklist .checklist-group .checklist-box.is--tag.is-checked .checklist-text {
- color: #333333 !important;
- }
- /deep/.buu .uni-data-checklist .checklist-group {
- flex-direction: column !important;
- }
- .surplus p {
- margin-bottom: 17%;
- margin-top: 8%;
- font-size: 80%;
- }
- .circular {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- background-color: #28EA71;
- margin: 0 auto;
- }
- .circular image {
- width: 60%;
- height: 60%;
- padding: 20%;
- }
- .tii {
- text-align: center;
- font-size: 26rpx;
- margin-top: 2%;
- }
- .tii2 {
- text-align: center;
- font-size: 26rpx;
- margin-top: 2%;
- background-color: #FFFFFF;
- }
- .errar {
- background-color: #FFFFFF;
- }
- .sharepage {
- width: 90%;
- margin: 0 auto;
- position: relative;
- }
- .Tasktext1 {
- // padding-top: 5% ;
- padding: 0 0 0 1%;
- height: 80rpx;
- margin-top: 7%;
- text-align: center;
- }
- .Tasktext1 span {
- color: #333333;
- font-size: 100%;
- font-weight: 550;
- text-indent: 2em;
- }
- .Tasktext1 image {
- vertical-align: middle;
- width: 80rpx;
- height: 80rpx;
- display: inline-block;
- padding-right: 14rpx;
- }
- .sharemap {
- margin: 0 auto;
- text-align: center;
- margin-top: 5%;
- }
- .sharemap image {
- width: 400rpx;
- height: 400rpx;
- }
- .Tasktext2 {
- // padding-top: 5% ;
- padding: 0 0 0 1%;
- // height: 80rpx;
- margin-top: 2%;
- // text-align: center;
- }
- .Tasktext2 span {
- color: #333333;
- font-size: 88%;
- font-weight: 600;
- text-indent: 2em;
- }
- .Tasktext2 image {
- vertical-align: middle;
- width: 30rpx;
- height: 30rpx;
- display: inline-block;
- padding-right: 14rpx;
- }
- .textti p {
- font-size: 60%;
- color: #999999;
- text-align: center;
- }
- .immg image {
- width: 200rpx;
- height: 200rpx;
- }
- .immg {
- line-height: 150%;
- }
- .immg p {
- color: #333333;
- font-size: 90%;
- font-weight: 600;
- }
- .warr p {
- font-weight: 500;
- font-size: 90%;
- &.lor {
- border-bottom: 2rpx solid #f2d22d;
- }
- }
- .tip_box {
- position: fixed;
- right: 0;
- z-index: 9999;
- display: flex;
- justify-content: flex-end;
- align-items: flex-end;
- flex-direction: column;
- margin-top: -40rpx;
- .arrow {
- width: 0;
- height: 0;
- border: 10rpx solid;
- border-color: transparent;
- }
- .container {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 4rpx 10px;
- .tips {
- flex: 1;
- }
- }
- }
- .popup-content {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- </style>
|