qj-common 4.1.11 → 4.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qj-common",
3
- "version": "4.1.11",
3
+ "version": "4.1.13",
4
4
  "description": "common files && template for qj-paas",
5
5
  "scripts": {
6
6
  "gulp": "gulp css"
@@ -1,4 +1,12 @@
1
1
  import request from '#/utils/request'
2
+ /* 电工首页楼层数据 */
3
+ export function queryConttitleReDomainByCode(data) {
4
+ return request({
5
+ url: 'web/cms/conttitleBusiness/queryConttitleReDomainByCode.json', //skuId=494333&goodsNum=1
6
+ method: 'get',
7
+ params: data
8
+ })
9
+ }
2
10
 
3
11
  //获取商品类型信息
4
12
  export function queryPntreeTree(pntreeId) {
@@ -1,24 +1,29 @@
1
1
  <template>
2
2
  <div class="container">
3
3
  <div class="bac">
4
- <div class="logo" @click="linkToIndex()">
5
- <img :src="logo" alt="" srcset="" />
4
+ <div class="logo" @click="goHome">
5
+ <img :src="hrefurl+logo" alt="" srcset=""/>
6
6
  </div>
7
7
  <div class="search">
8
8
  <div class="searchTatol">
9
9
  <!-- <div class="searchC"></div> -->
10
- <input placeholder="请输入关键字进行搜索" v-model="searchValue" @keyup.enter="search(searchValue)" />
11
- <div class="search_logo" @click="search(searchValue)">
12
- <img src="http://b2bopt-dev2021122100000001.qjclouds.com//paas/shop/2021122100000001/2022-02-17/99f34efac81d480c870ff5e0ad79e869.png" alt="" />
10
+ <input v-model="searchValue" placeholder="请输入关键字进行搜索" @keyup.enter="search(searchValue)"/>
11
+ <div class="search_logo" @click.passive.stop="search(searchValue)">
12
+ <i class="el-icon-search t-24" style="color:white;"></i>
13
13
  </div>
14
14
  </div>
15
15
  <div style="display:flex;color:#666666;font-size:14px">
16
16
  <p>热门词搜索:</p>
17
- <p style="margin-right:10px;cursor:pointer" v-for="(item, index) in searchWord[0]?searchWord[0].cmsContlistReDomainList:''" @click="search(item.contlistName)" :key="index">{{ item.contlistName }}</p>
17
+ <p v-for="(item, index) in searchWord[0]?searchWord[0].cmsContlistReDomainList:''"
18
+ :key="index" style="margin-right:10px;cursor:pointer"
19
+ @click.passive.stop="searchs(item)">{{ item.contlistName }}</p>
18
20
  </div>
19
21
  </div>
20
22
  <div class="shopCart" @click="linkToShoppingCar()">
21
- <img src="http://b2bopt-dev2021122100000001.qjclouds.com//paas/shop/2021122100000001/2022-02-17/3eeb28fbd145464b92a3710b5f714c56.png" alt="" style="width:23px;height:23px" />
23
+ <img
24
+ alt=""
25
+ src="http://b2bopt-dev2021122100000001.qjclouds.com//paas/shop/2021122100000001/2022-02-17/3eeb28fbd145464b92a3710b5f714c56.png"
26
+ style="width:23px;height:23px"/>
22
27
  <p>我的购物车</p>
23
28
  </div>
24
29
  </div>
@@ -26,59 +31,65 @@
26
31
  </template>
27
32
 
28
33
  <script>
29
- import { indexRequest } from '#/api/login.js'
34
+ import {queryConttitleReDomainByCode} from '@/api/shopFbu.js'
35
+
30
36
  export default {
31
37
  data() {
32
38
  return {
33
39
  searchValue: '',
34
40
  searchWord: [],
41
+ logo: '',
35
42
  hrefurl: process.env.API_ROOT,
36
- logo:''
37
43
  }
38
44
  },
39
45
  created() {
40
- this.logo=JSON.parse(sessionStorage.getItem('proappEnvLayout')).proappEnvLogo || '';
41
- indexRequest({ tginfoMenuCode: 'index1' }).then((res) => {
42
- if (res) {
43
- res.forEach((item) => {
44
- if (item.conttitleName == '热门搜索词') {
45
- this.searchWord.push(item)
46
- // this.searchWord.forEach((ele) => {
47
- // console.log(ele.contlistName, 'contlistNamecontlistName')
48
- // })
49
-
50
- console.log(this.searchWord, 'this.searchWord')
51
- } else {
52
- // this.swiperData = res.cmsContlistReDomainList
53
- // ? [...res.cmsContlistReDomainList].map((res) => {
54
- // return {
55
- // image: this.getImgFullUrl(res.contlistPicurlNow),
56
- // url: res.contlistUrlNow
57
- // }
58
- // })
59
- // : null
60
- }
61
- })
62
- }
63
- })
46
+ this.logo = JSON.parse(sessionStorage.getItem('proappEnvLayout')).proappEnvLogo || '';
47
+ let index1 = sessionStorage.getItem('index1');
48
+ this.searchWord = [];
49
+ if (index1) {
50
+ index1 = JSON.parse(index1);
51
+ index1.forEach((item) => {
52
+ if (item.conttitleName == '热门搜索词') {
53
+ this.searchWord.push(item)
54
+ }
55
+ })
56
+ } else {
57
+ queryConttitleReDomainByCode({tginfoMenuCode: 'index1'}).then((res) => {
58
+ if (res) {
59
+ res.forEach((item) => {
60
+ if (item.conttitleName == '热门搜索词') {
61
+ this.searchWord.push(item)
62
+ }
63
+ })
64
+ }
65
+ })
66
+ }
64
67
  },
65
68
  methods: {
66
69
  search(code) {
67
- code?location.href = '/paas/b2b-cli-pc-ayd/index.html#/searchResult?searchParam='+code:
68
- location.href = '/paas/b2b-cli-pc-ayd/index.html#/searchResult?searchParam=' + this.searchValue
70
+ if (this.$route.query.hasOwnProperty('searchParam') && this.$route.path == '/searchResult') {
71
+ this.$store.commit('SET_SEARCH_PARAM', code);
72
+ } else {
73
+ this.$router.push({
74
+ path: '/searchResult',
75
+ query: {
76
+ searchParam: code
77
+ }
78
+ })
79
+ }
80
+ },
81
+ searchs(item) {
82
+ window.location = item.contlistUrl
69
83
  },
70
- linkToIndex(){
71
- location.href = this.hrefurl + `/paas/b2b-cli-pc-ayd/index.html#/islandStore`;
84
+ goHome() {
85
+ this.$router.push({
86
+ path: '/islandStore'
87
+ })
72
88
  },
73
89
  linkToShoppingCar() {
74
- location.href =
75
- this.hrefurl + `/paas/b2b-cli-pc-ayd/index.html#/car`;
76
- // this.$router.push({
77
- //path: '/goodsDetails',
78
- //query: {
79
- //skuNo: code
80
- //}
81
- //})
90
+ this.$router.push({
91
+ path: '/car'
92
+ })
82
93
  },
83
94
  }
84
95
  }
@@ -87,22 +98,29 @@ export default {
87
98
  <style lang="scss" scoped>
88
99
  .container {
89
100
  background-color: #fff;
101
+
90
102
  .bac {
91
103
  width: 1200px;
92
104
  margin: 0 auto;
93
105
  height: 132px;
94
106
  display: flex;
95
107
  justify-content: space-between;
108
+
96
109
  .logo {
110
+ width: 90px;
111
+
97
112
  img {
98
113
  width: 90px;
99
114
  cursor: pointer;
100
115
  }
101
116
  }
117
+
102
118
  .search {
103
119
  margin-top: 26px;
120
+
104
121
  .searchTatol {
105
122
  display: flex;
123
+
106
124
  input {
107
125
  text-indent: 16px;
108
126
  border: 1px solid #ed2f17;
@@ -110,6 +128,7 @@ export default {
110
128
  width: 510px;
111
129
  margin-bottom: 10px;
112
130
  }
131
+
113
132
  input::-webkit-input-placeholder {
114
133
  /*WebKit browsers*/
115
134
  color: #ccc;
@@ -124,19 +143,22 @@ export default {
124
143
  /*Internet Explorer*/
125
144
  color: #ccc;
126
145
  }
146
+
127
147
  .search_logo {
128
148
  cursor: pointer;
129
149
  background-color: #ed2f17;
130
150
  width: 80px;
131
- height: 45px;
151
+ height: 44px;
132
152
  text-align: center;
133
- line-height: 45px;
153
+ line-height: 50px;
154
+
134
155
  img {
135
156
  width: 23px;
136
157
  }
137
158
  }
138
159
  }
139
160
  }
161
+
140
162
  .shopCart {
141
163
  cursor: pointer;
142
164
  margin-top: 26px;
@@ -148,6 +170,7 @@ export default {
148
170
  width: 180px;
149
171
  // background-color: red;
150
172
  border: 1px solid #ed2f17;
173
+
151
174
  p {
152
175
  font-size: 14px;
153
176
  margin-left: 10px;
@@ -2,7 +2,7 @@
2
2
  <div class="bacC">
3
3
  <div class="container">
4
4
  <div class="topLeft" v-if="userInfo.merberCompname">
5
- <p>{{userInfo.merberCompname}}</p>
5
+ <p>{{ userInfo.merberCompname }}</p>
6
6
  &nbsp;
7
7
  <p @click="outLogin()">【退出登录】</p>
8
8
  </div>
@@ -10,10 +10,17 @@
10
10
  <p @click="toLogin()">登录</p>
11
11
  </div>
12
12
  <div class="topRight">
13
- <block >
14
- <img v-if="$route.path === `/order`" class="seleIcon" src="http://opttest.lbaby1998.com/paas/shop/2021122100000001/2022-07-28/717cfb99fec34ed5b6b256eb7fd3d456.png" alt="" />
15
- <img v-else @click="toUser()" src="http://b2bopt-dev2021122100000001.qjclouds.com/paas/shop/2021122100000001/2022-02-17/0c3b5a19c1574307bc1fcbb0754d1ad0.png" alt="" />
16
- <span @click="toIndex()" :class="[ $route.path === `/islandStore` ? 'c-theme' : '' ]">个人中心</span>
13
+ <block>
14
+ <img v-if="$route.path === `/order`" alt=""
15
+ class="seleIcon"
16
+ src="http://opttest.lbaby1998.com/paas/shop/2021122100000001/2022-07-28/717cfb99fec34ed5b6b256eb7fd3d456.png"/>
17
+ <img v-else alt=""
18
+ src="http://b2bopt-dev2021122100000001.qjclouds.com/paas/shop/2021122100000001/2022-02-17/0c3b5a19c1574307bc1fcbb0754d1ad0.png"
19
+ @click="toUser()"/>
20
+ <span v-if="$route.path === `/order`">个人中心</span>
21
+ <span v-else @click="toIndex()">个人中心</span>
22
+
23
+ <!-- <span @click="toIndex()" :class="[ $route.path === `/islandStore` ? 'c-theme' : '' ]">个人中心</span> -->
17
24
  </block>
18
25
  <span @click="toHelp()" :class="[ $route.path === `/helpindex` ? 'c-theme' : '' ]">帮助中心</span>
19
26
  </div>
@@ -22,7 +29,8 @@
22
29
  </template>
23
30
 
24
31
  <script>
25
- import { loginOut } from '#/api/login.js'
32
+ import {loginOut} from '#/api/login.js'
33
+
26
34
  export default {
27
35
  data() {
28
36
  return {
@@ -51,14 +59,14 @@ export default {
51
59
  }
52
60
  })
53
61
  },
54
- toUser(){
62
+ toUser() {
55
63
  location.href = '/paas/b2b-bus-pc-ayd/index.html#/order'
56
64
  },
57
- toIndex(){
58
- location.href = '/paas/b2b-cli-pc-ayd/index.html#/islandStore'
65
+ toIndex() {
66
+ location.href = '/paas/b2b-bus-pc-ayd/index.html#/order'
59
67
  },
60
- toHelp(){
61
- location.href = '/paas/b2b-cli-pc-ayd/index.html#/helpindex'
68
+ toHelp() {
69
+ location.href = '/paas/b2b-cli-pc-ayd/index.html#/helpindex'
62
70
  }
63
71
  }
64
72
  }
@@ -68,6 +76,7 @@ export default {
68
76
  .bacC {
69
77
  background-color: #fff;
70
78
  border-bottom: 1px solid #f3f3f3;
79
+
71
80
  .container {
72
81
  width: 1200px;
73
82
  margin: 0 auto;
@@ -75,37 +84,46 @@ export default {
75
84
  justify-content: space-between;
76
85
  height: 40px;
77
86
  align-items: center;
87
+
78
88
  .topLeft {
79
89
  display: flex;
90
+
80
91
  .img {
81
92
  width: 24px;
82
93
  }
94
+
83
95
  p:nth-child(1) {
84
96
  color: #333;
85
97
  font-size: 14px;
86
98
  }
99
+
87
100
  p:nth-child(2) {
88
101
  color: #666666;
89
102
  font-size: 13px;
90
103
  cursor: pointer;
91
104
  }
105
+
92
106
  // flex-direction: column;
93
107
  }
108
+
94
109
  .topRight {
95
110
  img {
96
111
  cursor: pointer;
97
112
  }
98
- .seleIcon{
99
- width: 17px;
100
- margin-right: 10px;
101
- }
102
- span{
113
+
114
+ .seleIcon {
115
+ width: 17px;
116
+ margin-right: 10px;
117
+ }
118
+
119
+ span {
103
120
  font-size: 12px;
104
121
  cursor: pointer;
105
122
  }
106
- span:hover{
107
- color: #ed2f17;
108
- }
123
+
124
+ span:hover {
125
+ color: #ed2f17;
126
+ }
109
127
  }
110
128
  }
111
129
  }