index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <gracePage :customHeader="false">
  3. <view class="container" slot="gBody">
  4. <swiper class="cover" @change="change" :circular="swiper.circular">
  5. <swiper-item v-for="(v, k) in fetch.info.pic_bg" :key="k">
  6. <view class="default">
  7. <image :src="v" mode="widthFix" style="height:auto;"></image>
  8. </view>
  9. </swiper-item>
  10. </swiper>
  11. <view class="btn-ctrls">
  12. <view class="btn-wrapper space-between" v-if="fetch.button" :style="fetch.button.style">
  13. <view class="button primary big" :style="fetch.button.color" v-if="fetch.button.name && fetch.button.name[0]" @click="goView">{{fetch.button.name[0]}}</view>
  14. <block v-if="fetch.button.name && fetch.button.name[1]">
  15. <text class="spliter"></text>
  16. <view class="button primary" :style="fetch.button.color">{{fetch.button.name[1]}}</view>
  17. </block>
  18. </view>
  19. <view class='dots'>
  20. <text :class="swiper.index == k ? 'cur' : ''" v-for="(v, k) in fetch.items" :key="k"></text>
  21. </view>
  22. </view>
  23. </view>
  24. </gracePage>
  25. </template>
  26. <script>
  27. export default{
  28. data() {
  29. return {
  30. id : 0,
  31. swiper : {
  32. index : 0,
  33. circular : true,
  34. },
  35. fetch: {
  36. is_buy : false,
  37. info : {},
  38. button : {}
  39. }
  40. }
  41. },
  42. onLoad(option) {
  43. this.id = option.id;
  44. this.getData();
  45. },
  46. // 重新加载
  47. onPullDownRefresh: function() {
  48. this.getData();
  49. },
  50. methods:{
  51. change : function(e) {
  52. this.swiper.index = e.detail.current;
  53. },
  54. getData : function() {
  55. var self = this;
  56. this.Dever.get(this, 'app/collection/?l=api.getInfo', {id:this.id});
  57. },
  58. goView : function() {
  59. //是否购买
  60. if (!this.fetch.is_buy) {
  61. } else {
  62. this.Dever.location('dream/view?id=1&page_id=2&index=0');
  63. }
  64. }
  65. },
  66. }
  67. </script>
  68. <style>
  69. .container {
  70. position: absolute;
  71. height: 100%;
  72. width: 100%;
  73. left: 0;
  74. top: 0;
  75. overflow: hidden;
  76. }
  77. .btn-wrapper {
  78. justify-content: space-around;
  79. width: 100%;
  80. }
  81. .button {
  82. height: 80rpx;
  83. border: 1rpx solid #cc1619;
  84. color: #cc1619;
  85. font-size: 30rpx;
  86. min-width: 300rpx;
  87. border-radius: 40rpx;
  88. text-align: center;
  89. line-height: 80rpx;
  90. display: block;
  91. position: relative;
  92. }
  93. .button>button{
  94. position: absolute;
  95. width: 100%;
  96. height: 100%;
  97. left: 0;
  98. top: 0;
  99. opacity: 0;
  100. }
  101. .button.big {
  102. width: 630rpx;
  103. }
  104. .button.primary {
  105. background-color: #cc1619;
  106. color: #fff;
  107. }
  108. .button.blk {
  109. background-color: #000;
  110. color: #fff;
  111. border-color: #000;
  112. }
  113. .cover {
  114. width: 750rpx;
  115. height: 100%;
  116. }
  117. swiper-item>view{
  118. height: 100%;
  119. }
  120. swiper-item image{
  121. width: 750rpx;
  122. height: 100%;
  123. }
  124. .btn-ctrls {
  125. position: absolute;
  126. bottom: 40rpx;
  127. left: 200rpx;
  128. right: 200rpx;
  129. }
  130. .btn-ctrls .btn-wrapper {
  131. margin-top: 20rpx;
  132. width: 350rpx;
  133. display: flex;
  134. align-items: center;
  135. border-radius: 5rpx;
  136. background-color: #000;
  137. }
  138. .btn-ctrls .btn-wrapper .button{
  139. border-radius: 0;
  140. min-width: 100rpx;
  141. background-color: transparent;
  142. border: 0;
  143. flex: 1;
  144. }
  145. .btn-ctrls .btn-wrapper .spliter{
  146. flex-shrink: 0;
  147. width: 1rpx;
  148. background: #fff;
  149. height: 40rpx;
  150. color: #333;
  151. }
  152. .btn-ctrls .btn-wrapper .button.small{
  153. min-width: 150rpx;
  154. }
  155. .btn-ctrls .btn-wrapper .button.big{
  156. width: 420rpx;
  157. }
  158. .btn-ctrls .dots{
  159. display: flex;
  160. justify-content: center;
  161. margin-top: 20rpx;
  162. }
  163. .btn-ctrls .dots text{
  164. display: block;
  165. width: 16rpx;
  166. height: 8rpx;
  167. background: rgba(255, 255, 255, 0.5);
  168. border-radius: 8rpx;
  169. margin: 0 5rpx;
  170. }
  171. .btn-ctrls .dots text.cur{
  172. background-color: rgba(255, 255, 255, 1);
  173. }
  174. .btn-ctrls .scorelist{
  175. text-align: center;
  176. }
  177. .btn-ctrls .scorelist navigator{
  178. display: inline-block;
  179. font-size: 26rpx;
  180. color: #FFFFFF;
  181. text-decoration: underline;
  182. }
  183. .space-between{
  184. justify-content: space-between;
  185. }
  186. .btn-wrapper{
  187. display: flex;
  188. }
  189. .ios-pay{
  190. display: none;
  191. }
  192. .pulloff{
  193. position: fixed;
  194. width: 100%;
  195. height: 100%;
  196. top: 0;
  197. left: 0;
  198. z-index: 20;
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. }
  203. .pulloff>view{
  204. background-color: rgba(0, 0, 0, 0.65);
  205. padding: 53rpx 53rpx 53rpx 74rpx;
  206. border-radius: 10rpx;
  207. text-align: center;
  208. }
  209. .pulloff>view text{
  210. color: #fff;
  211. font-size: 30rpx;
  212. line-height: 53rpx;
  213. }
  214. .preselltip .layer{
  215. border-radius: 5rpx;
  216. padding:70rpx 40rpx;
  217. }
  218. .preselltip .layer .tit{
  219. font-size: 24rpx;
  220. text-align: center;
  221. margin: 16rpx 0 80rpx;
  222. }
  223. .preselltip .layer .btn-wrapper{
  224. position: absolute;
  225. bottom: 0;
  226. left: 0;
  227. }
  228. .preselltip .layer .btn-wrapper .button{
  229. width: 100%;
  230. border-radius: 0 0 5rpx 5rpx;
  231. }
  232. .recharge-layer{
  233. padding: 50rpx 55rpx 62rpx;
  234. background-color: #fff;
  235. position: absolute;
  236. bottom: 0;
  237. left: 0;
  238. right: 0;
  239. transform: translateY(100%);
  240. transition-property: transform;
  241. transition-duration: 0.3s;
  242. transition-timing-function: ease-in;
  243. }
  244. .recharge-layer.slidein{
  245. transform: translateY(0);
  246. }
  247. .recharge-layer .tit{
  248. font-weight: bolder;
  249. font-size: 36rpx;
  250. margin: 0 0 40rpx;
  251. }
  252. .recharge-layer .msg{
  253. font-size: 22rpx;
  254. line-height: 36rpx;
  255. width: 640rpx;
  256. margin: 0 auto 47rpx;
  257. }
  258. .recharge-layer input{
  259. width: 640rpx;
  260. height: 88rpx;
  261. border: 1rpx solid #EEEEEE;
  262. border-radius: 5rpx;
  263. box-sizing: border-box;
  264. padding: 0 25rpx;
  265. font-size: 24rpx;
  266. }
  267. .recharge-layer .errtip {
  268. color: #d1171a;
  269. font-size: 24rpx;
  270. margin: 21rpx 0 0;
  271. height: 34rpx;
  272. }
  273. .recharge-layer .btn-wrapper{
  274. display: flex;
  275. justify-content: space-between;
  276. padding-top: 20rpx;
  277. }
  278. .recharge-layer .btn-wrapper .button{
  279. border: 0;
  280. min-width: 0;
  281. border-radius: 5rpx;
  282. box-sizing: border-box;
  283. color: #999999;
  284. width: 284rpx;
  285. }
  286. .recharge-layer .btn-wrapper .button.primary{
  287. border:0;
  288. color: #fff;
  289. }
  290. .recharge-layer .btn-wrapper .button.cancel{
  291. border:0;
  292. background-color: #CCCCCC;
  293. color: #fff;
  294. }
  295. .recharge-mask{
  296. position: fixed;
  297. width: 100%;
  298. height: 100%;
  299. background: rgba(0, 0, 0, 0.5);
  300. left: 0;
  301. top: 0;
  302. display: none;
  303. }
  304. </style>