supplier_login.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <template>
  2. <view>
  3. <view class="supplier_login"><login-menu :menuList="menuList" @scrollPage="scrollPage" /></view>
  4. <view class="container">
  5. <scroll-view
  6. class="scrollview"
  7. @scroll="scrollView"
  8. scroll-y="true"
  9. :scroll-into-view="activeMenu"
  10. :scroll-with-animation="true"
  11. >
  12. <view id="item0">
  13. <marke-service :bannersList="bannerList">
  14. <template #supplier-title>
  15. <supplier-title title="全生命周期陪跑服务" subtitle="采美,更专业的美业数字化因营销服务" />
  16. </template>
  17. </marke-service>
  18. </view>
  19. <view id="item1">
  20. <Solution>
  21. <template #supplier-title>
  22. <supplier-title title="解决方案" subtitle="满足企业全方位需求" />
  23. </template>
  24. </Solution>
  25. </view>
  26. <view id="item2">
  27. <basic-operation>
  28. <template #supplier-title>
  29. <supplier-title title="基础运营产品" subtitle="使企业走向数字化的基石" />
  30. </template>
  31. </basic-operation>
  32. </view>
  33. <view id="item3">
  34. <scenario-market>
  35. <template #supplier-title>
  36. <supplier-title title="场景营销工具" subtitle="多样化工具,全方位助力您的企业目标" />
  37. </template>
  38. </scenario-market>
  39. </view>
  40. <view id="item4">
  41. <success-cases :successList="successList">
  42. <template #supplier-title>
  43. <supplier-title
  44. title="成功案例"
  45. subtitle="了解已合作品牌的真实推广案例,借鉴成功经验<br />助力有效推广,实现商业目标"
  46. />
  47. </template>
  48. </success-cases>
  49. </view>
  50. <view id="item5">
  51. <caimei-about>
  52. <template #supplier-title>
  53. <supplier-title
  54. title="关于采美"
  55. subtitle="了解采美,合作共赢"
  56. titlecolor="#ffffff"
  57. subtitlecolor="#ffffff"
  58. />
  59. </template>
  60. </caimei-about>
  61. </view>
  62. <view id="item6">
  63. <growth-community @playVideo="playVideo" :videoList="videoList" :articelList="articelList">
  64. <template #supplier-title>
  65. <supplier-title title="增长社区" subtitle="数十年资深美业运营经验,教你快速成长" />
  66. </template>
  67. </growth-community>
  68. </view>
  69. </scroll-view>
  70. </view>
  71. <view class="supplier-slide">
  72. <view class="user-cicle" @click="supplierLogin">
  73. <image style="width: 50%;height: 50%;" src="https://static.caimei365.com/app/img/supplier-login/userDefault.png" mode=""></image>
  74. </view>
  75. <view class="slide">
  76. <view
  77. class="slide-item"
  78. v-for="item in slideList"
  79. :key="item.id"
  80. v-if="item.isShow"
  81. @click="handlerChange(item)"
  82. >
  83. <image class="slide-img" :src="item.slideBg" mode=""></image>
  84. <view class="slide-title">{{ item.title }}</view>
  85. </view>
  86. </view>
  87. </view>
  88. <tui-modal :show="show" custom @cancel="cancel">
  89. <view class="tui-modal-custom">
  90. <view class="tui-modal-custom-text">周一至周五 9:00~1800</view>
  91. <view class="tui-modal-custom-phone" @click=";(modal = true), (show = false)">153-3889-7365</view>
  92. </view>
  93. </tui-modal>
  94. <tui-modal :show="isPhone" class="qrcode" custom @cancel="cancel">
  95. <view class="tui-modal-custom-qrcode">
  96. <image style="width: 100%;height: 100%;" show-menu-by-longpress="true" src="https://static.caimei365.com/app/img/supplier-login/kefu_qr.jpg" mode=""></image>
  97. </view>
  98. </tui-modal>
  99. <tui-modal :show="modal" custom @cancel="cancel">
  100. <view class="tui-modal-custom-call">
  101. <view class="tui-modal-custom-text">
  102. 确定拨打
  103. <text style="color: #FF5B00;font-weight: bold;margin: 0 6rpx;">153-3889-7365</text>
  104. 吗?
  105. </view>
  106. <view class="modal-btns">
  107. <tui-button
  108. class="cancel"
  109. type="black"
  110. @click="modal = false"
  111. height="72rpx"
  112. :size="28"
  113. plain
  114. shape="circle"
  115. >
  116. 取消
  117. </tui-button>
  118. <tui-button
  119. class="determine"
  120. height="72rpx"
  121. :size="28"
  122. type="warning"
  123. shape="circle"
  124. @click="handleClick"
  125. >
  126. 确定
  127. </tui-button>
  128. </view>
  129. </view>
  130. </tui-modal>
  131. <cm-video :show="showVideo" @closeClick="closeVideo" :videoObj="videoObj" />
  132. </view>
  133. </template>
  134. <script>
  135. import LoginMenu from './components/supplier-loginMenu.vue'
  136. import MarkeService from './components/markeServices.vue'
  137. import SupplierTitle from './components/supplier-title.vue'
  138. import Solution from './components/solution.vue'
  139. import BasicOperation from './components/basicOperationsProducts.vue'
  140. import ScenarioMarket from './components/scenarioMarketing.vue'
  141. import SuccessCases from './components/successCases.vue'
  142. import CaimeiAbout from './components/caimei-about.vue'
  143. import GrowthCommunity from './components/growthCommunity.vue'
  144. import CmVideo from './components/caimei-video.vue'
  145. import { mapState } from 'vuex'
  146. export default {
  147. components: {
  148. LoginMenu,
  149. MarkeService,
  150. SupplierTitle,
  151. Solution,
  152. BasicOperation,
  153. ScenarioMarket,
  154. SuccessCases,
  155. CaimeiAbout,
  156. GrowthCommunity,
  157. CmVideo
  158. },
  159. data() {
  160. return {
  161. menuList: [
  162. {
  163. id: 0,
  164. title: '营销服务'
  165. },
  166. {
  167. id: 1,
  168. title: '解决方案'
  169. },
  170. {
  171. id: 2,
  172. title: '运营产品'
  173. },
  174. {
  175. id: 3,
  176. title: '营销工具'
  177. },
  178. {
  179. id: 4,
  180. title: '成功案例'
  181. },
  182. {
  183. id: 5,
  184. title: '关于采美'
  185. },
  186. {
  187. id: 6,
  188. title: '增长社区'
  189. }
  190. ],
  191. activeMenu: '', // 滚动到指定位置
  192. show: false,
  193. isPhone: false,
  194. modal: false,
  195. showVideo: false,
  196. videoObj: {},
  197. userInfo: {},
  198. slideList: [
  199. {
  200. id: 1,
  201. title: '电话联系',
  202. slideBg: 'https://static.caimei365.com/app/img/supplier-login/phone.png',
  203. isShow: true
  204. },
  205. {
  206. id: 2,
  207. title: '微信客服',
  208. slideBg: 'https://static.caimei365.com/app/img/supplier-login/qrcode.png',
  209. isShow: true
  210. },
  211. {
  212. id: 3,
  213. title: '',
  214. slideBg: 'https://static.caimei365.com/app/img/supplier-login/scrolltop.png',
  215. isShow: false
  216. }
  217. ],
  218. successList: [],
  219. videoList: [],
  220. articelList: [],
  221. bannerList: []
  222. }
  223. },
  224. computed: {
  225. ...mapState(['hasLogin'])
  226. },
  227. watch: {},
  228. onLoad(options) {
  229. // 点击链接
  230. uni.$on('changeLink', e => {
  231. setTimeout(() => {
  232. this.activeMenu = e
  233. }, 500)
  234. })
  235. },
  236. mounted() {
  237. this.userInfo = uni.getStorageSync('userInfo')
  238. this.getSupplierLanding()
  239. },
  240. methods: {
  241. // 滚动事件
  242. scrollPage($event) {
  243. this.activeMenu = $event
  244. },
  245. scrollView(e) {
  246. this.activeMenu = ''
  247. if (e.detail.scrollTop < 50) {
  248. this.slideList[2].isShow = false
  249. } else {
  250. this.slideList[2].isShow = true
  251. }
  252. },
  253. handlerChange(e) {
  254. const obj = {
  255. 1: () => (this.show = true),
  256. 2: () => (this.isPhone = true),
  257. 3: () => (this.activeMenu = 'item0')
  258. }
  259. obj[e.id]()
  260. },
  261. hideAlert() {
  262. this.show = false
  263. },
  264. // 拨打电话
  265. handleClick() {
  266. uni.makePhoneCall({
  267. phoneNumber: '153-3889-7365' //仅为示例
  268. })
  269. this.modal = false
  270. },
  271. cancel() {
  272. this.modal = false
  273. this.show = false
  274. this.isPhone = false
  275. },
  276. // 视频播放
  277. playVideo($event) {
  278. this.videoObj = $event
  279. this.showVideo = true
  280. },
  281. // 视频关闭
  282. closeVideo() {
  283. this.showVideo = false
  284. },
  285. // supplierLogin 登陆
  286. supplierLogin() {
  287. if (this.hasLogin) {
  288. uni.navigateTo({
  289. url: '/pages/supplier/user/supplier?shopId=' + this.userInfo.shopId
  290. })
  291. } else {
  292. uni.navigateTo({
  293. url: '/pages/login/login?state=1'
  294. })
  295. }
  296. },
  297. async getSupplierLanding() {
  298. try {
  299. const {data} = await this.UserService.supplierLoading({source: 2})
  300. this.bannerList = data.banner
  301. this.successList = data.landing.filter(e => e.type == '1')
  302. this.videoList = data.landing.filter(e => e.type == '2')
  303. this.articelList = data.landing.filter(e => e.type == '3')
  304. } catch (error) {
  305. console.log(error)
  306. }
  307. }
  308. }
  309. }
  310. </script>
  311. <style lang="scss" scoped>
  312. .container {
  313. position: absolute;
  314. bottom: 0;
  315. height: auto;
  316. }
  317. .scrollview {
  318. width: 100%;
  319. height: calc(100vh - 120rpx);
  320. background-color: #fff;
  321. }
  322. .supplier-slide {
  323. position: fixed;
  324. right: 40rpx;
  325. box-sizing: border-box;
  326. width: 100rpx;
  327. bottom: 100rpx;
  328. z-index: 999;
  329. .user-cicle {
  330. width: 100rpx;
  331. height: 100rpx;
  332. border-radius: 50%;
  333. background-color: #fff;
  334. margin-bottom: 40rpx;
  335. box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(51, 51, 51, 0.16);
  336. display: flex;
  337. justify-content: center;
  338. align-items: center;
  339. }
  340. .slide {
  341. width: 100rpx;
  342. overflow: hidden;
  343. border-radius: 50rpx;
  344. background-color: #ff5b00;
  345. box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(255, 91, 0, 0.3);
  346. .slide-img {
  347. width: 45rpx;
  348. height: 45rpx;
  349. }
  350. .slide-item {
  351. height: 140rpx;
  352. width: 100rpx;
  353. display: flex;
  354. flex-direction: column;
  355. align-items: center;
  356. box-sizing: border-box;
  357. padding-top: 30rpx;
  358. border-bottom: 1rpx solid rgba(255, 255, 255, 0.3);
  359. .slide-title {
  360. margin-top: 10rpx;
  361. font-size: 20rpx;
  362. color: #fff;
  363. }
  364. }
  365. .slide-item:nth-child(3) {
  366. padding-top: 45rpx !important;
  367. }
  368. }
  369. }
  370. .tui-modal-custom {
  371. padding: 30rpx 80rpx;
  372. }
  373. .tui-modal-custom-text {
  374. text-align: center;
  375. color: #666666;
  376. font-size: 28rpx;
  377. }
  378. .tui-modal-custom-phone {
  379. margin-top: 62rpx;
  380. text-align: center;
  381. color: #ff5b00;
  382. border-bottom: 1px solid #ff5b00;
  383. font-size: 40rpx;
  384. font-weight: bold;
  385. }
  386. .tui-modal-custom-call {
  387. font-size: 32rpx;
  388. color: #666666;
  389. padding-top: 50rpx;
  390. }
  391. .qrcode {
  392. ::v-deep .tui-modal-box {
  393. width: auto !important;
  394. padding: 6rpx !important;
  395. border-radius: 0 !important;
  396. }
  397. .tui-modal-custom-qrcode {
  398. width: 412rpx;
  399. height: 412rpx;
  400. }
  401. }
  402. .modal-btns {
  403. display: flex;
  404. justify-content: space-between;
  405. margin-top: 62rpx;
  406. .cancel {
  407. width: 200rpx !important;
  408. color: #666666 !important;
  409. }
  410. .determine {
  411. width: 200rpx !important;
  412. }
  413. }
  414. </style>