index.vue 36 KB

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