bargainingAssistance.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691
  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. (copy) => {
  743. copy && copy()
  744. },
  745. );
  746. }
  747. }
  748. })
  749. .finally(() => {
  750. this.$toast.clear();
  751. });
  752. break;
  753. }
  754. }
  755. },
  756. // 获取验证码
  757. getCode() {
  758. if (
  759. this.laoginData.phone.length < 11 ||
  760. this.codeNumber !== '获取验证码'
  761. ) {
  762. return;
  763. }
  764. if (!/^1[3456789]\d{9}$/.test(this.laoginData.phone)) {
  765. this.$toast('手机号码有误,请重填');
  766. return;
  767. }
  768. this.$refs.verify.show();
  769. },
  770. // 登录
  771. async login() {
  772. this.loginLoading = true;
  773. let uuid = localStorage.getItem('uuid');
  774. if (!uuid) {
  775. const url = URL.createObjectURL(new Blob());
  776. uuid = url.toString();
  777. URL.revokeObjectURL(url);
  778. uuid = uuid.substring(uuid.lastIndexOf('/') + 1);
  779. // 去除 UUID 字符串中的连字符
  780. const uuidHex = uuid.replace(/-/g, '');
  781. // 将十六进制字符串解析为大整数
  782. const uuidNumber = BigInt('0x' + uuidHex);
  783. uuid = uuidNumber.toString().substring(0, 20); // 将大整数转换为字符串格式
  784. localStorage.setItem('uuid', uuid);
  785. }
  786. const data = await this.getSystemTime();
  787. const registerTime = this.timestampToTime(data.data);
  788. const params = {
  789. invitationType: 6,
  790. registerSource: 102,
  791. uuid,
  792. registerTime,
  793. };
  794. const headers = {
  795. devicesId: uuid,
  796. registerSign: this.jm(registerTime),
  797. };
  798. Object.assign(params, this.laoginData);
  799. Object.assign(params, this.inviteeData);
  800. params.activityId = params.operateActivityId;
  801. delete params.operateActivityId;
  802. this.$axios
  803. .$post('user/v5/client/register/forH5', params, { headers })
  804. .then((res) => {
  805. if (res.success) {
  806. localStorage.setItem('phone', params.phone);
  807. localStorage.setItem('auth._token.password', res.data.token);
  808. localStorage.setItem('token', res.data.token);
  809. localStorage.setItem(
  810. 'dataInfo',
  811. JSON.stringify({ type: Object, data: res.data }),
  812. );
  813. this.$toast('登录成功');
  814. const url = res.data.jumpToPage
  815. ? '/claimCloudPhone?bool=1'
  816. : '/claimCloudPhone/firstReward';
  817. this.$router[res.data.jumpToPage ? 'replace' : 'push'](url);
  818. }
  819. })
  820. .catch((error) => {
  821. setTimeout(() => {
  822. this.$toast(error.message);
  823. });
  824. })
  825. .finally(() => {
  826. this.loginLoading = false;
  827. });
  828. },
  829. timestampToTime(timestamp) {
  830. var date = new Date(timestamp * 1000);
  831. var Y = date.getFullYear() + '-';
  832. var M =
  833. (date.getMonth() + 1 < 10
  834. ? '0' + (date.getMonth() + 1)
  835. : date.getMonth() + 1) + '-';
  836. var D =
  837. (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
  838. var h =
  839. (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
  840. var m =
  841. (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) +
  842. ':';
  843. var s =
  844. date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
  845. return Y + M + D + h + m + s;
  846. },
  847. jm(systemTime) {
  848. const registerSign = sha256('Register_SZX_2023:' + systemTime);
  849. return registerSign;
  850. },
  851. // 跳转对应协议
  852. toAgreement() {
  853. sessionStorage.setItem('invitedPhone', this.laoginData.phone);
  854. sessionStorage.setItem('invitedCode', this.laoginData.code);
  855. this.$router.push(
  856. '/claimCloudPhone/agreement?agreementCoding=XYPZYHXY2002',
  857. );
  858. },
  859. success(data) {
  860. this.$toast.loading({
  861. message: '加载中...',
  862. forbidClick: true,
  863. duration: 0,
  864. });
  865. const params = {
  866. type: 'common',
  867. authorizationType: 4,
  868. phone: this.laoginData.phone,
  869. captchaVerification: data.captchaVerification,
  870. };
  871. this.$axios
  872. .$post('activity/v5/assist/bargaining/phone/send/activity', params)
  873. .then((res) => {
  874. if (res.success) {
  875. this.codeNumber = 60;
  876. const timer = setInterval(() => {
  877. this.codeNumber--;
  878. if (this.codeNumber === 0) {
  879. this.codeNumber = '获取验证码';
  880. clearInterval(timer);
  881. }
  882. }, 1000);
  883. setTimeout(() => {
  884. this.$toast('获取成功');
  885. });
  886. }
  887. })
  888. .catch((error) => {
  889. setTimeout(() => {
  890. this.$toast(error.message);
  891. });
  892. })
  893. .finally(() => {
  894. this.$toast.clear();
  895. });
  896. },
  897. endConfirm() {
  898. location.href = 'https://www.androidscloud.com';
  899. },
  900. beforeClose(action, done) {
  901. done(false);
  902. },
  903. },
  904. };
  905. </script>
  906. <style lang="less" scoped>
  907. .bargaining-assistance {
  908. @keyframes invitee-tips-text {
  909. 0% {
  910. opacity: 0;
  911. }
  912. 100% {
  913. opacity: 1;
  914. }
  915. }
  916. height: 100%;
  917. position: relative;
  918. .inviter-tips,
  919. .invitee-tips {
  920. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  921. }
  922. .inviter-tips {
  923. & > img {
  924. height: 60px;
  925. display: block;
  926. margin: 0 auto;
  927. }
  928. & > div {
  929. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  930. font-weight: 400;
  931. font-size: 12px;
  932. color: #ffffff;
  933. line-height: 17px;
  934. text-align: center;
  935. font-style: normal;
  936. margin-top: 6px;
  937. margin-bottom: 14px;
  938. }
  939. }
  940. .invitee-tips {
  941. .invitee-tips-user {
  942. font-weight: bold;
  943. font-size: 18px;
  944. color: #ffffff;
  945. line-height: 22px;
  946. text-align: left;
  947. font-style: normal;
  948. margin-bottom: 8px;
  949. }
  950. .invitee-tips-text {
  951. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  952. font-weight: 500;
  953. font-size: 18px;
  954. color: #ffffff;
  955. line-height: 22px;
  956. font-style: normal;
  957. & > div:first-of-type {
  958. opacity: 0;
  959. animation: invitee-tips-text 0.5s linear forwards;
  960. }
  961. & > div:last-of-type {
  962. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  963. font-weight: 400;
  964. font-size: 14px;
  965. color: #fff;
  966. line-height: 22px;
  967. text-align: left;
  968. font-style: normal;
  969. margin-top: 15px;
  970. margin-bottom: 14px;
  971. & > div {
  972. opacity: 0;
  973. animation: invitee-tips-text 0.5s linear forwards;
  974. margin-bottom: 14px;
  975. .van-icon-success {
  976. margin-right: 13px;
  977. }
  978. }
  979. }
  980. span {
  981. color: #ffe7a1;
  982. }
  983. }
  984. }
  985. .bargaining-assistance-main {
  986. background: #ffffff;
  987. border-radius: 20px;
  988. margin-bottom: 24px;
  989. overflow: hidden;
  990. &.bargaining-assistance-main-animation {
  991. opacity: 0;
  992. animation: invitee-tips-text 0.5s linear forwards;
  993. animation-delay: 2s;
  994. }
  995. .package-name {
  996. display: flex;
  997. justify-content: center;
  998. span {
  999. display: inline-block;
  1000. padding: 5px 61px;
  1001. background: #ffe8e8;
  1002. border-radius: 0 0 15px 15px;
  1003. margin: 0 auto;
  1004. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1005. font-weight: bold;
  1006. font-size: 16px;
  1007. color: #c00202;
  1008. line-height: 20px;
  1009. text-align: center;
  1010. font-style: normal;
  1011. }
  1012. }
  1013. .package-price {
  1014. font-family: Alibaba-PuHuiTi, Alibaba-PuHuiTi;
  1015. font-weight: bold;
  1016. color: #c70b0b;
  1017. height: 120px;
  1018. font-weight: normal;
  1019. box-sizing: border-box;
  1020. padding-top: 30px;
  1021. font-size: 60px;
  1022. line-height: 62px;
  1023. text-align: center;
  1024. font-style: normal;
  1025. font-weight: bold;
  1026. width: calc(100% - 24px);
  1027. margin: 0 auto;
  1028. background: #fff3f5;
  1029. box-shadow: 0px 0px 8px 2px #f4f7f8, 0px 2px 4px 0px #ecedf8;
  1030. border-radius: 20px;
  1031. margin-top: -20px;
  1032. border: 1px solid #eaeaea;
  1033. span {
  1034. font-size: 30px;
  1035. }
  1036. }
  1037. .package-progress {
  1038. margin: 24px 42px 35px;
  1039. }
  1040. .package-tips {
  1041. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1042. text-align: center;
  1043. font-size: 16px;
  1044. color: #000000;
  1045. font-style: normal;
  1046. margin-bottom: 24px;
  1047. font-weight: 500;
  1048. line-height: 22px;
  1049. font-style: normal;
  1050. span {
  1051. color: #f04646;
  1052. }
  1053. & > div:first-of-type {
  1054. font-size: 21px;
  1055. line-height: 29px;
  1056. }
  1057. }
  1058. .package-btn {
  1059. height: 54px;
  1060. background: linear-gradient(178deg, #fd8c50 0%, #fc3307 100%);
  1061. border-radius: 28px;
  1062. margin: 0 27px;
  1063. font-family: AlimamaShuHeiTi, AlimamaShuHeiTi;
  1064. font-weight: bold;
  1065. font-size: 20px;
  1066. color: #ffffff;
  1067. line-height: 54px;
  1068. text-align: center;
  1069. font-style: normal;
  1070. // margin-bottom: 24px;
  1071. &.end {
  1072. opacity: 0.5;
  1073. }
  1074. }
  1075. .package-expire {
  1076. margin-top: 12px;
  1077. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1078. text-align: center;
  1079. font-style: normal;
  1080. margin-bottom: 24px;
  1081. &,
  1082. .van-count-down {
  1083. font-weight: 400;
  1084. font-size: 12px;
  1085. color: #7d6156;
  1086. line-height: 16px;
  1087. }
  1088. .van-count-down {
  1089. display: inline-block;
  1090. }
  1091. }
  1092. .invitee-to-claim {
  1093. width: 330px;
  1094. height: 406px;
  1095. border-radius: 20px;
  1096. background: url('~/assets/image/claimCloudPhone/Invitee-to-claim.png')
  1097. no-repeat 0 0;
  1098. background-size: 100% 100%;
  1099. position: relative;
  1100. .invitee-to-claim_btn {
  1101. height: 54px;
  1102. background: linear-gradient(90deg, #ff6d2b 0%, #ff1500 100%);
  1103. box-shadow: inset 9px -7px 19px 0px #ffba57,
  1104. inset -1px 2px 6px 0px #ffbd63;
  1105. border-radius: 27px;
  1106. text-align: center;
  1107. position: absolute;
  1108. bottom: 14px;
  1109. width: 200px;
  1110. font-family: YouSheBiaoTiYuan;
  1111. font-size: 28px;
  1112. color: #ffffff;
  1113. line-height: 23px;
  1114. left: 50%;
  1115. transform: translateX(-50%);
  1116. font-style: normal;
  1117. font-weight: bold;
  1118. line-height: 54px;
  1119. }
  1120. }
  1121. }
  1122. .bargaining-record {
  1123. margin-bottom: 24px;
  1124. }
  1125. .bargaining-record,
  1126. .distribution-records {
  1127. background: #ffffff;
  1128. border-radius: 12px;
  1129. .title {
  1130. height: 44px;
  1131. background: #ffe8e8;
  1132. border-radius: 12px 12px 0px 0px;
  1133. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1134. font-weight: bold;
  1135. font-size: 16px;
  1136. color: #c00202;
  1137. line-height: 44px;
  1138. text-align: center;
  1139. font-style: normal;
  1140. }
  1141. .container {
  1142. height: 250px;
  1143. overflow-y: auto;
  1144. padding: 0 20px;
  1145. scrollbar-width: none !important; /* 对于 Firefox 隐藏滚动条 */
  1146. &::-webkit-scrollbar {
  1147. display: none !important; /* 对于 Chrome, Safari 和 Opera 隐藏滚动条 */
  1148. }
  1149. ::v-deep .van-empty {
  1150. padding: 0 !important;
  1151. }
  1152. }
  1153. .bargaining-record-item {
  1154. height: 53px;
  1155. border-bottom: 2px #f1f1f1 solid;
  1156. display: flex;
  1157. align-items: center;
  1158. .bargaining-record-item_info {
  1159. font-family: PingFangSC, PingFang SC;
  1160. font-weight: 400;
  1161. font-size: 14px;
  1162. color: #7d6156;
  1163. line-height: 18px;
  1164. font-style: normal;
  1165. & > div:first-of-type,
  1166. span {
  1167. font-weight: bold;
  1168. }
  1169. span {
  1170. color: #c00202;
  1171. }
  1172. }
  1173. }
  1174. }
  1175. .distribution-records {
  1176. .container {
  1177. padding: 0px;
  1178. position: relative;
  1179. & > div:first-of-type {
  1180. position: absolute;
  1181. width: 100%;
  1182. left: 0;
  1183. height: 20px;
  1184. background: #ffffff;
  1185. box-shadow: 0px 2px 4px 0px #ecedf8;
  1186. top: 0;
  1187. font-family: PingFangSC, PingFang SC;
  1188. font-weight: 400;
  1189. font-size: 12px;
  1190. color: #7d6156;
  1191. line-height: 20px;
  1192. text-align: center;
  1193. display: flex;
  1194. font-style: normal;
  1195. & > div {
  1196. width: 25%;
  1197. }
  1198. }
  1199. & > div:last-of-type {
  1200. height: 100%;
  1201. box-sizing: border-box;
  1202. padding-top: 20px;
  1203. overflow-y: auto;
  1204. scrollbar-width: none !important; /* 对于 Firefox 隐藏滚动条 */
  1205. &::-webkit-scrollbar {
  1206. display: none !important; /* 对于 Chrome, Safari 和 Opera 隐藏滚动条 */
  1207. }
  1208. ::v-deep .van-empty {
  1209. padding: 0px;
  1210. .van-empty__image {
  1211. img {
  1212. display: none;
  1213. }
  1214. background: url('~/assets/image/claimCloudPhone/distribution-records-empty.png')
  1215. no-repeat center bottom;
  1216. background-size: 90px 90px;
  1217. }
  1218. }
  1219. .distribution-records-item {
  1220. height: 46px;
  1221. line-height: 46px;
  1222. box-sizing: border-box;
  1223. display: flex;
  1224. border-bottom: 2px #f1f1f1 solid;
  1225. & > div {
  1226. width: 25%;
  1227. text-align: center;
  1228. font-family: PingFangSC, PingFang SC;
  1229. font-weight: 400;
  1230. font-size: 14px;
  1231. color: #6d2b12;
  1232. text-align: center;
  1233. overflow: hidden;
  1234. white-space: nowrap;
  1235. text-overflow: ellipsis;
  1236. font-style: normal;
  1237. }
  1238. }
  1239. }
  1240. }
  1241. }
  1242. .barrage {
  1243. position: fixed;
  1244. bottom: 11%;
  1245. transform: translateY(-11%);
  1246. right: 11px;
  1247. & > ::v-deep div {
  1248. transition: all 0.7s;
  1249. &.start {
  1250. opacity: 1;
  1251. animation: barrage 0.5s linear;
  1252. @keyframes barrage {
  1253. 0% {
  1254. opacity: 1;
  1255. transform: translateY(0px);
  1256. }
  1257. 100% {
  1258. transform: translateY(-30px);
  1259. opacity: 0;
  1260. }
  1261. }
  1262. }
  1263. opacity: 1;
  1264. width: 143px;
  1265. height: 40px;
  1266. position: absolute;
  1267. bottom: 11%;
  1268. right: 11px;
  1269. background: linear-gradient(
  1270. 90deg,
  1271. #992bff 0%,
  1272. rgba(255, 21, 0, 0.4) 100%
  1273. );
  1274. border-radius: 23px;
  1275. border-image: linear-gradient(
  1276. 94deg,
  1277. rgba(255, 255, 255, 1),
  1278. rgba(255, 255, 255, 0.35)
  1279. )
  1280. 1 1;
  1281. padding-left: 20px;
  1282. font-size: 10px;
  1283. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1284. font-weight: 400;
  1285. color: #ffffff;
  1286. display: flex;
  1287. flex-direction: column;
  1288. justify-content: center;
  1289. & > div {
  1290. height: 16px;
  1291. line-height: 16px;
  1292. &:first-of-type {
  1293. display: flex;
  1294. justify-content: space-between;
  1295. align-items: center;
  1296. & > div:first-of-type {
  1297. width: 60px;
  1298. overflow: hidden;
  1299. text-overflow: ellipsis;
  1300. white-space: nowrap;
  1301. }
  1302. & > div:last-of-type {
  1303. height: 16px;
  1304. line-height: 16px;
  1305. margin-right: 15px;
  1306. padding: 0 8px;
  1307. background: linear-gradient(to top, #fec37a 0%, #ff1500 100%);
  1308. border-radius: 21px;
  1309. }
  1310. }
  1311. &:last-of-type span {
  1312. color: #fddb2b;
  1313. }
  1314. }
  1315. }
  1316. }
  1317. .rule {
  1318. position: absolute;
  1319. z-index: 0;
  1320. right: -16px;
  1321. top: 5.5%;
  1322. width: 40px;
  1323. height: 20px;
  1324. line-height: 20px;
  1325. background: #f04646;
  1326. border-radius: 17px 0px 0px 17px;
  1327. font-family: PingFangSC, PingFang SC;
  1328. font-weight: 400;
  1329. font-size: 12px;
  1330. color: #ffffff;
  1331. text-align: center;
  1332. font-style: normal;
  1333. }
  1334. .rule-title {
  1335. height: 53px;
  1336. border-radius: 16px 16px 0 0;
  1337. background: linear-gradient(90deg, #f6cdb9 0%, #fbdbde 100%);
  1338. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1339. font-weight: bold;
  1340. font-size: 18px;
  1341. color: #751d13;
  1342. line-height: 53px;
  1343. text-align: center;
  1344. font-style: normal;
  1345. }
  1346. .rule-content {
  1347. height: 325px;
  1348. padding: 16px;
  1349. box-sizing: border-box;
  1350. background: #fff;
  1351. border-radius: 0 0 16px 16px;
  1352. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1353. font-weight: 400;
  1354. font-size: 14px;
  1355. color: #751d13;
  1356. line-height: 16px;
  1357. font-style: normal;
  1358. overflow-y: auto;
  1359. }
  1360. .rule-close {
  1361. height: 32px;
  1362. width: 32px;
  1363. background: #c1c1c1;
  1364. z-index: 5;
  1365. margin: 20px auto 0;
  1366. border-radius: 50%;
  1367. display: flex;
  1368. justify-content: center;
  1369. align-items: center;
  1370. font-size: 24px;
  1371. color: #666666;
  1372. }
  1373. ::v-deep .van-dialog {
  1374. background: transparent !important;
  1375. // overflow: visible;
  1376. }
  1377. .bargaining-img {
  1378. position: relative;
  1379. width: 336px;
  1380. height: 468px;
  1381. }
  1382. .bargaining-amount {
  1383. box-sizing: border-box;
  1384. background-size: 100% auto;
  1385. .bargaining-amount-text {
  1386. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1387. font-weight: bold;
  1388. font-size: 24px;
  1389. color: #ffffff;
  1390. line-height: 20px;
  1391. text-align: center;
  1392. font-style: normal;
  1393. span {
  1394. color: #ff0000;
  1395. font-size: 35px;
  1396. color: #fad539;
  1397. }
  1398. }
  1399. }
  1400. .exit {
  1401. height: 520px;
  1402. position: relative;
  1403. & > img {
  1404. position: absolute;
  1405. top: 50%;
  1406. left: 50%;
  1407. transform: translate(-50%, -50%);
  1408. height: 321px;
  1409. width: 284px;
  1410. z-index: -1;
  1411. }
  1412. .exit-glory {
  1413. position: absolute;
  1414. top: 50%;
  1415. left: 50%;
  1416. transform: translate(-50%, -50%) scale(1.5);
  1417. z-index: -2;
  1418. }
  1419. .exit-content {
  1420. position: absolute;
  1421. top: 25%;
  1422. left: 50%;
  1423. width: 200px;
  1424. transform: translateX(-50%);
  1425. font-family: AlimamaShuHeiTi, AlimamaShuHeiTi;
  1426. color: #171815;
  1427. line-height: 24px;
  1428. text-align: center;
  1429. font-style: normal;
  1430. font-weight: bold;
  1431. font-size: 16px;
  1432. z-index: 0;
  1433. & > div span {
  1434. color: #f04646;
  1435. }
  1436. .exit-content-progress {
  1437. margin: 30px 10px 100px;
  1438. }
  1439. .exit-content-btn {
  1440. & > img {
  1441. height: 42px;
  1442. width: 100%;
  1443. }
  1444. .exit-content-btn_leave {
  1445. font-weight: 400;
  1446. font-size: 12px;
  1447. color: #faf3d8;
  1448. }
  1449. }
  1450. }
  1451. }
  1452. .bargaining-success {
  1453. height: 378px;
  1454. width: 289px;
  1455. margin: 0 auto;
  1456. background: url('~/assets/image/claimCloudPhone/successful-bargaining-img.png')
  1457. no-repeat 0 0;
  1458. background-size: 100% 100%;
  1459. overflow: hidden;
  1460. position: relative;
  1461. .bargaining-success-title {
  1462. margin-top: 24px;
  1463. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1464. text-align: center;
  1465. font-style: normal;
  1466. font-weight: bold;
  1467. font-size: 28px;
  1468. color: #fdf9c8;
  1469. line-height: 38px;
  1470. }
  1471. .bargaining-success-tips {
  1472. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1473. font-weight: 500;
  1474. font-size: 12px;
  1475. color: #ffffff;
  1476. line-height: 17px;
  1477. text-align: center;
  1478. font-style: normal;
  1479. width: 160px;
  1480. margin: 0 auto;
  1481. }
  1482. .bargaining-success-btn {
  1483. position: absolute;
  1484. bottom: 20px;
  1485. left: 50%;
  1486. transform: translateX(-50%);
  1487. display: flex;
  1488. flex-direction: column;
  1489. justify-content: center;
  1490. & > div {
  1491. width: 180px;
  1492. height: 48px;
  1493. line-height: 48px;
  1494. text-align: center;
  1495. border-radius: 24px;
  1496. color: #fff;
  1497. font-weight: bold;
  1498. &:first-of-type {
  1499. margin-bottom: 8px;
  1500. background: linear-gradient(178deg, #fd8c50 0%, #fc3307 100%);
  1501. }
  1502. &:last-of-type {
  1503. color: #e63b47;
  1504. border: 1px solid #e63b47;
  1505. }
  1506. }
  1507. }
  1508. }
  1509. .expire {
  1510. height: 378px;
  1511. width: 289px;
  1512. margin: 0 auto;
  1513. background: url('~/assets/image/claimCloudPhone/expire-img.png') no-repeat 0
  1514. 0;
  1515. background-size: 100% 100%;
  1516. position: relative;
  1517. .expire-btn {
  1518. position: absolute;
  1519. bottom: 20px;
  1520. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  1521. font-weight: 500;
  1522. font-size: 16px;
  1523. color: #ffffff;
  1524. line-height: 48px;
  1525. left: 50%;
  1526. transform: translateX(-50%);
  1527. text-align: center;
  1528. font-style: normal;
  1529. width: 180px;
  1530. height: 48px;
  1531. background: linear-gradient(178deg, #fd8c50 0%, #fc3307 100%);
  1532. border-radius: 24px;
  1533. }
  1534. }
  1535. .login {
  1536. height: 312px;
  1537. background: #ffffff;
  1538. border-radius: 24px;
  1539. padding: 16px 28px;
  1540. box-sizing: border-box;
  1541. .login-title {
  1542. font-family: DingTalk, DingTalk;
  1543. font-weight: normal;
  1544. font-weight: bold;
  1545. font-size: 24px;
  1546. color: #0a132b;
  1547. line-height: 28px;
  1548. text-align: left;
  1549. font-style: normal;
  1550. margin-bottom: 14px;
  1551. }
  1552. .van-field {
  1553. margin-bottom: 14px;
  1554. border-radius: 8px;
  1555. border: 1px solid #e6e6e6;
  1556. }
  1557. .van-button {
  1558. width: 100%;
  1559. border-radius: 8px;
  1560. }
  1561. .login-code {
  1562. font-family: PingFangSC, PingFang SC;
  1563. font-weight: 500;
  1564. font-size: 14px;
  1565. color: #3666f2;
  1566. line-height: 16px;
  1567. text-align: left;
  1568. font-style: normal;
  1569. &.disabled {
  1570. color: #999;
  1571. }
  1572. }
  1573. .login-agreement {
  1574. font-family: PingFangSC, PingFang SC;
  1575. font-weight: 400;
  1576. font-size: 12px;
  1577. font-style: normal;
  1578. margin-top: 12px;
  1579. display: flex;
  1580. span {
  1581. color: #3666f2;
  1582. }
  1583. .van-checkbox {
  1584. align-items: start;
  1585. ::v-deep .van-checkbox__label {
  1586. color: #999999;
  1587. }
  1588. ::v-deep .van-checkbox__icon {
  1589. margin-top: 3px;
  1590. }
  1591. }
  1592. }
  1593. }
  1594. ::v-deep .phone-container {
  1595. background: transparent;
  1596. }
  1597. }
  1598. .dialog-bargaining {
  1599. overflow: visible;
  1600. }
  1601. .species {
  1602. height: 234px !important;
  1603. }
  1604. .glory,
  1605. .red-packet {
  1606. position: absolute;
  1607. top: 90%;
  1608. left: 50%;
  1609. }
  1610. .glory {
  1611. top: 116%;
  1612. transform: translate(-50%, -110%) scale(1.5);
  1613. }
  1614. .red-packet {
  1615. width: 259px !important;
  1616. height: 318px !important;
  1617. transform: translate(-50%, -90%);
  1618. }
  1619. .red-packet-title {
  1620. width: 90%;
  1621. height: 146px;
  1622. position: absolute;
  1623. top: 0;
  1624. left: 50%;
  1625. transform: translateX(-50%);
  1626. }
  1627. .end-visible-img {
  1628. width: 289px;
  1629. height: 264px;
  1630. margin: 0 auto;
  1631. display: block;
  1632. }
  1633. .mb-24 {
  1634. margin-bottom: 24px !important;
  1635. }
  1636. .mask {
  1637. z-index: 4000;
  1638. }
  1639. </style>