index.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573
  1. <template>
  2. <view class="bargainCon" :style="colorStyle">
  3. <skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
  4. bgcolor="#FFF"></skeleton>
  5. <view class="bargain skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
  6. <view :style="'background-image: url('+(bargainUid != userInfo.uid ?supportBg:bargaBg)+');'"
  7. class="header">
  8. <!-- #ifndef MP -->
  9. <view class="iconfont icon-ic_leftarrow" @click="goBack"></view>
  10. <!-- #endif -->
  11. <!-- #ifdef MP -->
  12. <view class="bargainTitle">
  13. <view :style="{height:getHeight.barTop+'px'}"></view>
  14. <view class="sysTitle acea-row row-center-wrapper" :style="{height:getHeight.barHeight+'px'}">
  15. <text class="iconfont icon-ic_leftarrow" @click="goBack"></text>
  16. </view>
  17. </view>
  18. <!-- #endif -->
  19. <view class="rule-btn w-72 flex-center fs-24 text--w111-fff" :style="{top: 81 + sysHeight + 'px'}"
  20. @tap="showDrawer = true">规则</view>
  21. <view class="rule-btn w-124 flex-center fs-24 text--w111-fff" :style="{top: 110 + sysHeight + 'px'}"
  22. @tap="goRecord">砍价记录</view>
  23. </view>
  24. <view class="wrapperCon">
  25. <view class="timeCon" :style="'background-image: url('+ countdownBg +');'">
  26. <view v-if="bargainUid == userInfo.uid">
  27. <countDown
  28. :tipText="'倒计时:'"
  29. inDayText="天"
  30. dayText=":"
  31. hourText=":"
  32. minuteText=":"
  33. secondText=" "
  34. :datatime="datatime"
  35. bgColor="#E93323"
  36. colors="#FFFFFF"
  37. dotColor="#E93323"
  38. :isDay="true"
  39. @endTime='endTime'
  40. v-if='endTimes == 0'></countDown>
  41. <view class="endTimes" v-else>此商品砍价已结束</view>
  42. </view>
  43. <view v-if="bargainUid != userInfo.uid" class="pictxt acea-row row-center-wrapper">
  44. <view class="pictrue">
  45. <image :src="bargainUserInfo.avatar"></image>
  46. </view>
  47. <view class="text">
  48. <text class="name">{{ bargainUserInfo.nickname || '' }}</text>
  49. 邀请您帮忙砍价
  50. </view>
  51. </view>
  52. </view>
  53. <view class="wrapper">
  54. <view class="pictxt acea-row row-between-wrapper" @tap="goProduct">
  55. <view class="pictrue skeleton-rect">
  56. <!-- <image :src="bargainInfo.image"></image> -->
  57. <easy-loadimage
  58. mode="widthFix"
  59. :image-src="bargainInfo.image"
  60. width="240rpx"
  61. height="240rpx"
  62. borderRadius="16rpx"></easy-loadimage>
  63. </view>
  64. <view class="text">
  65. <view class="top">
  66. <view class="name line2 skeleton-rect">
  67. <!-- <span class='labelN' v-if="bargainInfo.brand_name && bargainInfo.brand_name.trim()">{{bargainInfo.brand_name}}</span> -->
  68. {{ bargainInfo.title }}
  69. </view>
  70. <view class="tips">已有<text class="num">{{payCount}}人</text>砍价成功</view>
  71. </view>
  72. <baseMoney :money="bargainInfo.price" color='#E93323' :preFix="'当前'" symbolSize="32" integerSize="48"
  73. decimalSize="32" preFixSize='22' weight></baseMoney>
  74. <!-- <view class="successNum skeleton-rect">最低:¥{{ bargainInfo.min_price }}</view> -->
  75. </view>
  76. </view>
  77. <!-- 进度条 -->
  78. <block v-if="bargainUserHelpInfo.price > 0">
  79. <view class="cu-progress acea-row row-middle round margin-top" :class="endTimes?'on':''">
  80. <view class="acea-row row-middle bg-red"
  81. :style="'width:' + bargainUserHelpInfo.pricePercent + '%;'">
  82. <view v-if="">
  83. <image class="img" :class="bargainUserHelpInfo.alreadyPrice<=0?'on':''" :src="knife"></image>
  84. <view class="triangle" v-if="bargainUserHelpInfo.alreadyPrice>0"></view>
  85. <view class="hacked" v-if="bargainUserHelpInfo.alreadyPrice>0">
  86. 已砍{{ bargainUserHelpInfo.alreadyPrice }}元
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="money acea-row row-right">
  92. <view>还剩<text class="num">{{ bargainUserHelpInfo.price }}元</text></view>
  93. </view>
  94. </block>
  95. <view class="skeleton-rect" v-if="!isLogin" @click="getIsLogin">
  96. <view class="bargainBnt">立即登录</view>
  97. </view>
  98. <view class="skeleton-rect" v-if="endTimes">
  99. <view class="bargainBnt grey">活动已结束</view>
  100. <view class="seeGood" @click="goIndex">再去逛逛<text class="iconfont icon-ic_rightarrow"></text></view>
  101. </view>
  102. <view v-else>
  103. <!-- 自己砍价 -->
  104. <view class="skeleton-rect"
  105. v-if="bargainUid == userInfo.uid && (!userBargainStatus || userBargainStatus == bargainSumCount) && bargainUserHelpInfo.price > 0">
  106. <view class="bargainBnt" @tap="userBargain" v-if="productStock > 0 && quota > 0">立即参与砍价</view>
  107. <view class="bargainBnt grey" v-if="productStock <= 0 || quota <= 0">商品暂无库存</view>
  108. </view>
  109. <!-- 帮助砍价、帮砍成功: -->
  110. <view class="skeleton-rect"
  111. v-if="bargainUid == userInfo.uid && bargainUserHelpInfo.price > 0 && userBargainStatus != bargainSumCount">
  112. <view class="bargainBnt" @tap="getBargainUserBargainPricePoster">邀请好友帮忙砍价</view>
  113. <view class="tip">
  114. 已有
  115. <text class="num">{{ bargainUserHelpInfo.count }}</text>
  116. 位好友成功帮您砍价
  117. </view>
  118. </view>
  119. <view v-if="bargainUid != userInfo.uid && userBargainStatusHelp && bargainUserHelpInfo.price > 0">
  120. <view class="bargainBnt skeleton-rect" @tap="setBargainHelp">帮好友砍一刀</view>
  121. </view>
  122. <view v-if="bargainUid != userInfo.uid && userBargainStatusHelp && bargainUserHelpInfo.price == 0">
  123. <view class="bargainSuccess skeleton-rect">
  124. <text class="iconfont icon-a-ic_CompleteSelect"></text>
  125. 好友已砍价成功
  126. </view>
  127. <view class="bargainBnt grey skeleton-rect" v-if="productStock <= 0 || quota <= 0">商品暂无库存</view>
  128. <view v-else>
  129. <view class="bargainBnt grey skeleton-rect" v-if="bargainInfo.is_bargain">我也要参与</view>
  130. <view class="bargainBnt skeleton-rect" @tap="currentBargainUser" v-else>我也要参与</view>
  131. </view>
  132. </view>
  133. <view v-if="bargainUid != userInfo.uid && !userBargainStatusHelp">
  134. <view class="bargainSuccess skeleton-rect" v-if="productStock <= 0 || quota <= 0">
  135. <text class="iconfont icon-a-ic_CompleteSelect"></text>
  136. 已成功帮助好友砍价
  137. </view>
  138. <view class="bargainBnt grey" v-if="productStock <= 0 || quota <= 0">商品暂无库存</view>
  139. <view v-else>
  140. <view class="bargainBnt grey skeleton-rect" v-if="bargainInfo.is_bargain">我也要参与</view>
  141. <view class="bargainBnt skeleton-rect" @tap="currentBargainUser" v-else>我也要参与</view>
  142. </view>
  143. </view>
  144. <view v-if="bargainUserHelpInfo.price == 0 && bargainUid == userInfo.uid && statusPay != 3">
  145. <view class="bargainSuccess on skeleton-rect">
  146. <text class="iconfont icon-a-ic_CompleteSelect"></text>
  147. 恭喜您砍价成功,快去支付吧~
  148. </view>
  149. <view class="bargainBnt grey" v-if="productStock <= 0 || quota <= 0">商品暂无库存</view>
  150. <view class="bargainBnt skeleton-rect" v-else @tap="goPay">立即支付</view>
  151. <view class="bargainBnt on skeleton-rect" @tap="goBargainList">抢更多商品</view>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="bargainGang skeleton-rect" v-if="bargainUserHelpList.length">
  157. <view class="title acea-row row-center-wrapper" :style="'background-image: url('+ bargainTitle +');'">
  158. <view class="pictrue"></view>
  159. <view class="titleCon">砍价帮</view>
  160. <view class="pictrue on"></view>
  161. </view>
  162. <view class="tips">共有<text class="num">{{bargainUserHelpList.length}}</text>位好友成功帮您砍价</view>
  163. <view class="list">
  164. <block v-for="(item, index) in bargainUserHelpList" :key="index" v-if="index < 3 || !couponsHidden">
  165. <view class="item acea-row row-between-wrapper">
  166. <view class="pictxt acea-row row-between-wrapper">
  167. <view class="pictrue">
  168. <image :src="item.avatar"></image>
  169. </view>
  170. <view class="text">
  171. <view class="name line1">{{ item.nickname }}</view>
  172. <view class="line1">{{ item.add_time }}</view>
  173. </view>
  174. </view>
  175. <view class="money">
  176. 砍掉<text class="label">¥</text><text class="num">{{ item.price }}</text>
  177. </view>
  178. </view>
  179. </block>
  180. <view class="open acea-row row-center-wrapper" @click="openTap"
  181. v-if="bargainUserHelpList.length > 3">
  182. {{ couponsHidden ? '展开全部好友' : '关闭全部好友' }}
  183. <text class="iconfont"
  184. :class="couponsHidden == true ? 'icon-ic_downarrow' : 'icon-ic_uparrow'"></text>
  185. </view>
  186. </view>
  187. <view class="load" v-if="!limitStatus" @tap="getBargainUser">点击加载更多</view>
  188. </view>
  189. <view class="goodsDetails skeleton-rect">
  190. <view class="title acea-row row-center-wrapper" :style="'background-image: url('+ bargainTitle +');'">
  191. <view class="pictrue"></view>
  192. <view class="titleCon">商品详情</view>
  193. <view class="pictrue on"></view>
  194. </view>
  195. <view class="conter">
  196. <!-- #ifndef APP-PLUS -->
  197. <jyf-parser :html="bargainInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
  198. <!-- #endif -->
  199. <!-- #ifdef APP-PLUS -->
  200. <view v-html="bargainInfo.description"></view>
  201. <!-- #endif -->
  202. </view>
  203. </view>
  204. <view class="bargainTip" :class="active == true ? 'on' : ''">
  205. <view class="pictrue">
  206. <image :src="bargainPop"></image>
  207. </view>
  208. <view v-if="bargainUid == userInfo.uid">
  209. <view class="cutOff">
  210. <view class="title">您已砍掉<text class="num">{{ bargainUserBargainPrice.price }}元</text></view>
  211. <view>听说分享次数越多,</view>
  212. <view>砍价成功的几率越高哦!</view>
  213. </view>
  214. <!-- #ifdef MP -->
  215. <button class="tipBnt" @tap="getBargainUserBargainPricePoster"><text class="iconfont icon-ic_kanjia"></text>邀请好友帮砍价</button>
  216. <!-- #endif -->
  217. <!-- #ifdef H5 -->
  218. <view class="tipBnt" @tap="getBargainUserBargainPricePoster"><text class="iconfont icon-ic_kanjia"></text>邀请好友帮砍价</view>
  219. <!-- #endif -->
  220. </view>
  221. <view v-else>
  222. <view class="cutOff">
  223. <view class="title">成功帮砍<text class="num">{{ bargainUserBargainPrice.price }}元</text></view>
  224. <view>您也可以砍价低价拿哦,</view>
  225. <view>快去挑选心仪的商品吧~</view>
  226. </view>
  227. <view class="tipBnt grey" v-if="bargainInfo.is_bargain">我也要参与</view>
  228. <view @tap="currentBargainUser" class="tipBnt" v-else>我也要参与</view>
  229. </view>
  230. </view>
  231. <view class="mask" catchtouchmove="true" v-show="active == true" @tap="close"></view>
  232. </view>
  233. <!-- 分享按钮 -->
  234. <view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
  235. <!-- #ifndef MP -->
  236. <button class="item" hover-class='none' v-if="weixinStatus === true" @click="H5ShareBox = true">
  237. <!-- <button class="item" hover-class='none' v-if="weixinStatus === true" @click="setShareInfoStatus"> -->
  238. <view class="iconfont icon-weixin3"></view>
  239. <view class="">发送给朋友</view>
  240. </button>
  241. <!-- #endif -->
  242. <!-- #ifdef MP -->
  243. <button class="item" open-type="share" hover-class='none' @click="goFriend">
  244. <view class="iconfont icon-weixin3"></view>
  245. <view class="">发送给朋友</view>
  246. </button>
  247. <!-- #endif -->
  248. <!-- #ifdef APP-PLUS -->
  249. <view class="item" @click="appShare('WXSceneSession')">
  250. <view class="iconfont icon-weixin3"></view>
  251. <view class="">微信好友</view>
  252. </view>
  253. <view class="item" @click="appShare('WXSenceTimeline')">
  254. <view class="iconfont icon-pengyouquan"></view>
  255. <view class="">微信朋友圈</view>
  256. </view>
  257. <!-- #endif -->
  258. <!-- #ifndef APP-PLUS -->
  259. <button class="item" hover-class='none' @tap="getBargainUserBargainPricePoster">
  260. <view class="iconfont icon-haibao"></view>
  261. <view class="">生成海报</view>
  262. </button>
  263. <!-- #endif -->
  264. </view>
  265. <view class="mask" v-if="posters" @click="listenerActionClose"></view>
  266. <!-- 发送给朋友图片 -->
  267. <view class="share-box" v-if="H5ShareBox">
  268. <image :src="imgHost + '/statics/images/share-info.png'" @click="H5ShareBox = false"></image>
  269. </view>
  270. <!-- #ifdef H5 -->
  271. <view class="followCode" v-if="followCode">
  272. <view class="pictrue">
  273. <view class="code-bg"><img class="imgs" :src="codeSrc" /></view>
  274. </view>
  275. <view class="mask" @click="closeFollowCode"></view>
  276. </view>
  277. <zb-code ref="qrcode" v-show="false" :show="codeShow" :cid="cid" :val="val" :size="size" :unit="unit"
  278. :background="background" :foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconsize"
  279. :onval="onval" :loadMake="loadMake" @result="qrR" />
  280. <!-- #endif -->
  281. <base-drawer mode="bottom" :visible="showDrawer" background-color="transparent" mask maskClosable @close="closeDrawer">
  282. <view class="w-full bg--w111-fff rd-t-40rpx py-32 relative">
  283. <view class="text-center fs-32 text--w111-333 fw-500">砍价规则</view>
  284. <view class="close flex-center" @tap='closeDrawer'>
  285. <text class="iconfont icon-ic_close fs-24 text--w111-999"></text>
  286. </view>
  287. <view class="mt-48 px-32 scroll-content">
  288. <jyf-parser :html="bargainInfo.rule" ref="article" :tag-style="tagStyle"></jyf-parser>
  289. </view>
  290. <view class="mx-20 pb-safe">
  291. <view class="mt-52 h-72 flex-center rd-36px bg-red fs-26 text--w111-fff" @click="closeDrawer">我知道了</view>
  292. </view>
  293. </view>
  294. </base-drawer>
  295. </view>
  296. </template>
  297. <script>
  298. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  299. import zbCode from '@/components/zb-code/zb-code.vue';
  300. import baseDrawer from '@/components/tui-drawer/tui-drawer.vue';
  301. import {
  302. getBargainDetail,
  303. postBargainStartUser,
  304. postBargainStart,
  305. postBargainHelpPrice,
  306. postBargainHelpCount,
  307. postBargainHelp,
  308. postBargainHelpList,
  309. postBargainShare
  310. } from '@/api/activity.js';
  311. import {
  312. postCartAdd
  313. } from '@/api/store.js';
  314. import util from '@/utils/util.js';
  315. import {
  316. toLogin
  317. } from '@/libs/login.js';
  318. import {
  319. mapGetters
  320. } from 'vuex';
  321. import countDown from '@/components/countDown';
  322. import home from '@/components/home';
  323. import parser from '@/components/jyf-parser/jyf-parser';
  324. import {
  325. silenceBindingSpread
  326. } from '@/utils';
  327. import {
  328. TOKENNAME,
  329. HTTP_REQUEST_URL
  330. } from '@/config/app.js';
  331. const app = getApp();
  332. import colors from "@/mixins/color";
  333. export default {
  334. components: {
  335. baseDrawer,
  336. countDown,
  337. home,
  338. 'jyf-parser': parser
  339. },
  340. /**
  341. * 页面的初始数据
  342. */
  343. mixins: [colors],
  344. data() {
  345. return {
  346. // #ifdef MP
  347. getHeight: this.$util.getWXStatusHeight(),
  348. // #endif
  349. sysHeight: sysHeight,
  350. showSkeleton: true, //骨架屏显示隐藏
  351. isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
  352. countDownDay: '00',
  353. countDownHour: '00',
  354. countDownMinute: '00',
  355. countDownSecond: '00',
  356. active: false,
  357. id: 0, //砍价产品编号
  358. userInfo: {}, //当前用户信息
  359. bargainUid: 0, //开启砍价用户
  360. bargainUserInfo: {}, //开启砍价用户信息
  361. bargainUserId: 0, //开启砍价编号
  362. bargainInfo: {
  363. brand_name:''
  364. }, //砍价产品
  365. offset: 0,
  366. limit: 20,
  367. limitStatus: false,
  368. bargainUserHelpList: [],
  369. bargainUserHelpInfo: [],
  370. bargainUserBargainPrice: 0,
  371. status: '', // 0 开启砍价 1 朋友帮忙砍价 2 朋友帮忙砍价成功 3 完成砍价 4 砍价失败 5已创建订单
  372. bargainCount: [], //分享人数 浏览人数 参与人数
  373. retunTop: true,
  374. bargainPartake: 0,
  375. isHelp: false,
  376. interval: null,
  377. userBargainStatus: 0, //判断自己是否砍价
  378. bargainSumCount: 0, // 购买次数
  379. productStock: 0, //判断是否售罄;
  380. quota: 0, //判断是否已限量;
  381. userBargainStatusHelp: true,
  382. navH: '',
  383. statusPay: '',
  384. bargainPrice: 0,
  385. datatime: 0,
  386. offest: '',
  387. tagStyle: {
  388. img: 'width:100%;display:block;',
  389. table: 'width:100%',
  390. video: 'width:100%'
  391. },
  392. H5ShareBox: false, //公众号分享图片
  393. systemH: 100,
  394. isAuto: false, //没有授权的不会自动授权
  395. isShowAuth: false, //是否隐藏授权
  396. // pages: '',
  397. posters: false,
  398. weixinStatus: false,
  399. couponsHidden: true,
  400. followCode: false,
  401. //二维码参数
  402. codeShow: false,
  403. cid: '1',
  404. ifShow: true,
  405. val: "", // 要生成的二维码值
  406. size: 200, // 二维码大小
  407. unit: 'upx', // 单位
  408. background: '#FFF', // 背景色
  409. foreground: '#000', // 前景色
  410. pdground: '#000', // 角标色
  411. icon: '', // 二维码图标
  412. iconsize: 40, // 二维码图标大小
  413. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  414. onval: true, // val值变化时自动重新生成二维码
  415. loadMake: true, // 组件加载完成后自动生成二维码
  416. src: '', // 二维码生成后的图片地址或base64
  417. codeSrc: "",
  418. picUrl: {},
  419. payCount: 0, //砍价成功人数;
  420. endTimes:0,
  421. imgHost:HTTP_REQUEST_URL,
  422. supportBg: HTTP_REQUEST_URL+'/statics/images/bargain/bargain-support.png',
  423. bargaBg: HTTP_REQUEST_URL+'/statics/images/bargain/bargain-con.png',
  424. countdownBg: HTTP_REQUEST_URL+'/statics/images/bargain/bargain-countdown-bg.png',
  425. knife: HTTP_REQUEST_URL+'/statics/images/bargain/bargain-knife.png',
  426. bargainTitle: HTTP_REQUEST_URL+'/statics/images/bargain/bargain-title-bg.png',
  427. bargainPop: HTTP_REQUEST_URL+'/statics/images/bargain/bargain-pop.jpg',
  428. showDrawer: false,
  429. };
  430. },
  431. computed: mapGetters(['isLogin']),
  432. watch: {
  433. isLogin: {
  434. handler: function(newV, oldV) {
  435. if (newV) {
  436. // #ifndef MP
  437. this.addShareBargain();
  438. // #endif
  439. }
  440. },
  441. deep: true
  442. }
  443. },
  444. /**
  445. * 生命周期函数--监听页面加载
  446. */
  447. onLoad: function(options) {
  448. this.colorData();
  449. var that = this;
  450. // #ifdef MP
  451. uni.getSystemInfo({
  452. success: function(res) {
  453. that.systemH = res.statusBarHeight;
  454. that.navH = that.systemH + 10;
  455. }
  456. });
  457. // #endif
  458. var pages = getCurrentPages();
  459. if (pages.length <= 1) {
  460. that.retunTop = false;
  461. }
  462. //扫码携带参数处理
  463. // #ifdef MP
  464. if (options.scene) {
  465. var value = util.getUrlParams(decodeURIComponent(options.scene));
  466. if (typeof value === 'object') {
  467. if (value.id) options.id = value.id;
  468. if (value.spid) options.spid = value.spid;
  469. } else {
  470. app.globalData.spid = value;
  471. }
  472. }
  473. // #endif
  474. if (options.hasOwnProperty('id')) {
  475. that.id = options.id;
  476. that.bargainUid = options.spid || 0;
  477. //记录推广人uid
  478. if (options.spid) app.globalData.spid = options.spid;
  479. }
  480. this.getBargainDetails();
  481. if (this.isLogin) {
  482. if (that.bargainUid == 'undefined' || !that.bargainUid) {
  483. that.bargainUid = that.$store.state.app.uid;
  484. }
  485. this.addShareBargain();
  486. // app.globalData.openPages = '/pages/activity/goods_bargain_details/index?id=' + this.id + '&bargain=' + this.bargainUid +
  487. // '&spid=' + e.detail.uid;
  488. // this.$set(that, 'bargainPartake', e.detail.uid);
  489. } else {
  490. this.$Cache.set('login_back_url',
  491. `/pages/activity/goods_bargain_details/index?id=${options.id}&spid=${this.bargainUid}`);
  492. this.getIsLogin();
  493. }
  494. this.isLogin && silenceBindingSpread();
  495. uni.setNavigationBarTitle({
  496. title: '砍价详情'
  497. });
  498. },
  499. methods: {
  500. endTime(e){
  501. console.log('1111',e);
  502. this.endTimes = e;
  503. },
  504. getIsLogin(){
  505. toLogin()
  506. },
  507. // app分享
  508. // #ifdef APP-PLUS
  509. appShare(scene) {
  510. let that = this
  511. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  512. let curRoute = routes[routes.length - 1].$page.fullPath // 获取当前页面路由,也就是最后一个打开的页面路由
  513. uni.share({
  514. provider: "weixin",
  515. scene: scene,
  516. type: 0,
  517. href: `${HTTP_REQUEST_URL}${curRoute}`,
  518. title: that.bargainInfo.title,
  519. imageUrl: that.bargainInfo.small_image,
  520. success: function(res) {
  521. uni.showToast({
  522. title: '分享成功',
  523. icon: 'success'
  524. })
  525. that.posters = false;
  526. },
  527. fail: function(err) {
  528. uni.showToast({
  529. title: '分享失败',
  530. icon: 'none',
  531. duration: 2000
  532. })
  533. that.posters = false;
  534. }
  535. });
  536. },
  537. qrR(res) {
  538. this.codeSrc = res
  539. },
  540. // #endif
  541. /**
  542. * 分享打开
  543. *
  544. */
  545. listenerActionSheet: function() {
  546. if (this.isLogin == false) {
  547. this.getIsLogin();
  548. } else {
  549. // #ifdef H5
  550. if (this.$wechat.isWeixin() === true) {
  551. this.weixinStatus = true;
  552. }
  553. // #endif
  554. this.posters = true;
  555. }
  556. },
  557. getBargainUserBargainPricePoster() {
  558. uni.navigateTo({
  559. url: '/pages/activity/poster-poster/index?type=1&id=' + this.id + '&spid=' + this.bargainUid
  560. });
  561. },
  562. // 分享关闭
  563. listenerActionClose: function() {
  564. this.posters = false;
  565. },
  566. // 小程序关闭分享弹窗;
  567. goFriend: function() {
  568. this.posters = false;
  569. },
  570. openTap() {
  571. this.$set(this, 'couponsHidden', !this.couponsHidden);
  572. },
  573. // 授权关闭
  574. authColse: function(e) {
  575. this.isShowAuth = e;
  576. },
  577. // 去商品页
  578. goProduct() {
  579. uni.navigateTo({
  580. url: `/pages/goods_details/index?id=${this.bargainInfo.product_id}`
  581. });
  582. },
  583. // 自己砍价;
  584. userBargain: function() {
  585. let that = this;
  586. if (that.userInfo.uid == that.bargainUid) {
  587. if (that.userBargainStatus == that.bargainInfo.num) {
  588. return that.$util.Tips({
  589. title: `该商品每人限购${that.bargainInfo.num}${that.bargainInfo.unit_name}`
  590. });
  591. } else {
  592. that.setBargain();
  593. }
  594. }
  595. },
  596. goBack: function() {
  597. uni.navigateBack();
  598. },
  599. gobargainUserInfo: function() {
  600. //获取开启砍价用户信息
  601. var that = this;
  602. var data = {
  603. userId: that.bargainUid
  604. };
  605. postBargainStartUser({
  606. bargainId: that.id,
  607. bargainUserUid: that.bargainUid
  608. }).then(res => {
  609. that.$set(that, 'bargainUserInfo', res.data);
  610. });
  611. },
  612. goPay: function() {
  613. //立即支付
  614. var that = this;
  615. var data = {
  616. productId: that.bargainInfo.product_id,
  617. bargainId: that.id,
  618. cartNum: 1,
  619. uniqueId: '',
  620. combinationId: 0,
  621. secKillId: 0,
  622. new: 1
  623. };
  624. postCartAdd(data)
  625. .then(res => {
  626. uni.navigateTo({
  627. url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cartId
  628. });
  629. })
  630. .catch(err => {
  631. return that.$util.Tips({
  632. title: err
  633. });
  634. });
  635. },
  636. getBargainDetails: function() {
  637. //获取砍价产品详情
  638. var that = this;
  639. var id = that.id;
  640. getBargainDetail(id)
  641. .then(function(res) {
  642. that.payCount = res.data.payCount;
  643. that.bargainInfo = res.data.bargain;
  644. if(that.bargainInfo.description){
  645. that.bargainInfo.description = that.bargainInfo.description.replace(
  646. /<img/gi,
  647. '<img style="max-width:100%;height:auto;float:left;display:block" '
  648. );
  649. that.bargainInfo.description = that.bargainInfo.description.replace(
  650. /<video/gi,
  651. '<video style="width:100%;height:auto;display:block" '
  652. );
  653. }
  654. that.bargainPrice = res.data.bargain.price;
  655. that.userInfo = res.data.userInfo;
  656. that.bargainSumCount = res.data.bargainSumCount;
  657. that.userBargainStatus = res.data.userBargainStatus;
  658. that.productStock = res.data.bargain.attr.product_stock;
  659. that.quota = res.data.bargain.attr.quota;
  660. that.datatime = res.data.bargain.stop_time;
  661. uni.setNavigationBarTitle({
  662. title: res.data.bargain.title.substring(0, 13) + '...'
  663. });
  664. that.bargainUserHelpList = [];
  665. if(that.isLogin){
  666. that.getBargainHelpCount();
  667. that.getBargainUser();
  668. that.gobargainUserInfo();
  669. }
  670. //#ifdef H5
  671. that.setOpenShare();
  672. //#endif
  673. setTimeout(() => {
  674. that.showSkeleton = false
  675. }, 300)
  676. })
  677. .catch(function(err) {
  678. that.$util.Tips({
  679. title: err
  680. }, {
  681. tab: 2,
  682. url: '/pages/activity/goods_bargain/index'
  683. });
  684. });
  685. },
  686. getBargainHelpCount: function() {
  687. //获取砍价帮总人数、剩余金额、进度条、已经砍掉的价格
  688. var that = this;
  689. var data = {
  690. bargainId: that.id,
  691. bargainUserUid: that.bargainUid
  692. };
  693. postBargainHelpCount(data).then(res => {
  694. var price = util.$h.Sub(that.bargainPrice, res.data.alreadyPrice);
  695. that.bargainUserHelpInfo = res.data;
  696. that.bargainInfo.price = parseFloat(price) <= 0 ? 0 : price;
  697. that.userBargainStatusHelp = res.data.userBargainStatus;
  698. that.statusPay = res.data.status;
  699. });
  700. },
  701. currentBargainUser: function() {
  702. //当前用户砍价
  703. this.$set(this, 'bargainUid', this.userInfo.uid);
  704. this.setBargain();
  705. },
  706. setBargain: function() {
  707. //参与砍价
  708. var that = this;
  709. postBargainStart(that.id).then(res=>{
  710. if (res.data.code === 'subscribe') {
  711. that.$set(that, 'followCode', true);
  712. this.codeSrc = res.data.url
  713. return;
  714. }
  715. that.$set(that, 'bargainUserId', res.data);
  716. that.getBargainUserBargainPrice();
  717. that.setBargainHelp();
  718. that.getBargainHelpCount();
  719. that.userBargainStatus = 1;
  720. }).catch(err=>{
  721. that.$util.Tips({
  722. title: err
  723. });
  724. })
  725. },
  726. setBargainHelp: function() {
  727. //帮好友砍价
  728. var that = this;
  729. var data = {
  730. bargainId: that.id,
  731. bargainUserUid: that.bargainUid
  732. };
  733. postBargainHelp(data)
  734. .then(res => {
  735. if (res.data.code === 'subscribe') {
  736. that.$set(that, 'followCode', true);
  737. this.codeSrc = res.data.url
  738. return;
  739. }
  740. that.$set(that, 'bargainUserHelpList', []);
  741. that.$set(that, 'isHelp', true);
  742. that.getBargainUser();
  743. that.getBargainUserBargainPrice();
  744. that.getBargainHelpCount();
  745. })
  746. .catch(err => {
  747. that.$util.Tips({
  748. title: err
  749. });
  750. that.$set(that, 'bargainUserHelpList', []);
  751. that.getBargainUser();
  752. });
  753. },
  754. getBargainUser: function() {
  755. //获取砍价帮
  756. var that = this;
  757. var data = {
  758. bargainId: that.id,
  759. bargainUserUid: that.bargainUid,
  760. offset: that.offset,
  761. limit: that.limit
  762. };
  763. postBargainHelpList(data).then(res => {
  764. var bargainUserHelpListNew = [];
  765. var bargainUserHelpList = that.bargainUserHelpList;
  766. var len = res.data.length;
  767. bargainUserHelpListNew = bargainUserHelpList.concat(res.data);
  768. that.$set(that, 'bargainUserHelpList', res.data);
  769. that.$set(that, 'limitStatus', data.limit > len);
  770. that.$set(that, 'offest', Number(data.offset) + Number(data.limit));
  771. });
  772. },
  773. getBargainUserBargainPrice: function() {
  774. //获取帮忙砍价砍掉多少金额
  775. var that = this;
  776. var data = {
  777. bargainId: that.id,
  778. bargainUserUid: that.bargainUid
  779. };
  780. postBargainHelpPrice(data)
  781. .then(res => {
  782. that.$set(that, 'bargainUserBargainPrice', res.data);
  783. that.$set(that, 'active', true);
  784. })
  785. .catch(err => {
  786. that.$set(that, 'active', false);
  787. });
  788. },
  789. goBargainList: function() {
  790. uni.navigateTo({
  791. url: '/pages/activity/goods_bargain/index'
  792. });
  793. },
  794. goIndex(){
  795. uni.switchTab({
  796. url: '/pages/index/index'
  797. });
  798. },
  799. close: function() {
  800. this.$set(this, 'active', false);
  801. },
  802. onLoadFun: function(e) {
  803. let that = this;
  804. if (that.bargainUid == 'undefined' || !that.bargainUid) {
  805. that.bargainUid = that.$store.state.app.uid;
  806. }
  807. this.getBargainDetails();
  808. this.addShareBargain();
  809. this.isShowAuth = false;
  810. },
  811. addShareBargain: function() {
  812. //添加分享次数 获取人数
  813. var that = this;
  814. postBargainShare(this.id).then(res => {
  815. that.$set(that, 'bargainCount', res.data);
  816. });
  817. },
  818. //#ifdef H5
  819. setOpenShare() {
  820. let that = this;
  821. let configTimeline = {
  822. title: '您的好友' + that.userInfo.nickname + '邀请您砍价' + that.bargainInfo.title,
  823. desc: that.bargainInfo.info,
  824. link: window.location.protocol + '//' + window.location.host +
  825. '/pages/activity/goods_bargain_details/index?id=' +
  826. that.id + '&spid=' + that.bargainUid,
  827. imgUrl: that.bargainInfo.image
  828. };
  829. if (this.$wechat.isWeixin()) {
  830. this.$wechat
  831. .wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage',
  832. 'onMenuShareTimeline'
  833. ], configTimeline)
  834. .then(res => {})
  835. .catch(res => {
  836. if (res.is_ready) {
  837. res.wx.updateAppMessageShareData(configTimeline);
  838. res.wx.updateTimelineShareData(configTimeline);
  839. res.wx.onMenuShareAppMessage(configTimeline);
  840. res.wx.onMenuShareTimeline(configTimeline);
  841. }
  842. });
  843. }
  844. },
  845. closeFollowCode: function() {
  846. this.$set(this, 'followCode', false);
  847. },
  848. //#endif
  849. closeDrawer(){
  850. this.showDrawer = false;
  851. },
  852. goRecord(){
  853. uni.navigateTo({
  854. url: '/pages/activity/bargain/index'
  855. })
  856. }
  857. },
  858. /**
  859. * 生命周期函数--监听页面初次渲染完成
  860. */
  861. onReady: function() {
  862. this.isNodes++;
  863. },
  864. /**
  865. * 生命周期函数--监听页面显示
  866. */
  867. onShow(){
  868. uni.removeStorageSync('form_type_cart');
  869. },
  870. /**
  871. * 生命周期函数--监听页面隐藏
  872. */
  873. onHide: function() {
  874. if (this.interval !== null) clearInterval(this.interval);
  875. },
  876. /**
  877. * 生命周期函数--监听页面卸载
  878. */
  879. onUnload: function() {
  880. if (this.interval !== null) clearInterval(this.interval);
  881. },
  882. //#ifdef MP
  883. /**
  884. * 用户点击右上角分享
  885. */
  886. onShareAppMessage: function() {
  887. let that = this,
  888. share = {
  889. title: '您的好友' + that.userInfo.nickname + '邀请您帮他砍' + that.bargainInfo.title + ' 快去帮忙吧!',
  890. path: '/pages/activity/goods_bargain_details/index?id=' + this.id + '&spid=' + this.bargainUid,
  891. imageUrl: that.bargainInfo.image
  892. };
  893. that.close();
  894. that.addShareBargain();
  895. return share;
  896. }
  897. //#endif
  898. };
  899. </script>
  900. <style lang="scss">
  901. .bargainTitle{
  902. position: fixed;
  903. left:0;
  904. top:0;
  905. width: 100%;
  906. z-index: 99;
  907. .sysTitle{
  908. width: 100%;
  909. position: relative;
  910. .iconfont{
  911. position: absolute;
  912. font-size: 36rpx;
  913. left:11rpx;
  914. width: 80rpx;
  915. color:#fff;
  916. }
  917. }
  918. }
  919. .bargainCon{
  920. // background-color: var(--view-theme);
  921. padding-bottom: 50rpx;
  922. min-height: 100vh;
  923. }
  924. .generate-posters {
  925. width: 100%;
  926. height: 170rpx;
  927. background-color: #fff;
  928. position: fixed;
  929. left: 0;
  930. bottom: 0;
  931. z-index: 300;
  932. transform: translate3d(0, 100%, 0);
  933. transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  934. border-top: 1rpx solid #eee;
  935. }
  936. .rule-btn{
  937. height: 48rpx;
  938. background: rgba(0,0,0,0.3);
  939. border-radius: 24rpx 0 0 24rpx;
  940. position: fixed;
  941. right: 0;
  942. z-index: 9;
  943. }
  944. .generate-posters.on {
  945. transform: translate3d(0, 0, 0);
  946. }
  947. .generate-posters .item {
  948. flex: 1;
  949. text-align: center;
  950. font-size: 30rpx;
  951. }
  952. .generate-posters .item .iconfont {
  953. font-size: 80rpx;
  954. color: #5eae72;
  955. }
  956. .generate-posters .item .iconfont.icon-haibao {
  957. color: #5391f1;
  958. }
  959. .bargain .bargainGang .open {
  960. font-size: 24rpx;
  961. color: #999;
  962. margin-top: 30rpx;
  963. }
  964. .bargain .bargainGang .open .iconfont {
  965. font-size: 25rpx;
  966. margin: 5rpx 0 0 10rpx;
  967. }
  968. .bargain .header {
  969. background-repeat: no-repeat;
  970. background-size: 100% 100%;
  971. width: 100%;
  972. height: 1000rpx;
  973. margin: 0 auto;
  974. padding-top: 55rpx;
  975. box-sizing: border-box;
  976. .iconfont{
  977. color: #fff;
  978. font-size: 40rpx;
  979. margin-left: 34rpx;
  980. }
  981. }
  982. .bargain .header .people {
  983. text-align: center;
  984. color: #fff;
  985. font-size: 20rpx;
  986. position: absolute;
  987. width: 100%;
  988. /* #ifdef MP || APP-PLUS */
  989. height: 44px;
  990. line-height: 44px;
  991. top: 40rpx;
  992. /* #endif */
  993. /* #ifdef H5 */
  994. top: 58rpx;
  995. /* #endif */
  996. }
  997. .bargain .wrapperCon{
  998. width: 710rpx;
  999. margin: -624rpx auto 0 auto;
  1000. }
  1001. .bargain .wrapper,
  1002. .bargain .bargainGang,
  1003. .bargain .goodsDetails {
  1004. width: 100%;
  1005. background-color: #fff;
  1006. border-radius: 0 0 24rpx 24rpx;
  1007. padding: 17rpx 20rpx 0 20rpx;
  1008. padding-bottom: 50rpx;
  1009. }
  1010. .bargain .bargainGang .tips{
  1011. font-size: 24rpx;
  1012. font-weight: 400;
  1013. color: #333333;
  1014. text-align: center;
  1015. margin-top: 30rpx;
  1016. .num{
  1017. color: #E93323;
  1018. font-weight: 500;
  1019. padding: 0 8rpx;
  1020. }
  1021. }
  1022. .bargain .wrapperCon .timeCon{
  1023. background-repeat: no-repeat;
  1024. background-size: 100% 100%;
  1025. width: 100%;
  1026. height: 116rpx;
  1027. /deep/.time{
  1028. padding-top: 14px;
  1029. .styleAll{
  1030. background-color: #E93323;
  1031. color: #fff;
  1032. display: inline-block;
  1033. min-width: 34rpx;
  1034. height: 36rpx;
  1035. border-radius: 8rpx;
  1036. text-align: center;
  1037. line-height: 36rpx;
  1038. font-size: 28rpx;
  1039. font-family:'SemiBold';
  1040. padding: 0 2rpx;
  1041. .dayTxt{
  1042. font-size: 12px;
  1043. }
  1044. }
  1045. .title{
  1046. color: #333 !important;
  1047. }
  1048. .red{
  1049. color: #E93323;
  1050. padding: 0 6rpx;
  1051. }
  1052. }
  1053. .pictxt{
  1054. height: 96rpx;
  1055. .pictrue{
  1056. width: 60rpx;
  1057. height: 60rpx;
  1058. border-radius: 50%;
  1059. image{
  1060. width: 100%;
  1061. height: 100%;
  1062. border-radius: 50%;
  1063. }
  1064. }
  1065. .text{
  1066. font-size: 28rpx;
  1067. color: #333;
  1068. font-weight: 400;
  1069. margin-left: 18rpx;
  1070. .name{
  1071. font-weight: 600;
  1072. color: #E93323;
  1073. margin-right: 10rpx;
  1074. }
  1075. }
  1076. }
  1077. .endTimes{
  1078. font-size: 28rpx;
  1079. color: #333;
  1080. font-weight: 400;
  1081. text-align: center;
  1082. height: 96rpx;
  1083. line-height: 96rpx;
  1084. }
  1085. }
  1086. .bargain .wrapper .pictxt {
  1087. // margin: 26rpx 0 37rpx 0;
  1088. }
  1089. .bargain .wrapper .pictxt .pictrue {
  1090. width: 240rpx;
  1091. height: 240rpx;
  1092. position: relative;
  1093. }
  1094. .bargain .wrapper .pictxt .pictrue image {
  1095. width: 100%;
  1096. height: 100%;
  1097. border-radius: 16rpx;
  1098. }
  1099. .bargain .wrapper .pictxt .text {
  1100. width: 400rpx;
  1101. font-size: 28rpx;
  1102. color: #333;
  1103. .tips{
  1104. font-weight: 400;
  1105. color: #999999;
  1106. font-size: 22rpx;
  1107. margin-top: 12rpx;
  1108. .num{
  1109. color: #FE960F;
  1110. margin: 0 6rpx;
  1111. }
  1112. }
  1113. .top{
  1114. height: 188rpx;
  1115. }
  1116. }
  1117. .bargain .wrapper .pictxt .text .name{
  1118. width: 100%;
  1119. height: 74rpx;
  1120. visibility: visible;
  1121. }
  1122. .bargain .wrapper .pictxt .text .labelN{
  1123. font-size: 20rpx;
  1124. color: var(--view-theme);
  1125. font-weight: 500;
  1126. border:1px solid var(--view-theme);
  1127. border-radius: 6rpx;
  1128. padding: 2rpx 4rpx;
  1129. margin-right: 10rpx;
  1130. display: inline-block;
  1131. vertical-align: text-top;
  1132. }
  1133. .bargain .wrapper .pictxt .text .successNum {
  1134. font-size: 22rpx;
  1135. color: #999;
  1136. }
  1137. .bargain .wrapper .cu-progress {
  1138. // overflow: hidden;
  1139. height: 20rpx;
  1140. background-color: rgba(233, 51, 35, 0.08);
  1141. width: 100%;
  1142. border-radius: 20rpx;
  1143. margin-top: 60rpx;
  1144. &.on{
  1145. background-color:#F5F5F5;
  1146. }
  1147. }
  1148. .bargain .wrapper .cu-progress .bg-red {
  1149. width: 0;
  1150. height: 100%;
  1151. transition: width 0.6s ease;
  1152. border-radius: 20rpx;
  1153. background-color: #E93323;
  1154. position: relative;
  1155. .img{
  1156. width: 88rpx;
  1157. height: 88rpx;
  1158. position: absolute;
  1159. right: -30rpx;
  1160. top:50%;
  1161. margin-top: -38rpx;
  1162. &.on{
  1163. right: -62rpx;
  1164. }
  1165. }
  1166. .triangle{
  1167. width: 0;
  1168. height: 0;
  1169. border-left: 15rpx solid transparent;
  1170. border-right: 15rpx solid transparent;
  1171. border-bottom: 15rpx solid #E93323;
  1172. position: absolute;
  1173. right: 0;
  1174. top: 30rpx;
  1175. }
  1176. .hacked{
  1177. position: absolute;
  1178. height: 41rpx;
  1179. line-height: 43rpx;
  1180. padding: 0 6rpx;
  1181. background: #E93323;
  1182. color: #fff;
  1183. font-size: 22rpx;
  1184. right: -50rpx;
  1185. top:42rpx;
  1186. border-radius: 10rpx;
  1187. font-weight: 400;
  1188. }
  1189. }
  1190. .bargain .wrapper .money {
  1191. font-size: 22rpx;
  1192. color: #999;
  1193. margin-top: 16rpx;
  1194. .num{
  1195. font-weight: 400;
  1196. color: #E93323;
  1197. margin-left: 4rpx;
  1198. }
  1199. }
  1200. .bargain .wrapper .bargainSuccess {
  1201. font-size: 32rpx;
  1202. color: #333;
  1203. text-align: center;
  1204. margin-top: 52rpx;
  1205. &.on{
  1206. color: #E93323;
  1207. }
  1208. }
  1209. .bargain .wrapper .bargainSuccess .iconfont {
  1210. font-size: 34rpx;
  1211. color: #00b42a;
  1212. padding-right: 8rpx;
  1213. vertical-align: -3rpx;
  1214. }
  1215. .bargain .wrapper .seeGood{
  1216. font-weight: 400;
  1217. color: #E93323;
  1218. font-size: 30rpx;
  1219. text-align: center;
  1220. margin-top: 32rpx;
  1221. }
  1222. .bargain .wrapper .bargainBnt {
  1223. font-size: 28rpx;
  1224. font-weight: 500;
  1225. color: #fff;
  1226. width: 670rpx;
  1227. height: 88rpx;
  1228. border-radius: 50rpx;
  1229. background: linear-gradient(90deg, #E93323 0%, #FF7931 100%);
  1230. text-align: center;
  1231. line-height: 88rpx;
  1232. margin-top: 42rpx;
  1233. }
  1234. .bargain .wrapper .bargainBnt.on {
  1235. color: #E93323;
  1236. background: linear-gradient(90deg, #FCEAE9 0%, #FCEAE9 100%);
  1237. }
  1238. .bargain .wrapper .bargainBnt.grey {
  1239. color: #fff;
  1240. background-image: linear-gradient(to right, #ccc 0%, #ccc 100%);
  1241. }
  1242. .bargain .wrapper .tip {
  1243. font-size: 22rpx;
  1244. color: #999;
  1245. text-align: center;
  1246. margin-top: 22rpx;
  1247. font-weight: 400;
  1248. }
  1249. .bargain .wrapper .tip .num {
  1250. color: #E93323;
  1251. margin: 0 8rpx;
  1252. }
  1253. .bargain .bargainGang,.bargain .goodsDetails {
  1254. margin: 20rpx auto 0 auto;
  1255. width: 710rpx;
  1256. padding: 0 0 34rpx 0;
  1257. border-radius: 22rpx;
  1258. }
  1259. .bargain .bargainGang .title,
  1260. .bargain .goodsDetails .title {
  1261. font-size: 32rpx;
  1262. font-weight: bold;
  1263. height: 80rpx;
  1264. background-repeat: no-repeat;
  1265. background-size: 100% 100%;
  1266. width: 100%;
  1267. height: 86rpx;
  1268. color: #E93323;
  1269. font-size: 36rpx;
  1270. }
  1271. .bargain .bargainGang .title .pictrue,
  1272. .bargain .goodsDetails .title .pictrue {
  1273. width: 60rpx;
  1274. height: 4rpx;
  1275. background: linear-gradient(270deg, #E93323 0%, rgba(255,255,255,0) 100%);
  1276. }
  1277. .bargain .bargainGang .title .pictrue.on,
  1278. .bargain .goodsDetails .title .pictrue.on {
  1279. transform: rotate(180deg);
  1280. }
  1281. .bargain .bargainGang .title .titleCon,
  1282. .bargain .goodsDetails .title .titleCon {
  1283. margin: 0 28rpx;
  1284. }
  1285. .bargain .bargainGang .list{
  1286. margin-top: 10rpx;
  1287. padding: 0 20rpx;
  1288. }
  1289. .bargain .bargainGang .list .item {
  1290. height: 140rpx;
  1291. }
  1292. .bargain .bargainGang .list .item .pictxt {
  1293. width: 316rpx;
  1294. }
  1295. .bargain .bargainGang .list .item .pictxt .pictrue {
  1296. width: 80rpx;
  1297. height: 80rpx;
  1298. }
  1299. .bargain .bargainGang .list .item .pictxt .pictrue image {
  1300. width: 100%;
  1301. height: 100%;
  1302. border-radius: 50%;
  1303. }
  1304. .bargain .bargainGang .list .item .pictxt .text {
  1305. width: 225rpx;
  1306. font-size: 22rpx;
  1307. color: #999;
  1308. }
  1309. .bargain .bargainGang .list .item .pictxt .text .name {
  1310. font-size: 30rpx;
  1311. color: #333;
  1312. margin-bottom: 4rpx;
  1313. font-weight: 400;
  1314. }
  1315. .bargain .bargainGang .list .item .money {
  1316. font-size: 22rpx;
  1317. color: #999;
  1318. .label{
  1319. font-size: 28rpx;
  1320. color: #E93323;
  1321. font-weight: 600;
  1322. margin-left: 10rpx;
  1323. }
  1324. .num{
  1325. font-size: 44rpx;
  1326. color: #E93323;
  1327. font-family: 'SemiBold';
  1328. }
  1329. }
  1330. .bargain .bargainGang .load {
  1331. font-size: 24rpx;
  1332. text-align: center;
  1333. line-height: 80rpx;
  1334. height: 80rpx;
  1335. color: var(--view-theme);
  1336. }
  1337. .bargain .goodsDetails .conter {
  1338. overflow: hidden;
  1339. word-break: break-all;
  1340. }
  1341. .bargain .goodsDetails .conter image {
  1342. width: 100% !important;
  1343. display: block !important;
  1344. }
  1345. .bargain .bargainTip {
  1346. position: fixed;
  1347. top: 50%;
  1348. left: 50%;
  1349. width: 480rpx;
  1350. margin-left: -240rpx;
  1351. z-index: 111;
  1352. border-radius: 48rpx;
  1353. background-color: #fff;
  1354. transition: all 0.3s ease-in-out 0s;
  1355. opacity: 0;
  1356. transform: scale(0);
  1357. padding-bottom: 60rpx;
  1358. margin-top: -330rpx;
  1359. }
  1360. .bargain .bargainTip.on {
  1361. opacity: 1;
  1362. transform: scale(1);
  1363. }
  1364. .bargain .bargainTip .pictrue {
  1365. width: 100%;
  1366. height: 266rpx;
  1367. }
  1368. .bargain .bargainTip .pictrue image {
  1369. width: 100%;
  1370. height: 100%;
  1371. border-radius: 20rpx 20rpx 0 0;
  1372. }
  1373. .bargain .bargainTip .cutOff {
  1374. font-size: 24rpx;
  1375. color: #333;
  1376. padding: 0 29rpx;
  1377. text-align: center;
  1378. margin-top: 30rpx;
  1379. .title{
  1380. font-weight: 500;
  1381. font-size: 32rpx;
  1382. margin-bottom: 12rpx;
  1383. .num{
  1384. color: #FF7D00;
  1385. }
  1386. }
  1387. }
  1388. .bargain .bargainTip .tipBnt {
  1389. font-size: 26rpx;
  1390. color: #fff;
  1391. width: 360rpx;
  1392. height: 72rpx;
  1393. border-radius: 36rpx;
  1394. background: linear-gradient(90deg, #E93323 0%, #FF7931 100%);
  1395. box-shadow: 0px 6px 16px 0px rgba(216,7,7,0.5);
  1396. text-align: center;
  1397. line-height: 72rpx;
  1398. margin: 40rpx auto 0 auto;
  1399. .iconfont{
  1400. margin-right: 10rpx;
  1401. }
  1402. &.grey{
  1403. background: linear-gradient(90deg, #ccc 0%, #ccc 100%);
  1404. box-shadow: unset;
  1405. }
  1406. }
  1407. .bargain_view {
  1408. width: 100%;
  1409. height: 48rpx;
  1410. background: rgba(0, 0, 0, 0.5);
  1411. opacity: 1;
  1412. border-radius: 0 0 6rpx 6rpx;
  1413. position: absolute;
  1414. bottom: 0;
  1415. font-size: 22rpx;
  1416. color: #fff;
  1417. text-align: center;
  1418. line-height: 48rpx;
  1419. }
  1420. .iconfonts {
  1421. font-size: 22rpx !important;
  1422. }
  1423. .wxParse-div {
  1424. width: auto !important;
  1425. height: auto !important;
  1426. }
  1427. .bargain .mask {
  1428. z-index: 100;
  1429. }
  1430. .share-box {
  1431. z-index: 1000;
  1432. position: fixed;
  1433. left: 0;
  1434. top: 0;
  1435. width: 100%;
  1436. height: 100%;
  1437. image {
  1438. width: 100%;
  1439. height: 100%;
  1440. }
  1441. }
  1442. .followCode {
  1443. .pictrue {
  1444. width: 500rpx;
  1445. height: 530rpx;
  1446. border-radius: 12px;
  1447. left: 50%;
  1448. top: 50%;
  1449. margin-left: -250rpx;
  1450. margin-top: -360rpx;
  1451. position: fixed;
  1452. z-index: 10000;
  1453. .code-bg {
  1454. display: flex;
  1455. justify-content: center;
  1456. width: 100%;
  1457. height: 100%;
  1458. background-image: url('~@/static/images/code-bg.png');
  1459. background-size: 100% 100%;
  1460. }
  1461. .imgs {
  1462. width: 310rpx;
  1463. height: 310rpx;
  1464. margin-top: 92rpx;
  1465. }
  1466. }
  1467. .mask {
  1468. z-index: 9999;
  1469. }
  1470. }
  1471. .close{
  1472. position: absolute;
  1473. right: 32rpx;
  1474. top: 36rpx;
  1475. width: 36rpx;
  1476. height: 36rpx;
  1477. border-radius: 50%;
  1478. background-color: #eee;
  1479. }
  1480. .scroll-content{
  1481. max-height: 800rpx;
  1482. overflow-y: auto;
  1483. }
  1484. .bg-red{
  1485. background-color: #E93323;
  1486. }
  1487. </style>