visitorIndex.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <template>
  2. <view class="visitor-index">
  3. <zs-banner></zs-banner>
  4. <view class="list">
  5. <view class="combo">
  6. <view class="bg" :class="[active == index?'active':'']" @click="handleCard(index)"
  7. v-for="(item,index) in cardList" :key="item.title">
  8. <view class="card">
  9. <view class="combo-info">
  10. <view class="combo-title">
  11. {{item.title}}
  12. </view>
  13. <view class="combo-type">
  14. 连续包月
  15. </view>
  16. </view>
  17. <view class="combo-desc">
  18. <view class="desc-item" v-for="(item,index) in equityList" :key="index">
  19. <image class="icon" :src="item.icon" mode=""></image>
  20. <view class="text">
  21. {{item.desc}}
  22. </view>
  23. </view>
  24. </view>
  25. <view class="btn">
  26. 立即订购
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="table-box box">
  33. <view class="table-title">
  34. 资费详情
  35. </view>
  36. <table class="table">
  37. <tr>
  38. <td class="label">名称</td>
  39. <td class="value">移动生活本地宝</td>
  40. </tr>
  41. <tr>
  42. <td class="label">月费</td>
  43. <td class="value">20元</td>
  44. </tr>
  45. <tr>
  46. <td class="label">尊享权益</td>
  47. <td class="value">
  48. 加油充电8折起;<br>
  49. 景区门票6折起;<br>
  50. 千家酒店随心住<br>
  51. </td>
  52. </tr>
  53. </table>
  54. <view class="step-box">
  55. <view class="step-title">在线激活流程</view>
  56. <view class="step">
  57. <view class="step-item suffix">
  58. <image src="../../static/step1.png" class="icon" mode=""></image>
  59. <view class="label">
  60. 用户注册
  61. </view>
  62. </view>
  63. <view class="step-item suffix">
  64. <image src="../../static/step2.png" class="icon" mode=""></image>
  65. <view class="label">
  66. 受理开户
  67. </view>
  68. </view>
  69. <view class="step-item suffix">
  70. <image src="../../static/step3.png" class="icon" mode=""></image>
  71. <view class="label">
  72. 注册核验
  73. </view>
  74. </view>
  75. <view class="step-item">
  76. <image src="../../static/step4.png" class="icon" mode=""></image>
  77. <view class="label">
  78. 激活套餐
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="choose-btn" @click="handleBtn">
  85. 立即办理
  86. </view>
  87. <!-- 登录弹窗 -->
  88. <zs-login v-model="show"></zs-login>
  89. <!-- 骨架屏 -->
  90. <zs-skeleton :loading="loading"></zs-skeleton>
  91. </view>
  92. </template>
  93. <script>
  94. export default {
  95. data() {
  96. return {
  97. show: false,
  98. loading: true,
  99. active: 1, //套餐默认20
  100. cardList: [ //套餐列表
  101. {
  102. title: '10元套餐',
  103. },
  104. {
  105. title: '20元套餐',
  106. },
  107. {
  108. title: '30元套餐',
  109. }
  110. ],
  111. equityList: [{
  112. icon: require('../../static/equity1.png'),
  113. desc: '加油充电9折起',
  114. },
  115. {
  116. icon: require('../../static/equity2.png'),
  117. desc: '景区门票8折起',
  118. },
  119. {
  120. icon: require('../../static/equity3.png'),
  121. desc: '千家酒店随心住',
  122. }
  123. ],
  124. }
  125. },
  126. methods: {
  127. //选择套餐
  128. handleCard(index) {
  129. this.active = index
  130. },
  131. // 点击办理
  132. handleBtn() {
  133. this.show = true
  134. uni.setStorageSync('type', 1)
  135. },
  136. },
  137. onShow() {
  138. this.show = false
  139. this.loading = false
  140. },
  141. onHide() {
  142. this.show = false
  143. },
  144. }
  145. </script>
  146. <style lang="scss" scoped>
  147. .visitor-index {
  148. padding-bottom: 140rpx;
  149. .card-title {
  150. display: flex;
  151. justify-content: center;
  152. .title {
  153. font-size: 32rpx;
  154. text-align: center;
  155. color: #fff;
  156. width: 210rpx;
  157. line-height: 64rpx;
  158. background: linear-gradient(360deg, #3074F8 0%, #568FFF 100%);
  159. border-radius: 0rpx 0rpx 24rpx 24rpx;
  160. }
  161. }
  162. .list {
  163. padding: 0 20rpx 30rpx;
  164. position: relative;
  165. .combo {
  166. .bg {
  167. background: $uni-color-primary;
  168. padding: 12rpx;
  169. border-radius: 32rpx 32rpx 32rpx 32rpx;
  170. margin-top: 26rpx;
  171. opacity: .5;
  172. .card {
  173. display: flex;
  174. padding: 24rpx;
  175. background: #fff;
  176. border-radius: 32rpx 32rpx 32rpx 32rpx;
  177. .combo-info {
  178. width: 172rpx;
  179. height: 168rpx;
  180. background: url('../../static/combo.png') no-repeat;
  181. background-size: 100%;
  182. display: flex;
  183. flex-direction: column;
  184. align-items: center;
  185. .combo-title {
  186. font-size: 36rpx;
  187. font-family: DingTalk JinBuTi-Regular, DingTalk JinBuTi;
  188. font-weight: 400;
  189. color: $uni-text-primary;
  190. margin-top: 38rpx;
  191. }
  192. .combo-type {
  193. width: 112rpx;
  194. height: 36rpx;
  195. line-height: 36rpx;
  196. text-align: center;
  197. font-size: 24rpx;
  198. font-weight: 400;
  199. color: $uni-text-primary;
  200. background-color: #fff;
  201. border-radius: 18rpx;
  202. margin-top: 20rpx;
  203. }
  204. }
  205. }
  206. .combo-desc {
  207. flex: 1;
  208. margin-left: 38rpx;
  209. display: flex;
  210. flex-direction: column;
  211. justify-content: space-between;
  212. .desc-item {
  213. display: flex;
  214. align-items: center;
  215. align-content: flex-end;
  216. .icon {
  217. width: 36rpx;
  218. height: 36rpx;
  219. }
  220. .text {
  221. font-size: 24rpx;
  222. font-weight: 400;
  223. color: #121212;
  224. text-indent: 20rpx;
  225. }
  226. }
  227. }
  228. .btn {
  229. align-self: flex-end;
  230. width: 132rpx;
  231. height: 52rpx;
  232. line-height: 52rpx;
  233. font-size: 24rpx;
  234. color: #fff;
  235. text-align: center;
  236. background: $uni-color-primary;
  237. border-radius: 26rpx 26rpx 26rpx 26rpx;
  238. }
  239. }
  240. }
  241. .active {
  242. opacity: 1 !important;
  243. }
  244. }
  245. .choose-btn {
  246. width: 432rpx;
  247. line-height: 92rpx;
  248. text-align: center;
  249. color: #fff;
  250. font-weight: bold;
  251. font-size: 32rpx;
  252. background: linear-gradient(180deg, #FF876B 0%, #FE5B47 100%);
  253. box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
  254. border-radius: 46rpx 46rpx 46rpx 46rpx;
  255. position: fixed;
  256. z-index: 2;
  257. bottom: 20rpx;
  258. left: 50%;
  259. transform: translateX(-50%);
  260. }
  261. .equity {
  262. display: flex;
  263. align-items: center;
  264. padding: 40rpx 20rpx;
  265. .item {
  266. flex: 1;
  267. text-align: center;
  268. padding: 0 15rpx;
  269. font-size: 24rpx;
  270. .icon {
  271. width: 84rpx;
  272. height: 84rpx;
  273. }
  274. .desc {
  275. margin-top: 10rpx;
  276. }
  277. }
  278. }
  279. .box {
  280. border: 6rpx solid #DCE8FF;
  281. background: #fff;
  282. border-radius: 28rpx;
  283. margin: 40rpx 30rpx 0;
  284. }
  285. .table-box {
  286. padding: 30rpx;
  287. .table-title {
  288. background: #FEB687;
  289. color: #fff;
  290. line-height: 80rpx;
  291. text-align: center;
  292. border-radius: 12rpx 12rpx 0 0;
  293. }
  294. .table {
  295. border-collapse: collapse;
  296. line-height: 50rpx;
  297. border-radius: 12rpx;
  298. background: #FFF6EF;
  299. tr {
  300. display: flex;
  301. td {
  302. border: 2rpx solid #FEB687;
  303. padding: 10rpx 0 10rpx 40rpx;
  304. }
  305. .label {
  306. width: 200rpx;
  307. display: flex;
  308. align-items: center;
  309. }
  310. .value {
  311. flex: 1;
  312. }
  313. }
  314. }
  315. }
  316. .step-box {
  317. padding: 30rpx;
  318. margin-top: 50rpx;
  319. .step-title {
  320. font-size: 30rpx;
  321. font-weight: bold;
  322. text-align: center;
  323. margin-bottom: 45rpx;
  324. position: relative;
  325. &::before {
  326. position: absolute;
  327. top: 50%;
  328. left: 80rpx;
  329. transform: translateY(-50%);
  330. content: '';
  331. width: 86rpx;
  332. height: 8rpx;
  333. background: linear-gradient(270deg, #FE5B47 0%, rgba(254, 91, 71, 0) 100%);
  334. border-radius: 8rpx;
  335. }
  336. &::after {
  337. position: absolute;
  338. top: 50%;
  339. right: 80rpx;
  340. transform: translateY(-50%);
  341. content: '';
  342. width: 86rpx;
  343. height: 8rpx;
  344. background: linear-gradient(90deg, #FE5B47 0%, rgba(254, 91, 71, 0) 100%);
  345. border-radius: 8rpx;
  346. }
  347. }
  348. .step {
  349. display: flex;
  350. align-items: center;
  351. justify-content: space-between;
  352. .step-item {
  353. text-align: center;
  354. .icon {
  355. width: 80rpx;
  356. height: 80rpx;
  357. }
  358. .label {
  359. font-size: 24rpx;
  360. color: #121212;
  361. }
  362. }
  363. .suffix {
  364. position: relative;
  365. &::after {
  366. content: '';
  367. position: absolute;
  368. top: 50%;
  369. right: -40rpx;
  370. transform: translateY(calc(-50% - 20rpx));
  371. width: 25rpx;
  372. height: 25rpx;
  373. background: url('../../static/step5.png') no-repeat;
  374. background-size: 100%;
  375. display: block;
  376. }
  377. }
  378. }
  379. }
  380. }
  381. </style>