Index.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <div style="height: 100vh; overflow: hidden; display: flex; flex-direction: column;">
  3. <!-- 店铺名称 -->
  4. <div style="padding: 10px 16px 0px 16px;
  5. background-image: url('static/images/bg-home.png');
  6. background-repeat: no-repeat;
  7. background-position-y: 0px;
  8. background-size: 100% 120%;">
  9. <div style="display: flex;
  10. justify-content:space-between;
  11. align-items:center;
  12. color: #ffffff;">
  13. <div style="font-size: 20px; font-weight: bold;">
  14. <span>工作台</span>
  15. </div>
  16. <div style="line-height: 0px;">
  17. <van-icon name="static/images/icon-search-white.png" size="1.6rem" />
  18. </div>
  19. </div>
  20. <div style="margin-top: 20px; display: flex;
  21. justify-content:space-between;
  22. align-items:center;
  23. color: #ffffff;">
  24. <div style="font-size: 16px;">
  25. <span>Hi,</span>
  26. <span>龙三郎</span>
  27. </div>
  28. </div>
  29. <div style="margin-top: 10px; line-height: 0px;">
  30. <van-image
  31. width="100%"
  32. fit="contain"
  33. src="static/images/banner.png"
  34. />
  35. </div>
  36. </div>
  37. <!-- 九宫格 -->
  38. <div>
  39. <van-grid :square="false" :clickable="false" :border="false" column-num="2" gutter="16">
  40. <van-grid-item>
  41. <div style="width: 100%; text-align: left;">
  42. <div style="font-size: 1rem; color: #969799;">
  43. <span>个人设备</span>
  44. </div>
  45. <div style="font-size: 1rem; display: flex;
  46. justify-content: space-between;
  47. align-items: baseline;">
  48. <div style="display: flex; align-items: baseline;">
  49. <div style="font-size: 2rem; font-weight: bold;">2640</div>
  50. <div style="margin-left: 5px; font-size: 1rem; color: #969799;">台</div>
  51. </div>
  52. <div>
  53. <van-icon name="static/images/icon-device2.png" size="1.6rem" />
  54. </div>
  55. </div>
  56. </div>
  57. </van-grid-item>
  58. <van-grid-item>
  59. <div style="width: 100%; text-align: left;">
  60. <div style="font-size: 1rem; color: #969799;">
  61. <span>产品类型</span>
  62. </div>
  63. <div style="font-size: 1rem; display: flex;
  64. justify-content: space-between;
  65. align-items: baseline;">
  66. <div style="display: flex; align-items: baseline;">
  67. <div style="font-size: 2rem; font-weight: bold;">5</div>
  68. <div style="margin-left: 5px; font-size: 1rem; color: #969799;">类</div>
  69. </div>
  70. <div>
  71. <van-icon name="static/images/icon-type.png" size="1.6rem" />
  72. </div>
  73. </div>
  74. </div>
  75. </van-grid-item>
  76. </van-grid>
  77. </div>
  78. <!-- 新闻 -->
  79. <div style="padding: 0px 20px;">
  80. <div style="
  81. display: flex;
  82. justify-content: space-between;
  83. border-radius: 2px;
  84. align-items: center;
  85. ">
  86. <div>
  87. <div style="font-weight: bold; display: flex; align-items: center;">
  88. <van-icon name="label-o" size="1.1rem" />
  89. <span style="margin-left: 4px;">新闻</span>
  90. </div>
  91. </div>
  92. <div style="color: #0047FF; font-size: 0.9rem; display: flex; align-items: baseline;">
  93. <span style="margin-right: 3px;">换一批</span>
  94. <van-icon name="replay" size="1rem" />
  95. </div>
  96. </div>
  97. </div>
  98. <!-- 文章列表 -->
  99. <div style="padding: 0px 0px 0px 0px; height: 0px; flex-grow: 1; overflow-y: auto;">
  100. <van-cell v-for="item in 10" clickable>
  101. <div style="height: 80px; display: flex;">
  102. <div style="margin-right: 18px;">
  103. <van-image
  104. width="80"
  105. height="80"
  106. radius="6"
  107. src="static/images/banner.png"
  108. />
  109. </div>
  110. <div style="width: 0px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between;">
  111. <div style="font-weight: bold; text-align: left; color: #000;">
  112. <span>{{ item }}、公务员考试笔试,政审都过了,单位叫我去上班我要去吗?</span>
  113. </div>
  114. <div style="display: flex; justify-content: space-between; color: #969799;">
  115. <div>河南新闻</div>
  116. <div>2024-06-11</div>
  117. </div>
  118. </div>
  119. </div>
  120. </van-cell>
  121. </div>
  122. <div style="height: 60px;"></div>
  123. </div>
  124. </template>
  125. <script setup lang="ts">
  126. // import { onMounted, reactive } from 'vue';
  127. // import { useRouter } from 'vue-router';
  128. // import { showToast } from 'vant';
  129. // import 'vant/es/toast/style';
  130. // import { checkPhone } from '@/utils/util'
  131. // const router = useRouter();
  132. // const opt = reactive({
  133. // type: 1,
  134. // show: false,
  135. // name: '',
  136. // mobile: '',
  137. // isAnonymous: false,
  138. // })
  139. // 提交
  140. // const confirm = () => {
  141. // console.log('confirm');
  142. // // 非匿名,需要验证姓名和手机号
  143. // if(!opt.isAnonymous){
  144. // if(!opt.name){
  145. // showToast('请输入姓名');
  146. // return;
  147. // }
  148. // if(!checkPhone(opt.mobile)){
  149. // showToast('请正确的手机号');
  150. // return;
  151. // }
  152. // }
  153. // let url = '';
  154. // const query = '?isAnonymous=' + opt.isAnonymous + '&name=' + opt.name + '&mobile=' + opt.mobile;
  155. // if(opt.type == 1){
  156. // url = '/sales/add';
  157. // }else if(opt.type == 2){
  158. // url = '/recycle/add';
  159. // }
  160. // url += query;
  161. // // 路由跳转
  162. // router.push(url);
  163. // }
  164. // 生命周期函数
  165. // onMounted(() => {
  166. // console.log('onMounted')
  167. // // 阻止页面退出
  168. // history.pushState(null, 'null', document.URL);
  169. // window.addEventListener('popstate', function(){
  170. // history.pushState(null, 'null', document.URL);
  171. // },false);
  172. // })
  173. </script>
  174. <style scoped>
  175. </style>