bargainingAssistance.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693
  1. <template>
  2. <div class="bargaining-assistance">
  3. <!-- 邀请人提示 -->
  4. <div class="inviter-tips" v-if="+type">
  5. <img src="@/assets/image/claimCloudPhone/inviter-tips.png" alt="" />
  6. <div>好友注册获得助力 好友下单加速助力</div>
  7. </div>
  8. <!-- 被邀请人提示 -->
  9. <div v-else class="invitee-tips">
  10. <div class="invitee-tips-text">
  11. <div>亲,我在用<span>双子星云手机</span>,它可以帮我:</div>
  12. <div>
  13. <div style="animation-delay: 0.5s">
  14. <van-icon name="success" /> <span>24小时</span>运行游戏 / 聊天 /
  15. 看视频
  16. </div>
  17. <div style="animation-delay: 1s">
  18. <van-icon name="success" /> 双子星云手机已经帮我节省<span>
  19. 10086 </span
  20. >小时
  21. </div>
  22. <div style="animation-delay: 1.5s">
  23. <van-icon name="success" />
  24. 我得任务全做完了,游戏升级哇哇快,现在官方活动领云机,麻烦帮我助力!
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <!-- 砍价进度 -->
  30. <div
  31. class="bargaining-assistance-main"
  32. :class="{ 'bargaining-assistance-main-animation': !+type }"
  33. >
  34. <!-- 被邀请人助力、邀请人砍价 -->
  35. <template>
  36. <div class="package-name">
  37. <span> {{ info.phoneType }}{{ info.validityPeriod }}天</span>
  38. </div>
  39. <div class="package-price"><span>¥</span>{{ info.totalAmount }}</div>
  40. <div class="package-progress">
  41. <customProgress v-model="info.schedule" />
  42. </div>
  43. <div class="package-tips">
  44. <div>
  45. 仅差<span>{{ info.remainingPrice }}元</span>
  46. </div>
  47. <div>
  48. 必得价值<span>{{ info.totalAmount }}元</span>的免费云机
  49. </div>
  50. </div>
  51. <div
  52. :class="['package-btn', { end: +type === 7, 'mb-24': !+type }]"
  53. @click="btnFun"
  54. >
  55. {{ btnName }}
  56. </div>
  57. <div class="package-expire" v-if="+type">
  58. 免单失效时间:<van-count-down :time="time" />
  59. </div>
  60. </template>
  61. <van-dialog v-model="assistanceVisible" :showConfirmButton="false">
  62. <div class="invitee-to-claim">
  63. <div class="invitee-to-claim_btn" @click="loginVisible = true">
  64. 免费领取
  65. </div>
  66. </div>
  67. </van-dialog>
  68. </div>
  69. <!-- 邀请人显示 -->
  70. <template v-if="+type">
  71. <!-- 砍价记录 -->
  72. <div class="bargaining-record">
  73. <div class="title">砍价记录</div>
  74. <div class="container">
  75. <loadList
  76. ref="assistRecodeList"
  77. url="activity/v5/assist/operation/assistRecodeList"
  78. description="暂无砍价记录"
  79. >
  80. <template #default="{ list }">
  81. <div
  82. v-for="item in list"
  83. :key="item.id"
  84. class="bargaining-record-item"
  85. >
  86. <div class="bargaining-record-item_info">
  87. <div>{{ item.surfaceName }}</div>
  88. <div v-if="item.assistType === 1">
  89. 道具砍掉<span>{{ item.assistPrice }}元</span>
  90. </div>
  91. <div
  92. v-else-if="item.assistType === 2 || item.assistType === 3"
  93. >
  94. 为您砍价<span>{{ item.assistPrice }}元</span>
  95. </div>
  96. <div v-else>为您加油打气</div>
  97. </div>
  98. </div>
  99. </template>
  100. </loadList>
  101. </div>
  102. </div>
  103. <!-- 云机发放记录 -->
  104. <div class="distribution-records">
  105. <div class="title">云机发放记录</div>
  106. <div class="container">
  107. <div>
  108. <div>序号</div>
  109. <div>云机名称</div>
  110. <div>套餐类型</div>
  111. <div>云机时长</div>
  112. <div>购买类型</div>
  113. </div>
  114. <div>
  115. <loadList
  116. ref="assistGetPhoneRecode"
  117. url="activity/v5/assist/operation/assistGetPhoneRecode"
  118. description="当前您还没有白嫖到云手机"
  119. >
  120. <template #default="{ list }">
  121. <div
  122. v-for="(item, index) in list"
  123. :key="item.id"
  124. class="distribution-records-item"
  125. >
  126. <div>{{ index + 1 }}</div>
  127. <div>{{ item.diskName }}</div>
  128. <div>{{ item.phoneTypeStr }}</div>
  129. <div>{{ item.validTime }}天</div>
  130. <div>{{ ['', '购买', '续费'][item.dataType] }}</div>
  131. </div>
  132. </template>
  133. </loadList>
  134. </div>
  135. </div>
  136. </div>
  137. </template>
  138. <!-- 参加活动的所有信息 -->
  139. <template v-if="barrageList.length">
  140. <div class="barrage"></div>
  141. </template>
  142. <div class="rule" @click="ruleVisible = true" v-if="+type">规则</div>
  143. <!-- 规则弹窗 -->
  144. <van-dialog v-model="ruleVisible" :showConfirmButton="false">
  145. <div class="rule-title">活动规则</div>
  146. <div class="rule-content">
  147. <div v-html="ruleHtml"></div>
  148. </div>
  149. <div class="rule-close">
  150. <van-icon name="cross" @click="ruleVisible = false" />
  151. </div>
  152. </van-dialog>
  153. <!-- 邀请人首次到砍价的页面的弹窗 -->
  154. <van-dialog
  155. v-model="bargainingVisible"
  156. :showConfirmButton="false"
  157. class="dialog-bargaining"
  158. >
  159. <template v-if="!bargainingTipsBool">
  160. <div class="bargaining-img">
  161. <img
  162. src="@/assets/image/claimCloudPhone/red-packet-title.png"
  163. alt=""
  164. class="red-packet-title"
  165. />
  166. <lottie class="glory" :data="glory" :key="'glory'" />
  167. <lottie
  168. :key="'red-packet'"
  169. class="red-packet"
  170. :data="redPacket"
  171. @click.native="bargainingFun(true)"
  172. />
  173. </div>
  174. </template>
  175. <template v-if="bargainingTipsBool">
  176. <div class="bargaining-amount">
  177. <div class="bargaining-amount-text">
  178. 恭喜您,砍价成功<span>{{ bargainingAmount }}元</span>
  179. </div>
  180. <lottie
  181. class="species"
  182. :data="species"
  183. v-if="species"
  184. :key="'species'"
  185. />
  186. </div>
  187. </template>
  188. </van-dialog>
  189. <!-- 退出活动页的弹窗 -->
  190. <van-dialog v-model="exitVisible" :showConfirmButton="false">
  191. <div class="exit">
  192. <div class="exit-content">
  193. <div>确定要退出吗?</div>
  194. <div>
  195. 仅差<span>{{ info.remainingPrice }}元</span>免费带走云机
  196. </div>
  197. <div class="exit-content-progress">
  198. <customProgress v-model="info.schedule" />
  199. </div>
  200. <div class="exit-content-btn">
  201. <img
  202. @click="exitVisible = false"
  203. src="@/assets/image/claimCloudPhone/Inviting-others-img.png"
  204. alt=""
  205. />
  206. <div class="exit-content-btn_leave" @click="leaveFun">狠心离开</div>
  207. </div>
  208. </div>
  209. <img src="@/assets/image/claimCloudPhone/inviter-exit.png" alt="" />
  210. <lottie class="exit-glory" :data="glory" :key="'exit-glory'" />
  211. </div>
  212. </van-dialog>
  213. <!-- 砍价成功的弹窗-->
  214. <van-dialog
  215. v-model="successfulBargainingVisible"
  216. :showConfirmButton="false"
  217. >
  218. <div class="bargaining-success">
  219. <div class="bargaining-success-title">恭喜您,砍价成功</div>
  220. <div class="bargaining-success-tips">
  221. 您的云手机【{{ info.diskName }}】发放成功/续费成功
  222. </div>
  223. <div class="bargaining-success-btn">
  224. <div @click="claimTheNextOne">免费领下一台云机</div>
  225. <div @click="leaveFun">返回云手机首页</div>
  226. </div>
  227. </div>
  228. </van-dialog>
  229. <!-- 免单时间过期弹窗 -->
  230. <van-dialog v-model="expireVisible" :showConfirmButton="false">
  231. <div class="expire">
  232. <div class="expire-btn" @click="claimTheNextOne">免费领下一台云机</div>
  233. </div>
  234. </van-dialog>
  235. <!-- 被邀请人登录 -->
  236. <van-dialog v-model="loginVisible" :showConfirmButton="false">
  237. <div class="login">
  238. <div class="login-title">双子星快捷登录</div>
  239. <van-field
  240. placeholder="手机号"
  241. type="digit"
  242. v-model="laoginData.phone"
  243. clearable
  244. maxLength="11"
  245. />
  246. <van-field
  247. placeholder="验证码"
  248. v-model="laoginData.code"
  249. clearable
  250. type="digit"
  251. maxLength="6"
  252. >
  253. <template #button>
  254. <div
  255. :class="[
  256. 'login-code',
  257. {
  258. disabled:
  259. codeNumber !== '获取验证码' || laoginData.phone.length < 11,
  260. },
  261. ]"
  262. @click="getCode"
  263. >
  264. {{ codeNumber }}
  265. </div>
  266. </template>
  267. </van-field>
  268. <van-button
  269. color="#3666F2"
  270. :disabled="
  271. !agreementBool ||
  272. !laoginData.code ||
  273. laoginData.phone.length < 11 ||
  274. loginLoading
  275. "
  276. @click="login"
  277. >
  278. <template v-if="loginLoading"> 正在登录中... </template>
  279. <template v-else> 登录 </template>
  280. </van-button>
  281. <div class="login-agreement">
  282. <van-checkbox icon-size="16px" v-model="agreementBool">
  283. 通过登录即可完成注册,成为我们的新用户登录后表示同意
  284. <span @click.stop="toAgreement">用户协议</span>
  285. </van-checkbox>
  286. </div>
  287. </div>
  288. </van-dialog>
  289. <van-dialog
  290. v-model="endVisible"
  291. :showConfirmButton="false"
  292. :before-close="beforeClose"
  293. style="background: #fff"
  294. >
  295. <img
  296. src="@/assets/image/claimCloudPhone/end-visible-img.png"
  297. @click="endConfirm"
  298. class="end-visible-img"
  299. />
  300. <!-- <div style="text-align: center; padding: 10px; color: #999">
  301. 感谢您对我们应用的支持和参与。<br />
  302. 我们的活动已经结束了,<br />
  303. 但是我们会不断努力,<br />
  304. 为您带来更多精彩的活动和内容。<br />
  305. </div> -->
  306. </van-dialog>
  307. <Verify
  308. @success="success"
  309. mode="pop"
  310. captchaType="blockPuzzle"
  311. :imgSize="{ width: '300px', height: '155px' }"
  312. ref="verify"
  313. ></Verify>
  314. </div>
  315. </template>
  316. <script>
  317. import * as species from '@/assets/lottie/species/data.json';
  318. import * as redPacket from '@/assets/lottie/redPacket/data.json';
  319. import * as glory from '@/assets/lottie/glory/data.json';
  320. import { sha256 } from 'js-sha256';
  321. import customProgress from './customProgress.vue';
  322. import loadList from '@/components/loadList';
  323. import { fileKeyToUrl } from '@/plugins/file-center.js';
  324. import Verify from '@/components/verifition/Verify';
  325. import { writeToClipboard } from '@/plugins/plugins.js';
  326. import lottie from '@/components/lottie';
  327. export default {
  328. props: {
  329. operateActivityId: {
  330. type: [String, Number],
  331. default: '',
  332. },
  333. type: {
  334. type: [Number, String],
  335. default: '',
  336. },
  337. getSystemTime: {
  338. type: Function,
  339. default: () => {
  340. return () => {};
  341. },
  342. },
  343. leaveFun: {
  344. type: Function,
  345. default: () => {
  346. return () => {};
  347. },
  348. },
  349. wxIntercept: {
  350. type: Function,
  351. default: () => {
  352. return () => {};
  353. },
  354. },
  355. inviteeData: {
  356. type: Object,
  357. default: () => {
  358. return {};
  359. },
  360. },
  361. },
  362. data() {
  363. return {
  364. total: 50, // 砍价百分比
  365. barrageList: [], // 滚动轮播数据
  366. ruleVisible: false, // 规则弹窗
  367. bargainingVisible: false, // 首次砍价弹窗
  368. bargainingTipsBool: false, // 是否切换成砍价金额的页面
  369. exitVisible: false, // 退出弹窗
  370. successfulBargainingVisible: false, // 砍价成功弹窗
  371. expireVisible: false, // 免单时间过期弹窗
  372. loginVisible: false, // 被邀请人登录框
  373. agreementBool: false, // 是否勾选协议
  374. ruleHtml: '', // 规则内容
  375. info: {}, // 砍价相关信息
  376. bargainingAmount: '', // 砍价金额
  377. systemTime: '', // 系统时间
  378. assistanceVisible: false, // 是否触发助力
  379. laoginData: {
  380. // 被邀请人登录信息
  381. phone: '',
  382. code: '',
  383. },
  384. codeNumber: '获取验证码',
  385. loginLoading: false,
  386. endVisible: false, // 被邀请人活动结束弹窗
  387. species,
  388. redPacket,
  389. glory,
  390. };
  391. },
  392. components: {
  393. customProgress,
  394. loadList,
  395. Verify,
  396. lottie,
  397. },
  398. mounted() {
  399. if (sessionStorage.getItem('isAgreementBool')) {
  400. this.loginVisible = true;
  401. this.laoginData.phone = sessionStorage.getItem('invitedPhone');
  402. this.laoginData.code = sessionStorage.getItem('invitedCode');
  403. sessionStorage.removeItem('isAgreementBool');
  404. sessionStorage.removeItem('invitedPhone');
  405. sessionStorage.removeItem('invitedCode');
  406. }
  407. if (+this.type === 1 || +this.type === 2 || +this.type === 7) {
  408. this.getRule();
  409. this.getAssistAwardRecode();
  410. }
  411. setTimeout(() => {
  412. this.bargainingStatus(true);
  413. });
  414. },
  415. computed: {
  416. time() {
  417. const { validityPeriodTimeStamp = 0 } = this.info;
  418. let time = null;
  419. time = validityPeriodTimeStamp
  420. ? validityPeriodTimeStamp - this.systemTime * 1000
  421. : 0;
  422. time = +this.type === 7 ? 0 : time;
  423. return time;
  424. },
  425. btnName() {
  426. let name = null;
  427. if (+this.type === 7) {
  428. name = '活动已到期';
  429. } else {
  430. name = +this.type
  431. ? this.info.bargainingStatus === 1
  432. ? `继续砍价${this.info.remainingQuantity || 0}次`
  433. : '邀请好友助力免单'
  434. : '帮他助力';
  435. }
  436. return name;
  437. },
  438. },
  439. methods: {
  440. // 轮播活动参加的人的信息
  441. startBarrage() {
  442. const barrage = document.querySelector('.barrage');
  443. if (!barrage.childNodes.length) {
  444. const data = this.barrageList[0];
  445. this.barrageList.shift();
  446. this.barrageList.push(data);
  447. barrage.appendChild(writeIn(data));
  448. }
  449. const first = barrage.childNodes[0];
  450. setTimeout(() => {
  451. first.className = 'start';
  452. first.addEventListener('animationstart', () => {
  453. const data = this.barrageList[0];
  454. this.barrageList.shift();
  455. this.barrageList.push(data);
  456. const div = writeIn(data);
  457. barrage.appendChild(div);
  458. setTimeout(() => {
  459. div.style = 'opacity: 1';
  460. }, 100);
  461. });
  462. first.addEventListener('animationend', () => {
  463. barrage.removeChild(first);
  464. this.startBarrage();
  465. });
  466. }, 1000);
  467. function writeIn({ price, phoneNumber, phoneType, duration }) {
  468. const div = document.createElement('div');
  469. div.style = 'opacity: 0';
  470. div.innerHTML = `<div>
  471. <div>${phoneNumber}</div>
  472. <div class="free">免单</div>
  473. </div>
  474. <div>${phoneType}${duration}天,价值<span>${price}元</span></div>`;
  475. return div;
  476. }
  477. },
  478. bargainingFun(bool = false) {
  479. // 首次砍价的时候进此判断
  480. if (bool) {
  481. this.$toast.loading({
  482. message: '加载中...',
  483. forbidClick: true,
  484. duration: 0,
  485. });
  486. const { menuRuleId, userCardId } = this.$route.query;
  487. const obj = {
  488. operateActivityId: this.operateActivityId,
  489. menuRuleId,
  490. };
  491. // 如果是续费,选择了对应云机,需要传云机id
  492. if (userCardId) obj.userCardId = userCardId;
  493. this.$axios
  494. .$post('activity/v5/assist/bargaining/userSelectedPackage', obj)
  495. .then((res) => {
  496. if (res.success) {
  497. // 砍价金额
  498. this.bargainingAmount = res.data.fristKnifeAmount;
  499. setTimeout(() => {
  500. this.bargainingTipsBool = true;
  501. });
  502. // 重新获取用户最新的数据
  503. setTimeout(this.bargainingStatus, 1000);
  504. }
  505. })
  506. .catch((error) => {
  507. setTimeout(() => {
  508. this.$toast(error.message);
  509. });
  510. })
  511. .finally(() => {
  512. this.$toast.clear();
  513. });
  514. return;
  515. }
  516. this.chopAKnife();
  517. },
  518. // 获取规则
  519. getRule() {
  520. this.$axios
  521. .$get('public/v4/agreement/content', {
  522. params: { agreementCoding: 'YDQLBHD10000' },
  523. })
  524. .then((res) => {
  525. if (res.success) {
  526. const html = res.data.content;
  527. const rx = /<body[^>]*>([\s\S]+?)<\/body>/i;
  528. let m = rx.exec(html);
  529. if (m) {
  530. m = m[1];
  531. }
  532. this.ruleHtml = m;
  533. }
  534. });
  535. },
  536. // 获取用户数据接口
  537. bargainingStatus(bool = false) {
  538. if (bool) {
  539. this.$toast.loading({
  540. message: '加载中...',
  541. forbidClick: true,
  542. duration: 0,
  543. });
  544. }
  545. const params = {
  546. operateActivityId: localStorage.getItem('auth.operateActivityId'),
  547. };
  548. if (Object.keys(this.inviteeData).length) {
  549. params.userLaunchId = this.inviteeData.userLaunchId;
  550. }
  551. this.$axios
  552. .$get('activity/v5/assist/bargaining/current/bargainingStatus', {
  553. params,
  554. })
  555. .then(async (res) => {
  556. if (res.success) {
  557. this.info = res.data;
  558. // 砍价记录、云机发放记录
  559. if (
  560. [1, 2, 7].includes(this.info.bargainingStatus) &&
  561. this.$refs.assistRecodeList &&
  562. this.$refs.assistGetPhoneRecode
  563. ) {
  564. this.$refs.assistRecodeList.data = [];
  565. this.$refs.assistGetPhoneRecode.data = [];
  566. this.$refs.assistRecodeList.list();
  567. this.$refs.assistGetPhoneRecode.list();
  568. }
  569. localStorage.setItem(
  570. 'bargainingStatusInfo',
  571. JSON.stringify(this.info),
  572. );
  573. // 如果是被邀请人就不需要走下面流程
  574. if (Object.keys(this.inviteeData).length) {
  575. // 被邀请人活动结束
  576. if (res.data.bargainingStatus === 5) this.endVisible = true;
  577. return;
  578. }
  579. switch (+this.type) {
  580. case 3: // 成功,领取下一台云机界面
  581. this.successfulBargainingVisible = true;
  582. break;
  583. case 4: // 失败,领取下一台云机界面
  584. this.expireVisible = true;
  585. return;
  586. case 7: // 活动已结束
  587. return;
  588. }
  589. const data = await this.getSystemTime();
  590. this.systemTime = data.data;
  591. if (this.info.bargainingStatus === 0) {
  592. this.bargainingVisible = true;
  593. return;
  594. }
  595. // 如果是安卓客户端登录的情况且bargainingStatus为 1 2 ,
  596. if (
  597. this.info.bargainingStatus === 1 ||
  598. this.info.bargainingStatus === 2
  599. ) {
  600. // 对安卓返回键做拦截
  601. if (
  602. (this.$userAgent.isSzx || this.$userAgent.isSzxBrowser) &&
  603. this.$userAgent.isAndroid
  604. ) {
  605. // 旧版本做兼容,如果有的情况下的话就显示
  606. if (window.native.webBackStatus) {
  607. window.native.webBackStatus(true);
  608. window.appGoBackCallback = () => {
  609. this.exitVisible = true;
  610. };
  611. }
  612. }
  613. // 对微信做拦截
  614. if (this.$userAgent.isWx) {
  615. this.wxIntercept(() => {
  616. history.pushState(null, null, document.URL);
  617. this.exitVisible = true;
  618. });
  619. }
  620. }
  621. }
  622. })
  623. .catch((error) => {
  624. this.$toast(error.message);
  625. })
  626. .finally(() => {
  627. if (this.info.bargainingStatus !== 0) this.bargainingVisible = false;
  628. this.$toast.clear();
  629. });
  630. },
  631. // 滚动的相关数据
  632. getAssistAwardRecode() {
  633. this.$axios
  634. .$get('activity/v5/assist/operation/getAssistAwardRecode', {})
  635. .then((res) => {
  636. if (res.success) {
  637. this.barrageList = res.data;
  638. setTimeout(() => {
  639. this.barrageList.length && this.startBarrage();
  640. });
  641. }
  642. });
  643. },
  644. // 领取下一台手机
  645. claimTheNextOne() {
  646. this.$toast.loading({
  647. message: '加载中...',
  648. forbidClick: true,
  649. duration: 0,
  650. });
  651. this.$axios
  652. .$get('activity/v5/assist/operation/reportCutStatus', {
  653. params: {
  654. userLaunchId: this.info.userLaunchId,
  655. },
  656. })
  657. .then((res) => {
  658. if (res.success) {
  659. // 解除安卓返回按键
  660. if (
  661. (this.$userAgent.isSzx || this.$userAgent.isSzxBrowser) &&
  662. this.$userAgent.isAndroid
  663. ) {
  664. window.native.webBackStatus && window.native.webBackStatus(false);
  665. }
  666. this.$router.replace('/claimCloudPhone?exit=1&bool=1');
  667. }
  668. })
  669. .catch((error) => {
  670. setTimeout(() => {
  671. this.$toast(error.message);
  672. });
  673. })
  674. .finally(() => {
  675. this.$toast.clear();
  676. });
  677. },
  678. // 砍一刀
  679. chopAKnife() {
  680. this.$toast.loading({
  681. message: '加载中...',
  682. forbidClick: true,
  683. duration: 0,
  684. });
  685. this.$axios
  686. .$post('activity/v5/assist/operation/chopAKnife')
  687. .then((res) => {
  688. if (res.success) {
  689. this.bargainingTipsBool = true;
  690. this.bargainingAmount = res.data;
  691. setTimeout(() => {
  692. this.bargainingVisible = true;
  693. });
  694. // 重新获取用户最新的数据
  695. setTimeout(this.bargainingStatus, 1000);
  696. }
  697. })
  698. .catch((error) => {
  699. setTimeout(() => {
  700. this.$toast(error.message);
  701. });
  702. setTimeout(() => {
  703. this.$toast.clear();
  704. }, 500);
  705. })
  706. .finally(() => {
  707. this.$toast.clear();
  708. });
  709. },
  710. btnFun() {
  711. if (+this.type === 7) return;
  712. if (!+this.type) this.assistanceVisible = true;
  713. if (+this.type) {
  714. switch (this.info.bargainingStatus) {
  715. case 1:
  716. this.chopAKnife();
  717. break;
  718. case 2:
  719. this.$toast.loading({
  720. message: '加载中...',
  721. forbidClick: true,
  722. duration: 0,
  723. });
  724. this.$axios
  725. .$post('activity/v5/assist/bargaining/getGenerateInvitationLink')
  726. .then(async (res) => {
  727. if (res.success) {
  728. res.data.desc = res.data.content;
  729. res.data.link = res.data.url;
  730. res.data.imgUrl = fileKeyToUrl(res.data.imgUrl);
  731. const shareInfo = { ...res.data };
  732. if (this.$userAgent.isSzx || this.$userAgent.isSzxBrowser) {
  733. this.$native.share(shareInfo);
  734. } else {
  735. writeToClipboard(
  736. res.data.link,
  737. () => {
  738. setTimeout(() => {
  739. this.$toast('链接复制成功');
  740. });
  741. },
  742. () => {
  743. setTimeout(() => {
  744. this.$toast('链接复制失败');
  745. });
  746. },
  747. );
  748. }
  749. }
  750. })
  751. .finally(() => {
  752. this.$toast.clear();
  753. });
  754. break;
  755. }
  756. }
  757. },
  758. // 获取验证码
  759. getCode() {
  760. if (
  761. this.laoginData.phone.length < 11 ||
  762. this.codeNumber !== '获取验证码'
  763. ) {
  764. return;
  765. }
  766. if (!/^1[3456789]\d{9}$/.test(this.laoginData.phone)) {
  767. this.$toast('手机号码有误,请重填');
  768. return;
  769. }
  770. this.$refs.verify.show();
  771. },
  772. // 登录
  773. async login() {
  774. this.loginLoading = true;
  775. let uuid = localStorage.getItem('uuid');
  776. if (!uuid) {
  777. const url = URL.createObjectURL(new Blob());
  778. uuid = url.toString();
  779. URL.revokeObjectURL(url);
  780. uuid = uuid.substring(uuid.lastIndexOf('/') + 1);
  781. // 去除 UUID 字符串中的连字符
  782. const uuidHex = uuid.replace(/-/g, '');
  783. // 将十六进制字符串解析为大整数
  784. const uuidNumber = BigInt('0x' + uuidHex);
  785. uuid = uuidNumber.toString().substring(0, 20); // 将大整数转换为字符串格式
  786. localStorage.setItem('uuid', uuid);
  787. }
  788. const data = await this.getSystemTime();
  789. const registerTime = this.timestampToTime(data.data);
  790. const params = {
  791. invitationType: 6,
  792. registerSource: 102,
  793. uuid,
  794. registerTime,
  795. };
  796. const headers = {
  797. devicesId: uuid,
  798. registerSign: this.jm(registerTime),
  799. };
  800. Object.assign(params, this.laoginData);
  801. Object.assign(params, this.inviteeData);
  802. params.activityId = params.operateActivityId;
  803. delete params.operateActivityId;
  804. this.$axios
  805. .$post('user/v5/client/register/forH5', params, { headers })
  806. .then((res) => {
  807. if (res.success) {
  808. localStorage.setItem('phone', params.phone);
  809. localStorage.setItem('auth._token.password', res.data.token);
  810. localStorage.setItem('token', res.data.token);
  811. localStorage.setItem(
  812. 'dataInfo',
  813. JSON.stringify({ type: Object, data: res.data }),
  814. );
  815. this.$toast('登录成功');
  816. const url = res.data.jumpToPage
  817. ? '/claimCloudPhone?bool=1'
  818. : '/claimCloudPhone/firstReward';
  819. this.$router[res.data.jumpToPage ? 'replace' : 'push'](url);
  820. }
  821. })
  822. .catch((error) => {
  823. setTimeout(() => {
  824. this.$toast(error.message);
  825. });
  826. })
  827. .finally(() => {
  828. this.loginLoading = false;
  829. });
  830. },
  831. timestampToTime(timestamp) {
  832. var date = new Date(timestamp * 1000);
  833. var Y = date.getFullYear() + '-';
  834. var M =
  835. (date.getMonth() + 1 < 10
  836. ? '0' + (date.getMonth() + 1)
  837. : date.getMonth() + 1) + '-';
  838. var D =
  839. (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
  840. var h =
  841. (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
  842. var m =
  843. (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) +
  844. ':';
  845. var s =
  846. date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
  847. return Y + M + D + h + m + s;
  848. },
  849. jm(systemTime) {
  850. const registerSign = sha256('Register_SZX_2023:' + systemTime);
  851. return registerSign;
  852. },
  853. // 跳转对应协议
  854. toAgreement() {
  855. sessionStorage.setItem('invitedPhone', this.laoginData.phone);
  856. sessionStorage.setItem('invitedCode', this.laoginData.code);
  857. this.$router.push(
  858. '/claimCloudPhone/agreement?agreementCoding=XYPZYHXY2002',
  859. );
  860. },
  861. success(data) {
  862. this.$toast.loading({
  863. message: '加载中...',
  864. forbidClick: true,
  865. duration: 0,
  866. });
  867. const params = {
  868. type: 'common',
  869. authorizationType: 4,
  870. phone: this.laoginData.phone,
  871. captchaVerification: data.captchaVerification,
  872. };
  873. this.$axios
  874. .$post('activity/v5/assist/bargaining/phone/send/activity', params)
  875. .then((res) => {
  876. if (res.success) {
  877. this.codeNumber = 60;
  878. const timer = setInterval(() => {
  879. this.codeNumber--;
  880. if (this.codeNumber === 0) {
  881. this.codeNumber = '获取验证码';
  882. clearInterval(timer);
  883. }
  884. }, 1000);
  885. setTimeout(() => {
  886. this.$toast('获取成功');
  887. });
  888. }
  889. })
  890. .catch((error) => {
  891. setTimeout(() => {
  892. this.$toast(error.message);
  893. });
  894. })
  895. .finally(() => {
  896. this.$toast.clear();
  897. });
  898. },
  899. endConfirm() {
  900. location.href = 'https://www.androidscloud.com';
  901. },
  902. beforeClose(action, done) {
  903. done(false);
  904. },
  905. },
  906. };
  907. </script>
  908. <style lang="less" scoped>
  909. .bargaining-assistance {
  910. @keyframes invitee-tips-text {
  911. 0% {
  912. opacity: 0;
  913. }
  914. 100% {
  915. opacity: 1;
  916. }
  917. }
  918. height: 100%;
  919. position: relative;
  920. .inviter-tips,
  921. .invitee-tips {
  922. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  923. }
  924. .inviter-tips {
  925. & > img {
  926. height: 60px;
  927. display: block;
  928. margin: 0 auto;
  929. }
  930. & > div {
  931. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  932. font-weight: 400;
  933. font-size: 12px;
  934. color: #ffffff;
  935. line-height: 17px;
  936. text-align: center;
  937. font-style: normal;
  938. margin-top: 6px;
  939. margin-bottom: 14px;
  940. }
  941. }
  942. .invitee-tips {
  943. .invitee-tips-user {
  944. font-weight: bold;
  945. font-size: 18px;
  946. color: #ffffff;
  947. line-height: 22px;
  948. text-align: left;
  949. font-style: normal;
  950. margin-bottom: 8px;
  951. }
  952. .invitee-tips-text {
  953. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  954. font-weight: 500;
  955. font-size: 18px;
  956. color: #ffffff;
  957. line-height: 22px;
  958. font-style: normal;
  959. & > div:first-of-type {
  960. opacity: 0;
  961. animation: invitee-tips-text 0.5s linear forwards;
  962. }
  963. & > div:last-of-type {
  964. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  965. font-weight: 400;
  966. font-size: 14px;
  967. color: #fff;
  968. line-height: 22px;
  969. text-align: left;
  970. font-style: normal;
  971. margin-top: 15px;
  972. margin-bottom: 14px;
  973. & > div {
  974. opacity: 0;
  975. animation: invitee-tips-text 0.5s linear forwards;
  976. margin-bottom: 14px;
  977. .van-icon-success {
  978. margin-right: 13px;
  979. }
  980. }
  981. }
  982. span {
  983. color: #ffe7a1;
  984. }
  985. }
  986. }
  987. .bargaining-assistance-main {
  988. background: #ffffff;
  989. border-radius: 20px;
  990. margin-bottom: 24px;
  991. overflow: hidden;
  992. &.bargaining-assistance-main-animation {
  993. opacity: 0;
  994. animation: invitee-tips-text 0.5s linear forwards;
  995. animation-delay: 2s;
  996. }
  997. .package-name {
  998. display: flex;
  999. justify-content: center;
  1000. span {
  1001. display: inline-block;
  1002. padding: 5px 61px;
  1003. background: #ffe8e8;
  1004. border-radius: 0 0 15px 15px;
  1005. margin: 0 auto;
  1006. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1007. font-weight: bold;
  1008. font-size: 16px;
  1009. color: #c00202;
  1010. line-height: 20px;
  1011. text-align: center;
  1012. font-style: normal;
  1013. }
  1014. }
  1015. .package-price {
  1016. font-family: Alibaba-PuHuiTi, Alibaba-PuHuiTi;
  1017. font-weight: bold;
  1018. color: #c70b0b;
  1019. height: 120px;
  1020. font-weight: normal;
  1021. box-sizing: border-box;
  1022. padding-top: 30px;
  1023. font-size: 60px;
  1024. line-height: 62px;
  1025. text-align: center;
  1026. font-style: normal;
  1027. font-weight: bold;
  1028. width: calc(100% - 24px);
  1029. margin: 0 auto;
  1030. background: #fff3f5;
  1031. box-shadow: 0px 0px 8px 2px #f4f7f8, 0px 2px 4px 0px #ecedf8;
  1032. border-radius: 20px;
  1033. margin-top: -20px;
  1034. border: 1px solid #eaeaea;
  1035. span {
  1036. font-size: 30px;
  1037. }
  1038. }
  1039. .package-progress {
  1040. margin: 24px 42px 35px;
  1041. }
  1042. .package-tips {
  1043. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1044. text-align: center;
  1045. font-size: 16px;
  1046. color: #000000;
  1047. font-style: normal;
  1048. margin-bottom: 24px;
  1049. font-weight: 500;
  1050. line-height: 22px;
  1051. font-style: normal;
  1052. span {
  1053. color: #f04646;
  1054. }
  1055. & > div:first-of-type {
  1056. font-size: 21px;
  1057. line-height: 29px;
  1058. }
  1059. }
  1060. .package-btn {
  1061. height: 54px;
  1062. background: linear-gradient(178deg, #fd8c50 0%, #fc3307 100%);
  1063. border-radius: 28px;
  1064. margin: 0 27px;
  1065. font-family: AlimamaShuHeiTi, AlimamaShuHeiTi;
  1066. font-weight: bold;
  1067. font-size: 20px;
  1068. color: #ffffff;
  1069. line-height: 54px;
  1070. text-align: center;
  1071. font-style: normal;
  1072. // margin-bottom: 24px;
  1073. &.end {
  1074. opacity: 0.5;
  1075. }
  1076. }
  1077. .package-expire {
  1078. margin-top: 12px;
  1079. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1080. text-align: center;
  1081. font-style: normal;
  1082. margin-bottom: 24px;
  1083. &,
  1084. .van-count-down {
  1085. font-weight: 400;
  1086. font-size: 12px;
  1087. color: #7d6156;
  1088. line-height: 16px;
  1089. }
  1090. .van-count-down {
  1091. display: inline-block;
  1092. }
  1093. }
  1094. .invitee-to-claim {
  1095. width: 330px;
  1096. height: 406px;
  1097. border-radius: 20px;
  1098. background: url('~/assets/image/claimCloudPhone/Invitee-to-claim.png')
  1099. no-repeat 0 0;
  1100. background-size: 100% 100%;
  1101. position: relative;
  1102. .invitee-to-claim_btn {
  1103. height: 54px;
  1104. background: linear-gradient(90deg, #ff6d2b 0%, #ff1500 100%);
  1105. box-shadow: inset 9px -7px 19px 0px #ffba57,
  1106. inset -1px 2px 6px 0px #ffbd63;
  1107. border-radius: 27px;
  1108. text-align: center;
  1109. position: absolute;
  1110. bottom: 14px;
  1111. width: 200px;
  1112. font-family: YouSheBiaoTiYuan;
  1113. font-size: 28px;
  1114. color: #ffffff;
  1115. line-height: 23px;
  1116. left: 50%;
  1117. transform: translateX(-50%);
  1118. font-style: normal;
  1119. font-weight: bold;
  1120. line-height: 54px;
  1121. }
  1122. }
  1123. }
  1124. .bargaining-record {
  1125. margin-bottom: 24px;
  1126. }
  1127. .bargaining-record,
  1128. .distribution-records {
  1129. background: #ffffff;
  1130. border-radius: 12px;
  1131. .title {
  1132. height: 44px;
  1133. background: #ffe8e8;
  1134. border-radius: 12px 12px 0px 0px;
  1135. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1136. font-weight: bold;
  1137. font-size: 16px;
  1138. color: #c00202;
  1139. line-height: 44px;
  1140. text-align: center;
  1141. font-style: normal;
  1142. }
  1143. .container {
  1144. height: 250px;
  1145. overflow-y: auto;
  1146. padding: 0 20px;
  1147. scrollbar-width: none !important; /* 对于 Firefox 隐藏滚动条 */
  1148. &::-webkit-scrollbar {
  1149. display: none !important; /* 对于 Chrome, Safari 和 Opera 隐藏滚动条 */
  1150. }
  1151. ::v-deep .van-empty {
  1152. padding: 0 !important;
  1153. }
  1154. }
  1155. .bargaining-record-item {
  1156. height: 53px;
  1157. border-bottom: 2px #f1f1f1 solid;
  1158. display: flex;
  1159. align-items: center;
  1160. .bargaining-record-item_info {
  1161. font-family: PingFangSC, PingFang SC;
  1162. font-weight: 400;
  1163. font-size: 14px;
  1164. color: #7d6156;
  1165. line-height: 18px;
  1166. font-style: normal;
  1167. & > div:first-of-type,
  1168. span {
  1169. font-weight: bold;
  1170. }
  1171. span {
  1172. color: #c00202;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. .distribution-records {
  1178. .container {
  1179. padding: 0px;
  1180. position: relative;
  1181. & > div:first-of-type {
  1182. position: absolute;
  1183. width: 100%;
  1184. left: 0;
  1185. height: 20px;
  1186. background: #ffffff;
  1187. box-shadow: 0px 2px 4px 0px #ecedf8;
  1188. top: 0;
  1189. font-family: PingFangSC, PingFang SC;
  1190. font-weight: 400;
  1191. font-size: 12px;
  1192. color: #7d6156;
  1193. line-height: 20px;
  1194. text-align: center;
  1195. display: flex;
  1196. font-style: normal;
  1197. & > div {
  1198. width: 25%;
  1199. }
  1200. }
  1201. & > div:last-of-type {
  1202. height: 100%;
  1203. box-sizing: border-box;
  1204. padding-top: 20px;
  1205. overflow-y: auto;
  1206. scrollbar-width: none !important; /* 对于 Firefox 隐藏滚动条 */
  1207. &::-webkit-scrollbar {
  1208. display: none !important; /* 对于 Chrome, Safari 和 Opera 隐藏滚动条 */
  1209. }
  1210. ::v-deep .van-empty {
  1211. padding: 0px;
  1212. .van-empty__image {
  1213. img {
  1214. display: none;
  1215. }
  1216. background: url('~/assets/image/claimCloudPhone/distribution-records-empty.png')
  1217. no-repeat center bottom;
  1218. background-size: 90px 90px;
  1219. }
  1220. }
  1221. .distribution-records-item {
  1222. height: 46px;
  1223. line-height: 46px;
  1224. box-sizing: border-box;
  1225. display: flex;
  1226. border-bottom: 2px #f1f1f1 solid;
  1227. & > div {
  1228. width: 25%;
  1229. text-align: center;
  1230. font-family: PingFangSC, PingFang SC;
  1231. font-weight: 400;
  1232. font-size: 14px;
  1233. color: #6d2b12;
  1234. text-align: center;
  1235. overflow: hidden;
  1236. white-space: nowrap;
  1237. text-overflow: ellipsis;
  1238. font-style: normal;
  1239. }
  1240. }
  1241. }
  1242. }
  1243. }
  1244. .barrage {
  1245. position: fixed;
  1246. bottom: 11%;
  1247. transform: translateY(-11%);
  1248. right: 11px;
  1249. & > ::v-deep div {
  1250. transition: all 0.7s;
  1251. &.start {
  1252. opacity: 1;
  1253. animation: barrage 0.5s linear;
  1254. @keyframes barrage {
  1255. 0% {
  1256. opacity: 1;
  1257. transform: translateY(0px);
  1258. }
  1259. 100% {
  1260. transform: translateY(-30px);
  1261. opacity: 0;
  1262. }
  1263. }
  1264. }
  1265. opacity: 1;
  1266. width: 143px;
  1267. height: 40px;
  1268. position: absolute;
  1269. bottom: 11%;
  1270. right: 11px;
  1271. background: linear-gradient(
  1272. 90deg,
  1273. #992bff 0%,
  1274. rgba(255, 21, 0, 0.4) 100%
  1275. );
  1276. border-radius: 23px;
  1277. border-image: linear-gradient(
  1278. 94deg,
  1279. rgba(255, 255, 255, 1),
  1280. rgba(255, 255, 255, 0.35)
  1281. )
  1282. 1 1;
  1283. padding-left: 20px;
  1284. font-size: 10px;
  1285. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1286. font-weight: 400;
  1287. color: #ffffff;
  1288. display: flex;
  1289. flex-direction: column;
  1290. justify-content: center;
  1291. & > div {
  1292. height: 16px;
  1293. line-height: 16px;
  1294. &:first-of-type {
  1295. display: flex;
  1296. justify-content: space-between;
  1297. align-items: center;
  1298. & > div:first-of-type {
  1299. width: 60px;
  1300. overflow: hidden;
  1301. text-overflow: ellipsis;
  1302. white-space: nowrap;
  1303. }
  1304. & > div:last-of-type {
  1305. height: 16px;
  1306. line-height: 16px;
  1307. margin-right: 15px;
  1308. padding: 0 8px;
  1309. background: linear-gradient(to top, #fec37a 0%, #ff1500 100%);
  1310. border-radius: 21px;
  1311. }
  1312. }
  1313. &:last-of-type span {
  1314. color: #fddb2b;
  1315. }
  1316. }
  1317. }
  1318. }
  1319. .rule {
  1320. position: absolute;
  1321. z-index: 0;
  1322. right: -16px;
  1323. top: 5.5%;
  1324. width: 40px;
  1325. height: 20px;
  1326. line-height: 20px;
  1327. background: #f04646;
  1328. border-radius: 17px 0px 0px 17px;
  1329. font-family: PingFangSC, PingFang SC;
  1330. font-weight: 400;
  1331. font-size: 12px;
  1332. color: #ffffff;
  1333. text-align: center;
  1334. font-style: normal;
  1335. }
  1336. .rule-title {
  1337. height: 53px;
  1338. border-radius: 16px 16px 0 0;
  1339. background: linear-gradient(90deg, #f6cdb9 0%, #fbdbde 100%);
  1340. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1341. font-weight: bold;
  1342. font-size: 18px;
  1343. color: #751d13;
  1344. line-height: 53px;
  1345. text-align: center;
  1346. font-style: normal;
  1347. }
  1348. .rule-content {
  1349. height: 325px;
  1350. padding: 16px;
  1351. box-sizing: border-box;
  1352. background: #fff;
  1353. border-radius: 0 0 16px 16px;
  1354. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1355. font-weight: 400;
  1356. font-size: 14px;
  1357. color: #751d13;
  1358. line-height: 16px;
  1359. font-style: normal;
  1360. overflow-y: auto;
  1361. }
  1362. .rule-close {
  1363. height: 32px;
  1364. width: 32px;
  1365. background: #c1c1c1;
  1366. z-index: 5;
  1367. margin: 20px auto 0;
  1368. border-radius: 50%;
  1369. display: flex;
  1370. justify-content: center;
  1371. align-items: center;
  1372. font-size: 24px;
  1373. color: #666666;
  1374. }
  1375. ::v-deep .van-dialog {
  1376. background: transparent !important;
  1377. // overflow: visible;
  1378. }
  1379. .bargaining-img {
  1380. position: relative;
  1381. width: 336px;
  1382. height: 468px;
  1383. }
  1384. .bargaining-amount {
  1385. box-sizing: border-box;
  1386. background-size: 100% auto;
  1387. .bargaining-amount-text {
  1388. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1389. font-weight: bold;
  1390. font-size: 24px;
  1391. color: #ffffff;
  1392. line-height: 20px;
  1393. text-align: center;
  1394. font-style: normal;
  1395. span {
  1396. color: #ff0000;
  1397. font-size: 35px;
  1398. color: #fad539;
  1399. }
  1400. }
  1401. }
  1402. .exit {
  1403. height: 520px;
  1404. position: relative;
  1405. & > img {
  1406. position: absolute;
  1407. top: 50%;
  1408. left: 50%;
  1409. transform: translate(-50%, -50%);
  1410. height: 321px;
  1411. width: 284px;
  1412. z-index: -1;
  1413. }
  1414. .exit-glory {
  1415. position: absolute;
  1416. top: 50%;
  1417. left: 50%;
  1418. transform: translate(-50%, -50%) scale(1.5);
  1419. z-index: -2;
  1420. }
  1421. .exit-content {
  1422. position: absolute;
  1423. top: 25%;
  1424. left: 50%;
  1425. width: 200px;
  1426. transform: translateX(-50%);
  1427. font-family: AlimamaShuHeiTi, AlimamaShuHeiTi;
  1428. color: #171815;
  1429. line-height: 24px;
  1430. text-align: center;
  1431. font-style: normal;
  1432. font-weight: bold;
  1433. font-size: 16px;
  1434. z-index: 0;
  1435. & > div span {
  1436. color: #f04646;
  1437. }
  1438. .exit-content-progress {
  1439. margin: 30px 10px 100px;
  1440. }
  1441. .exit-content-btn {
  1442. & > img {
  1443. height: 42px;
  1444. width: 100%;
  1445. }
  1446. .exit-content-btn_leave {
  1447. font-weight: 400;
  1448. font-size: 12px;
  1449. color: #faf3d8;
  1450. }
  1451. }
  1452. }
  1453. }
  1454. .bargaining-success {
  1455. height: 378px;
  1456. width: 289px;
  1457. margin: 0 auto;
  1458. background: url('~/assets/image/claimCloudPhone/successful-bargaining-img.png')
  1459. no-repeat 0 0;
  1460. background-size: 100% 100%;
  1461. overflow: hidden;
  1462. position: relative;
  1463. .bargaining-success-title {
  1464. margin-top: 24px;
  1465. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1466. text-align: center;
  1467. font-style: normal;
  1468. font-weight: bold;
  1469. font-size: 28px;
  1470. color: #fdf9c8;
  1471. line-height: 38px;
  1472. }
  1473. .bargaining-success-tips {
  1474. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1475. font-weight: 500;
  1476. font-size: 12px;
  1477. color: #ffffff;
  1478. line-height: 17px;
  1479. text-align: center;
  1480. font-style: normal;
  1481. width: 160px;
  1482. margin: 0 auto;
  1483. }
  1484. .bargaining-success-btn {
  1485. position: absolute;
  1486. bottom: 20px;
  1487. left: 50%;
  1488. transform: translateX(-50%);
  1489. display: flex;
  1490. flex-direction: column;
  1491. justify-content: center;
  1492. & > div {
  1493. width: 180px;
  1494. height: 48px;
  1495. line-height: 48px;
  1496. text-align: center;
  1497. border-radius: 24px;
  1498. color: #fff;
  1499. font-weight: bold;
  1500. &:first-of-type {
  1501. margin-bottom: 8px;
  1502. background: linear-gradient(178deg, #fd8c50 0%, #fc3307 100%);
  1503. }
  1504. &:last-of-type {
  1505. color: #e63b47;
  1506. border: 1px solid #e63b47;
  1507. }
  1508. }
  1509. }
  1510. }
  1511. .expire {
  1512. height: 378px;
  1513. width: 289px;
  1514. margin: 0 auto;
  1515. background: url('~/assets/image/claimCloudPhone/expire-img.png') no-repeat 0
  1516. 0;
  1517. background-size: 100% 100%;
  1518. position: relative;
  1519. .expire-btn {
  1520. position: absolute;
  1521. bottom: 20px;
  1522. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1523. font-weight: 500;
  1524. font-size: 16px;
  1525. color: #ffffff;
  1526. line-height: 48px;
  1527. left: 50%;
  1528. transform: translateX(-50%);
  1529. text-align: center;
  1530. font-style: normal;
  1531. width: 180px;
  1532. height: 48px;
  1533. background: linear-gradient(178deg, #fd8c50 0%, #fc3307 100%);
  1534. border-radius: 24px;
  1535. }
  1536. }
  1537. .login {
  1538. height: 312px;
  1539. background: #ffffff;
  1540. border-radius: 24px;
  1541. padding: 16px 28px;
  1542. box-sizing: border-box;
  1543. .login-title {
  1544. font-family: DingTalk, DingTalk;
  1545. font-weight: normal;
  1546. font-weight: bold;
  1547. font-size: 24px;
  1548. color: #0a132b;
  1549. line-height: 28px;
  1550. text-align: left;
  1551. font-style: normal;
  1552. margin-bottom: 14px;
  1553. }
  1554. .van-field {
  1555. margin-bottom: 14px;
  1556. border-radius: 8px;
  1557. border: 1px solid #e6e6e6;
  1558. }
  1559. .van-button {
  1560. width: 100%;
  1561. border-radius: 8px;
  1562. }
  1563. .login-code {
  1564. font-family: PingFangSC, PingFang SC;
  1565. font-weight: 500;
  1566. font-size: 14px;
  1567. color: #3666f2;
  1568. line-height: 16px;
  1569. text-align: left;
  1570. font-style: normal;
  1571. &.disabled {
  1572. color: #999;
  1573. }
  1574. }
  1575. .login-agreement {
  1576. font-family: PingFangSC, PingFang SC;
  1577. font-weight: 400;
  1578. font-size: 12px;
  1579. font-style: normal;
  1580. margin-top: 12px;
  1581. display: flex;
  1582. span {
  1583. color: #3666f2;
  1584. }
  1585. .van-checkbox {
  1586. align-items: start;
  1587. ::v-deep .van-checkbox__label {
  1588. color: #999999;
  1589. }
  1590. ::v-deep .van-checkbox__icon {
  1591. margin-top: 3px;
  1592. }
  1593. }
  1594. }
  1595. }
  1596. ::v-deep .phone-container {
  1597. background: transparent;
  1598. }
  1599. }
  1600. .dialog-bargaining {
  1601. overflow: visible;
  1602. }
  1603. .species {
  1604. height: 234px !important;
  1605. }
  1606. .glory,
  1607. .red-packet {
  1608. position: absolute;
  1609. top: 90%;
  1610. left: 50%;
  1611. }
  1612. .glory {
  1613. top: 116%;
  1614. transform: translate(-50%, -110%) scale(1.5);
  1615. }
  1616. .red-packet {
  1617. width: 259px !important;
  1618. height: 318px !important;
  1619. transform: translate(-50%, -90%);
  1620. }
  1621. .red-packet-title {
  1622. width: 90%;
  1623. height: 146px;
  1624. position: absolute;
  1625. top: 0;
  1626. left: 50%;
  1627. transform: translateX(-50%);
  1628. }
  1629. .end-visible-img {
  1630. width: 289px;
  1631. height: 264px;
  1632. margin: 0 auto;
  1633. display: block;
  1634. }
  1635. .mb-24 {
  1636. margin-bottom: 24px !important;
  1637. }
  1638. .mask {
  1639. z-index: 4000;
  1640. }
  1641. </style>