giftDetail.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <template>
  2. <view class="content">
  3. <view class="gift-wrap flex f-j-s">
  4. <view class="gift-img">
  5. <image src="../../static/error/errorImage.jpg" mode=""></image>
  6. </view>
  7. <view class="gift-info flex f-d-c f-j-sb f-ai-s pl20 pt20">
  8. <view class="gift-name">
  9. 会员礼包<image src="../../static/icon/g-l.png" mode=""></image><text class="info-tit">内含五张门店优惠券</text>
  10. </view>
  11. <view class="gift-price">
  12. <text class="new-price pr10">¥300</text><text class="old-price">¥1000</text>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="gift-jg flex f-j-c">
  17. <view class="jg"></view>
  18. <view class="">礼包包含</view>
  19. <view class="jg"></view>
  20. </view>
  21. <scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrap">
  22. <view class="djq-wrap flex f-ai-s" v-for="item in 10">
  23. <image src="../../static/error/errorImage.jpg" mode="" class="djq-img"></image>
  24. <view class="djq-right pl20">
  25. <view class="djq-tit flex f-j-sb f-ai-s">
  26. <view class="djq-name clamp">
  27. 岭上会推拿SPA岭上会推拿SPA岭上会推拿SPA岭上会推拿SPA岭上会推拿SPA
  28. </view>
  29. <view class="djq-dis">
  30. <image src="../../static/icon/dw.png" mode=""></image>
  31. 距离0.3KM
  32. </view>
  33. </view>
  34. <view class="flex f-d-c f-j-sb f-ai-s fg1" style="height: 110rpx;">
  35. <view class="djq-dz clamp2">
  36. 椒江区市府大道200号椒江区市府大道200号椒江区
  37. </view>
  38. <view class="djq-hd flex f-j-sb">
  39. <view class="buy-info">
  40. 1425人已购买
  41. </view>
  42. <view class="hd-btn">
  43. <image src="../../static/icon/call.png" mode="" style="margin-right: 15rpx;"
  44. @click="makeCall()"></image>
  45. <image src="../../static/icon/dh.png" mode="" @click="dh()"></image>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="left-btm flex f-j-s">
  50. <view class="j-logo">
  51. </view>
  52. <view class="j-price">
  53. <text>¥</text>25
  54. </view>
  55. <view class="j-zk">
  56. 5.8折
  57. </view>
  58. <view class="j-name">
  59. 50元代金券
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="tb" style="height: 100rpx;"></view>
  65. </scroll-view>
  66. <view class="btm-btn" @click="buying?'':goBuy()">
  67. 立即购买
  68. </view>
  69. <uni-popup ref="popup" type="bottom">
  70. <view class="zf-wrap">
  71. <view class="zf-top flex f-j-sb">
  72. <view class="top-left">
  73. 选择支付方式
  74. </view>
  75. <image src="../../static/icon/colse.png" mode="" @click="close"></image>
  76. </view>
  77. <view class="zf-type flex" @click="changePayType(1)">
  78. <view class="type-left">
  79. <text class="icon iconfont iconweixin"></text>
  80. <text style="margin-left: 20rpx;">微信支付</text>
  81. </view>
  82. <label class="radio">
  83. <radio value="" color="#FF4C4C" :checked="payType == 1"></radio>
  84. </label>
  85. </view>
  86. <view class="zf-type flex" @click="changePayType(3)">
  87. <view class="type-left">
  88. <text class="icon iconfont iconyue"></text>
  89. <text style="margin-left: 20rpx;">余额支付</text>
  90. </view>
  91. <label class="radio">
  92. <radio value="" color="#FF4C4C" :checked="payType == 3"></radio>
  93. </label>
  94. </view>
  95. <view class="" style="width: 750rpx;height: 20rpx;background: #F6F6F6;"></view>
  96. <view class="zf-btn flex">
  97. <view class="btn-left">
  98. 合计:<text class="zf-price">100</text>
  99. </view>
  100. <view class="btn-right" @click="buying?'':buy()">
  101. 立即支付
  102. </view>
  103. </view>
  104. </view>
  105. </uni-popup>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. height: '',
  113. payType: 1,
  114. buying: false,
  115. }
  116. },
  117. onLoad() {
  118. },
  119. onShow() {
  120. },
  121. onReachBottom() {
  122. },
  123. onReady() {
  124. var obj = this;
  125. uni.getSystemInfo({
  126. success: resu => {
  127. const query = uni.createSelectorQuery();
  128. query.select('.scroll-wrap').boundingClientRect();
  129. query.exec(function(res) {
  130. obj.height = resu.windowHeight - res[0].top + 'px';
  131. });
  132. },
  133. fail: res => {}
  134. });
  135. },
  136. methods: {
  137. // 打开支付弹窗
  138. goBuy() {
  139. this.$refs.popup.open()
  140. },
  141. // 关闭支付弹窗
  142. close() {
  143. this.$refs.popup.close()
  144. },
  145. //选择支付方式
  146. changePayType(type) {
  147. this.payType = type;
  148. if (this.payType == 1) {
  149. this.payName = 'weixin';
  150. }
  151. if (this.payType == 2) {
  152. this.payName = 'ali';
  153. }
  154. if (this.payType == 3) {
  155. this.payName = 'yue';
  156. }
  157. if (this.payType == 4) {
  158. this.payName = 'pink_integral';
  159. }
  160. if (this.payType == 5) {
  161. this.payName = 'cash';
  162. }
  163. },
  164. //支付
  165. buy() {
  166. let obj = this
  167. if (obj.payType == 0) {
  168. return obj.$api.msg('请选择支付方式')
  169. }
  170. if (obj.buying) {
  171. return
  172. }
  173. obj.buying = true
  174. obj.close()
  175. },
  176. // 拨打电话
  177. makeCall() {
  178. },
  179. // 导航
  180. dh() {
  181. }
  182. }
  183. }
  184. </script>
  185. <style lang="scss">
  186. .gift-wrap {
  187. width: 750rpx;
  188. height: 198rpx;
  189. background: #FFFFFF;
  190. padding: 24rpx 30rpx;
  191. .gift-img {
  192. image {
  193. width: 150rpx;
  194. height: 150rpx;
  195. border-radius: 20rpx;
  196. }
  197. }
  198. .gift-info {
  199. flex-grow: 1;
  200. height: 100%;
  201. .gift-name {
  202. font-size: 36rpx;
  203. font-weight: bold;
  204. color: #333333;
  205. line-height: 44rpx;
  206. image {
  207. width: 26rpx;
  208. height: 26rpx;
  209. margin-left: 13rpx;
  210. margin-right: 9rpx;
  211. }
  212. .info-tit {
  213. font-size: 24rpx;
  214. font-weight: 500;
  215. color: #FFA30B;
  216. }
  217. }
  218. .gift-price {
  219. text-align: left;
  220. text {
  221. display: inline-block;
  222. }
  223. .new-price {
  224. font-size: 38rpx;
  225. font-weight: bold;
  226. color: #FF4C4C;
  227. }
  228. .old-price {
  229. font-size: 24rpx;
  230. font-weight: 500;
  231. text-decoration: line-through;
  232. color: #999999;
  233. text {
  234. font-size: 17rpx;
  235. }
  236. }
  237. }
  238. }
  239. }
  240. .gift-jg {
  241. margin: 20rpx 0;
  242. font-size: 30rpx;
  243. font-weight: 500;
  244. color: #363636;
  245. .jg {
  246. width: 120rpx;
  247. height: 1rpx;
  248. background: #989898;
  249. margin: 0 50rpx;
  250. }
  251. }
  252. .djq-wrap {
  253. width: 701rpx;
  254. height: 255rpx;
  255. background: #FFFFFF;
  256. box-shadow: 0px 0px 27rpx 0px rgba(50, 50, 52, 0.06);
  257. border-radius: 20rpx;
  258. margin: 0 auto 20rpx;
  259. padding: 23rpx 22rpx;
  260. &:last-of-type {
  261. margin-bottom: 0;
  262. }
  263. .djq-img {
  264. flex-shrink: 0;
  265. width: 150rpx;
  266. height: 150rpx;
  267. border-radius: 10rpx;
  268. }
  269. .djq-right {
  270. flex-grow: 1;
  271. .djq-tit {
  272. font-size: 34rpx;
  273. font-weight: bold;
  274. color: #333333;
  275. line-height: 52rpx;
  276. .djq-name {
  277. max-width: 300rpx;
  278. }
  279. .djq-dis {
  280. flex-shrink: 0;
  281. image {
  282. width: 20rpx;
  283. height: 28rpx;
  284. margin-right: 10rpx;
  285. }
  286. font-size: 22rpx;
  287. font-weight: 500;
  288. color: #666666;
  289. }
  290. }
  291. .djq-dz {
  292. width: 100%;
  293. font-size: 24rpx;
  294. font-weight: 500;
  295. color: #666666;
  296. }
  297. .djq-hd {
  298. width: 100%;
  299. border-bottom: 1rpx solid #EAECED;
  300. .buy-info {
  301. display: inline-block;
  302. height: 32rpx;
  303. border-radius: 16rpx 16rpx 16rpx 0px;
  304. line-height: 32rpx;
  305. font-size: 20rpx;
  306. font-weight: 500;
  307. color: #FF440D;
  308. padding: 0 15rpx;
  309. background-color: #fcf3f0;
  310. }
  311. .hd-btn {
  312. image {
  313. width: 46rpx;
  314. height: 46rpx;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. .left-btm {
  321. height: 66rpx;
  322. .j-logo {
  323. width: 32rpx;
  324. line-height: 33rpx;
  325. background: linear-gradient(-48deg, #FFA30B, #FFD158);
  326. border-radius: 13rpx;
  327. font-size: 21rpx;
  328. font-weight: 500;
  329. color: #FFFFFF;
  330. text-align: center;
  331. }
  332. .j-price {
  333. font-size: 27rpx;
  334. font-weight: bold;
  335. color: #FF4C4C;
  336. margin: 0 10rpx 0 5rpx;
  337. }
  338. .j-zk {
  339. height: 31rpx;
  340. border: 1rpx solid #FF4C4C;
  341. border-radius: 7rpx;
  342. line-height: 31rpx;
  343. padding: 0 8rpx;
  344. font-size: 20rpx;
  345. font-weight: bold;
  346. color: #FF4C4C;
  347. margin-right: 5rpx;
  348. }
  349. .j-name {
  350. font-size: 23rpx;
  351. font-weight: bold;
  352. color: #333333;
  353. }
  354. }
  355. .btm-btn {
  356. width: 750rpx;
  357. height: 100rpx;
  358. text-align: center;
  359. line-height: 100rpx;
  360. font-size: 36rpx;
  361. font-weight: 500;
  362. color: #FFFFFF;
  363. background-color: #ff4c4c;
  364. position: fixed;
  365. bottom: 0;
  366. }
  367. .zf-wrap {
  368. width: 750rpx;
  369. height: 404rpx;
  370. background: #FFFFFF;
  371. border-radius: 10rpx 10rpx 0px 0px;
  372. .zf-top {
  373. height: 86rpx;
  374. border-bottom: #EEEEEE solid 1rpx;
  375. padding: 0 25rpx;
  376. font-size: 28rpx;
  377. font-weight: bold;
  378. color: #333333;
  379. image {
  380. width: 15rpx;
  381. height: 15rpx;
  382. }
  383. }
  384. .zf-type {
  385. margin-left: 23rpx;
  386. width: 727rpx;
  387. height: 100rpx;
  388. border-bottom: #EEEEEE solid 1rpx;
  389. padding: 0 25rpx;
  390. font-size: 28rpx;
  391. font-weight: 400;
  392. color: #3F454B;
  393. &:last-of-type {
  394. border-bottom: none;
  395. }
  396. }
  397. .zf-btn {
  398. .btn-right {
  399. width: 360rpx;
  400. line-height: 100rpx;
  401. background: #FF4C4C;
  402. text-align: center;
  403. font-size: 32rpx;
  404. font-weight: bold;
  405. color: #FFFFFF;
  406. }
  407. .btn-left {
  408. width: 390rpx;
  409. line-height: 100rpx;
  410. padding-left: 24rpx;
  411. font-size: 28rpx;
  412. font-weight: 400;
  413. color: #3F454B;
  414. .zf-price {
  415. font-size: 36rpx;
  416. font-weight: bold;
  417. color: #FF4C4C;
  418. &::before {
  419. content: '¥';
  420. font-size: 24rpx;
  421. color: #FF4C4C;
  422. }
  423. }
  424. }
  425. }
  426. }
  427. .iconweixin {
  428. color: #36cb59;
  429. }
  430. .iconyue {
  431. color: #fe8e2e;
  432. }
  433. </style>