混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

368 lines
9.0 KiB

3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
1 week ago
2 weeks ago
3 weeks ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
2 weeks ago
1 week ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
3 weeks ago
1 week ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
2 weeks ago
1 week ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
1 week ago
2 weeks ago
  1. <template>
  2. <view class="page">
  3. <view class="content">
  4. <!-- 顶部导航栏 -->
  5. <view class="banner sticky">
  6. <view :class="['head-div', isSticky && 'iooo', isSticky && 'box-shadow-light']">
  7. <view class="flex">
  8. <view>
  9. <uv-icon name="location" size="22" color="#333"></uv-icon>
  10. </view>
  11. <view>{{ area }}</view>
  12. <view @click="showRoleSelector">
  13. <uv-icon name="arrow-down" size="16" color="#333"></uv-icon>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- 角色切换按钮 -->
  18. <view class="role-switch-container">
  19. <view class="role-switch-btn" @click="showRoleSelector">
  20. <text class="role-text">{{ currentRoleText }}</text>
  21. <uv-icon name="arrow-down" size="14" color="#666"></uv-icon>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- banner图片 -->
  26. <view class="banner-div">
  27. <image style="width:690rpx;height:268rpx;border-radius:10rpx" src="/static/re/banner.png"></image>
  28. </view>
  29. <!-- 公告栏 -->
  30. <view class="notify-div flex" @click="clickNotify">
  31. <view class="mr10">
  32. <uv-icon name="volume" size="24" color="#666"></uv-icon>
  33. </view>
  34. <view class="ellipsis">公告{{ notice.content || '砼聚人平台全新上线,欢迎大家使用!' }}</view>
  35. </view>
  36. <!-- 主要内容 -->
  37. <view class="content-div">
  38. <view class="font-title mt32">砼聚人小程序全新上线啦</view>
  39. <view class="font-subtitle m20">深度开放共创共赢</view>
  40. <view class="description">
  41. 砼聚人平台隶属于长沙市砼聚人科技有限公司平台专注于为混凝土行业的设备提供灵活用工现主营业务为泵车车载泵搅拌车提供代驾服务致力于解决行业用工成本及用工风险的行业痛点帮助客户降低成本提升市场竞争力同时提升泵车操作手应有的技术价值实现工作自由度高劳动强度低收入高结算快的未来工作场景我们的梦想是让行业的兄弟活得更有尊严
  42. </view>
  43. <!-- 入驻按钮 -->
  44. <view class="flex m20 font-botton">
  45. <view class="flex" style="width:50%" @click="clickDriver">
  46. <image src="/static/re/ideic3.png" class="square40 mr10" />
  47. <view style="line-height:40rpx">泵司入驻</view>
  48. </view>
  49. <view class="flex" style="width:50%" @click="clickEnter">
  50. <image src="/static/re/ideic4.png" class="square40 mr10" />
  51. <view style="line-height:40rpx">企业入驻</view>
  52. </view>
  53. </view>
  54. <!-- 描述文字和图片 -->
  55. <view class="description-with-image">
  56. 随着疫情到来全民进入消费降级时代行业进入寒冬许多企业面临困境并关闭然而在这个
  57. <image style="float:right;width:480rpx;height:378rpx" src="/static/re/ide1.png"></image>
  58. 挑战中人们开始重视居家生活质量和健康促进了需求量上升行业逐渐适应新常态加强线上销售和定制服务不断创新和改进产品逆境中孕育机遇希望新的一年能带来行业的复苏和发展
  59. </view>
  60. <!-- 统计数据 -->
  61. <view class="flex m36">
  62. <view class="flex" style="width:50%">
  63. <image src="/static/re/ideic1.png" class="square80 mr10" />
  64. <view>
  65. <view style="line-height:60rpx;font-size:60rpx;color:#F40000;font-weight:bolder">{{ num1 || '1000+' }}</view>
  66. <view style="line-height:20rpx;font-size:20rpx;color:#aaa">企业入驻</view>
  67. </view>
  68. </view>
  69. <view class="flex" style="width:50%">
  70. <image src="/static/re/ideic2.png" class="square80 mr10" />
  71. <view>
  72. <view style="line-height:60rpx;font-size:60rpx;color:#F40000;font-weight:bolder">{{ num2 || '5000+' }}</view>
  73. <view style="line-height:20rpx;font-size:20rpx;color:#aaa">司机入驻</view>
  74. </view>
  75. </view>
  76. </view>
  77. <!-- 视频介绍 -->
  78. <view @click="clickVideo">
  79. <view class="m10">更多精彩更在视频介绍</view>
  80. <video style="width:690rpx;height:1272rpx" :src="videoUrl" :autoplay="true"></video>
  81. </view>
  82. </view>
  83. </view>
  84. <tabber select="home" />
  85. <!-- 身份切换浮窗 -->
  86. <view class="role-float-btn" @click="showRoleModal">
  87. <uv-icon name="man" size="24" color="#fff"></uv-icon>
  88. </view>
  89. <!-- 角色选择组件 -->
  90. <role-selector ref="roleSelector" @roleChanged="onRoleChanged"></role-selector>
  91. </view>
  92. </template>
  93. <script>
  94. import tabber from '@/components/base/tabbar.vue'
  95. import roleSelector from '@/components/config/roleSelector.vue'
  96. import { mapState, mapGetters, mapMutations } from 'vuex'
  97. export default {
  98. components: {
  99. tabber,
  100. roleSelector,
  101. },
  102. data() {
  103. return {
  104. area: '长沙',
  105. isSticky: false,
  106. num1: '1000+',
  107. num2: '5000+',
  108. notice: {
  109. content: '砼聚人平台全新上线,欢迎大家使用!'
  110. },
  111. leftIcon: false,
  112. rightIcon: false,
  113. videoUrl: 'https://relief.oss-cn-hangzhou.aliyuncs.com/home.mp4'
  114. }
  115. },
  116. computed: {
  117. ...mapState(['role']),
  118. ...mapGetters(['currentRoleText'])
  119. },
  120. onShow() {
  121. this.loadData();
  122. // 初始化角色
  123. this.initRole();
  124. // 监听滚动实现粘性导航
  125. const intersectionObserver = uni.createIntersectionObserver(this);
  126. intersectionObserver.relativeToViewport({ top: 0 }).observe('.banner-div', (res) => {
  127. if (res.intersectionRatio <= 0) {
  128. this.isSticky = true;
  129. } else {
  130. this.isSticky = false;
  131. }
  132. });
  133. // 获取存储的地区信息
  134. this.area = uni.getStorageSync('area') || '长沙';
  135. // 监听角色变更事件
  136. uni.$on('roleChanged', (newRole) => {
  137. console.log('角色已变更为:', newRole);
  138. });
  139. },
  140. methods: {
  141. ...mapMutations(['initRole']),
  142. // 点击公告
  143. clickNotify() {
  144. uni.navigateTo({ url: '/pages_order/base/notify' });
  145. },
  146. // 泵司入驻
  147. clickDriver() {
  148. uni.navigateTo({ url: '/pages_order/login/driver' });
  149. },
  150. // 企业入驻
  151. clickEnter() {
  152. uni.navigateTo({ url: '/pages_order/login/enter' });
  153. },
  154. // 加载数据
  155. loadData() {
  156. // 模拟加载统计数据
  157. setTimeout(() => {
  158. this.num1 = '1200+';
  159. this.num2 = '5800+';
  160. }, 1000);
  161. },
  162. // 点击视频
  163. clickVideo() {
  164. console.log('点击视频');
  165. },
  166. // 显示角色选择器
  167. showRoleSelector() {
  168. this.$refs.roleSelector.open();
  169. },
  170. // 显示身份切换弹窗
  171. showRoleModal() {
  172. this.$refs.roleSelector.open();
  173. },
  174. // 处理角色变更事件
  175. onRoleChanged(newRole) {
  176. console.log('角色已变更为:', newRole);
  177. },
  178. }
  179. }
  180. </script>
  181. <style scoped lang="scss">
  182. body {
  183. background-color: #FFF;
  184. }
  185. .iooo {
  186. background-color: #FFF;
  187. }
  188. .banner {
  189. width: 100vw;
  190. height: 344rpx;
  191. background: radial-gradient(200% 100% at 49% 0%, rgba(205, 0, 0, 0.2) 0%, rgba(233, 244, 252, 0) 100%);
  192. }
  193. .head-div {
  194. width: 690rpx;
  195. height: 88rpx;
  196. padding: 88rpx 30rpx 0rpx;
  197. line-height: 88rpx;
  198. font-size: 32rpx;
  199. color: #000000;
  200. }
  201. .banner-div {
  202. width: 690rpx;
  203. height: 260rpx;
  204. margin: -160rpx auto 10rpx;
  205. }
  206. .notify-div {
  207. width: 690rpx;
  208. margin: 30rpx auto 10rpx;
  209. font-size: 24rpx;
  210. line-height: 36rpx;
  211. color: #1C1C1C;
  212. }
  213. .content-div {
  214. width: 690rpx;
  215. margin: 0 auto;
  216. margin-top: 10rpx;
  217. font-size: 28rpx;
  218. line-height: 52rpx;
  219. color: rgba(51, 51, 51, 0.85);
  220. }
  221. .font-title {
  222. font-size: 36rpx;
  223. font-weight: bold;
  224. color: #333;
  225. }
  226. .font-subtitle {
  227. font-size: 28rpx;
  228. color: #666;
  229. }
  230. .font-botton {
  231. font-size: 28rpx;
  232. color: #333;
  233. }
  234. .description {
  235. text-align: justify;
  236. line-height: 1.6;
  237. }
  238. .description-with-image {
  239. text-align: justify;
  240. line-height: 1.6;
  241. margin: 20rpx 0;
  242. }
  243. .flex {
  244. display: flex;
  245. align-items: center;
  246. }
  247. .flex-sb {
  248. display: flex;
  249. justify-content: space-between;
  250. align-items: center;
  251. }
  252. .mr10 {
  253. margin-right: 10rpx;
  254. }
  255. .m20 {
  256. margin: 20rpx 0;
  257. }
  258. .m36 {
  259. margin: 36rpx 0;
  260. }
  261. .mt32 {
  262. margin-top: 32rpx;
  263. }
  264. .square40 {
  265. width: 40rpx;
  266. height: 40rpx;
  267. }
  268. .square80 {
  269. width: 80rpx;
  270. height: 80rpx;
  271. }
  272. .ellipsis {
  273. overflow: hidden;
  274. white-space: nowrap;
  275. text-overflow: ellipsis;
  276. }
  277. .box-shadow-light {
  278. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  279. }
  280. .m10 {
  281. margin: 10rpx 0;
  282. }
  283. .role-switch-container {
  284. position: absolute;
  285. top: 20rpx;
  286. right: 30rpx;
  287. z-index: 10;
  288. }
  289. .role-switch-btn {
  290. display: flex;
  291. align-items: center;
  292. padding: 10rpx 20rpx;
  293. background-color: rgba(255, 255, 255, 0.9);
  294. border-radius: 30rpx;
  295. border: 1rpx solid #e0e0e0;
  296. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  297. }
  298. .role-text {
  299. font-size: 24rpx;
  300. color: #333;
  301. margin-right: 8rpx;
  302. }
  303. .role-float-btn {
  304. position: fixed;
  305. bottom: 200rpx;
  306. right: 30rpx;
  307. width: 100rpx;
  308. height: 100rpx;
  309. background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
  310. border-radius: 50rpx;
  311. display: flex;
  312. align-items: center;
  313. justify-content: center;
  314. box-shadow: 0 8rpx 20rpx rgba(0, 122, 255, 0.3);
  315. z-index: 999;
  316. transition: all 0.3s ease;
  317. &:active {
  318. transform: scale(0.95);
  319. box-shadow: 0 4rpx 10rpx rgba(0, 122, 255, 0.2);
  320. }
  321. }
  322. </style>