giftDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  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. <uni-popup ref="popupdh" type="bottom" @click="close">
  107. <view class="popup_row">
  108. <view class="rows">
  109. <view class="rows-item" @click="toGaodeMap">高德地图</view>
  110. <view class="rows-item" @click="tobaiDuMap">百度地图</view>
  111. <!-- <view class="rows-item" @click="totengxunMap">腾讯地图</view> -->
  112. </view>
  113. </view>
  114. </uni-popup>
  115. </view>
  116. </template>
  117. <script>
  118. export default {
  119. data() {
  120. return {
  121. height: '',
  122. payType: 1,
  123. buying: false,
  124. }
  125. },
  126. onLoad() {
  127. },
  128. onShow() {
  129. },
  130. onReachBottom() {
  131. },
  132. onReady() {
  133. var obj = this;
  134. uni.getSystemInfo({
  135. success: resu => {
  136. const query = uni.createSelectorQuery();
  137. query.select('.scroll-wrap').boundingClientRect();
  138. query.exec(function(res) {
  139. obj.height = resu.windowHeight - res[0].top + 'px';
  140. });
  141. },
  142. fail: res => {}
  143. });
  144. },
  145. methods: {
  146. // 打开支付弹窗
  147. goBuy() {
  148. this.$refs.popup.open()
  149. },
  150. // 关闭支付弹窗
  151. close() {
  152. this.$refs.popup.close()
  153. },
  154. //选择支付方式
  155. changePayType(type) {
  156. this.payType = type;
  157. if (this.payType == 1) {
  158. this.payName = 'weixin';
  159. }
  160. if (this.payType == 2) {
  161. this.payName = 'ali';
  162. }
  163. if (this.payType == 3) {
  164. this.payName = 'yue';
  165. }
  166. if (this.payType == 4) {
  167. this.payName = 'pink_integral';
  168. }
  169. if (this.payType == 5) {
  170. this.payName = 'cash';
  171. }
  172. },
  173. //支付
  174. buy() {
  175. let obj = this
  176. if (obj.payType == 0) {
  177. return obj.$api.msg('请选择支付方式')
  178. }
  179. if (obj.buying) {
  180. return
  181. }
  182. obj.buying = true
  183. obj.close()
  184. },
  185. // 拨打电话
  186. makeCall() {
  187. },
  188. // 导航
  189. dh() {
  190. }
  191. }
  192. }
  193. </script>
  194. <style lang="scss">
  195. .gift-wrap {
  196. width: 750rpx;
  197. height: 198rpx;
  198. background: #FFFFFF;
  199. padding: 24rpx 30rpx;
  200. .gift-img {
  201. image {
  202. width: 150rpx;
  203. height: 150rpx;
  204. border-radius: 20rpx;
  205. }
  206. }
  207. .gift-info {
  208. flex-grow: 1;
  209. height: 100%;
  210. .gift-name {
  211. font-size: 36rpx;
  212. font-weight: bold;
  213. color: #333333;
  214. line-height: 44rpx;
  215. image {
  216. width: 26rpx;
  217. height: 26rpx;
  218. margin-left: 13rpx;
  219. margin-right: 9rpx;
  220. }
  221. .info-tit {
  222. font-size: 24rpx;
  223. font-weight: 500;
  224. color: #FFA30B;
  225. }
  226. }
  227. .gift-price {
  228. text-align: left;
  229. text {
  230. display: inline-block;
  231. }
  232. .new-price {
  233. font-size: 38rpx;
  234. font-weight: bold;
  235. color: #FF4C4C;
  236. }
  237. .old-price {
  238. font-size: 24rpx;
  239. font-weight: 500;
  240. text-decoration: line-through;
  241. color: #999999;
  242. text {
  243. font-size: 17rpx;
  244. }
  245. }
  246. }
  247. }
  248. }
  249. .gift-jg {
  250. margin: 20rpx 0;
  251. font-size: 30rpx;
  252. font-weight: 500;
  253. color: #363636;
  254. .jg {
  255. width: 120rpx;
  256. height: 1rpx;
  257. background: #989898;
  258. margin: 0 50rpx;
  259. }
  260. }
  261. .djq-wrap {
  262. width: 701rpx;
  263. height: 255rpx;
  264. background: #FFFFFF;
  265. box-shadow: 0px 0px 27rpx 0px rgba(50, 50, 52, 0.06);
  266. border-radius: 20rpx;
  267. margin: 0 auto 20rpx;
  268. padding: 23rpx 22rpx;
  269. &:last-of-type {
  270. margin-bottom: 0;
  271. }
  272. .djq-img {
  273. flex-shrink: 0;
  274. width: 150rpx;
  275. height: 150rpx;
  276. border-radius: 10rpx;
  277. }
  278. .djq-right {
  279. flex-grow: 1;
  280. .djq-tit {
  281. font-size: 34rpx;
  282. font-weight: bold;
  283. color: #333333;
  284. line-height: 52rpx;
  285. .djq-name {
  286. max-width: 300rpx;
  287. }
  288. .djq-dis {
  289. flex-shrink: 0;
  290. image {
  291. width: 20rpx;
  292. height: 28rpx;
  293. margin-right: 10rpx;
  294. }
  295. font-size: 22rpx;
  296. font-weight: 500;
  297. color: #666666;
  298. }
  299. }
  300. .djq-dz {
  301. width: 100%;
  302. font-size: 24rpx;
  303. font-weight: 500;
  304. color: #666666;
  305. }
  306. .djq-hd {
  307. width: 100%;
  308. border-bottom: 1rpx solid #EAECED;
  309. .buy-info {
  310. display: inline-block;
  311. height: 32rpx;
  312. border-radius: 16rpx 16rpx 16rpx 0px;
  313. line-height: 32rpx;
  314. font-size: 20rpx;
  315. font-weight: 500;
  316. color: #FF440D;
  317. padding: 0 15rpx;
  318. background-color: #fcf3f0;
  319. }
  320. .hd-btn {
  321. image {
  322. width: 46rpx;
  323. height: 46rpx;
  324. }
  325. }
  326. }
  327. }
  328. }
  329. .left-btm {
  330. height: 66rpx;
  331. .j-logo {
  332. width: 32rpx;
  333. line-height: 33rpx;
  334. background: linear-gradient(-48deg, #FFA30B, #FFD158);
  335. border-radius: 13rpx;
  336. font-size: 21rpx;
  337. font-weight: 500;
  338. color: #FFFFFF;
  339. text-align: center;
  340. }
  341. .j-price {
  342. font-size: 27rpx;
  343. font-weight: bold;
  344. color: #FF4C4C;
  345. margin: 0 10rpx 0 5rpx;
  346. }
  347. .j-zk {
  348. height: 31rpx;
  349. border: 1rpx solid #FF4C4C;
  350. border-radius: 7rpx;
  351. line-height: 31rpx;
  352. padding: 0 8rpx;
  353. font-size: 20rpx;
  354. font-weight: bold;
  355. color: #FF4C4C;
  356. margin-right: 5rpx;
  357. }
  358. .j-name {
  359. font-size: 23rpx;
  360. font-weight: bold;
  361. color: #333333;
  362. }
  363. }
  364. .btm-btn {
  365. width: 750rpx;
  366. height: 100rpx;
  367. text-align: center;
  368. line-height: 100rpx;
  369. font-size: 36rpx;
  370. font-weight: 500;
  371. color: #FFFFFF;
  372. background-color: #ff4c4c;
  373. position: fixed;
  374. bottom: 0;
  375. }
  376. .zf-wrap {
  377. width: 750rpx;
  378. height: 404rpx;
  379. background: #FFFFFF;
  380. border-radius: 10rpx 10rpx 0px 0px;
  381. .zf-top {
  382. height: 86rpx;
  383. border-bottom: #EEEEEE solid 1rpx;
  384. padding: 0 25rpx;
  385. font-size: 28rpx;
  386. font-weight: bold;
  387. color: #333333;
  388. image {
  389. width: 15rpx;
  390. height: 15rpx;
  391. }
  392. }
  393. .zf-type {
  394. margin-left: 23rpx;
  395. width: 727rpx;
  396. height: 100rpx;
  397. border-bottom: #EEEEEE solid 1rpx;
  398. padding: 0 25rpx;
  399. font-size: 28rpx;
  400. font-weight: 400;
  401. color: #3F454B;
  402. &:last-of-type {
  403. border-bottom: none;
  404. }
  405. }
  406. .zf-btn {
  407. .btn-right {
  408. width: 360rpx;
  409. line-height: 100rpx;
  410. background: #FF4C4C;
  411. text-align: center;
  412. font-size: 32rpx;
  413. font-weight: bold;
  414. color: #FFFFFF;
  415. }
  416. .btn-left {
  417. width: 390rpx;
  418. line-height: 100rpx;
  419. padding-left: 24rpx;
  420. font-size: 28rpx;
  421. font-weight: 400;
  422. color: #3F454B;
  423. .zf-price {
  424. font-size: 36rpx;
  425. font-weight: bold;
  426. color: #FF4C4C;
  427. &::before {
  428. content: '¥';
  429. font-size: 24rpx;
  430. color: #FF4C4C;
  431. }
  432. }
  433. }
  434. }
  435. }
  436. .iconweixin {
  437. color: #36cb59;
  438. }
  439. .iconyue {
  440. color: #fe8e2e;
  441. }
  442. .popup_row {
  443. width: 100%;
  444. height: 500rpx;
  445. background-color: #ffffff;
  446. border-radius: 20rpx;
  447. display: flex;
  448. justify-content: center;
  449. align-items: center;
  450. .rows {
  451. width: 100%;
  452. padding: 0 24rpx;
  453. .rows-item {
  454. height: 80rpx;
  455. line-height: 80rpx;
  456. text-align: center;
  457. width: 100%;
  458. font-size: 32rpx;
  459. color: #303133;
  460. // border-bottom: 1rpx solid #f0f0f0;
  461. }
  462. }
  463. }
  464. </style>