Compare commits

...

55 Commits
master ... test

Author SHA1 Message Date
姜鑫 c2a60b94e2 chore(release): 1.0.0-B.29 2 years ago
姜鑫 90f3ca77a1 chore(release): 1.0.0-B.28 2 years ago
姜鑫 6b177012b2 chore(release): 1.0.0-B.27 2 years ago
姜鑫 a9bda9123e chore(release): 1.0.0-B.26 2 years ago
姜鑫 8c6916646a style: 🎨 字体大小修改 2 years ago
姜鑫 3c3e3c08ce style: 🎨 修改字体大小 2 years ago
姜鑫 d4ae9bbedd chore(release): 1.0.0-B.25 2 years ago
姜鑫 76e3d3424d build: 📦️ 去除sourcemap 2 years ago
姜鑫 083ce97df8 chore(release): 1.0.0-B.24 2 years ago
姜鑫 0e1398b5ff refactor: ♻️ 修改 2 years ago
姜鑫 440ee3cf8e chore(release): 1.0.0-B.23 2 years ago
姜鑫 3ac73dcd33 refactor: ♻️ 修改 2 years ago
姜鑫 49401814b5 chore(release): 1.0.0-B.22 2 years ago
姜鑫 1a344b4bf4 feat: 🚀 添加返回首页按钮 2 years ago
姜鑫 47977cae9d chore(release): 1.0.0-B.21 2 years ago
姜鑫 a66c4d65db ci: 🎡 修改淘宝镜像源 2 years ago
姜鑫 13e78e4fe2 chore(release): 1.0.0-B.20 2 years ago
姜鑫 93f556e8d7 refactor: ♻️ 去除顾客心声自动播放 修改自动返回时长为1分钟 2 years ago
姜鑫 75ba7eb1a6 chore(release): 1.0.0-B.19 2 years ago
姜鑫 1966785118 refactor: ♻️ 修改排序方式为竖向 2 years ago
姜鑫 679782ca22 chore(release): 1.0.0-B.18 2 years ago
姜鑫 b937b41e08 Merge branch 'dev' of https://git.1000my.com/project_yongwangyun/YongWang_Customer into dev 2 years ago
姜鑫 368535c03d chore(release): 1.0.0-B.17 2 years ago
姜鑫 e9e0c3f734 fix: 🧩 修复问题文字过长时 超出矩形框 2 years ago
千目管理员 5f9c9ea90e fix: YongWang_Customer 2 years ago
姜鑫 74a7643986 chore(release): 1.0.0-B.16 2 years ago
姜鑫 3e417e4caf chore(release): 1.0.0-B.15 2 years ago
姜鑫 20fa21fa84 chore(release): 1.0.0-B.14 2 years ago
姜鑫 a708abec87 feat: 🚀 间隔5分钟刷新一次数据 2 years ago
姜鑫 df7ef8d9bb chore(release): 1.0.0-B.13 2 years ago
姜鑫 057fef0d52 style: 🎨 提示文案字号修改 2 years ago
姜鑫 1ca219103f chore(release): 1.0.0-B.12 2 years ago
姜鑫 aa544dec91 refactor: ♻️ 回复内容更改为富文本 2 years ago
姜鑫 5602f6f182 chore(release): 1.0.0-B.11 2 years ago
姜鑫 685ea7545f style: 🎨 修改字体大小 2 years ago
姜鑫 ac3d58d348 chore(release): 1.0.0-B.10 3 years ago
姜鑫 32274bc8e1 fix: 🧩 修复图片显示多余 3 years ago
姜鑫 eb74b1ac36 chore(release): 1.0.0-B.9 3 years ago
姜鑫 7cb80ea49b feat: 🚀 添加负责人签字 3 years ago
姜鑫 871d21100f chore(release): 1.0.0-B.8 3 years ago
姜鑫 748fe3fb0a refactor: ♻️ 调整轮播 3 years ago
姜鑫 14729f4bb6 chore(release): 1.0.0-B.7 3 years ago
姜鑫 66f9086f9d refactor: ♻️ 修改初始化时间 3 years ago
姜鑫 541fa7ed3f chore(release): 1.0.0-B.6 3 years ago
姜鑫 c78d5b3155 refactor: ♻️ 轮播时长修改 3 years ago
姜鑫 9ef772e31a chore(release): 1.0.0-B.5 3 years ago
姜鑫 8f6a428fc8 refactor: ♻️ 修改轮播时长 3 years ago
姜鑫 c0e4f9be58 chore(release): 1.0.0-B.4 3 years ago
姜鑫 c6af813654 refactor: ♻️ 大屏顾客心声列表ui重构 3 years ago
姜鑫 9c8aa0e59a chore(release): 1.0.0-B.3 3 years ago
姜鑫 5e2e8c6dbf style: 🎨 样式调优 3 years ago
姜鑫 bb75dd574b chore(release): 1.0.0-B.2 3 years ago
姜鑫 db1650206a refactor: ♻️ 修改mallCode从url地址获取 3 years ago
姜鑫 f2addeb030 chore(release): 1.0.0-B.1 3 years ago
姜鑫 e31a067acf feat: 🚀 commit 3 years ago
  1. 10
      .drone.yml
  2. 4
      .tpl
  3. 97
      CHANGELOG.md
  4. 29
      package-lock.json
  5. 4
      package.json
  6. 2
      public/static/offline/JSON/GetDevCoordinateByIP.json
  7. 4
      public/static/offline/JSON/getConfig.json
  8. 53
      src/App.vue
  9. 5
      src/assets/images/arrow.svg
  10. 13
      src/assets/images/back_index_icon.svg
  11. 106
      src/components/ScrollList/ScrollList.vue
  12. 78
      src/components/ScrollListItem/ScrollListItem.vue
  13. 26
      src/components/WeatherAndTime/WeatherAndTime.vue
  14. 6
      src/composables/useConfig.ts
  15. 17
      src/composables/useWeather.ts
  16. 2
      src/enums/index.ts
  17. 5
      src/http/api/base/index.ts
  18. 2
      src/http/http.ts
  19. 8
      src/types/customer.d.ts
  20. 3
      vue.config.js

10
.drone.yml

@ -20,7 +20,7 @@ trigger:
volumes:
- name: node
host:
path: /data/drone/node_modules_daoshi/
path: /data/drone/node_modules_YongWang_Customer/
- name: svn
host:
path: /data/drone/svndir/
@ -35,8 +35,8 @@ steps:
settings:
mirror: https://docker.mirrors.ustc.edu.cn
commands:
- npm config set registry https://registry.npm.taobao.org
- npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
- npm config set registry https://registry.npmmirror.com/
# - npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
- npm install
- npm run build
- ls dist
@ -68,7 +68,7 @@ steps:
- mv $zip_name ../
# svn目录定义 开头和结尾不能有/,且不能出现中文乱码,复制地址时建议只复制02项目定制后的目录,会影响到变量取值
- svndir="2022研发/Prd007_智能导视/02项目定制/BJ006北京京西大悦城/导视前端"
- svndir="2022研发/Prd007_智能导视/02项目定制/XT001永旺集团/前端导视"
# - svn_reponame=${svndir%%/*}
# - svn_path=${svndir##*/}
# - echo 仓库内部子路径取值 $svn_path
@ -104,7 +104,7 @@ steps:
image: lddsb/drone-dingtalk-message
failure: ignore
settings:
token: 'your dingTalk robot token'
token: 3f3b35d1e5bb3590550b81680d555f884200a5d13be679be19d15aa5ff7f0e0e
type: markdown
message_color: true
message_pic: true

4
.tpl

@ -1,9 +1,9 @@
<font color=[TPL_STATUS_COLOR] size="3">
项目svn地址:http://svn.1000my.com/svn/2022研发/Prd007_智能导视/02项目定制/
项目svn地址:http://svn.1000my.com/svn/2022研发/Prd007_智能导视/02项目定制/XT001永旺集团/前端导视
</font>
<font color=[TPL_STATUS_COLOR] size="3">
项目git地址:https://git.1000my.com/
项目git地址:https://git.1000my.com/project_yongwangyun/YongWang_Customer.git
</font>
<font color=[TPL_STATUS_COLOR] size="3">

97
CHANGELOG.md

@ -0,0 +1,97 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.0.0-B.29](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.25...v1.0.0-B.29) (2024-05-22)
## [1.0.0-B.28](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.25...v1.0.0-B.28) (2024-05-22)
## [1.0.0-B.27](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.25...v1.0.0-B.27) (2024-05-22)
## [1.0.0-B.26](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.25...v1.0.0-B.26) (2024-05-22)
## [1.0.0-B.25](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.24...v1.0.0-B.25) (2024-04-01)
## [1.0.0-B.24](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.23...v1.0.0-B.24) (2024-03-28)
## [1.0.0-B.23](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.22...v1.0.0-B.23) (2024-03-28)
## [1.0.0-B.22](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.21...v1.0.0-B.22) (2024-03-28)
### Features
* 🚀 添加返回首页按钮 ([1a344b4](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/1a344b4bf4e2e00446f9673b6b7b73ee8676e563))
## [1.0.0-B.21](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.20...v1.0.0-B.21) (2024-03-25)
## [1.0.0-B.20](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.19...v1.0.0-B.20) (2024-03-25)
## [1.0.0-B.19](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.18...v1.0.0-B.19) (2024-01-16)
## [1.0.0-B.18](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.17...v1.0.0-B.18) (2024-01-16)
### Bug Fixes
* YongWang_Customer ([5f9c9ea](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/5f9c9ea90ebbd29ccf5dcbb77a522fc18f3ade5f))
## [1.0.0-B.17](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.16...v1.0.0-B.17) (2024-01-16)
### Bug Fixes
* 🧩 修复问题文字过长时 超出矩形框 ([e9e0c3f](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/e9e0c3f7342c19a3f778133117343c68ba97ff0a))
## [1.0.0-B.16](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.15...v1.0.0-B.16) (2024-01-05)
## [1.0.0-B.15](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.14...v1.0.0-B.15) (2024-01-05)
## [1.0.0-B.14](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.13...v1.0.0-B.14) (2024-01-05)
### Features
* 🚀 间隔5分钟刷新一次数据 ([a708abe](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/a708abec873464a8ed23a48a6c7711b2675f5614))
## [1.0.0-B.13](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.12...v1.0.0-B.13) (2024-01-03)
## [1.0.0-B.12](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.11...v1.0.0-B.12) (2024-01-03)
## [1.0.0-B.11](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.10...v1.0.0-B.11) (2023-12-29)
## [1.0.0-B.10](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.9...v1.0.0-B.10) (2023-11-17)
### Bug Fixes
* 🧩 修复图片显示多余 ([32274bc](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/32274bc8e1d1192108f82cc86f867e5fc9671ec4))
## [1.0.0-B.9](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.8...v1.0.0-B.9) (2023-11-17)
### Features
* 🚀 添加负责人签字 ([7cb80ea](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/7cb80ea49bb70a0676d3cbf3265db9e503314739))
## [1.0.0-B.8](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.7...v1.0.0-B.8) (2023-11-08)
## [1.0.0-B.7](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.6...v1.0.0-B.7) (2023-11-08)
## [1.0.0-B.6](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.5...v1.0.0-B.6) (2023-11-08)
## [1.0.0-B.5](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.4...v1.0.0-B.5) (2023-11-08)
## [1.0.0-B.4](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.3...v1.0.0-B.4) (2023-11-08)
## [1.0.0-B.3](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.2...v1.0.0-B.3) (2023-10-30)
## [1.0.0-B.2](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.1...v1.0.0-B.2) (2023-10-27)
## 1.0.0-B.1 (2023-10-25)
### Features
* 🚀 commit ([e31a067](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/e31a067acf66fdbc0d41e9ec04905b066ee3325d))
* 🚀 first commit ([26b3c78](https://git.1000my.com/project_yongwangyun/YongWang_Customer/commit/26b3c78b13b9e7b083bd918a77aceba1fc257355))

29
package-lock.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "0.1.0",
"version": "1.0.0-B.29",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -5858,6 +5858,14 @@
"entities": "^2.0.0"
}
},
"dom7": {
"version": "4.0.6",
"resolved": "https://registry.npmmirror.com/dom7/-/dom7-4.0.6.tgz",
"integrity": "sha512-emjdpPLhpNubapLFdjNL9tP06Sr+GZkrIHEXLWvOGsytACUrkbeIdjO5g77m00BrHTznnlcNqgmn7pCN192TBA==",
"requires": {
"ssr-window": "^4.0.0"
}
},
"domelementtype": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
@ -9290,6 +9298,11 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
@ -12235,6 +12248,11 @@
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
"dev": true
},
"ssr-window": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/ssr-window/-/ssr-window-4.0.2.tgz",
"integrity": "sha512-ISv/Ch+ig7SOtw7G2+qkwfVASzazUnvlDTwypdLoPoySv+6MqlOV10VwPSE6EWkGjhW50lUmghPmpYZXMu/+AQ=="
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz",
@ -12885,6 +12903,15 @@
}
}
},
"swiper": {
"version": "8.4.5",
"resolved": "https://registry.npmmirror.com/swiper/-/swiper-8.4.5.tgz",
"integrity": "sha512-zveyEFBBv4q1sVkbJHnuH4xCtarKieavJ4SxP0QEHvdpPLJRuD7j/Xg38IVVLbp7Db6qrPsLUePvxohYx39Agw==",
"requires": {
"dom7": "^4.0.4",
"ssr-window": "^4.0.2"
}
},
"table": {
"version": "6.8.1",
"resolved": "https://registry.npmmirror.com/table/-/table-6.8.1.tgz",

4
package.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "0.1.0",
"version": "1.0.0-B.29",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@ -22,7 +22,9 @@
"@better-scroll/scroll-bar": "^2.5.0",
"axios": "^1.3.3",
"core-js": "^3.8.3",
"lodash-es": "^4.17.21",
"pinia": "^2.0.30",
"swiper": "^8.4.5",
"vue": "^3.2.13"
},
"devDependencies": {

2
public/static/offline/JSON/GetDevCoordinateByIP.json

@ -8,7 +8,7 @@
"xaxis": "93",
"yaxis": "93",
"angle": "0",
"mallCode": "79b73dae-5d30-4f2f-ad07-d6bc648fb6dfhh",
"mallCode": "6686390f-1331-4275-81b7-0561545957d1",
"buildingCode": "79b73dae-5d30-4f2f-ad07-d6bc648fb66e",
"buildingName": "A",
"buildingOrder": 0,

4
public/static/offline/JSON/getConfig.json

@ -1,8 +1,8 @@
{
"code": "200",
"data": {
"smallUrl": "http://121.199.30.36:8012/daoshi",
"bigUrl": "http://121.199.30.36:8012/mall",
"smallUrl": "http://192.168.1.130:8012/daoshi",
"bigUrl": "http://192.168.1.130:8012/Mall",
"baseUrl": "/static/offline"
},
"msg": ""

53
src/App.vue

@ -1,10 +1,54 @@
<template>
<WeatherAndTime />
<ScrollList />
<WeatherAndTime :mall-code="mallCode" />
<ScrollList ref="scrollList" :customer-list="customerList" :mall-code="mallCode" />
<img src="./assets/images/back_index_icon.svg" class="fixed bottom-11 left-[52px] w-28 h-12 z-100" alt="" @click="back" />
</template>
<script setup lang="ts">
import { onMounted, onBeforeUnmount, ref, toRefs, shallowRef } from 'vue'
import { useRootStore } from '@/store/root'
import { getCustomerList } from '@/http/api/base'
import { HTTP_CODE } from '@/enums'
import WeatherAndTime from '@/components/WeatherAndTime/WeatherAndTime.vue'
import ScrollList from '@/components/ScrollList/ScrollList.vue'
const store = useRootStore()
const { config } = toRefs(store)
const scrollList = ref<InstanceType<typeof ScrollList> | null>(null)
const mallCode = ref<string>('')
const pageIndex = ref(1)
const customerList = shallowRef<Customer[]>([])
function _getCustomerList() {
const params = {
pageIndex: pageIndex.value,
pageSize: 1000,
mallCode: mallCode.value
}
getCustomerList(config.value.smallUrl, params).then(({ code, data }) => {
if (code === HTTP_CODE.ERR_OK) {
customerList.value = data.list
}
})
}
let timer: any
onMounted(() => {
const href = window.location.href
mallCode.value = href.split('=')[1]
_getCustomerList()
timer = setInterval(() => {
_getCustomerList()
scrollList.value?.scroll()
}, 1000 * 60)
})
onBeforeUnmount(() => {
clearInterval(timer)
})
function back() {
scrollList.value?.scroll()
}
</script>
<style>
@ -17,4 +61,9 @@ body,
#app {
background: #000;
}
.special p,
.special div,
.special span {
font-size: 24px !important;
}
</style>

5
src/assets/images/arrow.svg

@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" rx="24" fill="white"/>
<rect x="3" y="3" width="42" height="42" rx="21" stroke="#C70082"/>
<path d="M35 24L24.75 34.25L20.5074 34.25L29.2574 25.5L13.3756 25.5L13.3756 22.5L29.2574 22.5L20.5074 13.75L24.75 13.75L35 24Z" fill="#C70082"/>
</svg>

After

Width:  |  Height:  |  Size: 368 B

13
src/assets/images/back_index_icon.svg

@ -0,0 +1,13 @@
<svg width="112" height="48" viewBox="0 0 112 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="112" height="48" rx="24" fill="#C70082"/>
<path d="M42.918 17.66C43.842 18.388 44.626 19.13 45.27 19.858L44.318 20.796C43.772 20.096 43.002 19.34 41.994 18.528L42.918 17.66ZM50.912 30.19C50.156 30.19 49.344 30.176 48.462 30.162C47.566 30.148 46.838 30.064 46.264 29.924C45.704 29.756 45.228 29.434 44.808 28.958C44.626 28.72 44.458 28.608 44.29 28.608C43.996 28.608 43.492 29.238 42.778 30.498L41.798 29.588C42.498 28.454 43.142 27.74 43.702 27.46V23.498H41.812V22.266H44.948V27.586C45.004 27.642 45.074 27.712 45.13 27.782C45.466 28.174 45.788 28.454 46.124 28.636C46.53 28.846 47.146 28.972 47.958 29C48.742 29.014 49.68 29.028 50.744 29.028C51.43 29.028 52.13 29.014 52.83 29C53.53 28.972 54.076 28.958 54.454 28.93L54.16 30.19H50.912ZM53.166 17.604L53.824 18.738C52.032 19.186 50.044 19.438 47.846 19.508L47.86 20.81H53.656V21.748C53.292 23.008 52.76 24.128 52.088 25.122C52.872 25.822 53.586 26.55 54.244 27.306L53.348 28.37C52.732 27.586 52.046 26.844 51.29 26.13C50.436 27.068 49.414 27.88 48.224 28.552L47.412 27.488C48.56 26.872 49.526 26.13 50.324 25.262C49.61 24.646 48.854 24.058 48.056 23.498L48.826 22.56C49.638 23.12 50.394 23.694 51.122 24.282C51.626 23.554 52.046 22.77 52.354 21.93H47.846C47.762 24.632 47.314 26.676 46.502 28.048L45.298 27.46C46.138 26.06 46.572 24.1 46.614 21.58V18.346C49.19 18.29 51.374 18.038 53.166 17.604ZM60.214 21.37H65.814V26.55H60.214V21.37ZM64.554 25.444V22.49H61.446V25.444H64.554ZM68.74 18.304V30.176H67.452V29.686H58.548V30.176H57.26V18.304H68.74ZM58.548 28.51H67.452V19.48H58.548V28.51ZM82.774 21.678V30.456H81.458V29.952H74.542V30.456H73.226V21.678H77.02C77.104 21.314 77.16 20.936 77.216 20.544H71.756V19.256H75.13C74.934 18.78 74.71 18.346 74.458 17.926L75.76 17.436C76.04 17.94 76.292 18.556 76.53 19.256H79.4C79.694 18.668 79.96 18.052 80.184 17.408L81.5 17.87C81.304 18.374 81.094 18.836 80.87 19.256H84.244V20.544H78.63C78.56 20.936 78.476 21.314 78.392 21.678H82.774ZM74.542 28.748H81.458V27.544H74.542V28.748ZM74.542 26.382H81.458V25.206H74.542V26.382ZM74.542 24.058H81.458V22.882H74.542V24.058ZM97.48 20.488V27.278H96.136V21.79H89.808V27.292H88.464V20.488H92.034C92.118 20.082 92.202 19.676 92.258 19.256H86.798V17.996H99.202V19.256H93.7C93.616 19.676 93.532 20.096 93.42 20.488H97.48ZM94.022 27.124C95.814 27.698 97.452 28.398 98.922 29.224L98.096 30.484C96.528 29.532 94.932 28.776 93.294 28.23L94.022 27.124ZM92.328 22.462H93.672V24.688C93.588 26.242 93.084 27.488 92.16 28.426C91.264 29.294 89.78 29.952 87.736 30.428L86.98 29.238C89.024 28.79 90.41 28.23 91.138 27.544C91.866 26.816 92.258 25.864 92.328 24.688V22.462Z" fill="white"/>
<g clip-path="url(#clip0_1162_5572)">
<path d="M18.828 18.9998L21.364 21.5358L19.95 22.9498L15 17.9998L19.95 13.0498L21.364 14.4638L18.828 16.9998H26C28.1217 16.9998 30.1566 17.8427 31.6569 19.3429C33.1571 20.8432 34 22.8781 34 24.9998C34 27.1215 33.1571 29.1564 31.6569 30.6567C30.1566 32.1569 28.1217 32.9998 26 32.9998H17V30.9998H26C27.5913 30.9998 29.1174 30.3677 30.2426 29.2424C31.3679 28.1172 32 26.5911 32 24.9998C32 23.4085 31.3679 21.8824 30.2426 20.7572C29.1174 19.6319 27.5913 18.9998 26 18.9998H18.828Z" fill="white"/>
</g>
<rect x="3" y="3" width="106" height="42" rx="20" stroke="white"/>
<defs>
<clipPath id="clip0_1162_5572">
<rect width="24" height="24" fill="white" transform="translate(13 12)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

106
src/components/ScrollList/ScrollList.vue

@ -1,70 +1,74 @@
<template>
<div class="relative rounded-[10px] bg-[#E9E9E9] mx-10 h-[936px]">
<ScrollView pull-up class="relative w-[1840px]" :list="[]" scroll-x @scroll-end="scrollEnd">
<div class="inline-grid grid-rows-[repeat(2,430px)] grid-flow-col gap-4 px-6 whitespace-nowrap pt-[30px] pb-3">
<ScrollListItem v-for="item of customerList" :key="item.addTime" />
<div class="flex-center row-span-2" :class="[isFirst ? 'col-end-[56]' : '']">
<Loading v-if="!loaded" />
</div>
</div>
<img
v-if="!customerList.length && loaded"
class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
src="../../assets/images/nodata.svg"
alt=""
/>
<div class="absolute left-1/2 -translate-x-1/2 bottom-5 flex flex-col items-center">
<img src="../../assets/images/hand.png" class="fadeInRight mb-[6px]" alt="" />
<p class="text-14 text-[#666]">左右滑动查看更多</p>
</div>
</ScrollView>
<div class="flex relative items-stretch rounded-[10px] bg-[#E9E9E9] mx-10">
<div class="swiper-container w-[calc(100%-104px)] my-[30px] pl-6">
<Swiper
v-if="chunkList.length"
rewind
observer
observe-parents
observe-slide-children
:modules="modules"
style="height: 879px"
@swiper="swiperInit"
>
<SwiperSlide v-for="item of chunkList" :key="JSON.stringify(item)">
<div class="grid grid-cols-[repeat(3,556px)] grid-rows-[repeat(2,430px)] grid-flow-col gap-4">
<ScrollListItem v-for="customer of item" :key="customer.addTime" :customer="customer" />
</div>
</SwiperSlide>
</Swiper>
</div>
<div class="flex shrink-0 flex-col items-center w-[104px] rounded-[10px] bg-[#C70082] pt-[56px]">
<img src="../../assets/images/arrow.svg" alt="" />
<p class="text-24 text-white pt-4 tb tracking-[10px]">请在右边的写字台书写您的心声和建议吧</p>
<i class="text-20 text-white">!</i>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, toRefs, onMounted } from 'vue'
import { useRootStore } from '@/store/root'
import { getCustomerList } from '@/http/api/base'
import { HTTP_CODE } from '@/enums'
import ScrollView from '@/base/ScrollView/ScrollView.vue'
import { shallowRef, computed } from 'vue'
import { chunk } from 'lodash-es'
import ScrollListItem from '@/components/ScrollListItem/ScrollListItem.vue'
import Loading from '@/base/Loading/Loading.vue'
import SwiperCore, { Autoplay } from 'swiper'
import { Swiper, SwiperSlide } from 'swiper/vue'
const store = useRootStore()
const { config, device } = toRefs(store)
import 'swiper/css'
const customerList = ref<Customer[]>([])
const pageIndex = ref(1)
const loaded = ref(false)
const isFirst = ref(true)
const modules = [Autoplay]
SwiperCore.use(modules)
function scrollEnd() {
console.log('scrollEnd')
type Props = {
mallCode: string
customerList: Customer[]
}
onMounted(_getCustomerList)
const props = withDefaults(defineProps<Props>(), {
mallCode: '',
customerList: () => []
})
function _getCustomerList() {
loaded.value = false
const params = {
pageIndex: pageIndex.value,
pageSize: 10,
mallCode: device.value.mallCode
}
getCustomerList(config.value.smallUrl, params)
.then(({ code, data }) => {
if (code === HTTP_CODE.ERR_OK) {
customerList.value.push(...data.list)
}
})
.finally(() => {
// isFirst.value = false
loaded.value = true
})
const chunkList = computed(() => chunk(props.customerList, 6))
const swiper = shallowRef()
function swiperInit(_swiper: any) {
swiper.value = _swiper
}
function scroll() {
swiper.value?.slideTo(0)
}
defineExpose({
scroll
})
</script>
<style>
.tb {
writing-mode: tb;
}
.fadeInRight {
animation: fade-in-right 1s infinite;
}

78
src/components/ScrollListItem/ScrollListItem.vue

@ -1,19 +1,58 @@
<template>
<div class="flex flex-wrap pt-6 pl-6 pr-[6px] space-x-8 relative w-[720px] rounded-xl bg-white shadow-[3px_3px_0_0_rgba(0,0,0,0.10)]">
<div class="flex-1 justify-between">
<div class="text-justify text-[#808080] text-12 font-normal leading-[18px] mb-2">{{ customer.addTime }}</div>
<ScrollView class="relative h-[356px]" scrollbar :list="[]">
<div class="text-justify text-[#C70082] text-16 font-normal leading-normal whitespace-normal pr-[14px]">
Q:{{ customer.suggestionContent }}
<div
class="flex flex-wrap pt-6 pl-6 pr-[6px] gap-x-8 relative w-[556px] h-[430px] rounded-xl bg-white shadow-[3px_3px_0_0_rgba(0,0,0,0.10)]"
>
<div class="flex-1 shrink-0 justify-between">
<div class="flex items-center text-justify text-[#808080] text-20 font-normal leading-[18px] mb-2">
<div class="flex-center mr-3 w-8 h-8 bg-[#B60081] rounded-xl">
<svg class="w-4 h-6" xmlns="http://www.w3.org/2000/svg" width="16" height="24" viewBox="0 0 16 24" fill="none">
<path
d="M7.71206 16.7038C10.6401 16.7038 12.5601 14.0638 12.5601 9.7918C12.5601 5.6638 10.6401 3.1198 7.71206 3.1198C4.78406 3.1198 2.88806 5.6638 2.88806 9.7918C2.88806 14.0638 4.78406 16.7038 7.71206 16.7038ZM13.2561 23.3038C9.84806 23.3038 7.49606 21.4318 6.39206 18.9358C2.57606 18.3118 0.00805664 14.9038 0.00805664 9.7918C0.00805664 4.0798 3.17606 0.695801 7.71206 0.695801C12.2721 0.695801 15.4161 4.1038 15.4161 9.7918C15.4161 14.7598 13.0161 18.0958 9.39206 18.8638C10.1841 20.3278 11.7921 20.9998 13.5681 20.9998C14.3361 20.9998 14.9601 20.8798 15.4641 20.7118L15.9921 22.8238C15.3921 23.0878 14.4081 23.3038 13.2561 23.3038Z"
fill="white"
/>
</svg>
</div>
{{ formatDate(customer.addTime) }}
</div>
<ScrollView class="relative h-[355px]" scrollbar :list="customer.suggestionContent">
<div class="text-[#C70082] font-normal leading-normal whitespace-normal pr-[14px] pb-10">
<div class="text-24 special" v-html="customer.suggestionContent"></div>
</div>
</ScrollView>
</div>
<div class="flex-1">
<div class="text-justify text-[#808080] text-12 font-normal leading-[18px] mb-2">{{ customer.updateTime }}</div>
<ScrollView class="relative h-[356px]" scrollbar observe-image :list="[]">
<div class="text-justify text-[##333333] text-16 font-normal leading-normal whitespace-normal pr-[14px]">
A:
<div v-html="customer.replyContent"></div>
<div class="flex-1 shrink-0">
<div class="flex items-center text-justify text-[#808080] text-20 font-normal leading-[18px] mb-2">
<div class="flex-center mr-3 w-8 h-8 rounded-xl bg-[#F5F5F5] border border-solid border-[#808080]">
<svg class="w-4 h-6" xmlns="http://www.w3.org/2000/svg" width="16" height="18" viewBox="0 0 16 18" fill="none">
<path
d="M0.535889 17.8438L6.39189 0.155762H9.60789L15.4639 17.8438H12.5119L11.0239 12.8278H4.87989L3.39189 17.8438H0.535889ZM5.55189 10.6198H10.3519L9.65589 8.24376C9.07989 6.32376 8.55189 4.35576 7.99989 2.36376H7.90389C7.37589 4.37976 6.82389 6.32376 6.24789 8.24376L5.55189 10.6198Z"
fill="#808080"
/>
</svg>
</div>
{{ formatDate(customer.updateTime) }}
</div>
<ScrollView class="relative h-[356px]" scrollbar observe-image :list="customer.replyContent">
<div class="text-[##333333] font-normal leading-normal whitespace-normal pr-2">
<div class="mb-2 special text-24" v-html="customer.replyContent"></div>
<div v-if="customer.sign" class="text-[#333] text-24">店铺店长: {{ customer.sign }}</div>
<div class="flex items-center text-[#333] text-24 pt-2">
总经理: 能岛拓也
<svg
class="w-12 h-12 ml-2.5 shrink-0"
width="48"
height="48"
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="24" cy="24" r="22.9655" stroke="#E62222" stroke-width="2.06897" />
<path
d="M21.3975 14.2267H17.723V15.6568H21.3975V14.2267ZM15.9751 12.6576H23.2446V21.953C23.2446 22.8468 23.0857 23.3434 22.47 23.6214C21.8742 23.8995 20.9804 23.9392 19.7688 23.9392C19.6695 23.4427 19.3914 22.7078 19.1332 22.2311C19.9873 22.2708 20.8016 22.2708 21.0797 22.251C21.318 22.251 21.3975 22.1715 21.3975 21.9332V20.0463H17.723V23.9591H15.9751V12.6576ZM17.723 17.0868V18.5963H21.3975V17.0868H17.723ZM31.0107 6.93731L32.2422 8.30779C30.6929 9.04268 28.667 9.718 26.8198 10.2543V11.9028C26.8198 12.5781 26.9588 12.6774 27.8129 12.6774C28.1903 12.6774 30.0375 12.6774 30.534 12.6774C31.249 12.6774 31.3881 12.3596 31.4874 10.4926C31.8449 10.7905 32.6195 11.0686 33.1359 11.1878C32.9175 13.6705 32.401 14.3459 30.7128 14.3459C30.2559 14.3459 28.0115 14.3459 27.5944 14.3459C25.489 14.3459 24.9726 13.7897 24.9726 11.9227V5.58668H26.8198V8.74475C28.369 8.18862 29.958 7.5133 31.0107 6.93731ZM31.2093 15.8157L32.4606 17.206C30.9114 18.0799 28.7862 18.8148 26.8397 19.3908V21.377C26.8397 22.0523 27.0184 22.1715 27.8725 22.1715C28.2499 22.1715 30.1368 22.1715 30.6532 22.1715C31.4278 22.1715 31.5668 21.7941 31.6463 19.649C32.0435 19.947 32.7983 20.225 33.3147 20.3442C33.0962 23.0852 32.5798 23.8201 30.8121 23.8201C30.3553 23.8201 28.0711 23.8201 27.6342 23.8201C25.5288 23.8201 24.9925 23.2639 24.9925 21.377V14.8623H26.8397V17.8416C28.4882 17.2457 30.1566 16.5108 31.2093 15.8157ZM15.7566 11.4659C15.6573 11.0885 15.3395 10.1947 15.121 9.69813C15.4388 9.61868 15.7368 9.34062 16.0744 8.90365C16.3922 8.50641 17.425 6.99689 18.0209 5.48737L20.0071 6.04351C19.3715 7.29482 18.5175 8.566 17.6833 9.59882L21.4173 9.36048C21.0399 8.66531 20.603 7.97013 20.1859 7.35441L21.755 6.73868C22.7481 8.08931 23.8206 9.87689 24.198 11.0885L22.5296 11.8035C22.4303 11.4857 22.2913 11.1481 22.1125 10.7707C16.9484 11.1679 16.2135 11.2871 15.7566 11.4659ZM17.5839 27.0962H22.1522C22.3508 26.5401 22.5495 25.9243 22.6488 25.4675L24.8733 25.686C24.6548 26.1825 24.3768 26.6592 24.1384 27.0962H29.9977V33.3726H19.4311V34.6041H32.977V36.0341H19.4311V37.1265H32.262C32.262 37.1265 32.2422 37.6032 32.2024 37.8416C31.9244 41.3373 31.6264 42.7872 31.11 43.3632C30.7326 43.7406 30.3751 43.8797 29.8388 43.9392C29.382 43.9988 28.5478 43.9988 27.6342 43.9392C27.6143 43.4625 27.4355 42.7674 27.1773 42.3304C27.9519 42.4099 28.667 42.4297 28.945 42.4297C29.243 42.4297 29.4217 42.3701 29.5806 42.2112C29.8786 41.8934 30.1169 40.9202 30.3354 38.5368H17.5839V27.0962ZM28.1108 30.87H19.4311V32.0419H28.1108V30.87ZM28.1108 29.6584V28.427H19.4311V29.6584H28.1108ZM15.8758 39.371H17.5839V41.2976H20.5235V38.8347H22.2515V41.2976H25.1514V39.3312H26.8595V43.3434H25.1514V42.7475H15.8758V39.371Z"
fill="#E62222"
/>
</svg>
</div>
</div>
</ScrollView>
</div>
@ -27,9 +66,20 @@ type Props = {
customer: Customer
}
withDefault(defineProps<Props>(), {
customer: {} as Customer
withDefaults(defineProps<Props>(), {
customer: () => ({} as Customer)
})
function formatDate(date: string) {
if (!date) {
return
}
const newDate = new Date(date)
const year = newDate.getFullYear()
const month = String(newDate.getMonth() + 1).padStart(2, '0')
const week = String(newDate.getDate()).padStart(2, '0')
return `${year}-${month}-${week} ${newDate.getHours().toString().padStart(2, '0')}:${newDate.getMinutes().toString().padStart(2, '0')}`
}
</script>
<style>

26
src/components/WeatherAndTime/WeatherAndTime.vue

@ -1,11 +1,13 @@
<template>
<div class="flex justify-between items-center py-7 px-10">
<img src="../../assets/images/logo.png" class="w-16 h-16" alt="" />
<div class="flex-1">
<img src="../../assets/images/logo.png" class="w-16 h-16" alt="" />
</div>
<div class="flex items-center space-x-4">
<img src="../../assets/images/heart.png" class="w-10 h-10" alt="" />
<p class="text-36 text-white font-bold">顾客心声</p>
</div>
<div class="flex items-center">
<div class="flex-1 flex items-center justify-end">
<div class="w-9 h-9 mr-2">
<Icon :type="icon.type" color="#fff" />
</div>
@ -21,13 +23,31 @@
</template>
<script setup lang="ts">
import { watch } from 'vue'
import { formatDay } from '@/utils/utils'
import { useWeather } from '@/composables/useWeather'
import { useTime } from '@/composables/useTime'
import { useDay } from '@/composables/useDay'
import Icon from '@/base/Icon/Icon.vue'
const { weather, icon } = useWeather()
type Props = {
mallCode: string
}
const props = withDefaults(defineProps<Props>(), {
mallCode: ''
})
const { weather, icon, getWeatherStatus } = useWeather()
const { currentTime } = useTime()
const { whichWeek } = useDay()
watch(
() => props.mallCode,
(newVal: string) => {
if (newVal.length) {
getWeatherStatus(props.mallCode)
}
}
)
</script>

6
src/composables/useConfig.ts

@ -1,13 +1,11 @@
import { getWeather, getConfig, getDevice } from '@/http/api/base'
import { getConfig } from '@/http/api/base'
import { useRootStore } from '@/store/root'
export const useConfig = async () => {
const store = useRootStore()
try {
const [_weather, _config, _device] = await Promise.all([getWeather(), getConfig(), getDevice()])
store.SET_WEATHER(_weather.data)
const [_config] = await Promise.all([getConfig()])
store.SET_CONFIG(_config.data)
store.SET_DEVICE(_device.data)
Promise.resolve()
} catch (error) {
console.log('error: ', error)

17
src/composables/useWeather.ts

@ -1,12 +1,19 @@
import { ref, toRefs } from 'vue'
import { ref, toRefs, computed } from 'vue'
import { useRootStore } from '@/store/root'
import { getWeather } from '@/http/api/base'
type IconMap = { type: ExtractIcons<'sunny' | 'cloudy' | 'rain' | 'snow' | 'shade'>; status: string }
export const useWeather = () => {
const store = useRootStore()
const { weather } = toRefs(store)
const icon = ref({} as IconMap)
const { config } = toRefs(store)
const weather = ref({} as Weather)
function getWeatherStatus(mallCode: string) {
getWeather(config.value.smallUrl, mallCode).then(({ data }) => {
weather.value = data ?? {}
})
}
const status: IconMap[] = [
{ type: 'sunny', status: '晴' },
@ -15,7 +22,7 @@ export const useWeather = () => {
{ type: 'snow', status: '雪' },
{ type: 'shade', status: '阴' }
]
icon.value = status.find(item => weather.value.status?.includes(item.status)) ?? status[0]
const icon = computed(() => status.find(item => weather.value.status?.includes(item.status)) ?? status[0])
return { weather, icon }
return { weather, icon, getWeatherStatus }
}

2
src/enums/index.ts

@ -19,7 +19,7 @@ export enum FEATURED {
}
export enum HTTP_CODE {
ERR_OK = 200, //数据请求成功(可用于语音状态码)
ERR_OK = '200', //数据请求成功(可用于语音状态码)
ERR_DATA_NULL = 500, //语音无查询信息
ERR_OVER = 100, //语音播报完毕
ERR_NULL = '401', //未识别到语音

5
src/http/api/base/index.ts

@ -4,11 +4,8 @@ import { PREFIX } from '@/enums'
//获取配置项
export const getConfig = () => request<Config>({ url: `${PREFIX.STATIC_URL}/JSON/getConfig.json` })
//获取设备
export const getDevice = () => request<Device>({ url: `${PREFIX.STATIC_URL}/JSON/GetDevCoordinateByIP.json` })
//获取天气
export const getWeather = () => request<Weather>({ url: `${PREFIX.STATIC_URL}/JSON/GetWeathers.json` })
export const getWeather = (url: string, mallCode: string) => request<Weather>({ url: `${url}/Api/Cdn/GetWeathers?mallCode=${mallCode}` })
//获取心声列表
export const getCustomerList = (url: string, params: { pageIndex: number; pageSize: number; mallCode: string }) => {

2
src/http/http.ts

@ -96,7 +96,7 @@ const _request = new Request({
export type Response<T> = {
msg: string
data: T
code: number
code: number | string
}
export const request = <T = any>(config: RequestConfig<Response<T>>) => _request.request(config)

8
src/types/customer.d.ts

@ -1,6 +1,14 @@
interface Customer {
suggestionContent: string
replyContent: string
sign: null | string
fileList: {
extCode: string
fileCode: string
fileName: string
filePath: string
type: string
}[]
addTime: string
updateTime: string
}

3
vue.config.js

@ -4,5 +4,6 @@ const prod = process.env.NODE_ENV === 'production'
module.exports = defineConfig({
transpileDependencies: true,
publicPath: prod ? './' : '/'
publicPath: prod ? './' : '/',
productionSourceMap: false
})

Loading…
Cancel
Save