openpictrue.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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 class="image" :src="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. show: {
  17. default: false,
  18. type: Boolean
  19. },
  20. images: {
  21. default: '',
  22. type: String
  23. }
  24. },
  25. components: {
  26. uniPopup
  27. },
  28. watch: {
  29. 'show':function(val) {
  30. console.log(val)
  31. if(val) {
  32. this.type = true;
  33. }else {
  34. this.type = false;
  35. }
  36. },
  37. },
  38. data() {
  39. return {
  40. type: false,
  41. pictureUrl: this.pictureUrl,
  42. list: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
  43. };
  44. },
  45. // onBackPress() {
  46. // if (this.type !== '') {
  47. // this.type = '';
  48. // return true;
  49. // }
  50. // },
  51. methods: {
  52. togglePopup() {
  53. this.type = false;
  54. uni.$emit('changshow')
  55. },
  56. gomoney() {
  57. // uni.navigateTo({
  58. // url:'/pages/myCenter/definite'
  59. // })
  60. }
  61. }
  62. };
  63. </script>
  64. <style>
  65. page {
  66. display: flex;
  67. flex-direction: column;
  68. box-sizing: border-box;
  69. background-color: #fff
  70. }
  71. view {
  72. font-size: 28upx;
  73. line-height: inherit
  74. }
  75. .example {
  76. padding: 0 30upx 30upx
  77. }
  78. .example-title {
  79. font-size: 32upx;
  80. line-height: 32upx;
  81. color: #777;
  82. margin: 40upx 25upx;
  83. position: relative
  84. }
  85. .example .example-title {
  86. margin: 40upx 0
  87. }
  88. .example-body {
  89. padding: 0 40upx
  90. }
  91. .uni-padding-wrap {
  92. padding: 0 30upx;
  93. }
  94. button {
  95. margin: 20upx 0;
  96. }
  97. .uni-helllo-text {
  98. height: 100upx;
  99. line-height: 100upx;
  100. text-align: center;
  101. }
  102. .center-box {
  103. width: 800upx;
  104. height: 800upx;
  105. }
  106. .uni-list-item {
  107. text-align: left;
  108. line-height: 80upx;
  109. border-bottom: 1px #f5f5f5 solid;
  110. }
  111. .uni-list-item:last-child {
  112. border: none;
  113. }
  114. .center-box .image {
  115. width: 100%;
  116. height: 100%;
  117. }
  118. .bottom-title {
  119. line-height: 60upx;
  120. font-size: 24upx;
  121. padding: 15upx 0;
  122. }
  123. .bottom-content {
  124. display: flex;
  125. flex-wrap: wrap;
  126. padding: 0 35upx;
  127. }
  128. .bottom-content-box {
  129. display: flex;
  130. flex-direction: column;
  131. align-items: center;
  132. margin-bottom: 15upx;
  133. width: 25%;
  134. box-sizing: border-box;
  135. }
  136. .bottom-content-image {
  137. display: flex;
  138. justify-content: center;
  139. align-items: center;
  140. width: 90upx;
  141. height: 90upx;
  142. overflow: hidden;
  143. background: #007aff;
  144. border-radius: 10upx;
  145. }
  146. .bottom-content-text {
  147. font-size: 26upx;
  148. color: #333;
  149. margin-top: 10upx;
  150. }
  151. .bottom-btn {
  152. height: 90upx;
  153. line-height: 90upx;
  154. border-top: 1px #f5f5f5 solid;
  155. }
  156. .bottom-content-image.wx {
  157. background: #00ce47;
  158. }
  159. .bottom-content-image.qq {
  160. background: #00b6f6;
  161. }
  162. .bottom-content-image.sina {
  163. background: #ff766a;
  164. }
  165. .bottom-content-image.copy {
  166. background: #07ccd0;
  167. }
  168. @font-face {
  169. font-family: 'iconfont';
  170. /* project id 1028200 */
  171. src: url('https://at.alicdn.com/t/font_1028200_47ewtwy4t04.ttf') format('truetype');
  172. }
  173. .icon {
  174. font-family: 'iconfont';
  175. font-size: 40upx;
  176. color: #fff;
  177. }
  178. </style>