supplier_login.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. <template>
  2. <view>
  3. <view class="supplier_login"><login-menu :menuList="menuList" @scrollPage="scrollPage" ref="login-menu" /></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 :isShareTimeline="isShareTimeline" @solutionModal="solutionModal">
  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" ref="supplierSlide" :style="{zIndex: isModalShow ? -1 : 20}">
  72. <view class="user-cicle" @click="supplierLogin" v-if="!hasLogin || userInfo.userIdentity === 3">
  73. <image
  74. style="width: 48rpx;height: 48rpx;"
  75. src="https://static.caimei365.com/app/img/supplier-login/userDefault_new.png"
  76. mode=""
  77. ></image>
  78. <view class="userLogin">{{ hasLogin ? userInfo.name : '登录/注册'}}</view>
  79. </view>
  80. <view class="slide">
  81. <view
  82. class="slide-item"
  83. v-for="item in slideList"
  84. :key="item.id"
  85. v-if="item.isShow"
  86. @click="handlerChange(item)"
  87. >
  88. <image class="slide-img" :src="item.slideBg" mode=""></image>
  89. <view class="slide-title">{{ item.title }}</view>
  90. </view>
  91. </view>
  92. </view>
  93. <tui-modal :show="show" custom @cancel="cancel">
  94. <view class="tui-modal-custom">
  95. <view class="tui-modal-custom-text">周一至周五 9:00~1800</view>
  96. <view class="tui-modal-custom-phone" @click=";(modal = true), (show = false)">131-6478-0233</view>
  97. </view>
  98. </tui-modal>
  99. <tui-modal :show="isPhone" class="qrcode" custom @cancel="cancel">
  100. <view class="tui-modal-custom-qrcode">
  101. <image
  102. style="width: 100%;height: 100%;"
  103. show-menu-by-longpress="true"
  104. src="https://static.caimei365.com/app/img/supplier-login/kefu_qr.jpg"
  105. mode=""
  106. ></image>
  107. </view>
  108. </tui-modal>
  109. <tui-modal :show="modal" custom @cancel="cancel">
  110. <view class="tui-modal-custom-call">
  111. <view class="tui-modal-custom-text">
  112. 确定拨打
  113. <text style="color: #FF5B00;font-weight: bold;margin: 0 6rpx;">131-6478-0233</text>
  114. 吗?
  115. </view>
  116. <view class="modal-btns">
  117. <tui-button
  118. class="cancel"
  119. type="black"
  120. @click="modal = false"
  121. height="72rpx"
  122. :size="28"
  123. plain
  124. shape="circle"
  125. >
  126. 取消
  127. </tui-button>
  128. <tui-button
  129. class="determine"
  130. height="72rpx"
  131. :size="28"
  132. type="warning"
  133. shape="circle"
  134. @click="handleClick"
  135. >
  136. 确定
  137. </tui-button>
  138. </view>
  139. </view>
  140. </tui-modal>
  141. <cm-video :show="showVideo" @closeClick="closeVideo" :videoObj="videoObj" />
  142. </view>
  143. </template>
  144. <script>
  145. import LoginMenu from './components/supplier-loginMenu.vue'
  146. import MarkeService from './components/markeServices.vue'
  147. import SupplierTitle from './components/supplier-title.vue'
  148. import Solution from './components/solution.vue'
  149. import BasicOperation from './components/basicOperationsProducts.vue'
  150. import ScenarioMarket from './components/scenarioMarketing.vue'
  151. import SuccessCases from './components/successCases.vue'
  152. import CaimeiAbout from './components/caimei-about.vue'
  153. import GrowthCommunity from './components/growthCommunity.vue'
  154. import CmVideo from './components/caimei-video.vue'
  155. import { mapState } from 'vuex'
  156. export default {
  157. components: {
  158. LoginMenu,
  159. MarkeService,
  160. SupplierTitle,
  161. Solution,
  162. BasicOperation,
  163. ScenarioMarket,
  164. SuccessCases,
  165. CaimeiAbout,
  166. GrowthCommunity,
  167. CmVideo
  168. },
  169. data() {
  170. return {
  171. menuList: [
  172. {
  173. id: 0,
  174. title: '营销服务'
  175. },
  176. {
  177. id: 1,
  178. title: '解决方案'
  179. },
  180. {
  181. id: 2,
  182. title: '运营产品'
  183. },
  184. {
  185. id: 3,
  186. title: '营销工具'
  187. },
  188. {
  189. id: 4,
  190. title: '成功案例'
  191. },
  192. {
  193. id: 5,
  194. title: '关于采美'
  195. },
  196. {
  197. id: 6,
  198. title: '增长社区'
  199. }
  200. ],
  201. activeMenu: '', // 滚动到指定位置
  202. show: false,
  203. isPhone: false,
  204. modal: false,
  205. showVideo: false,
  206. videoObj: {},
  207. slideList: [
  208. {
  209. id: 1,
  210. title: '电话联系',
  211. slideBg: 'https://static.caimei365.com/app/img/supplier-login/phone.png',
  212. isShow: true
  213. },
  214. {
  215. id: 2,
  216. title: '微信客服',
  217. slideBg: 'https://static.caimei365.com/app/img/supplier-login/qrcode.png',
  218. isShow: true
  219. },
  220. {
  221. id: 3,
  222. title: '',
  223. slideBg: 'https://static.caimei365.com/app/img/supplier-login/scrolltop.png',
  224. isShow: false
  225. }
  226. ],
  227. successList: [],
  228. videoList: [],
  229. articelList: [],
  230. bannerList: [],
  231. isShareTimeline: false, // 是否从朋友圈分享
  232. isModalShow: false,
  233. }
  234. },
  235. computed: {
  236. ...mapState(['hasLogin', 'userInfo'])
  237. },
  238. watch: {},
  239. onLoad(options) {
  240. // 是否从朋友圈分享进入
  241. if (options.isShareTimeline) {
  242. this.isShareTimeline = options.isShareTimeline
  243. }
  244. // 点击链接
  245. uni.$on('changeLink', e => {
  246. setTimeout(() => {
  247. this.activeMenu = e
  248. }, 500)
  249. })
  250. uni.$on('handlerChangeLink', e => {
  251. setTimeout(() => {
  252. this.$refs['login-menu'].activeMenu = e
  253. this.$refs['login-menu'].isActive = Number(e.split('item')[1])
  254. this.activeMenu = e
  255. }, 500)
  256. })
  257. },
  258. mounted() {
  259. this.getSupplierLanding()
  260. },
  261. onShareAppMessage(res) {
  262. return {
  263. title: '更专业的美业数字化营销服务',
  264. path: '/pages/login/supplier_login'
  265. }
  266. },
  267. // 分享朋友圈
  268. onShareTimeline() {
  269. return {
  270. title: '更专业的美业数字化营销服务',
  271. path: '/pages/login/supplier_login',
  272. query: 'isShareTimeline=' + true
  273. }
  274. },
  275. methods: {
  276. // 滚动事件
  277. scrollPage($event) {
  278. this.activeMenu = $event
  279. },
  280. scrollView(e) {
  281. this.activeMenu = ''
  282. if (e.detail.scrollTop < 50) {
  283. this.slideList[2].isShow = false
  284. } else {
  285. this.slideList[2].isShow = true
  286. }
  287. },
  288. handlerChange(e) {
  289. const obj = {
  290. 1: () => (this.show = true),
  291. 2: () => (this.isPhone = true),
  292. 3: () => (this.activeMenu = 'item0')
  293. }
  294. obj[e.id]()
  295. },
  296. hideAlert() {
  297. this.show = false
  298. },
  299. // 拨打电话
  300. handleClick() {
  301. uni.makePhoneCall({
  302. phoneNumber: '131-6478-0233' //仅为示例
  303. })
  304. this.modal = false
  305. },
  306. cancel() {
  307. this.modal = false
  308. this.show = false
  309. this.isPhone = false
  310. },
  311. // 视频播放
  312. playVideo($event) {
  313. this.videoObj = $event
  314. this.showVideo = true
  315. },
  316. // 视频关闭
  317. closeVideo() {
  318. this.showVideo = false
  319. },
  320. // supplierLogin 登陆
  321. supplierLogin() {
  322. if (this.hasLogin) {
  323. uni.navigateTo({
  324. url: '/pages/supplier/user/supplier?shopId=' + this.userInfo.shopId
  325. })
  326. } else {
  327. uni.navigateTo({
  328. url: '/pages/login/login?state=1'
  329. })
  330. }
  331. },
  332. // solutionModal 方案解决模块
  333. solutionModal(val) {
  334. this.isModalShow = val
  335. },
  336. async getSupplierLanding() {
  337. try {
  338. const { data } = await this.UserService.supplierLoading({ source: 2 })
  339. this.bannerList = data.banner
  340. this.successList = data.landing.filter(e => e.type == '1')
  341. this.videoList = data.landing.filter(e => e.type == '2')
  342. this.articelList = data.landing.filter(e => e.type == '3')
  343. } catch (error) {
  344. console.log(error)
  345. }
  346. }
  347. }
  348. }
  349. </script>
  350. <style lang="scss" scoped>
  351. .container {
  352. position: absolute;
  353. bottom: 0;
  354. height: auto;
  355. }
  356. .scrollview {
  357. width: 100%;
  358. height: calc(100vh - 120rpx);
  359. background-color: #fff;
  360. #item1 {
  361. z-index: 20;
  362. }
  363. }
  364. .supplier-slide {
  365. position: fixed;
  366. right: 40rpx;
  367. box-sizing: border-box;
  368. width: 100rpx;
  369. bottom: 100rpx;
  370. .user-cicle {
  371. width: 100rpx;
  372. height: 150rpx;
  373. background: url(https://static.caimei365.com/app/img/supplier-login/userbg.png) center no-repeat;
  374. border-radius: 36px;
  375. margin-bottom: 40rpx;
  376. box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(51, 51, 51, 0.16);
  377. display: flex;
  378. justify-content: space-between;
  379. align-items: center;
  380. flex-direction: column;
  381. font-size: 18rpx;
  382. color: white;
  383. box-sizing: border-box;
  384. padding: 34rpx 0;
  385. .userLogin {
  386. width: 100%;
  387. white-space: nowrap;
  388. overflow: hidden;
  389. text-overflow: ellipsis;
  390. text-align: center;
  391. }
  392. }
  393. .slide {
  394. width: 100rpx;
  395. overflow: hidden;
  396. border-radius: 50rpx;
  397. background-color: #ff5b00;
  398. box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(255, 91, 0, 0.3);
  399. .slide-img {
  400. width: 45rpx;
  401. height: 45rpx;
  402. }
  403. .slide-item {
  404. height: 140rpx;
  405. width: 100rpx;
  406. display: flex;
  407. flex-direction: column;
  408. align-items: center;
  409. box-sizing: border-box;
  410. padding-top: 30rpx;
  411. border-bottom: 1rpx solid rgba(255, 255, 255, 0.3);
  412. .slide-title {
  413. margin-top: 10rpx;
  414. font-size: 20rpx;
  415. color: #fff;
  416. }
  417. }
  418. .slide-item:nth-child(3) {
  419. padding-top: 45rpx !important;
  420. }
  421. }
  422. }
  423. .tui-modal-custom {
  424. padding: 30rpx 80rpx;
  425. }
  426. .tui-modal-custom-text {
  427. text-align: center;
  428. color: #666666;
  429. font-size: 28rpx;
  430. }
  431. .tui-modal-custom-phone {
  432. margin-top: 62rpx;
  433. text-align: center;
  434. color: #ff5b00;
  435. border-bottom: 1px solid #ff5b00;
  436. font-size: 40rpx;
  437. font-weight: bold;
  438. }
  439. .tui-modal-custom-call {
  440. font-size: 32rpx;
  441. color: #666666;
  442. padding-top: 50rpx;
  443. }
  444. .qrcode {
  445. ::v-deep .tui-modal-box {
  446. width: auto !important;
  447. padding: 6rpx !important;
  448. border-radius: 0 !important;
  449. }
  450. .tui-modal-custom-qrcode {
  451. width: 412rpx;
  452. height: 460rpx;
  453. }
  454. }
  455. .modal-btns {
  456. display: flex;
  457. justify-content: space-between;
  458. margin-top: 62rpx;
  459. .cancel {
  460. width: 200rpx !important;
  461. color: #666666 !important;
  462. }
  463. .determine {
  464. width: 200rpx !important;
  465. }
  466. }
  467. </style>