HomeView.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <script setup>
  2. import { ref, onMounted } from "vue";
  3. import { useRouter } from "vue-router";
  4. import banner1 from "../assets/banner1.jpg";
  5. import banner2 from "../assets/banner2.jpg";
  6. import banner3 from "../assets/banner3.jpg";
  7. import banner4 from "../assets/banner4.jpg";
  8. import role1 from "../assets/role1.png";
  9. import role2 from "../assets/role2.png";
  10. import role3 from "../assets/role3.png";
  11. import role from "../assets/role.png";
  12. const images = ref([
  13. { url: banner1 },
  14. { url: banner2 },
  15. { url: banner3 },
  16. { url: banner4 },
  17. ]);
  18. const router = useRouter();
  19. const active = ref(0);
  20. const value = ref("");
  21. const cardlist = ref([
  22. {
  23. title: "新客触达",
  24. image: role3,
  25. subTitle: "白名单新客触达",
  26. description: "通过电话联系同业存客、或白户客户,摸排客户融资需求,寻找商机",
  27. sceneType:"XIAOWEI",
  28. roleOption:[
  29. {text: '同业存客', value: '同业存客'},
  30. {text: '白户客户', value: '白户客户'}
  31. ]
  32. },
  33. {
  34. title: "初次拜访",
  35. image: role2,
  36. subTitle: "判断意向营销推广",
  37. description:'HY金属模具有限公司,为平安已结清直租旧户,联系到了前笔承做时的公司负责人,了解到他已退休,现为二代接手,女儿赵总为法人,儿儿赵经理负责公司后勤杂务,对接银行以及租赁公司,姐弟共同经营公司。你与赵经理取得了联系,并按照公司的标准提供了价格范围,赵经理对价格有异议,你约了赵经理今天去HY公司拜访,沟通合作机会。',
  38. sceneType:"XIAOWEI_RONGZI",
  39. roleOption:[
  40. {text: '客户经理', value: '客户经理'},
  41. ]
  42. },
  43. {
  44. title: "存量客户(待解锁)",
  45. image: role1,
  46. subTitle: "存量客户名单",
  47. description: "通过电话联系已有的存量客户名单,开展营销,寻找商机",
  48. roleOption:[
  49. {text: '存量客户', value: '存量客户'},
  50. ]
  51. },
  52. {
  53. title: "区域陌拜(待解锁)",
  54. image: role,
  55. subTitle: "地推周边企业陌拜",
  56. description:"通过地推的方式搜索新客户,并进行现场陌拜,建立关系,挖掘商机",
  57. roleOption:[
  58. {text: '周边企业', value: '周边企业'},
  59. ]
  60. }
  61. ])
  62. const handleDetail = (item,index) => {
  63. if(index === 0 || index === 1){
  64. localStorage.setItem("role", JSON.stringify(item));
  65. router.push("/detail");
  66. }
  67. };
  68. onMounted(() => {
  69. localStorage.removeItem("chatHistory");
  70. localStorage.removeItem("status");
  71. });
  72. </script>
  73. <template>
  74. <div class="home">
  75. <!-- 人物头像 -->
  76. <div class="avatar">
  77. <header>
  78. <img src="../assets/head.jpg" alt="" />
  79. <div class="head_content">
  80. <span>Chris B</span>
  81. <span>探索未知,发现自我~</span>
  82. </div>
  83. </header>
  84. <div class="search">
  85. <van-search v-model="value" placeholder="搜索" />
  86. </div>
  87. <div class="banner">
  88. <van-swipe :autoplay="3000">
  89. <van-swipe-item v-for="(image, index) in images" :key="index">
  90. <div class="image-wrapper">
  91. <img :src="image.url" alt="轮播图片" />
  92. <div class="text-wrapper">
  93. <div>模拟对话场景,提升业务能力</div>
  94. <button>查看任务</button>
  95. </div>
  96. </div>
  97. </van-swipe-item>
  98. </van-swipe>
  99. </div>
  100. <div class="card_list">
  101. <p>陪练课程</p>
  102. <div class="card_content">
  103. <div v-for="(item, index) in cardlist" :key="index" class="card_item" @click="handleDetail(item,index)">
  104. <img :src="item.image" alt="" />
  105. <p>{{ item.title }}</p>
  106. <span>{{ item.subTitle }}</span>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <!-- 底部tabbar -->
  112. <div style="visibility: hidden; height: 50px"></div>
  113. <van-tabbar v-model="active">
  114. <van-tabbar-item name="home" icon="home-o">首页</van-tabbar-item>
  115. <van-tabbar-item name="friends" icon="contact-o">我的</van-tabbar-item>
  116. </van-tabbar>
  117. </div>
  118. </template>
  119. <style scoped lang="less">
  120. p {
  121. margin: 0;
  122. padding: 0;
  123. }
  124. html {
  125. touch-action: manipulation;
  126. /* 禁止双指缩放 */
  127. }
  128. @media (max-width: 767px) {
  129. html {
  130. touch-action: pan-y;
  131. /* 允许垂直滚动,禁止水平滚动和缩放 */
  132. }
  133. }
  134. .avatar {
  135. padding: 0 1.38rem;
  136. header {
  137. padding: 1.31rem 0;
  138. display: flex;
  139. align-items: center;
  140. img {
  141. width: 3.13rem;
  142. height: 3.13rem;
  143. border-radius: 6.25rem;
  144. background-color: rgba(229, 229, 229, 1);
  145. box-shadow: 0rem 0.5rem 1.5rem 0rem rgba(92, 117, 169, 0.4);
  146. margin-right: 1.25rem;
  147. }
  148. .head_content {
  149. display: flex;
  150. flex-direction: column;
  151. span {
  152. line-height: 1.44rem;
  153. color: rgba(16, 16, 16, 1);
  154. font-size: 1rem;
  155. text-align: left;
  156. font-family: PingFangSC-medium;
  157. }
  158. span:nth-child(2) {
  159. color: rgba(102, 102, 102, 0.7);
  160. font-size: 0.88rem;
  161. line-height: 1.25rem;
  162. }
  163. }
  164. }
  165. .search {
  166. .van-search {
  167. width: 100%;
  168. height: 2.5rem;
  169. padding: 0;
  170. }
  171. :deep(.van-search__content) {
  172. border-radius: 0.5rem;
  173. }
  174. }
  175. .banner {
  176. margin: 1.25rem 0 1.25rem 0;
  177. }
  178. .image-wrapper {
  179. position: relative;
  180. width: 100%;
  181. height: 8.75rem;
  182. border-radius: 0.75rem;
  183. overflow: hidden;
  184. img {
  185. width: 100%;
  186. height: auto;
  187. object-fit: cover;
  188. }
  189. .text-wrapper {
  190. position: absolute;
  191. left: 0.88rem;
  192. top: 2.19rem;
  193. line-height: 1.56rem;
  194. color: rgba(255, 255, 255, 1);
  195. font-size: 1.13rem;
  196. text-align: left;
  197. font-family: Times New Roman-regular;
  198. button {
  199. margin-top: 1.44rem;
  200. width: 5.25rem;
  201. height: 1.75rem;
  202. border: 1px solid rgba(255, 255, 255, 1);
  203. line-height: 1.06rem;
  204. border-radius: 0.38rem;
  205. background-color: rgba(255, 255, 255, 1);
  206. color: rgba(9, 52, 74, 1);
  207. font-size: 0.75rem;
  208. text-align: center;
  209. font-family: -regular;
  210. }
  211. }
  212. }
  213. .card_list {
  214. p {
  215. line-height: 1.44rem;
  216. color: rgba(16, 16, 16, 1);
  217. font-size: 1rem;
  218. text-align: left;
  219. font-family: Times New Roman-regular;
  220. margin-bottom: 0.38rem;
  221. }
  222. .card_content {
  223. display: flex;
  224. flex-wrap: wrap;
  225. justify-content: space-between;
  226. /* margin-top: 1.25rem; */
  227. }
  228. .card_item {
  229. width: 47%;
  230. height: 13.75rem;
  231. background-color: rgba(255, 255, 255, 1);
  232. box-shadow: 0rem 0.06rem 0.88rem 0rem rgba(0, 1, 130, 0.08);
  233. border-radius: 0.75rem;
  234. overflow: hidden;
  235. margin-bottom: 1rem;
  236. img {
  237. width: 100%;
  238. height: 9.75rem;
  239. object-fit: cover;
  240. }
  241. p {
  242. margin: 0.63rem 0 0 0.63rem;
  243. line-height: 1.25rem;
  244. color: rgba(16, 16, 16, 1);
  245. font-size: 0.88rem;
  246. text-align: left;
  247. font-family: PingFangSC-medium;
  248. }
  249. span {
  250. line-height: 1.06rem;
  251. color: rgba(102, 102, 102, 1);
  252. font-size: 0.75rem;
  253. text-align: left;
  254. font-family: PingFangSC-regular;
  255. margin-left: 0.63rem;
  256. }
  257. }
  258. // @media (min-width: 600px) {
  259. // .card {
  260. // width: 50%;
  261. // height: 400px;
  262. // }
  263. // }
  264. }
  265. }
  266. </style>