popup.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view>
  3. <view class="example">
  4. <uniPopup :show="type" position="middle" mode="insert" @hidePopup="togglePopup('')">
  5. <view class="uni-center center-box">
  6. <image @click="gomoney" class="image" :src="pictureUrl+'/uploads/home/adv/'+images" />
  7. </view>
  8. </uniPopup>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import uniPopup from './uni-popup.vue'
  14. export default {
  15. props: {
  16. ishow: {
  17. default: false,
  18. type: Boolean
  19. },
  20. images: {
  21. default: '',
  22. type: String
  23. }
  24. },
  25. components: {
  26. uniPopup
  27. },
  28. // watch: {
  29. // 'ishow':function(val) {
  30. // if(val) {
  31. // this.type = true;
  32. // }else {
  33. // this.type = false;
  34. // }
  35. // },
  36. // },
  37. data() {
  38. return {
  39. type: true,
  40. pictureUrl: this.pictureUrl,
  41. list: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
  42. bottomData: [{
  43. text: '微信',
  44. icon: '\ue6a4',
  45. name: 'wx'
  46. },
  47. {
  48. text: '朋友圈',
  49. icon: '\ue646',
  50. name: 'wx'
  51. },
  52. {
  53. text: 'QQ',
  54. icon: '\ue66b',
  55. name: 'qq'
  56. },
  57. {
  58. text: '新浪',
  59. icon: '\ue600',
  60. name: 'sina'
  61. },
  62. {
  63. text: '复制',
  64. icon: '\ue632',
  65. name: 'copy'
  66. },
  67. {
  68. text: '更多',
  69. icon: '\ue618',
  70. name: 'more'
  71. }
  72. ]
  73. };
  74. },
  75. onBackPress() {
  76. if (this.type !== '') {
  77. this.type = '';
  78. return true;
  79. }
  80. },
  81. methods: {
  82. togglePopup() {
  83. this.type = false;
  84. },
  85. gomoney() {
  86. uni.navigateTo({
  87. url:'/pages/myCenter/definite'
  88. })
  89. }
  90. }
  91. };
  92. </script>
  93. <style>
  94. page {
  95. display: flex;
  96. flex-direction: column;
  97. box-sizing: border-box;
  98. background-color: #fff
  99. }
  100. view {
  101. font-size: 28upx;
  102. line-height: inherit
  103. }
  104. .example {
  105. padding: 0 30upx 30upx
  106. }
  107. .example-title {
  108. font-size: 32upx;
  109. line-height: 32upx;
  110. color: #777;
  111. margin: 40upx 25upx;
  112. position: relative
  113. }
  114. .example .example-title {
  115. margin: 40upx 0
  116. }
  117. .example-body {
  118. padding: 0 40upx
  119. }
  120. .uni-padding-wrap {
  121. padding: 0 30upx;
  122. }
  123. button {
  124. margin: 20upx 0;
  125. }
  126. .uni-helllo-text {
  127. height: 100upx;
  128. line-height: 100upx;
  129. text-align: center;
  130. }
  131. .center-box {
  132. width: 700upx;
  133. height: 700upx;
  134. }
  135. .uni-list-item {
  136. text-align: left;
  137. line-height: 80upx;
  138. border-bottom: 1px #f5f5f5 solid;
  139. }
  140. .uni-list-item:last-child {
  141. border: none;
  142. }
  143. .center-box .image {
  144. width: 100%;
  145. height: 100%;
  146. }
  147. .bottom-title {
  148. line-height: 60upx;
  149. font-size: 24upx;
  150. padding: 15upx 0;
  151. }
  152. .bottom-content {
  153. display: flex;
  154. flex-wrap: wrap;
  155. padding: 0 35upx;
  156. }
  157. .bottom-content-box {
  158. display: flex;
  159. flex-direction: column;
  160. align-items: center;
  161. margin-bottom: 15upx;
  162. width: 25%;
  163. box-sizing: border-box;
  164. }
  165. .bottom-content-image {
  166. display: flex;
  167. justify-content: center;
  168. align-items: center;
  169. width: 90upx;
  170. height: 90upx;
  171. overflow: hidden;
  172. background: #007aff;
  173. border-radius: 10upx;
  174. }
  175. .bottom-content-text {
  176. font-size: 26upx;
  177. color: #333;
  178. margin-top: 10upx;
  179. }
  180. .bottom-btn {
  181. height: 90upx;
  182. line-height: 90upx;
  183. border-top: 1px #f5f5f5 solid;
  184. }
  185. .bottom-content-image.wx {
  186. background: #00ce47;
  187. }
  188. .bottom-content-image.qq {
  189. background: #00b6f6;
  190. }
  191. .bottom-content-image.sina {
  192. background: #ff766a;
  193. }
  194. .bottom-content-image.copy {
  195. background: #07ccd0;
  196. }
  197. @font-face {
  198. font-family: 'iconfont';
  199. /* project id 1028200 */
  200. src: url('https://at.alicdn.com/t/font_1028200_47ewtwy4t04.ttf') format('truetype');
  201. }
  202. .icon {
  203. font-family: 'iconfont';
  204. font-size: 40upx;
  205. color: #fff;
  206. }
  207. </style>