Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3957be379 | ||
|
|
c18ec66653 | ||
|
|
e726a51922 | ||
|
|
c51f177c7c | ||
|
|
1439e1206d | ||
|
|
714f5c3340 | ||
|
|
27d4727f89 | ||
|
|
e81aa3a490 | ||
|
|
ab5e5659fe | ||
|
|
d9e5fefdfa | ||
|
|
14a0477ee8 | ||
|
|
69540415ec | ||
|
|
dcff3181b3 | ||
|
|
1016b4d7cb | ||
|
|
0c9f3a5081 | ||
|
|
b7c7177f71 | ||
|
|
8b7e35c182 | ||
|
|
f30d06ea11 | ||
|
|
050938b8aa | ||
|
|
6ecc996e8b | ||
|
|
ff93f79a18 | ||
|
|
4c60c7ba52 | ||
|
|
b84534b654 | ||
|
|
1915394b27 | ||
|
|
6ce59471f3 | ||
|
|
787b2eada4 | ||
|
|
aa68c01ace | ||
|
|
8bf30f6989 | ||
|
|
15e9ca1687 | ||
|
|
4f867cb191 | ||
|
|
f658302d71 | ||
|
|
4104052d1a | ||
|
|
83be020182 | ||
|
|
1b56642743 | ||
|
|
413b464e18 | ||
|
|
35d9d34689 | ||
|
|
088c1be6f9 | ||
|
|
fafd862f99 | ||
|
|
43a26d4943 | ||
|
|
12252eec5a | ||
|
|
506cc6053d | ||
|
|
2ba35be830 | ||
|
|
83c1060b0c | ||
|
|
2896442f2f | ||
|
|
072a05257e | ||
|
|
2f2497270a | ||
|
|
cb3b92a2b2 | ||
|
|
7c1f57bb0c | ||
|
|
daed2c3ec5 | ||
|
|
b899039b89 | ||
|
|
51ecf9b3b2 | ||
|
|
0f582d6005 | ||
|
|
011117d318 | ||
|
|
780a3754c0 | ||
|
|
af6da8649c | ||
|
|
68765f4474 | ||
|
|
6b84821a0b | ||
|
|
6f059dfed1 | ||
|
|
4f01467d5c | ||
|
|
6d0d87e6cb | ||
|
|
f3427dfa9a | ||
|
|
bf5b30ae93 | ||
|
|
427d33b550 | ||
|
|
f3c1ad8d32 | ||
|
|
3baeace156 | ||
|
|
af273b2eb8 | ||
|
|
30261f183a | ||
|
|
6b408c41d3 | ||
|
|
305c965cc1 | ||
|
|
e19ebec8ef | ||
|
|
6e6cc36570 | ||
|
|
69e8a48283 | ||
|
|
edcb64fbf6 | ||
|
|
d3d22a3c87 | ||
|
|
313adf37b0 | ||
|
|
1feb90c602 | ||
|
|
4b8ba61ee5 | ||
|
|
eda9664c6d | ||
|
|
b3f85d807d | ||
|
|
9b0216c857 | ||
|
|
b5e23dda59 | ||
|
|
cfd333cffa | ||
|
|
24d2b6f96a | ||
|
|
ce428b7ff8 | ||
|
|
9eb5f0acf3 | ||
|
|
fb31d538b6 | ||
|
|
8064cd13fa | ||
|
|
e0de70ee35 | ||
|
|
5de4ab8758 | ||
|
|
ba91746cde | ||
|
|
8ebf12dcc6 | ||
|
|
9e0bc48135 | ||
|
|
a4201225fa | ||
|
|
5ab60fda4c | ||
|
|
93770e4c3d | ||
|
|
82a54220d4 | ||
|
|
7b79d6e965 | ||
|
|
fac60f9df9 | ||
|
|
a21870c578 | ||
|
|
6a2a2755e5 | ||
|
|
27be3935fa | ||
|
|
9c67d724fd | ||
|
|
e33c59ae64 | ||
|
|
a273948165 | ||
|
|
0053ddd3e4 | ||
|
|
22abd6caaf | ||
|
|
94aa156f50 | ||
|
|
c1c0cb2373 | ||
|
|
58d0faa855 | ||
|
|
8f5eca5c62 | ||
|
|
94405b6de9 | ||
|
|
d06666ec9d | ||
|
|
21dccd8d61 | ||
|
|
b228155cc0 | ||
|
|
7b88c8d3fc | ||
|
|
5ab1254676 | ||
|
|
0d72a1d580 | ||
|
|
3efc3232b0 | ||
|
|
f15d842419 | ||
|
|
db4dc959d4 | ||
|
|
024eedaabb | ||
|
|
6790c14aaf | ||
|
|
b37d3a139e | ||
|
|
3407ef7aff | ||
|
|
06658209eb | ||
|
|
384d7ccae1 | ||
|
|
0641013a5c | ||
|
|
af075a9c28 | ||
|
|
cb75cbae9c | ||
|
|
6f8b940be5 | ||
|
|
1a6d0da0fd | ||
|
|
6f24c71d96 | ||
|
|
b0fffe8101 | ||
|
|
c015eb9dff | ||
|
|
2033fb7ed7 | ||
|
|
11878e7e8b | ||
|
|
4434360f8a | ||
|
|
01199eeebd | ||
|
|
973ce36778 | ||
|
|
41753688cb | ||
|
|
d6f6356ee0 | ||
|
|
43841c0491 | ||
|
|
c9e2e6005c | ||
|
|
11d40e719c | ||
|
|
43aca09ca6 | ||
|
|
bde972a5ad | ||
|
|
b27d9b12fe | ||
|
|
aaa6a2299f | ||
|
|
1e0772713f | ||
|
|
3eb077eb3c | ||
|
|
e391b2fe9b | ||
|
|
22f2e9779a | ||
|
|
b9b47ef816 | ||
|
|
cd940e9394 | ||
|
|
922a1614a6 | ||
|
|
5dd83fdd92 | ||
|
|
4951a8ad19 | ||
|
|
5640e3e24c | ||
|
|
d7e290911d | ||
|
|
55b0dd95b1 | ||
|
|
75290bf1b4 | ||
|
|
a9e3ac2eda | ||
|
|
06abd34261 | ||
|
|
1a231d6715 | ||
|
|
8242632cb0 | ||
|
|
b8a60be507 | ||
|
|
ee04a02cb6 | ||
|
|
992c4a7ba5 | ||
|
|
ae81590c9e | ||
|
|
719bbebbf6 | ||
|
|
c50474c156 | ||
|
|
fda09a5cb0 | ||
|
|
223bcf6ac8 | ||
|
|
3527e4c8c7 | ||
|
|
19bb5c1084 | ||
|
|
4a354a7dcf | ||
|
|
bcee082202 | ||
|
|
e7afa28bc2 | ||
|
|
dce2377383 | ||
|
|
3fac704828 | ||
|
|
33526c2df0 | ||
|
|
0cb7d5f5e8 | ||
|
|
2aceabf991 | ||
|
|
6ad3ba0fd6 | ||
|
|
b092e8c9c5 | ||
|
|
2bf5ba295e | ||
|
|
a97835ed27 | ||
|
|
5e4f3aced6 | ||
|
|
9803c53c3b | ||
|
|
32a7e311fc | ||
|
|
77453380fa | ||
|
|
5fc4159e08 | ||
|
|
7740e8f6a8 | ||
|
|
a18e478c26 | ||
|
|
99dd695553 | ||
|
|
0528865e7b | ||
|
|
e08f597f58 | ||
|
|
74c5c2b768 | ||
|
|
05b6075df3 | ||
|
|
688d0ee264 | ||
|
|
0f85b2fc58 | ||
|
|
8b5d8d6dc7 | ||
|
|
734887d6d4 | ||
|
|
4878005209 | ||
|
|
ae554044d3 | ||
|
|
75a821eb6c | ||
|
|
741ce177cd | ||
|
|
017f34bbf4 | ||
|
|
efaf6feb1a | ||
|
|
39ae37b484 | ||
|
|
52b75d0bd3 | ||
|
|
1033e0ee04 | ||
|
|
46b4f05a6b | ||
|
|
b9c3ff756c | ||
|
|
37fa7fab05 | ||
|
|
7f4bc948df | ||
|
|
b264e04e8f | ||
|
|
8056e74d43 | ||
|
|
01eaea0cdc | ||
|
|
7a8a1b66f1 | ||
|
|
f9be8af78f | ||
|
|
5b1b1f1c69 | ||
|
|
0ce7c578c9 | ||
|
|
57a8c5a59d | ||
|
|
22c171cbb4 | ||
|
|
712d210d81 | ||
|
|
186b78d426 | ||
|
|
54d19d813e | ||
|
|
3659280b5b | ||
|
|
89190e216f | ||
|
|
208980ddba | ||
|
|
90a58aecd5 | ||
|
|
a72acdca54 | ||
|
|
4c8e79ebba | ||
|
|
44d4a21eba | ||
|
|
b3e67abbec | ||
|
|
fc392a5e01 | ||
|
|
fcf8a16cfc | ||
|
|
d1813f3dca | ||
|
|
7edbe49a43 | ||
|
|
e5ce19539d | ||
|
|
609b8a8b60 | ||
|
|
14ceb895d3 | ||
|
|
f02a7c5514 | ||
|
|
6f3e25ab64 | ||
|
|
28ffaee0ce | ||
|
|
d4f61842fb | ||
|
|
2bac749ca4 | ||
|
|
86422f0f14 | ||
|
|
2b15e320f4 | ||
|
|
f9b8ca6bf2 | ||
|
|
ef2443dc58 | ||
|
|
d1304ff4c5 | ||
|
|
7e9eb39a32 | ||
|
|
b7cb860c5e | ||
|
|
138abd46a2 | ||
|
|
302a6c2b40 | ||
|
|
d95b57d523 | ||
|
|
3e25bf9759 | ||
|
|
9ab00a372e | ||
|
|
2226d665ad | ||
|
|
44849db20d | ||
|
|
eed49847c4 | ||
|
|
f956c5a74c | ||
|
|
57341a6bb5 | ||
|
|
fedef62a44 | ||
|
|
659cce3abe | ||
|
|
db21546dc9 | ||
|
|
560a2f49ed | ||
|
|
be61dfbc30 | ||
|
|
cef0177716 | ||
|
|
19914b5b0d | ||
|
|
4e6d5598b7 | ||
|
|
2f217e8dc1 | ||
|
|
344e0aa888 | ||
|
|
51bc828dc9 | ||
|
|
2c514164da | ||
|
|
9458e9347c | ||
|
|
86b927b487 | ||
|
|
f7dcdc22f1 | ||
|
|
dbdb902e6b | ||
|
|
c2968d5da0 | ||
|
|
870ad9d5b3 | ||
|
|
0022ff1bef | ||
|
|
a4992cc2d2 | ||
|
|
8a387de58d | ||
|
|
e8434cf3d3 | ||
|
|
ac49206b91 | ||
|
|
e6960b8c2a | ||
|
|
de82fafe9c | ||
|
|
4a4f8ffdd2 | ||
|
|
3dc35f8464 | ||
|
|
4cfb053573 | ||
|
|
84c5ede725 | ||
|
|
2b3c0e4355 | ||
|
|
148ac41089 | ||
|
|
82a90630e9 | ||
|
|
9b412eebdb | ||
|
|
801132262f | ||
|
|
8269a7a07c | ||
|
|
f57b85193b | ||
|
|
2fdc712d57 | ||
|
|
70853005d9 | ||
|
|
4064e214af | ||
|
|
6a72159035 | ||
|
|
5f93140796 | ||
|
|
8b295633b9 | ||
|
|
62a53ad6d1 | ||
|
|
9c68817612 | ||
|
|
19662f97be | ||
|
|
160fc7a65d | ||
|
|
2f33383251 | ||
|
|
ae93b92dae | ||
|
|
46314b4260 | ||
|
|
dc50adf98d | ||
|
|
b367938b7a | ||
|
|
5ca669de01 | ||
|
|
4c41c9813d | ||
|
|
40af0a58e6 | ||
|
|
3fb32211b2 | ||
|
|
dee76a7407 | ||
|
|
320ba71ca3 | ||
|
|
f7302a3eeb | ||
|
|
a3dd70151d | ||
|
|
5f7073ca4e | ||
|
|
c91409150f | ||
|
|
6aa3fbdd54 | ||
|
|
ec6575c09e | ||
|
|
887c350a93 | ||
|
|
8bc9558828 | ||
|
|
5fffc98955 | ||
|
|
8b813d1682 | ||
|
|
c65bb0e312 | ||
|
|
93f82ea55b | ||
|
|
79ddcd69ce | ||
|
|
a0c540d474 | ||
|
|
c0bf4ed2c9 | ||
|
|
82bff005c4 | ||
|
|
07a63eb9d2 | ||
|
|
171bf1d416 | ||
|
|
255a1b47a0 | ||
|
|
bec8625b69 | ||
|
|
1393a85a67 | ||
|
|
95389ecffb | ||
|
|
edf5f64b88 | ||
|
|
94c6219d54 | ||
|
|
6a270836d9 | ||
|
|
8f9eece29d | ||
|
|
b50f201637 | ||
|
|
01ff3035fe | ||
|
|
2394057f8d | ||
|
|
3c3904345a | ||
|
|
cfc84ab3db | ||
|
|
3a7feb1c39 | ||
|
|
1284affc10 | ||
|
|
3f7b1b8f79 | ||
|
|
016fef50aa | ||
|
|
2fde80fc1d | ||
|
|
0c19894fce | ||
|
|
22cd5160bf | ||
|
|
b02bba911d | ||
|
|
01bed46bce | ||
|
|
6b2da9e91d | ||
|
|
ec0752a267 | ||
|
|
4c14687217 | ||
|
|
67ba00b882 | ||
|
|
2a98da3ce8 | ||
|
|
a8f701b614 | ||
|
|
fbe7b0b419 | ||
|
|
624c7f17a2 | ||
|
|
195035f7ba | ||
|
|
f897ed8ae7 | ||
|
|
96a439a8df | ||
|
|
bc64e2a737 | ||
|
|
c49d686719 | ||
|
|
78f1c7b3b6 | ||
|
|
6eedbfd240 | ||
|
|
209295c581 | ||
|
|
ce68fd6870 | ||
|
|
cfd09436f1 | ||
|
|
eb87337e70 | ||
|
|
b96f503652 | ||
|
|
e2b5b8b2c5 | ||
|
|
f6a319714a | ||
|
|
78baa1ea47 | ||
|
|
5bb9a2a757 | ||
|
|
0288c777f8 | ||
|
|
d27c8898eb | ||
|
|
49717bf52f | ||
|
|
1764faeed2 | ||
|
|
ed55ef1341 | ||
|
|
75bec54a76 | ||
|
|
459f6b31e6 |
@@ -1,7 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import { clearAllInterval } from '@/utils/util'
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
|
clearAllInterval()
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
@@ -23,4 +25,5 @@ export default {
|
|||||||
@import "./assets/css/base.less";
|
@import "./assets/css/base.less";
|
||||||
@import "./assets/css/reset.less";
|
@import "./assets/css/reset.less";
|
||||||
@import "./assets/css/style.less";
|
@import "./assets/css/style.less";
|
||||||
|
@import "./assets/css/v12-style.less";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -69,3 +69,10 @@ export function getVideoList(page = 1, limit = 10) {
|
|||||||
export function removeFavorite(ids) {
|
export function removeFavorite(ids) {
|
||||||
return request.post('/collection/delete', ids)
|
return request.post('/collection/delete', ids)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏千县名品县城列表
|
||||||
|
* */
|
||||||
|
export function getCountyFamousList(page = 1, limit = 10) {
|
||||||
|
return request.get('/collection/countyFamous/list', {page, limit})
|
||||||
|
}
|
||||||
+16
@@ -220,3 +220,19 @@ export function setTopHotelNew(data) {
|
|||||||
login: true
|
login: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺转发分享背景图片
|
||||||
|
* @param id 店铺ID int
|
||||||
|
* */
|
||||||
|
export function getHotelShareBackgroundImage(id) {
|
||||||
|
return request.get("/api/hotelMain/shareImage/" + id, {}, {login: true})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺资讯
|
||||||
|
* @param id 店铺资讯ID int
|
||||||
|
* */
|
||||||
|
export function hotelNewsView(data) {
|
||||||
|
return request.post("/api/hotelNews/view", data, {login: true})
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,3 +29,10 @@ export function takePrize(lotteryRecordId){
|
|||||||
export function getLogs(page = 1, limit = 10) {
|
export function getLogs(page = 1, limit = 10) {
|
||||||
return request.get('/lottery/dice/records',{page,limit})
|
return request.get('/lottery/dice/records',{page,limit})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽奖活动分享
|
||||||
|
* */
|
||||||
|
export function getLotteryShareInfo() {
|
||||||
|
return request.get('/lottery/shareImage')
|
||||||
|
}
|
||||||
@@ -161,3 +161,21 @@ export function orderVerific(verifyCode, isConfirm) {
|
|||||||
export function orderDelay(uni) {
|
export function orderDelay(uni) {
|
||||||
return request.post("/order/extendedDelivery", {uni})
|
return request.post("/order/extendedDelivery", {uni})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 再买一单
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function aginConfirm(params) {
|
||||||
|
return request.post('/order/buyAgainConfirm', params)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改地址
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function editAddress(params) {
|
||||||
|
return request.post('/order/editAddress', params)
|
||||||
|
}
|
||||||
@@ -78,6 +78,10 @@ export function getHomestay(id) {
|
|||||||
return request.get(`/contentHomestay/${id}`, {}, {login: false})
|
return request.get(`/contentHomestay/${id}`, {}, {login: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getHomestayV2(id) {
|
||||||
|
return request.get(`/contentHomestay/v2/${id}`, {}, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 节日专题
|
* 节日专题
|
||||||
* */
|
* */
|
||||||
@@ -85,6 +89,17 @@ export function getFestival() {
|
|||||||
return request.get('/contentFestival', {}, {login: false})
|
return request.get('/contentFestival', {}, {login: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getFestivalV2() {
|
||||||
|
return request.get('/contentFestival/v2', {}, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尖货专题
|
||||||
|
* */
|
||||||
|
export function getContentBest(id) {
|
||||||
|
return request.get(`/contentBest/${id}`, {}, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 非遗文化
|
* 非遗文化
|
||||||
* */
|
* */
|
||||||
@@ -117,3 +132,27 @@ export function getProvinceGoods(parentId, keyword, page) {
|
|||||||
const params = `?parentId=${parentId}&keyword=${keyword}&page=${page}&limit=10`;
|
const params = `?parentId=${parentId}&keyword=${keyword}&page=${page}&limit=10`;
|
||||||
return request.get('/landmarkGoods/productList' + params, {}, {login: false})
|
return request.get('/landmarkGoods/productList' + params, {}, {login: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getPorjectRecommend(params) {
|
||||||
|
return request.get('/landmarkGoods/hotelList', params, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPorjectPolicyFiles(params) {
|
||||||
|
return request.get('/landmarkGoods/policyFiles', params, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCulture(params) {
|
||||||
|
return request.get('/landmarkGoods/culture', params, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNews(params) {
|
||||||
|
return request.get('/landmarkGoods/news', params, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hadLike(data) {
|
||||||
|
return request.post('/landmarkGoods/news/zan', data, {login: false})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hadView(data) {
|
||||||
|
return request.post('/landmarkGoods/news/view', data, {login: false})
|
||||||
|
}
|
||||||
+6
-2
@@ -8,8 +8,8 @@ export function getSplashScreen() {
|
|||||||
* 首页
|
* 首页
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function getHomeData() {
|
export function getHomeData(params) {
|
||||||
return request.get("index", {}, {
|
return request.get("index", params, {
|
||||||
login: false
|
login: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -208,3 +208,7 @@ export function getShareImage() {
|
|||||||
export function getXiaoZhi() {
|
export function getXiaoZhi() {
|
||||||
return request.get("/appAdvertising", {}, {login: false})
|
return request.get("/appAdvertising", {}, {login: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function pushSystemStatic(data) {
|
||||||
|
return request.post("/systemStats/push", data, { login: false })
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 千县名品首页
|
||||||
|
export function getCountyFamousIndex() {
|
||||||
|
return request.get('/countyFamous/index', {}, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品省-县树形列表
|
||||||
|
export function getCountyFamousCityTree(param) {
|
||||||
|
return request.get('/countyFamous/cityTree', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城数据
|
||||||
|
export function getCountyFamousCityDetail(id) {
|
||||||
|
return request.get('/countyFamous/' + id, {}, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城店铺数据
|
||||||
|
export function getCountyFamousCityShop(param) {
|
||||||
|
return request.get('/countyFamous/shop', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品店铺点赞/取消赞
|
||||||
|
export function postCountyFamousShopZan(data) {
|
||||||
|
return request.post('/countyFamous/shop/zan', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品店铺点赞/取消赞
|
||||||
|
export function postCountyFamousShopAddFavorite(data) {
|
||||||
|
return request.post('/collection/countyFamous/add', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品店铺点赞/取消赞
|
||||||
|
export function postCountyFamousShopRemoveFavorite(data) {
|
||||||
|
return request.post('/collection/countyFamous/remove', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品资讯点赞/取消赞
|
||||||
|
export function postCountyFamousNewsZan(data) {
|
||||||
|
return request.post('/countyFamous/news/zan', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品资讯被浏览
|
||||||
|
export function postCountyFamousNewsView(data) {
|
||||||
|
return request.post('/countyFamous/news/view', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城资讯数据
|
||||||
|
export function getCountyFamousCityNews(param) {
|
||||||
|
return request.get('/countyFamous/news', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城攻略数据
|
||||||
|
export function getCountyFamousCityGuide(param) {
|
||||||
|
return request.get('/countyFamous/guide', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城攻略专题页
|
||||||
|
export function getCountyFamousCityGuideContent(param) {
|
||||||
|
return request.get('/countyFamous/guide/content', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城重点产业列表
|
||||||
|
export function getCountyFamousIndustry(param) {
|
||||||
|
return request.get('/countyFamous/industry', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城产业项目列表
|
||||||
|
export function getCountyFamousIndustryProject(param) {
|
||||||
|
return request.get('/countyFamous/industryProject', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城产业项目文件列表
|
||||||
|
export function getCountyFamousIndustryProjectFile(param) {
|
||||||
|
return request.get('/countyFamous/industryProject/file', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城招商政策文件列表
|
||||||
|
export function getCountyFamousInvestmentFile(param) {
|
||||||
|
return request.get('/countyFamous/investmentFile', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城村屋列表
|
||||||
|
export function getCountyFamousVillage(param) {
|
||||||
|
return request.get('/countyFamous/village', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城村屋详情
|
||||||
|
export function getCountyFamousVillageDetail(id) {
|
||||||
|
return request.get('/countyFamous/village/' + id, {}, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城村屋资讯
|
||||||
|
export function getCountyFamousVillageNews(param) {
|
||||||
|
return request.get('/countyFamous/village/news', param, { login: true })
|
||||||
|
}
|
||||||
@@ -25,6 +25,15 @@ export function getProductDetail(id, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 商品规格选中
|
||||||
|
* */
|
||||||
|
export function getProductSkuBySelected(data) {
|
||||||
|
return request.post("/product/getSkuBySelected", data, {
|
||||||
|
login: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 商品分销二维码
|
* 商品分销二维码
|
||||||
* */
|
* */
|
||||||
@@ -144,6 +153,20 @@ export function changeCartNum(id, number) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 购物车 获取商品规格
|
||||||
|
* */
|
||||||
|
export function getCartGoodAttr(id, uniqueId) {
|
||||||
|
return request.get(`/product/attr/${id}?uniqueId=${uniqueId}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 购物车 商品规格修改
|
||||||
|
* */
|
||||||
|
export function cartGoodChangeAttr(data) {
|
||||||
|
return request.post('/cart/changeAttr', data)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索推荐关键字
|
* 搜索推荐关键字
|
||||||
*/
|
*/
|
||||||
@@ -196,3 +219,8 @@ export function storeListApi(data) {
|
|||||||
login: false
|
login: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 商品列表
|
||||||
|
export function getHotels(param) {
|
||||||
|
return request.get('/api/hotelMain/search', param, { login: false })
|
||||||
|
}
|
||||||
|
|||||||
+47
@@ -273,6 +273,13 @@ export function postAddress(data) {
|
|||||||
return request.post("/address/edit", data);
|
return request.post("/address/edit", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 自动识别收货地址
|
||||||
|
* */
|
||||||
|
export function analysisAddress(data) {
|
||||||
|
return request.post("/address/analysis", data);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 获取收藏产品
|
* 获取收藏产品
|
||||||
* */
|
* */
|
||||||
@@ -539,3 +546,43 @@ export function getRechargeApi() {
|
|||||||
export function getUserCenterBanner() {
|
export function getUserCenterBanner() {
|
||||||
return request.get("userCenterBanner");
|
return request.get("userCenterBanner");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 用户积分信息
|
||||||
|
*/
|
||||||
|
export function getUserPointInfo(param) {
|
||||||
|
return request.get('/user/points/info', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 用户积分记录
|
||||||
|
*/
|
||||||
|
export function getUserPointBill(param) {
|
||||||
|
return request.get('/user/points/bill', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 用户分销说明
|
||||||
|
*/
|
||||||
|
export function getUserSpreadRule(param) {
|
||||||
|
return request.get('/userSpreadRule', param, { login: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的足迹
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getHistory(params) {
|
||||||
|
return request.get('/history/list', params)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购物车猜你喜欢
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getUserLike(params) {
|
||||||
|
return request.get('/cart/guessYouLike',params)
|
||||||
|
}
|
||||||
+19
-2
@@ -54,8 +54,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
|
width: 200rpx;
|
||||||
color: #9D9D9D;
|
color: #9D9D9D;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.value2 {
|
||||||
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
@@ -180,9 +185,10 @@
|
|||||||
|
|
||||||
.title {
|
.title {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
padding: 16rpx;
|
|
||||||
border-right: 2rpx solid #D2D2D2;
|
|
||||||
color: #ADADAD;
|
color: #ADADAD;
|
||||||
|
.title-cont {
|
||||||
|
padding: 16rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,6 +197,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
|
width: calc(100% - 160rpx);
|
||||||
|
border-left: 2rpx solid #D2D2D2;
|
||||||
|
.value-cont {
|
||||||
|
padding: 16rpx;
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break: break-all;
|
||||||
|
word-break: normal;
|
||||||
|
white-space: initial;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16rpx;
|
padding: 16rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -843,6 +843,8 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goodWrapper .item .text {
|
.goodWrapper .item .text {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
width: 5.37*100rpx;
|
width: 5.37*100rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -866,7 +868,6 @@ page {
|
|||||||
|
|
||||||
.goodWrapper .item .text .money {
|
.goodWrapper .item .text .money {
|
||||||
font-size: 0.26*100rpx;
|
font-size: 0.26*100rpx;
|
||||||
margin-top: 0.17*100rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.goodWrapper .item .text .evaluate {
|
.goodWrapper .item .text .evaluate {
|
||||||
@@ -3254,6 +3255,7 @@ page {
|
|||||||
|
|
||||||
.my-order .list .item .item-info .text .money {
|
.my-order .list .item .item-info .text .money {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-order .list .item .totalPrice {
|
.my-order .list .item .totalPrice {
|
||||||
@@ -3422,7 +3424,7 @@ page {
|
|||||||
|
|
||||||
.order-details .wrapper .item .conter {
|
.order-details .wrapper .item .conter {
|
||||||
color: #868686;
|
color: #868686;
|
||||||
width: 5*100rpx;
|
width: 4.5*100rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3459,10 +3461,10 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.order-details .footer .bnt {
|
.order-details .footer .bnt {
|
||||||
width: 1.76*100rpx;
|
width: 1.36*100rpx;
|
||||||
height: 0.6*100rpx;
|
height: 0.5*100rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 0.6*100rpx;
|
line-height: 0.5*100rpx;
|
||||||
border-radius: 0.5*100rpx;
|
border-radius: 0.5*100rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 0.27*100rpx;
|
font-size: 0.27*100rpx;
|
||||||
|
|||||||
@@ -0,0 +1,197 @@
|
|||||||
|
/*================变量==================*/
|
||||||
|
@primary-color: #C52733;
|
||||||
|
@dark-color: #333333;
|
||||||
|
@white-color: #fff;
|
||||||
|
|
||||||
|
@colors: #C52733, #333333, #fff, #666, #F0F0F0, #999999, #E92727, #FFC543;
|
||||||
|
@classnames: primary, dark, white, secondary-dark, grey, dark1, red, yellow;
|
||||||
|
/*=====================================*/
|
||||||
|
|
||||||
|
each(@colors, {
|
||||||
|
@color: extract(@colors, @index);
|
||||||
|
@classname: extract(@classnames, @index);
|
||||||
|
.v12-@{classname} {
|
||||||
|
background-color: @color !important;
|
||||||
|
background: @color !important;
|
||||||
|
}
|
||||||
|
.v12-@{classname}-text{
|
||||||
|
color: @color !important;
|
||||||
|
}
|
||||||
|
.v12-@{classname}-border{
|
||||||
|
border: 1px solid @color !important;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/*===================字体大小======================*/
|
||||||
|
.generateFontSize(@i) when (@i <= 80) {
|
||||||
|
.v12-font-@{i} {
|
||||||
|
font-size: @i * 1rpx !important;
|
||||||
|
}
|
||||||
|
.generateFontSize(@i + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.generateFontSize(0);
|
||||||
|
|
||||||
|
.v12-font-bold{
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
.generateFontWeight(@n, @i: 100) when (@i <= @n) {
|
||||||
|
.v12-font-weight-@{i} {
|
||||||
|
font-weight: @i !important;
|
||||||
|
}
|
||||||
|
.generateFontWeight(@n, (@i + 100))
|
||||||
|
}
|
||||||
|
.generateFontWeight(900);
|
||||||
|
|
||||||
|
/*==================内外边距====================*/
|
||||||
|
.generateMarginAndPadding(@n, @i:0) when (@i<= @n) {
|
||||||
|
@baseNum: @i * 8rpx;
|
||||||
|
.v12-mt-@{i} {
|
||||||
|
margin-top: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-ml-@{i} {
|
||||||
|
margin-left: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-mr-@{i} {
|
||||||
|
margin-right: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-mb-@{i} {
|
||||||
|
margin-bottom: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-ma-@{i} {
|
||||||
|
margin-left: @baseNum;
|
||||||
|
margin-right: @baseNum;
|
||||||
|
margin-bottom: @baseNum;
|
||||||
|
margin-top: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-mx-@{i} {
|
||||||
|
margin-left: @baseNum;
|
||||||
|
margin-right: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-my-@{i} {
|
||||||
|
margin-bottom: @baseNum;
|
||||||
|
margin-top: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-pt-@{i} {
|
||||||
|
padding-top: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-pl-@{i} {
|
||||||
|
padding-left: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-pr-@{i} {
|
||||||
|
padding-right: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-pb-@{i} {
|
||||||
|
padding-bottom: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-pa-@{i} {
|
||||||
|
padding-top: @baseNum;
|
||||||
|
padding-bottom: @baseNum;
|
||||||
|
padding-right: @baseNum;
|
||||||
|
padding-left: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-px-@{i} {
|
||||||
|
padding-right: @baseNum;
|
||||||
|
padding-left: @baseNum;
|
||||||
|
}
|
||||||
|
.v12-py-@{i} {
|
||||||
|
padding-top: @baseNum;
|
||||||
|
padding-bottom: @baseNum;
|
||||||
|
}
|
||||||
|
.generateMarginAndPadding(@n, (@i + 1))
|
||||||
|
}
|
||||||
|
.generateMarginAndPadding(40);
|
||||||
|
|
||||||
|
/*==================圆角====================*/
|
||||||
|
.generateRadius(@n, @i: 0) when (@i <= @n) {
|
||||||
|
@baseRadius: @i * 1rpx;
|
||||||
|
.v12-radius-@{i} {
|
||||||
|
border-radius: @baseRadius !important;
|
||||||
|
}
|
||||||
|
.generateRadius(@n, (@i + 1))
|
||||||
|
}
|
||||||
|
.generateRadius(100);
|
||||||
|
/*=========================================*/
|
||||||
|
|
||||||
|
.generateSpacing(@n, @i: 0) when(@i <= @n) {
|
||||||
|
@baseSpacing:@i * 1rpx;
|
||||||
|
.v12-spacing-@{i} {
|
||||||
|
letter-spacing: @baseSpacing !important;
|
||||||
|
}
|
||||||
|
.generateSpacing(@n, (@i + 1))
|
||||||
|
}
|
||||||
|
.generateSpacing(100);
|
||||||
|
/*====================flex 函数表达式=====================*/
|
||||||
|
|
||||||
|
.v12-d-flex{
|
||||||
|
display: flex !important;
|
||||||
|
}
|
||||||
|
.v12-flex-column {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.v12-align-center{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.v12-align-start{
|
||||||
|
display: flex;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
.v12-align-end{
|
||||||
|
display: flex;
|
||||||
|
align-items: end;
|
||||||
|
}
|
||||||
|
.v12-align-baseline{
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
.v12-justify-center{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.v12-justify-around{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
.v12-justify-between{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.v12-justify-start{
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.v12-justify-end{
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.v12-d-grid-columns-2 {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.v12-text-right{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.v12-text-left{
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.v12-text-center{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.v12-btn{
|
||||||
|
width: 136rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 50rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 27rpx;
|
||||||
|
}
|
||||||
|
.v12-full-width{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -63,6 +63,7 @@ export default {
|
|||||||
date = date.replace(/-/g, '/');
|
date = date.replace(/-/g, '/');
|
||||||
let timestamp = new Date(date).getTime();
|
let timestamp = new Date(date).getTime();
|
||||||
let now = new Date().getTime();
|
let now = new Date().getTime();
|
||||||
|
|
||||||
return timestamp - now;
|
return timestamp - now;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change">
|
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change">
|
||||||
<image class="icon-hook" :src="$VUE_APP_RESOURCES_URL+'/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/>
|
<!-- <image class="icon-hook" :src="webUrl + '/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/> -->
|
||||||
|
<u-icon name="checkmark-circle-fill" color="#C52733" v-if="isSelected"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -19,6 +20,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: Object.freeze(this.$VUE_APP_RESOURCES_URL)
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isSelected: function() {
|
isSelected: function() {
|
||||||
return this.defaultState
|
return this.defaultState
|
||||||
@@ -38,7 +44,7 @@ export default {
|
|||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 2rpx solid #D5D7D8;
|
border: 2px solid #D5D7D8;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +54,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.isSelected {
|
.isSelected {
|
||||||
border: 3px solid #FD5749;
|
border: 3px solid #C52733;
|
||||||
background: #FD5749;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view @tap.stop="open">
|
<view class="address-text-wrapper" @tap.stop="open">
|
||||||
<text class="uni-input">{{ value }}</text>
|
<view class="uni-input one-t address-text">{{ value }}</view>
|
||||||
<uni-popup ref="popup" type="bottom" safe-area>
|
<uni-popup ref="popup" type="bottom" safe-area>
|
||||||
<view class="cityselect">
|
<view class="cityselect">
|
||||||
<view class="cityselect-header">
|
<view class="cityselect-header">
|
||||||
@@ -220,6 +220,12 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
.address-text-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
.address-text {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
.cityselect {
|
.cityselect {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 75%;
|
height: 75%;
|
||||||
|
|||||||
+74
-27
@@ -1,27 +1,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="components-coupons">
|
<view class="components-coupons">
|
||||||
<image class="coupons__cover" :src="data.image" mode="widthFix"/>
|
<view class="image-wrap">
|
||||||
|
<image
|
||||||
|
:src="data.image"
|
||||||
|
class="coupons__cover"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
<view @click="selectCoupon" class="check-radio" :class="{'v12-primary': data.checked}">
|
||||||
|
<radio
|
||||||
|
v-if="radioModel && data.status === 0"
|
||||||
|
:value="data.id"
|
||||||
|
:checked="data.checked"
|
||||||
|
color="#C52733"
|
||||||
|
borderColor="#C52733"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="coupons__section flex jc-between ai-center">
|
<view class="coupons__section flex jc-between ai-center">
|
||||||
<view>有效期至:
|
<view>
|
||||||
<text>{{ data.endTime }}</text>
|
<text class="v12-dark-text v12-font-weight-500 v12-font-28">有效期至:</text>
|
||||||
</view>
|
<text class='v12-primary-text v12-font-weight-500 v12-font-28'>{{ data.endTime }}</text>
|
||||||
<view class="coupons__tag coupons__tag-expire" v-if="data.status===2">已到期</view>
|
|
||||||
<view class="coupons__tag" @click="goGoods()" v-if="data.status===0 && !radioModel">去使用</view>
|
|
||||||
<view @click="selectCoupon">
|
|
||||||
<radio :value="data.id" :checked="data.checked" color="#FF564A" v-if="radioModel && data.status===0"/>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<!-- status: 0-未使用,1-已使用,2-已过期 -->
|
||||||
|
<view
|
||||||
|
v-if="data.status === 2"
|
||||||
|
class="coupons__tag coupons__tag-expire v12-font-24"
|
||||||
|
>已到期</view>
|
||||||
|
<view
|
||||||
|
v-if="data.status === 0 && !radioModel"
|
||||||
|
class="coupons__tag coupons__tag-expire v12-font-24"
|
||||||
|
>不可用</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
<view class="coupons__rules">
|
<view class="coupons__rules">
|
||||||
<view class="coupons__rules-title" @click="changeRules()">使用规则
|
<view class="coupons__rules-title v12-font-22" @click="changeRules()">使用规则
|
||||||
<image :class="{'open':isOpen}" :src="webUrl + '/20231125220409665027.png'" mode="scaleToFill"/>
|
<image :class="{'open':isOpen}" :src="webUrl + '/20231125220409665027.png'" mode="scaleToFill"/>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
:class="isOpen ? 'auto-height' : ''"
|
:class="isOpen ? 'auto-height' : ''"
|
||||||
class="coupon-html"
|
class="coupon-html"
|
||||||
>
|
>
|
||||||
<rich-text :nodes="data.description" />
|
<rich-text class='v12-font-22 v12-dark1-text' :nodes="data.description" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -31,7 +50,13 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "Coupons",
|
name: "Coupons",
|
||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 是否显示选择框
|
||||||
radioModel: {
|
radioModel: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@@ -51,39 +76,61 @@ export default {
|
|||||||
changeRules() {
|
changeRules() {
|
||||||
this.isOpen = !this.isOpen
|
this.isOpen = !this.isOpen
|
||||||
},
|
},
|
||||||
goGoods() {
|
|
||||||
uni.switchTab({url: '/pages/home/landMark'})
|
|
||||||
// this.$global.navToGoods(this.data.productId)
|
|
||||||
},
|
|
||||||
selectCoupon() {
|
selectCoupon() {
|
||||||
if (!this.radioModel) return
|
if (!this.radioModel) return
|
||||||
this.$emit('change', this.data.id)
|
// 已选中则可以取消选中
|
||||||
|
this.$emit('change', this.data.checked ? '' : this.data.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.check-radio{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 16px;
|
||||||
|
height: 32rpx;
|
||||||
|
width: 32rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid #C52733;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
radio {
|
||||||
|
margin-right: -6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.image-wrap{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
.components-coupons {
|
.components-coupons {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 2rpx solid #FF564A;
|
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background: #fff;
|
||||||
image {
|
image {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons__cover {
|
.coupons__cover {
|
||||||
width: 100%;
|
width: 600rpx;
|
||||||
height: auto;
|
height: 200rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons__section {
|
.coupons__section {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 18rpx 20rpx 16rpx 16rpx;
|
padding: 18rpx 20rpx 16rpx 50rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
|
||||||
@@ -113,7 +160,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.coupons__rules {
|
.coupons__rules {
|
||||||
padding: 0 20rpx 20rpx 16rpx;
|
padding: 0 20rpx 20rpx 50rpx;
|
||||||
|
|
||||||
.coupons__rules-title {
|
.coupons__rules-title {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
@@ -130,11 +177,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.coupon-html {
|
.coupon-html {
|
||||||
height: 80rpx;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: all .3s;
|
transition: all .3s ease-in-out;
|
||||||
|
height: 60rpx;
|
||||||
&.auto-height {
|
&.auto-height {
|
||||||
height: auto;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+139
-33
@@ -1,21 +1,97 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="popup-coupons">
|
<view class="popup-coupons">
|
||||||
<view class="popup-box">
|
<view class="popup-box">
|
||||||
<view class="popup-title bold tc">选择优惠券</view>
|
<view class="popup-title bold tc">优惠详情</view>
|
||||||
<SubSection :current="current" :can-use="canUse" :not-use="notUse" radioModel @change="changeNav"/>
|
<SubSection
|
||||||
|
:current="current"
|
||||||
<view class="list-box">
|
:can-use="canUse"
|
||||||
<view style="margin-bottom: 20rpx" v-for="(item,index) in list" :key="index">
|
:not-use="notUse"
|
||||||
<Coupons :data="item" radioModel @change="selectCoupon"/>
|
radio-model
|
||||||
|
@change="changeNav"
|
||||||
|
v-if="showTab"
|
||||||
|
/>
|
||||||
|
<view class="v12-radius-20 v12-white v12-align-center v12-justify-around v12-pa-3" v-else>
|
||||||
|
<view class="">
|
||||||
|
<view class="v12-text-center v12-font-28">
|
||||||
|
券后价
|
||||||
|
</view>
|
||||||
|
<view class="v12-mt-3 v12-text-center v12-red-text">
|
||||||
|
<text class="v12-font-28">
|
||||||
|
¥
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-44">
|
||||||
|
{{ computePrice }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-center v12-font-44">
|
||||||
|
=
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="v12-text-center v12-font-28">
|
||||||
|
当前售价
|
||||||
|
</view>
|
||||||
|
<view class="v12-mt-3 v12-text-center">
|
||||||
|
<text class="v12-font-28">
|
||||||
|
¥
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-44">
|
||||||
|
{{ currentPrice }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-center v12-font-44">
|
||||||
|
-
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="v12-text-center">
|
||||||
|
满减
|
||||||
|
</view>
|
||||||
|
<view class="v12-mt-3 v12-text-center v12-font-44">
|
||||||
|
{{ selectItem.couponPrice || 0 }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="tc" v-if="list.length===0">
|
<view class="list-box">
|
||||||
|
<view class="larg-one v12-mb-3">
|
||||||
|
<Coupons
|
||||||
|
:data="largOne"
|
||||||
|
:radio-model="current === 0"
|
||||||
|
@change="selectCoupon"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="v12-font-32 v12-dark-text v12-spacing-2 v12-font-bold v12-mb-3">
|
||||||
|
更多可使用券
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="index"
|
||||||
|
style="margin-bottom: 20rpx"
|
||||||
|
>
|
||||||
|
<Coupons
|
||||||
|
:data="item"
|
||||||
|
:radio-model="current === 0"
|
||||||
|
@change="selectCoupon"
|
||||||
|
v-if="index !== maxIndex"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="list.length === 0"
|
||||||
|
class="tc"
|
||||||
|
>
|
||||||
<image class="zero-coupons" :src="webUrl+'/20231201201733142658.png'" mode="scaleToFill"/>
|
<image class="zero-coupons" :src="webUrl+'/20231201201733142658.png'" mode="scaleToFill"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button disabled></button>
|
<button disabled></button>
|
||||||
<view class="btn-done bold flex jc-center ai-center" :class="{'btn-disabled':current===1}" @click="setCoupon" v-if="current===0">确定
|
<view
|
||||||
|
v-if="current === 0"
|
||||||
|
:class="{ 'btn-disabled': current === 1 }"
|
||||||
|
class="btn-done bold flex jc-center ai-center v12-primary"
|
||||||
|
@click="setCoupon"
|
||||||
|
>
|
||||||
|
确定
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,12 +106,39 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
twoList: {
|
twoList: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {
|
||||||
|
usable: [],
|
||||||
|
unusable: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showTab: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
currentPrice: {
|
||||||
|
default: 0,
|
||||||
|
type: Number
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
current: 0,
|
||||||
|
couponId: uni.getStorageSync('couponId') || 0,
|
||||||
|
selectItem: {
|
||||||
|
couponPrice: 0
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
list() {
|
list() {
|
||||||
let temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable']
|
const temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable']
|
||||||
|
if (this.current === 0) {
|
||||||
|
const localCouponId = uni.getStorageSync('couponId') || 0
|
||||||
|
temp.map(item => {
|
||||||
|
item.checked = localCouponId === item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
return this.$global.deepClone(temp)
|
return this.$global.deepClone(temp)
|
||||||
},
|
},
|
||||||
canUse() {
|
canUse() {
|
||||||
@@ -43,46 +146,47 @@ export default {
|
|||||||
},
|
},
|
||||||
notUse() {
|
notUse() {
|
||||||
return this.twoList['unusable'].length
|
return this.twoList['unusable'].length
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
computePrice() {
|
||||||
current() {
|
return this.force2Decimal(this.currentPrice - this.selectItem.couponPrice) || this.currentPrice
|
||||||
this.selectCoupon(this.couponId)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data() {
|
maxIndex() {
|
||||||
return {
|
const maxIndex = this.list.reduce((a, b, c) => {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
return (this.list[a].couponPrice < b.couponPrice) ? c : a
|
||||||
current: 0,
|
}, 0)
|
||||||
couponId: 0
|
return maxIndex
|
||||||
|
},
|
||||||
|
largOne() {
|
||||||
|
if(this.list[this.maxIndex]) {
|
||||||
|
this.selectCoupon(this.list[this.maxIndex].id)
|
||||||
|
uni.setStorageSync('couponId', this.list[this.maxIndex].id)
|
||||||
}
|
}
|
||||||
|
// this.$emit('max', this.list[this.maxIndex] || {})
|
||||||
|
return this.list[this.maxIndex] || {}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.couponId = uni.getStorageSync('couponId') || 0
|
this.$emit('max', this.largOne)
|
||||||
this.selectCoupon(this.couponId)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
force2Decimal(value) {
|
||||||
|
return this.$force2Decimal(value);
|
||||||
|
},
|
||||||
changeNav(index) {
|
changeNav(index) {
|
||||||
this.current = index
|
this.current = index
|
||||||
},
|
},
|
||||||
selectCoupon(id) {
|
selectCoupon(id) {
|
||||||
const isCancel = this.couponId === id
|
this.couponId = id
|
||||||
this.couponId = isCancel ? 0 : id
|
this.selectItem = this.list.find(e => e.id === id) || {}
|
||||||
|
this.list.map(item => {
|
||||||
this.list?.forEach(item => {
|
|
||||||
if (!isCancel) {
|
|
||||||
item.checked = id === item.id
|
item.checked = id === item.id
|
||||||
} else {
|
|
||||||
item.checked = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setCoupon() {
|
setCoupon() {
|
||||||
if (this.current === 1) return
|
if (this.current === 1) return
|
||||||
// if (this.couponId !== 0) {
|
|
||||||
uni.setStorageSync('couponId', this.couponId)
|
uni.setStorageSync('couponId', this.couponId)
|
||||||
// }
|
this.$emit('change', this.selectItem || {})
|
||||||
this.$emit('close')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,6 +194,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.popup-coupons {
|
.popup-coupons {
|
||||||
|
background: #F0F0F0;
|
||||||
.popup-box {
|
.popup-box {
|
||||||
padding: 34rpx 32rpx;
|
padding: 34rpx 32rpx;
|
||||||
}
|
}
|
||||||
@@ -103,6 +208,7 @@ export default {
|
|||||||
|
|
||||||
.list-box {
|
.list-box {
|
||||||
max-height: 640rpx;
|
max-height: 640rpx;
|
||||||
|
height: 640rpx;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
+81
-32
@@ -1,38 +1,60 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="orderGoods">
|
<view class="orderGoods">
|
||||||
<view v-if="title.length>0" class="total acea-row row-middle" >
|
<view
|
||||||
<view class="acea-row row-left row-middle" style="position: relative;">
|
v-if="title.length > 0"
|
||||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""></image>
|
class="v12-pa-3 acea-row row-middle"
|
||||||
<text class="title">{{title}}</text>
|
>
|
||||||
<!-- <text class="pink-dot"></text> -->
|
<view
|
||||||
|
style="position: relative;"
|
||||||
|
class="acea-row row-left row-middle"
|
||||||
|
>
|
||||||
|
<!-- <image
|
||||||
|
style="width: 32rpx;height: 32rpx;margin-right: 12rpx;"
|
||||||
|
src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""
|
||||||
|
/> -->
|
||||||
|
<text class="title v12-font-32">
|
||||||
|
{{ title }}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="total">共{{ cartInfo.length }}件商品</view>
|
<view
|
||||||
|
v-else
|
||||||
|
class=""
|
||||||
|
>共{{ cartInfo.length }}件商品</view>
|
||||||
<view class="goodWrapper">
|
<view class="goodWrapper">
|
||||||
<view class="item acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-for="cart in cartInfo" :key="cart.id">
|
<view
|
||||||
|
v-for="cart in cartInfo"
|
||||||
|
:key="cart.id"
|
||||||
|
class="item acea-row row-between-wrapper v12-mt-3"
|
||||||
|
style="flex-wrap: nowrap; border:none"
|
||||||
|
>
|
||||||
<view class="pictrue" style="margin-right: 20rpx;">
|
<view class="pictrue" style="margin-right: 20rpx;">
|
||||||
<image :src="cart.productInfo.image" class="image" />
|
<image :src="cart.productInfo.image" class="image" />
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text" style="height: 100%;justify-content: space-between;">
|
||||||
<view class="acea-row row-between-wrapper">
|
<view class="acea-row row-between-wrapper">
|
||||||
<view class="name line1">{{ cart.productInfo.storeName }}</view>
|
<view class="name line1 one-t v12-font-bold">{{ cart.productInfo.storeName }}</view>
|
||||||
<!-- <view class="num">x {{ cart.cartNum }}</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view
|
<view class="acea-row row-middle row-between attr-wrap">
|
||||||
class="attr line1"
|
|
||||||
v-if="cart.productInfo.attrInfo"
|
|
||||||
>{{ cart.productInfo.attrInfo.sku }}</view> -->
|
|
||||||
<view class="acea-row row-middle row-between">
|
|
||||||
<view
|
<view
|
||||||
class="attr"
|
|
||||||
style="height: 38rpx;line-height:38rpx;background-color: #FFF3F2;border-radius: 19rpx;padding: 4rpx 20rpx;"
|
|
||||||
v-if="cart.productInfo.attrInfo"
|
v-if="cart.productInfo.attrInfo"
|
||||||
>属性:{{ cart.productInfo.attrInfo.sku }}</view>
|
class="more-t v12-font-24 v12-secondary-dark-text"
|
||||||
<view v-if="evaluate == 3" class="evaluate" style="bottom: 0 !important;position: relative;height: 36rpx !important;width: 90rpx !important;line-height: 36rpx !important;font-size: 32rpx;border-radius: 18rpx;" @click="routerGo(cart)">评价</view>
|
>
|
||||||
|
规格:{{ cart.productInfo.attrInfo.sku }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="evaluate == 3"
|
||||||
|
class="evaluate"
|
||||||
|
@click="routerGo(cart)"
|
||||||
|
>评价</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money font-color-lightred acea-row row-between">
|
<view class="money font-color-lightred acea-row row-between">
|
||||||
<text>¥{{ cart.truePrice }}</text>
|
<view class="v12-font-bold">
|
||||||
<text class="num" style="margin-left: 10rpx;">x{{ cart.cartNum }}</text>
|
<text class="v12-font-28 v12-dark-text">应付:</text>
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-primary-text v12-font-28">{{ cart.truePrice }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="num v12-dark-text">x{{ cart.cartNum }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -68,21 +90,48 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pink-dot{
|
.orderGoods{
|
||||||
width:24rpx;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
height:24rpx;
|
}
|
||||||
background:rgba(255,86,74,0.4);
|
.item{
|
||||||
border-radius:50%;
|
height: 160rpx !important;
|
||||||
position: absolute;
|
|
||||||
z-index: 0;
|
|
||||||
bottom: 24rpx;
|
|
||||||
right: -12rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title{
|
.title{
|
||||||
font-size:26rpx;
|
font-size:26rpx;
|
||||||
color:#080F1A;
|
color:#080F1A;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.goodWrapper .item .pictrue {
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
}
|
||||||
|
.goodWrapper .item .pictrue .image {
|
||||||
|
display: block;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
.attr-wrap {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
.text .attr {
|
||||||
|
max-width: calc(100% - 130rpx);
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
line-height: 28rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #FFF3F2;
|
||||||
|
}
|
||||||
|
.evaluate {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
height: 36rpx;
|
||||||
|
width: 90rpx;
|
||||||
|
border-radius: 36rpx !important;
|
||||||
|
line-height: 36rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+122
-75
@@ -2,51 +2,56 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
|
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
|
||||||
<view class="textpic acea-row row-between-wrapper">
|
<view class="textpic acea-row row-between-wrapper">
|
||||||
<view class="pictrue" @click="previewImg(attr.productSelect.image)">
|
<view class="pictrue" @click="previewImg(attrObj.productSelect.image)">
|
||||||
<image :src="attr.productSelect.image" class="image" />
|
<image :src="attrObj.productSelect.image" class="image" />
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="line1">{{ attr.productSelect.store_name }}</view>
|
<view class="money font-color-lightred v12-font-">
|
||||||
<view class="money font-color-lightred">
|
|
||||||
¥
|
¥
|
||||||
<text class="num">{{ attr.productSelect.price }}</text>
|
<text class="num v12-font-40">{{ attrObj.productSelect.price }}</text>
|
||||||
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
|
<text class="v12-ml-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;">¥</text>
|
||||||
|
<text class="v12-mr-2 v12-font-weight-300 v12-font-22" style="color: #BBBBBB; text-decoration: line-through;">{{ attrObj.productSelect.otPrice }}</text>
|
||||||
|
<text class="v12-white-text v12-red v12-font-22 v12-radius-40 v12-px-1 v12-font-weight-400">会员价</text>
|
||||||
|
<!-- <text class="stock">库存: {{ attrObj.productSelect.stock }}</text> -->
|
||||||
</view>
|
</view>
|
||||||
|
<view class="more-t">{{ attrObj.productSelect.store_name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="productWinList">
|
<view class="productWinList">
|
||||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
|
||||||
<view class="title">{{ item.attrName }}</view>
|
|
||||||
<view class="listn acea-row row-middle">
|
|
||||||
<view
|
<view
|
||||||
v-for="(itemn, indexn) in item.attrValue"
|
v-for="(item, index) in attrObj.productAttr"
|
||||||
:key="indexn"
|
:key="index"
|
||||||
:class="{
|
class="item"
|
||||||
'on': item.index == indexn,
|
|
||||||
'disabled': productValue[itemn.attr].stock === 0
|
|
||||||
}"
|
|
||||||
class="itemn"
|
|
||||||
@click="tapAttr(indexw, indexn, itemn)"
|
|
||||||
>
|
>
|
||||||
{{ itemn.attr }}
|
<view class="title">{{ item.attrName }}</view>
|
||||||
<text
|
<view class="listn acea-row v12-justify-start">
|
||||||
v-if="productValue[itemn.attr].stock === 0"
|
|
||||||
class="tag"
|
|
||||||
>缺货</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="cart">
|
|
||||||
<view class="title">数量</view>
|
|
||||||
<view class="carnum acea-row row-left">
|
|
||||||
<view class="item reduce" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
|
|
||||||
<view class="item num">{{ cartNum }}</view>
|
|
||||||
<view
|
<view
|
||||||
class="item plus"
|
v-for="(subItem, subIndex) in item.attrValue"
|
||||||
|
:key="subIndex"
|
||||||
|
:class="{
|
||||||
|
'actived': subItem.check,
|
||||||
|
'disabled': !subItem.canUsed
|
||||||
|
}"
|
||||||
|
class="itemn v12-radius-40"
|
||||||
|
@click="tapAttr(index, subIndex, subItem)"
|
||||||
|
>
|
||||||
|
{{ subItem.attr }}
|
||||||
|
<text v-if="!subItem.canUsed" class="less-tag" style="color: #fff !important;">缺货</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cart v12-justify-between v12-align-center">
|
||||||
|
<view class="titlev12-dark-text f12-font-32">购买数量</view>
|
||||||
|
<view class="carnum acea-row row-left">
|
||||||
|
<view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
|
||||||
|
<view class="item v12-font-36 v12-font-bold v12-dark-text cart-btn">{{ cartNum }}</view>
|
||||||
|
<view
|
||||||
|
style="border-radius:0 40rpx 40rpx 0"
|
||||||
|
class="item plus v12-font-bold v12-white-text v12-primary v12-primary-border v12-font-36 cart-btn"
|
||||||
:class="
|
:class="
|
||||||
cartNum >= attr.productSelect.stock
|
cartNum >= attrObj.productSelect.stock
|
||||||
? 'on'
|
? 'on'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
@@ -64,71 +69,113 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
attr: {
|
attr: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {
|
||||||
},
|
return {
|
||||||
productValue: {
|
productAttr: []
|
||||||
type: Object,
|
}
|
||||||
default: () => {}
|
}
|
||||||
},
|
},
|
||||||
cartNum: {
|
cartNum: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: () => 1
|
default: () => 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
attrObj: {
|
||||||
|
productSelect: {},
|
||||||
|
productAttr: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$set(this, 'attrObj', JSON.parse(JSON.stringify(this.attr)))
|
||||||
|
console.log(this.attrObj)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
previewImg:function(imgUrl){
|
reRender(data) {
|
||||||
|
this.$set(this, 'attrObj', JSON.parse(JSON.stringify(data)))
|
||||||
|
// console.log(this.attrObj.productAttr)
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
previewImg(imgUrl) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls:[imgUrl]
|
urls:[imgUrl]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
closeAttr: function() {
|
closeAttr() {
|
||||||
this.$emit("changeFun", { action: "changeattr", value: false });
|
this.$emit("changeFun", { action: "changeattr", value: false })
|
||||||
},
|
},
|
||||||
CartNumDes: function() {
|
CartNumDes() {
|
||||||
this.$emit("changeFun", { action: "ChangeCartNum", value: false });
|
this.$emit("changeFun", { action: "ChangeCartNum", value: false })
|
||||||
},
|
},
|
||||||
CartNumAdd: function() {
|
CartNumAdd() {
|
||||||
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
|
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 })
|
||||||
},
|
},
|
||||||
tapAttr: function(indexw, indexn, itemn) {
|
tapAttr(index, subIndex, subItem) {
|
||||||
if (this.productValue[itemn.attr].stock === 0) {
|
// 缺货的点击了没效果
|
||||||
|
if (!subItem.canUsed || subItem.check) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 修改商品规格不生效的原因:
|
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
|
||||||
// H5端下面写法,attr更新,但是除H5外其他端不支持,
|
subItem.check= false
|
||||||
// 尽量避免下面的骚写法,不要在子组件内更新props
|
if (subIndex === subIdx) {
|
||||||
// 这里修改是为了能获取到被选中的属性
|
subItem.check = true
|
||||||
this.attr.productAttr[indexw].index = indexn;
|
}
|
||||||
let that = this;
|
})
|
||||||
let value = that
|
const value = this.getCheckedValue().sort().join(",")
|
||||||
.getCheckedValue()
|
this.$emit("changeFun", {
|
||||||
.sort()
|
|
||||||
.join(",");
|
|
||||||
that.$emit("changeFun", {
|
|
||||||
action: "ChangeAttr",
|
action: "ChangeAttr",
|
||||||
value: {
|
value: {
|
||||||
value,
|
value,
|
||||||
indexw,
|
index,
|
||||||
indexn
|
subIndex
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//获取被选中属性;
|
// 获取被选中属性
|
||||||
getCheckedValue: function() {
|
getCheckedValue() {
|
||||||
let productAttr = this.attr.productAttr;
|
const productAttr = this.attrObj.productAttr
|
||||||
let value = [];
|
const value = []
|
||||||
for (let i = 0; i < productAttr.length; i++) {
|
productAttr.map(item => {
|
||||||
for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {
|
item.attrValue.map(subItem => {
|
||||||
if (productAttr[i].index === j) {
|
if (subItem.check) {
|
||||||
value.push(productAttr[i].attrValueArr[j]);
|
value.push(subItem.attr)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
<style scope>
|
||||||
|
.itemn{
|
||||||
|
margin: 28rpx 0 0 34rpx !important;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.money{
|
||||||
|
margin-top: 0 !important
|
||||||
|
}
|
||||||
|
.actived{
|
||||||
|
border-color: #C52733 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
background: #C52733
|
||||||
|
}
|
||||||
|
.cart-btn{
|
||||||
|
height:52rpx !important;
|
||||||
|
width:52rpx !important
|
||||||
|
}
|
||||||
|
.less-tag{
|
||||||
|
position: absolute;
|
||||||
|
background: #FF5562;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
height: 38rpx;
|
||||||
|
line-height: 38rpx;
|
||||||
|
right: -15px;
|
||||||
|
top: -10px;
|
||||||
|
padding: 0 3px;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight:400
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<u-popup :show="show" @close="close" @open="open" closeable>
|
||||||
|
<view class="v12-px-3">
|
||||||
|
<view class="v12-text-center v12-font-32 v12-py-3 v12-secondary-dark-text">
|
||||||
|
服务说明
|
||||||
|
</view>
|
||||||
|
<view class="wrap v12-dark-text">
|
||||||
|
<view class="service-title">
|
||||||
|
<text class="v12-dark-text v12-font-32">
|
||||||
|
售后服务
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<text class="v12-font-28 v12-font-bold">
|
||||||
|
{{ info }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
info: ''
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.show = false
|
||||||
|
this.$emit('close')
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
this.show = true
|
||||||
|
this.$emit('open')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.wrap{
|
||||||
|
background: rgba(197,39,51,0.1);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -38,14 +38,15 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="sub-section flex">
|
<view class="sub-section flex">
|
||||||
<view class="sub-section__item flex jc-center ai-center" :class="{'sub-section__active':index===0}"
|
<view class="sub-section__item flex jc-center ai-center"
|
||||||
@click="change(0)">
|
@click="change(0)">
|
||||||
可使用 ({{ canUse }})
|
可使用 ({{ canUse }})
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-section__item flex jc-center ai-center" :class="{'sub-section__active':index===1}"
|
<view class="sub-section__item flex jc-center ai-center"
|
||||||
@click="change(1)">
|
@click="change(1)">
|
||||||
{{radioModel?'不可用':'已到期'}} ({{ notUse }})
|
{{radioModel?'不可用':'已到期'}} ({{ notUse }})
|
||||||
</view>
|
</view>
|
||||||
|
<view class="sub-section__active" :style="{left: (80 + index * 360) + 'rpx'}"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,20 +55,27 @@ export default {
|
|||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 2rpx solid #FF564A;
|
border-radius: 20rpx;
|
||||||
border-radius: 4rpx;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.sub-section__item {
|
.sub-section__item {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-section__active {
|
.sub-section__active {
|
||||||
background: #FF564A;
|
position: absolute;
|
||||||
color: #FFFFFF;
|
width: 140rpx;
|
||||||
|
height: 8rpx;
|
||||||
|
background: linear-gradient(to right, #C52733 0%, rgba(211,92,101,0.91) 54%, rgba(255,255,255,0.62) 100%);
|
||||||
|
border-radius: 0rpx 0rpx 26rpx 26rpx;
|
||||||
|
bottom: (80 - 34) / 2 * 1rpx;
|
||||||
|
transition: left ease-in-out 0.3s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="evaluateWtapper">
|
<view class="evaluateWtapper">
|
||||||
<view
|
<view
|
||||||
class="evaluateItem"
|
|
||||||
v-for="(item, evaluateWtapperIndex) in reply"
|
v-for="(item, evaluateWtapperIndex) in reply"
|
||||||
:key="evaluateWtapperIndex"
|
:key="evaluateWtapperIndex"
|
||||||
|
class="evaluateItem"
|
||||||
>
|
>
|
||||||
<view class="pic-text acea-row row-middle">
|
<view class="pic-text acea-row row-middle">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
@@ -11,13 +11,29 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="acea-row row-middle">
|
<view class="acea-row row-middle">
|
||||||
<view class="name line1">{{ item.nickname }}</view>
|
<view class="name line1">{{ item.nickname }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-px-4">
|
||||||
|
<view class="v12-secondary-dark-text v12-font-24 attr-bg"> {{ item.sku }}</view>
|
||||||
<view class="start" :class="'star' + item.star"></view>
|
<view class="start" :class="'star' + item.star"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<!-- <view class="time">{{ item.createTime }} {{ item.sku||'' }}</view> -->
|
||||||
<view class="time">{{ item.createTime }} {{ item.sku||'' }}</view>
|
<view class="evaluate-infor v12-font-24">{{ item.comment }}</view>
|
||||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
|
||||||
<view class="imgList acea-row">
|
<view class="imgList acea-row">
|
||||||
<view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
|
<view v-if="item.video" class="pictrue">
|
||||||
|
<video
|
||||||
|
:src="item.video"
|
||||||
|
:poster="item.video + '?vframe/jpg/offset/1'"
|
||||||
|
controls
|
||||||
|
play-btn-position="center"
|
||||||
|
class="image"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-for="(itemn, eq) in item.picturesArr"
|
||||||
|
:key="eq"
|
||||||
|
class="pictrue"
|
||||||
|
>
|
||||||
<image :src="itemn" class="image" @click="previewImage(item.picturesArr, eq)" />
|
<image :src="itemn" class="image" @click="previewImage(item.picturesArr, eq)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -54,3 +70,11 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.attr-bg{
|
||||||
|
background: rgba(197,39,51,0.1);
|
||||||
|
padding: 7rpx 5px;
|
||||||
|
width: fit-content;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,13 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="noCommodity">
|
<view class="noCommodity">
|
||||||
<view class="noPictrue">
|
<view class="noPictrue">
|
||||||
<image :src="webUrl+'/20210203153900181449.png'" class="image"/>
|
<image
|
||||||
|
v-if="type === 'good'"
|
||||||
|
:src=" webUrl + '/20210203153900181449.png'"
|
||||||
|
class="image"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-if="type === 'hotel'"
|
||||||
|
:src=" webUrl + '/no-hotel.png'"
|
||||||
|
class="image"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "NoGoodData",
|
name: 'NoGoodData',
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'good'
|
||||||
|
}
|
||||||
|
},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
current: cind,
|
current: cind,
|
||||||
indicator: 'default'
|
indicator: 'default'
|
||||||
});
|
});
|
||||||
|
this.$emit('click')
|
||||||
},
|
},
|
||||||
getheight() {
|
getheight() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template name="sunui-upimg">
|
<template name="sunui-upimg">
|
||||||
<view class="sunui-uploader-bd">
|
<view class="sunui-uploader-bd">
|
||||||
<view class="sunui-uploader-files">
|
<view class="sunui-uploader-files">
|
||||||
|
<view
|
||||||
|
v-if="showBlankPlaceholder"
|
||||||
|
:style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'"
|
||||||
|
class="sunui-uploader-file"
|
||||||
|
/>
|
||||||
<block v-for="(item, index) in upload_before_list" :key="index">
|
<block v-for="(item, index) in upload_before_list" :key="index">
|
||||||
<view class="sunui-uploader-file" :class="[item.upload_percent < 100 ? 'sunui-uploader-file-status' : '']" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
<view class="sunui-uploader-file" :class="[item.upload_percent < 100 ? 'sunui-uploader-file-status' : '']" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
||||||
<image class="sunui-uploader-img" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" :src="item.path" mode="aspectFill" @tap="preview(index)" v-if="type === 'image'" />
|
<image class="sunui-uploader-img" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" :src="item.path" mode="aspectFill" @tap="preview(index)" v-if="type === 'image'" />
|
||||||
@@ -10,7 +15,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view v-show="upload_before_list.length < upload_count" hover-class="sunui-uploader-hover" class="sunui-uploader-inputbox" @tap="choose" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
<view v-show="upload_before_list.length < upload_count" hover-class="sunui-uploader-hover" class="sunui-uploader-inputbox" @tap="choose" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
||||||
<view :style="'line-height:'+ upload_img_wh + 'rpx;'"><text class="iconfont icon-mn_shangchuantupian" style="color: #666;"></text></view>
|
<view :style="'line-height:'+ upload_img_wh + 'rpx;'">
|
||||||
|
<text v-if="type === 'image'" class="iconfont icon-mn_shangchuantupian" style="color: #666;"></text>
|
||||||
|
<u-icon v-if="type === 'video'" size="48px" name="play-circle" style="color: #666;"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -48,6 +56,11 @@ export default {
|
|||||||
},
|
},
|
||||||
name: 'sunui-upimg',
|
name: 'sunui-upimg',
|
||||||
props: {
|
props: {
|
||||||
|
// 是否显示空白占位图,用于同时上传视频和图片,两个上传空间并列
|
||||||
|
showBlankPlaceholder: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
upload_video_max: {
|
upload_video_max: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30 // 最大上传容量(M)
|
default: 30 // 最大上传容量(M)
|
||||||
@@ -94,6 +107,21 @@ export default {
|
|||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
dataList: {
|
||||||
|
handler(val) {
|
||||||
|
this.upload_before_list = val
|
||||||
|
this.upload_cache_list = []
|
||||||
|
if (val.length > 0) {
|
||||||
|
val.map(item => {
|
||||||
|
item && this.upload_cache_list.push(item.path)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.emit()
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
onReady(res) {
|
onReady(res) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
for (let i = 0; i < 10; i++) {
|
for (let i = 0; i < 10; i++) {
|
||||||
@@ -101,40 +129,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
// url(val) {
|
|
||||||
// this.upload_before_list.map((item) => {
|
|
||||||
// this.upload_cache_list.push(item.path);
|
|
||||||
// });
|
|
||||||
// this.emit();
|
|
||||||
// }
|
|
||||||
dataList:{
|
|
||||||
handler(val){
|
|
||||||
console.log('dataList change'+JSON.stringify(val));
|
|
||||||
this.upload_before_list = val;
|
|
||||||
if(this.upload_before_list.length>0){
|
|
||||||
this.upload_cache_list = [];
|
|
||||||
this.upload_before_list.map((item) => {
|
|
||||||
//过滤掉非网络图片
|
|
||||||
if(item.path.substring(0,4) == 'http' && item.path.substring(0,11) != 'http://tmp/')
|
|
||||||
{
|
|
||||||
this.upload_cache_list.push(item.path);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
this.upload_cache_list = [];
|
|
||||||
}
|
|
||||||
this.emit();
|
|
||||||
},
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
videoPlay(e) {
|
videoPlay(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
@@ -161,9 +155,9 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/* uni.showLoading({
|
uni.showLoading({
|
||||||
title: `正在上传...`,
|
title: `正在上传...`,
|
||||||
}); */
|
})
|
||||||
|
|
||||||
Promise.all(promises).then((data) => {
|
Promise.all(promises).then((data) => {
|
||||||
// uni.hideLoading();
|
// uni.hideLoading();
|
||||||
@@ -171,9 +165,10 @@ export default {
|
|||||||
this.upload_cache_list.push(...data);
|
this.upload_cache_list.push(...data);
|
||||||
console.log("after uploaded upload_cache_list:"+JSON.stringify(this.upload_cache_list))
|
console.log("after uploaded upload_cache_list:"+JSON.stringify(this.upload_cache_list))
|
||||||
this.emit();
|
this.emit();
|
||||||
|
uni.hideLoading()
|
||||||
}).catch((res) => {
|
}).catch((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// uni.hideLoading();
|
uni.hideLoading()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
choose() {
|
choose() {
|
||||||
@@ -230,7 +225,7 @@ export default {
|
|||||||
this.upload_exceeded_list.push(i === 0 ? 1 : i + 1);
|
this.upload_exceeded_list.push(i === 0 ? 1 : i + 1);
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: `第${[...new Set(this.upload_exceeded_list)].join(',')}张图片超出限制${this.upload_max}MB,已过滤`,
|
content: `图片超出限制${this.upload_max}MB,已过滤`,
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
confirmText: '确认',
|
confirmText: '确认',
|
||||||
success(res) {
|
success(res) {
|
||||||
@@ -378,7 +373,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.icon-mn_shangchuantupian {
|
.icon-mn_shangchuantupian {
|
||||||
font-size: 3em;
|
font-size: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sunui-uploader-img {
|
.sunui-uploader-img {
|
||||||
@@ -397,7 +392,7 @@ export default {
|
|||||||
|
|
||||||
.sunui-uploader-inputbox {
|
.sunui-uploader-inputbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 16rpx;
|
margin: 0 16rpx 16rpx 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #ededed;
|
background-color: #ededed;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -446,7 +441,6 @@ export default {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sunui-uploader-bd {
|
.sunui-uploader-bd {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
<template>
|
||||||
|
<view class="xdd-product-item" @click="viewHandle(item)">
|
||||||
|
<view class="focus-img">
|
||||||
|
<image
|
||||||
|
:src="item[imageKey]"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-if="item.isOldBrand"
|
||||||
|
:src="webUrl + '/home/old-mark.png'"
|
||||||
|
class="mark-img"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-if="item.isLandmarkGoods"
|
||||||
|
:src="webUrl + '/home/mark-land.png'"
|
||||||
|
class="mark-img"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-if="item.isCountyFamous"
|
||||||
|
:src="webUrl + '/home/qixian-mark.png'"
|
||||||
|
class="mark-img"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="info-wrap">
|
||||||
|
<view class="name more-t">
|
||||||
|
{{ item[nameKey] }}
|
||||||
|
</view>
|
||||||
|
<view v-if="item.bestContent" class="desc more-t">
|
||||||
|
{{ item.bestContent }}
|
||||||
|
</view>
|
||||||
|
<view v-if="item.couponName && showCoupon" class="coupon">
|
||||||
|
<view class="tag">券</view>
|
||||||
|
<view class="tag">{{ item.couponName }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="price-wrap">
|
||||||
|
<view class="price">
|
||||||
|
<text class="price-txt price-red">¥{{ item[priceKey] }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="btn">
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/icon-cart.png'"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'XddProductItem',
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
imageKey: {
|
||||||
|
type: String,
|
||||||
|
default: 'image'
|
||||||
|
},
|
||||||
|
nameKey: {
|
||||||
|
type: String,
|
||||||
|
default: 'storeName'
|
||||||
|
},
|
||||||
|
priceKey: {
|
||||||
|
type: String,
|
||||||
|
default: 'price'
|
||||||
|
},
|
||||||
|
// 是否显示优惠券
|
||||||
|
showCoupon: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
viewHandle(item) {
|
||||||
|
this.$emit('view', item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.xdd-product-item {
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
.focus-img {
|
||||||
|
position: relative;
|
||||||
|
.img {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
display: block;
|
||||||
|
width: 345rpx;
|
||||||
|
height: 345rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.mark-img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 3;
|
||||||
|
display: block;
|
||||||
|
width: 84rpx;
|
||||||
|
height: 74rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info-wrap {
|
||||||
|
padding: 12rpx;
|
||||||
|
.name {
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.desc {
|
||||||
|
width: 320rpx;
|
||||||
|
padding: 10rpx 0 0 0;
|
||||||
|
color: #FFC543;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.coupon {
|
||||||
|
display: flex;
|
||||||
|
padding: 10rpx 0 0 0;
|
||||||
|
.tag + .tag {
|
||||||
|
margin: 0 0 0 -1rpx;
|
||||||
|
}
|
||||||
|
.tag {
|
||||||
|
height: 32rpx;
|
||||||
|
padding: 0 6rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
border: 1rpx solid #C52733;
|
||||||
|
color: #C52733;
|
||||||
|
line-height: 32rpx;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.price-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-end;
|
||||||
|
padding: 10rpx 0 0 0;
|
||||||
|
.price {
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
.price-txt {
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.price-red {
|
||||||
|
margin: 0 10rpx 0 0;
|
||||||
|
color: #C52733;
|
||||||
|
}
|
||||||
|
.price-grey {
|
||||||
|
color: #C4C4C4;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
<template>
|
||||||
|
<view
|
||||||
|
:style="{
|
||||||
|
'background-image': 'url(' + webUrl + '/home/tabbar-bg.png);'
|
||||||
|
}"
|
||||||
|
class="xdd-tabbar-wrap"
|
||||||
|
>
|
||||||
|
<view class="center-img" @click="switchTabFn('/pages/cloud/haveFun')">
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/tabbar-center.png'"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
|
<view
|
||||||
|
:class="currIndex === 4 ? 'curr' : ''"
|
||||||
|
class="name"
|
||||||
|
>寻趣味</view>
|
||||||
|
</view>
|
||||||
|
<view class="tabbar-list">
|
||||||
|
<view
|
||||||
|
v-for="(tabbarItem, tabbarIndex) in tabbar"
|
||||||
|
:key="tabbarIndex"
|
||||||
|
class="tabbar-item"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in tabbarItem"
|
||||||
|
:key="index"
|
||||||
|
:class="currIndex === item.index ? 'curr' : ''"
|
||||||
|
class="item"
|
||||||
|
@click="gotoPage(item.url, item.type, item.index)"
|
||||||
|
>
|
||||||
|
<view class="img-wrap">
|
||||||
|
<!-- 预加载两张图片,可以在点击切换的时候不闪屏 -->
|
||||||
|
<image
|
||||||
|
:src="item.onIcon"
|
||||||
|
class="img on"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="item.offIcon"
|
||||||
|
class="img off"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="name">{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'XddTabbar',
|
||||||
|
props: {
|
||||||
|
currIndex: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
tabbar: [[
|
||||||
|
{
|
||||||
|
name: '首页',
|
||||||
|
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-01-on.png',
|
||||||
|
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-01-off.png',
|
||||||
|
url: '/pages/home/index',
|
||||||
|
type: 1,
|
||||||
|
index: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '消息',
|
||||||
|
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-02-on.png',
|
||||||
|
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-02-off.png',
|
||||||
|
url: '/pkg_common/views/roomLogs',
|
||||||
|
type: 2,
|
||||||
|
index: 1
|
||||||
|
}
|
||||||
|
],[
|
||||||
|
{
|
||||||
|
name: '购物车',
|
||||||
|
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-03-on.png',
|
||||||
|
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-03-off.png',
|
||||||
|
url: '/pages/cart',
|
||||||
|
type: 1,
|
||||||
|
index: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '我的',
|
||||||
|
onIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-04-on.png',
|
||||||
|
offIcon: this.$VUE_APP_RESOURCES_URL + '/home/tabbar-04-off.png',
|
||||||
|
url: '/pages/user/User/index',
|
||||||
|
type: 1,
|
||||||
|
index: 3
|
||||||
|
}
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 跳转至目标页面
|
||||||
|
* type: 1-tabbar页面,2-非tabbar页面
|
||||||
|
*/
|
||||||
|
gotoPage(url, type = 1, index) {
|
||||||
|
if (this.currIndex === index) return
|
||||||
|
if (type === 1) {
|
||||||
|
this.switchTabFn(url)
|
||||||
|
}
|
||||||
|
if (type === 2) {
|
||||||
|
uni.navigateTo({ url })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
switchTabFn(url) {
|
||||||
|
uni.switchTab({ url })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.xdd-tabbar-wrap {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 21rpx;
|
||||||
|
left: 21rpx;
|
||||||
|
right: 21rpx;
|
||||||
|
z-index: 99;
|
||||||
|
height: 164rpx;
|
||||||
|
background-size: 708rpx 164rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
.center-img {
|
||||||
|
position: absolute;
|
||||||
|
top: -16rpx;
|
||||||
|
left: 50%;
|
||||||
|
z-index: 5;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
.img {
|
||||||
|
width: 136rpx;
|
||||||
|
height: 136rpx;
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #9a9a9a;
|
||||||
|
transform: translateY(-4rpx);
|
||||||
|
&.curr {
|
||||||
|
color: #C52733;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tabbar-list {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 70rpx 0 0 0;
|
||||||
|
.tabbar-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: calc(50% - 78rpx);
|
||||||
|
.img-wrap {
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 44rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
&.on {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&.off {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
padding: 10rpx 0 0 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #9a9a9a;
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
width: 140rpx;
|
||||||
|
&.curr {
|
||||||
|
.name {
|
||||||
|
color: #C52733;
|
||||||
|
}
|
||||||
|
.on {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.off {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
input {
|
input {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-10
@@ -1,11 +1,3 @@
|
|||||||
// export const VUE_APP_API_URL = "https://shop.xdd618.com/api";
|
|
||||||
// export const VUE_APP_API_URL = "https://www.xdd618.com/api";
|
|
||||||
|
|
||||||
// export const SERVICE_API_URL = "https://service-test.xdd618.com/api";
|
|
||||||
// export const SERVICE_API_URL = "https://service.xdd618.com/api";
|
|
||||||
|
|
||||||
// export const SOCKET_URL = "wss://service-test.xdd618.com/ws";
|
|
||||||
// export const SOCKET_URL = "wss://service.xdd618.com/ws";
|
|
||||||
const NODE_ENV = process.env.VUE_APP_ENV || 'development'
|
const NODE_ENV = process.env.VUE_APP_ENV || 'development'
|
||||||
let BASE_URL = ''
|
let BASE_URL = ''
|
||||||
let SERVICE_URL = ''
|
let SERVICE_URL = ''
|
||||||
@@ -16,7 +8,7 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') {
|
|||||||
SERVICE_WS_URL = 'wss://service-test.xdd618.com/ws'
|
SERVICE_WS_URL = 'wss://service-test.xdd618.com/ws'
|
||||||
}
|
}
|
||||||
if (NODE_ENV === 'prod') {
|
if (NODE_ENV === 'prod') {
|
||||||
BASE_URL = 'https://www.xdd618.com/api'
|
BASE_URL = 'https://wxapp.xdd618.com/api'
|
||||||
SERVICE_URL = 'https://service.xdd618.com/api'
|
SERVICE_URL = 'https://service.xdd618.com/api'
|
||||||
SERVICE_WS_URL = 'wss://service.xdd618.com/ws'
|
SERVICE_WS_URL = 'wss://service.xdd618.com/ws'
|
||||||
}
|
}
|
||||||
@@ -26,7 +18,9 @@ export const SERVICE_API_URL = SERVICE_URL
|
|||||||
export const SOCKET_URL = SERVICE_WS_URL
|
export const SOCKET_URL = SERVICE_WS_URL
|
||||||
|
|
||||||
|
|
||||||
export const VUE_APP_RESOURCES_URL = "https://www.xdd618.com/api/file/pic";
|
export const VUE_APP_RESOURCES_URL = "https://wxapp.xdd618.com/api/file/pic"
|
||||||
export const STATIC_RESOURCE_URL = "https://resource.xdd618.com/image"
|
export const STATIC_RESOURCE_URL = "https://resource.xdd618.com/image"
|
||||||
|
|
||||||
export const WX_LIVE_APPID = "wx2b03c6e691cd7370";
|
export const WX_LIVE_APPID = "wx2b03c6e691cd7370";
|
||||||
|
|
||||||
|
export const pageViewDataCacheKey = 'pageViewDataCacheKey'
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { getPageViewDataToLocalCache } from '@/utils/util'
|
||||||
|
|
||||||
|
export const pageToWatchData = Object.assign({
|
||||||
|
'appIndex': []
|
||||||
|
}, getPageViewDataToLocalCache())
|
||||||
+20
-15
@@ -49,25 +49,30 @@ export function takeOrderHandle(orderId) {
|
|||||||
|
|
||||||
export function delOrderHandle(orderId) {
|
export function delOrderHandle(orderId) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
dialog.confirm({
|
uni.showModal({
|
||||||
mes: "确认删除该订单?",
|
title: '提示',
|
||||||
opts() {
|
content: '确认删除该订单?',
|
||||||
delOrder(orderId)
|
success(res) {
|
||||||
.then(res => {
|
if (res.confirm) {
|
||||||
|
delOrder(orderId).then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '删除成功', icon: 'success', duration: 2000
|
title: '删除成功',
|
||||||
});
|
icon: 'success',
|
||||||
resolve(res);
|
duration: 2000
|
||||||
})
|
})
|
||||||
.catch(err => {
|
resolve(res)
|
||||||
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '删除失败', icon: 'none', duration: 2000
|
title: '删除失败',
|
||||||
});
|
icon: 'none',
|
||||||
reject(err);
|
duration: 2000
|
||||||
});
|
})
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function payOrderHandle(orderId, type, from) {
|
export function payOrderHandle(orderId, type, from) {
|
||||||
|
|||||||
@@ -15,8 +15,11 @@ import {
|
|||||||
WX_LIVE_APPID
|
WX_LIVE_APPID
|
||||||
} from "@/config";
|
} from "@/config";
|
||||||
import uView from "uview-ui";
|
import uView from "uview-ui";
|
||||||
|
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
||||||
|
import { pageToWatchData } from '@/config/page'
|
||||||
|
|
||||||
Vue.use(uView);
|
Vue.use(uView)
|
||||||
|
Vue.component('GooSkeleton', GooSkeleton)
|
||||||
Vue.mixin(mixin)
|
Vue.mixin(mixin)
|
||||||
|
|
||||||
// 注册全局组件
|
// 注册全局组件
|
||||||
@@ -30,7 +33,8 @@ Vue.prototype.$VUE_APP_RESOURCES_URL = VUE_APP_RESOURCES_URL
|
|||||||
Vue.prototype.$STATIC_RESOURCE_URL = STATIC_RESOURCE_URL
|
Vue.prototype.$STATIC_RESOURCE_URL = STATIC_RESOURCE_URL
|
||||||
Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL
|
Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL
|
||||||
Vue.prototype.$WX_LIVE_APPID = WX_LIVE_APPID
|
Vue.prototype.$WX_LIVE_APPID = WX_LIVE_APPID
|
||||||
Vue.prototype.$global = global;
|
Vue.prototype.$global = global
|
||||||
|
Vue.prototype.$pageToWatchData = pageToWatchData
|
||||||
|
|
||||||
Vue.prototype.$validator = function (rule) {
|
Vue.prototype.$validator = function (rule) {
|
||||||
return new schema(rule);
|
return new schema(rule);
|
||||||
@@ -43,30 +47,32 @@ Vue.prototype.$validator = function (rule) {
|
|||||||
// cookie.set(CACHE_KEY, 1);
|
// cookie.set(CACHE_KEY, 1);
|
||||||
// }
|
// }
|
||||||
// 强制转为几位小数,不足的补0
|
// 强制转为几位小数,不足的补0
|
||||||
var forceToDecimal = function changeToDecimal(x, len, ignore = false) {
|
const forceToDecimal = function changeToDecimal(value, len = 1) {
|
||||||
var f_x = parseFloat(x);
|
const f_x = parseFloat(value)
|
||||||
if (isNaN(f_x)) {
|
if (isNaN(f_x)) {
|
||||||
return 0;
|
return 0
|
||||||
}
|
}
|
||||||
var f = Math.round(f_x * 100) / 100;
|
let s = f_x.toString()
|
||||||
if (ignore) {
|
let rs = s.indexOf('.')
|
||||||
f = Math.floor(f_x * 100) / 100;
|
|
||||||
}
|
|
||||||
var s = f.toString();
|
|
||||||
var rs = s.indexOf('.');
|
|
||||||
if (rs < 0) {
|
if (rs < 0) {
|
||||||
rs = s.length;
|
rs = s.length
|
||||||
s += '.';
|
s += '.'
|
||||||
}
|
}
|
||||||
while (s.length <= rs + len) {
|
while (s.length <= rs + len) {
|
||||||
s += '0';
|
s += '0'
|
||||||
}
|
}
|
||||||
return s;
|
const tempArr = s.split('.')
|
||||||
|
const decimalArr = tempArr[1].split('')
|
||||||
|
let res = tempArr[0] + '.'
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
res += decimalArr[i]
|
||||||
|
}
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
// 强制转为2位小数,不足的补0
|
// 强制转为2位小数,不足的补0
|
||||||
var force2Decimal = function change2Decimal(x, ignore = false) {
|
const force2Decimal = function change2Decimal(value) {
|
||||||
return forceToDecimal(x, 2, false);
|
return forceToDecimal(value, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.prototype.$force2Decimal = force2Decimal
|
Vue.prototype.$force2Decimal = force2Decimal
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import {
|
||||||
|
pageToWatchShowCount,
|
||||||
|
pageToWatchShowTimer,
|
||||||
|
getCurrDateTime,
|
||||||
|
TimeDifference
|
||||||
|
} from '@/utils/util'
|
||||||
|
export const pageListenMixins = {
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
pageViewDateTime: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.pageViewDateTime = getCurrDateTime()
|
||||||
|
this.pageToWatchShowCount(this.pageKeyId)
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.pageToHideHandle()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
pageToWatchShowCount,
|
||||||
|
pageToWatchShowTimer,
|
||||||
|
pageToHideHandle() {
|
||||||
|
const visitTime = TimeDifference(this.pageViewDateTime, getCurrDateTime())
|
||||||
|
if (visitTime > 0) {
|
||||||
|
this.pageToWatchShowTimer(this.pageKeyId, {
|
||||||
|
statsName: this.pageKeyId,
|
||||||
|
statsTime: this.pageViewDateTime,
|
||||||
|
visitTime
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.pageViewDateTime = ''
|
||||||
|
console.log('清除页面监听-----%s', this.pageKeyId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+70
-107
@@ -58,7 +58,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/shop/GoodSearch/index",
|
"path": "pages/shop/GoodSearch/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "搜索商品"
|
"navigationBarTitleText": "搜索"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/shop/GoodsList/index",
|
"path": "pages/shop/GoodsList/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品列表"
|
"navigationBarTitleText": "搜索"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -139,6 +139,13 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/shop/GoodsCon/qualifications",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "商家资质",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/user/address/AddAddress/index",
|
"path": "pages/user/address/AddAddress/index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -201,6 +208,14 @@
|
|||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/user/History/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "商品足迹",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/user/UserBill/index",
|
"path": "pages/user/UserBill/index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -287,96 +302,6 @@
|
|||||||
"navigationBarTitleText": "退货列表"
|
"navigationBarTitleText": "退货列表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/orderAdmin/OrderIndex/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商家订单统计"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/orderAdmin/AdminOrderList/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "订单"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/orderAdmin/GoodsDeliver/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "发货"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/orderAdmin/AdminOrder/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商家订单列表"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/orderAdmin/Statistics/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商家统计数据"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/orderAdmin/OrderCancellation/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商家取消订单"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/Poster/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "推广海报"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/DargainDetails/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "帮砍价"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/GoodsBargain/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "砍价列表"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/BargainRecord/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "砍价记录"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/GoodsGroup/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "团购商品列表"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/GroupDetails/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "团购商品详情"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/GroupRule/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "团购规则"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/GoodsSeckill/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "秒杀"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/activity/SeckillDetails/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "秒杀详情"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/map/index",
|
"path": "pages/map/index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -448,6 +373,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的喜欢"
|
"navigationBarTitleText": "我的喜欢"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/user/Points/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "积分"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
@@ -630,6 +561,12 @@
|
|||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "views/heritageGoodAndVideo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "views/homestay",
|
"path": "views/homestay",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -652,7 +589,40 @@
|
|||||||
{
|
{
|
||||||
"path": "views/famousList",
|
"path": "views/famousList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "千县名品"
|
"navigationBarTitleText": "寻迹千县"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxian",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "寻迹千县"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianShop",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "寻迹千县",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianTheme",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "寻迹千县",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianVillageShop",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "寻迹千县",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianInvestment",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "招商政策"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -856,14 +826,6 @@
|
|||||||
"navigationBarTitleText": "文玩"
|
"navigationBarTitleText": "文玩"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "views/store",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "文玩店铺详情",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"navigationBarTextStyle": "white"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "views/storeList",
|
"path": "views/storeList",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -883,12 +845,13 @@
|
|||||||
},
|
},
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "uni-app",
|
"navigationBarTitleText": "地标文化特产",
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"backgroundColor": "#F8F8F8"
|
"backgroundColor": "#F8F8F8"
|
||||||
},
|
},
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#8B8F99",
|
"color": "#8B8F99",
|
||||||
|
"custom": true,
|
||||||
"selectedColor": "#FF564A",
|
"selectedColor": "#FF564A",
|
||||||
"borderStyle": "black",
|
"borderStyle": "black",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
@@ -900,10 +863,10 @@
|
|||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/home/landMark",
|
"pagePath": "pages/cloud/haveFun",
|
||||||
"iconPath": "static/tabbar/icon-land.png",
|
"iconPath": "static/tabbar/icon-land.png",
|
||||||
"selectedIconPath": "static/tabbar/icon-land-hot.png",
|
"selectedIconPath": "static/tabbar/icon-land-hot.png",
|
||||||
"text": "地标好物"
|
"text": "寻趣味"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/cart",
|
"pagePath": "pages/cart",
|
||||||
@@ -925,7 +888,7 @@
|
|||||||
{
|
{
|
||||||
"name": "商品详情",
|
"name": "商品详情",
|
||||||
"path": "pages/shop/GoodsCon/index",
|
"path": "pages/shop/GoodsCon/index",
|
||||||
"query": "id=277"
|
"query": "id=588"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "店铺详情",
|
"name": "店铺详情",
|
||||||
@@ -963,8 +926,8 @@
|
|||||||
"query": ""
|
"query": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "特色礼品",
|
"name": "搜索",
|
||||||
"path": "pkg_product/views/giftList",
|
"path": "pages/shop/GoodsList/index",
|
||||||
"query": ""
|
"query": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export default {
|
|||||||
// this.videoContext = uni.createVideoContext('myVideo');
|
// this.videoContext = uni.createVideoContext('myVideo');
|
||||||
// this.videoContext.requestFullScreen();
|
// this.videoContext.requestFullScreen();
|
||||||
|
|
||||||
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl='+video.video);
|
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl='+video.video + '&id=' + video.id);
|
||||||
},
|
},
|
||||||
liveClick:function(video){
|
liveClick:function(video){
|
||||||
var liveAppId = this.$WX_LIVE_APPID;
|
var liveAppId = this.$WX_LIVE_APPID;
|
||||||
|
|||||||
@@ -4,16 +4,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components:{
|
components:{
|
||||||
uniPopup
|
uniPopup
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
curPlayVideoUrl:'',
|
curPlayVideoUrl:'',
|
||||||
isVideoPopupShow:false
|
isVideoPopupShow:false,
|
||||||
|
pageKeyId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady: function(res) {
|
onReady: function(res) {
|
||||||
@@ -21,10 +23,9 @@ export default {
|
|||||||
this.videoContext.requestFullScreen();
|
this.videoContext.requestFullScreen();
|
||||||
},
|
},
|
||||||
onLoad:function(e){
|
onLoad:function(e){
|
||||||
|
this.curPlayVideoUrl = e.videoUrl
|
||||||
this.curPlayVideoUrl = e.videoUrl;
|
const id = options.id
|
||||||
//this.$refs.popup.open();
|
this.pageKeyId = `findVideo_videoId_${id}`
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
videoErrorCallback: function(e) {
|
videoErrorCallback: function(e) {
|
||||||
|
|||||||
@@ -32,71 +32,69 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getStoreVideoType, getArticleList} from "@/api/public";
|
import {getStoreVideoType, getArticleList} from '@/api/public'
|
||||||
import {getVideoList} from "@/api/user";
|
import {getVideoList} from '@/api/user'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
typeList: [{"label": "全部", "value": ""}],
|
typeList: [{'label': '全部', 'value': ''}],
|
||||||
type: "",
|
type: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
keyword: "",
|
keyword: '',
|
||||||
list: [],
|
list: [],
|
||||||
isWait: false
|
isWait: false,
|
||||||
|
pageKeyId: Object.freeze('findVideoList')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getType();
|
this.getType()
|
||||||
this.fetchList();
|
this.fetchList()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.page++;
|
this.page++
|
||||||
this.fetchList();
|
this.fetchList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getType() {
|
getType() {
|
||||||
getStoreVideoType().then(({data}) => {
|
getStoreVideoType().then(({data}) => {
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
this.typeList.push(item);
|
this.typeList.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
changeType(item) {
|
changeType(item) {
|
||||||
this.type = item.value;
|
this.type = item.value
|
||||||
this.page = 1;
|
this.page = 1
|
||||||
this.list = [];
|
this.list = []
|
||||||
this.fetchList();
|
this.fetchList()
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchList() {
|
fetchList() {
|
||||||
if (this.isWait) return;
|
if (this.isWait) return
|
||||||
this.isWait = true;
|
this.isWait = true
|
||||||
|
const params = {
|
||||||
let params = {
|
|
||||||
type: this.type,
|
type: this.type,
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: this.limit
|
limit: this.limit
|
||||||
};
|
}
|
||||||
|
|
||||||
getVideoList(params).then(res => {
|
getVideoList(params).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
for (let i = 0; i < res.data.length; i++) {
|
for (let i = 0; i < res.data.length; i++) {
|
||||||
res.data[i].hide = true;
|
res.data[i].hide = true
|
||||||
this.list.push(res.data[i])
|
this.list.push(res.data[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isWait = false;
|
this.isWait = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video);
|
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="bargain-record" ref="container">
|
|
||||||
<view class="item" v-for="(item, bargainrecordIndex) in bargain" :key="bargainrecordIndex">
|
|
||||||
<view class="picTxt acea-row row-between-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.image" />
|
|
||||||
</view>
|
|
||||||
<view class="text acea-row row-column-around">
|
|
||||||
<view class="line1">{{ item.title }}</view>
|
|
||||||
<count-down
|
|
||||||
:isDay="true"
|
|
||||||
:tipText="'倒计时 '"
|
|
||||||
:dayText="' 天 '"
|
|
||||||
:hourText="' 时 '"
|
|
||||||
:minuteText="' 分 '"
|
|
||||||
:secondText="' 秒'"
|
|
||||||
:datatime="item.datatime"
|
|
||||||
></count-down>
|
|
||||||
<view class="money font-color-red">
|
|
||||||
已砍至
|
|
||||||
<text class="symbol">¥</text>
|
|
||||||
<text class="num">{{ item.residuePrice }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="bottom acea-row row-between-wrapper">
|
|
||||||
<view class="purple" v-if="item.status === 1">活动进行中</view>
|
|
||||||
<view class="success" v-else-if="item.status === 3">砍价成功</view>
|
|
||||||
<view class="end" v-else>活动已结束</view>
|
|
||||||
<view class="acea-row row-middle row-right">
|
|
||||||
<view
|
|
||||||
class="bnt cancel"
|
|
||||||
v-if="item.status === 1"
|
|
||||||
@click="getBargainUserCancel(item.bargainId)"
|
|
||||||
>取消活动</view>
|
|
||||||
<view
|
|
||||||
class="bnt bg-color-red"
|
|
||||||
v-if="item.status === 1"
|
|
||||||
@click="goDetail(item.bargainId)"
|
|
||||||
>继续砍价</view>
|
|
||||||
<view class="bnt bg-color-red" v-else @click="goList">重开一个</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import CountDown from "@/components/CountDown";
|
|
||||||
import { getBargainUserList, getBargainUserCancel } from "@/api/activity";
|
|
||||||
import Loading from "@/components/Loading";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "BargainRecord",
|
|
||||||
components: {
|
|
||||||
CountDown,
|
|
||||||
Loading
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
bargain: [],
|
|
||||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
|
||||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
|
||||||
page: 1, //页码
|
|
||||||
limit: 20 //数量
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.getBargainUserList();
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
!this.loadingList && this.getBargainUserList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goDetail: function(id) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/DargainDetails/index",
|
|
||||||
query: { id, partake: 0 }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goList: function() {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/GoodsBargain/index"
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getBargainUserList: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.loadingList) return;
|
|
||||||
if (that.status) return;
|
|
||||||
getBargainUserList({ page: that.page, limit: that.limit })
|
|
||||||
.then(res => {
|
|
||||||
that.status = res.data.length < that.limit;
|
|
||||||
that.bargain.push.apply(that.bargain, res.data);
|
|
||||||
that.page++;
|
|
||||||
that.loadingList = false;
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getBargainUserCancel: function(bargainId) {
|
|
||||||
var that = this;
|
|
||||||
getBargainUserCancel({ bargainId: bargainId })
|
|
||||||
.then(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "success",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.status = false;
|
|
||||||
that.loadingList = false;
|
|
||||||
that.page = 1;
|
|
||||||
that.bargain = [];
|
|
||||||
that.getBargainUserList();
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,617 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="bargain">
|
|
||||||
<!-- 在header上加 on 为请求支援 -->
|
|
||||||
<view :class="[bargainPartake != userInfo.uid ? 'header on' : 'header']">
|
|
||||||
<view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view>
|
|
||||||
<!-- 帮助砍价、帮砍成功:-->
|
|
||||||
<view class="pictxt acea-row row-center-wrapper" v-if="bargainPartake != userInfo.uid">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="bargainUserInfo.avatar" />
|
|
||||||
</view>
|
|
||||||
<view class="text">
|
|
||||||
{{ bargainUserInfo.nickname }}
|
|
||||||
<text>邀请您帮忙砍价</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<count-down
|
|
||||||
:isDay="true"
|
|
||||||
:tipText="'倒计时 '"
|
|
||||||
:dayText="' 天 '"
|
|
||||||
:hourText="' 时 '"
|
|
||||||
:minuteText="' 分 '"
|
|
||||||
:secondText="' 秒'"
|
|
||||||
:datatime="datatime"
|
|
||||||
></count-down>
|
|
||||||
</view>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="pictxt acea-row row-between-wrapper" @click="openAlone">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="bargain.image" />
|
|
||||||
<view class="bargain_view">
|
|
||||||
查看商品
|
|
||||||
<view class="iconfont icon-jiantou iconfonts"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="text acea-row row-column-around">
|
|
||||||
<view class="line2" v-text="bargain.title"></view>
|
|
||||||
<view class="money font-color-red">
|
|
||||||
已砍至: ¥
|
|
||||||
<text class="num" v-text="price"></text>
|
|
||||||
</view>
|
|
||||||
<view class="acea-row row-middle">
|
|
||||||
<view class="successNum" v-text="'原价' + bargain.price"></view>
|
|
||||||
<view class="successNum" v-text="'已有' + bargainSumCount + '人砍价成功'"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="cu-progress acea-row row-middle round margin-top">
|
|
||||||
<view
|
|
||||||
class="acea-row row-middle bg-red"
|
|
||||||
:style="{ width: loading ? pricePercent + '%' : '' }"
|
|
||||||
></view>
|
|
||||||
</view>
|
|
||||||
<view class="balance acea-row row-between-wrapper">
|
|
||||||
<view v-text="'已砍' + alreadyPrice + '元'"></view>
|
|
||||||
<view v-if="surplusPrice === 0">砍价成功</view>
|
|
||||||
<view v-else v-text="'还剩' + surplusPrice + '元'"></view>
|
|
||||||
</view>
|
|
||||||
<!-- 帮助砍价、帮砍成功:-->
|
|
||||||
<view
|
|
||||||
class="bargainSuccess"
|
|
||||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
|
|
||||||
>
|
|
||||||
<span class="iconfont icon-xiaolian"></span>已成功帮助好友砍价
|
|
||||||
</view>
|
|
||||||
<!-- 砍价成功:-->
|
|
||||||
<view
|
|
||||||
class="bargainSuccess"
|
|
||||||
v-if="
|
|
||||||
surplusPrice === 0 &&
|
|
||||||
bargainPartake === userInfo.uid &&
|
|
||||||
userBargainStatus === 1 &&
|
|
||||||
!helpListLoading
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<span class="iconfont icon-xiaolian"></span>恭喜您砍价成功,快去支付吧~
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
v-if="userBargainStatus == 0 && bargainPartake === userInfo.uid"
|
|
||||||
class="bargainBnt"
|
|
||||||
@click="goParticipate"
|
|
||||||
>立即参与砍价</view>
|
|
||||||
<view
|
|
||||||
class="bargainBnt"
|
|
||||||
@click="goPoster"
|
|
||||||
v-if="
|
|
||||||
surplusPrice > 0 &&
|
|
||||||
bargainPartake === userInfo.uid &&
|
|
||||||
userBargainStatus === 1 &&
|
|
||||||
!helpListLoading
|
|
||||||
"
|
|
||||||
>邀请好友帮砍价</view>
|
|
||||||
<view
|
|
||||||
class="bargainBnt"
|
|
||||||
@click="getBargainHelp"
|
|
||||||
v-else-if="
|
|
||||||
bargainPartake != userInfo.uid &&
|
|
||||||
userBargainStatus == 1 &&
|
|
||||||
statusUser &&
|
|
||||||
!helpListLoading
|
|
||||||
"
|
|
||||||
>帮好友砍一刀</view>
|
|
||||||
<view
|
|
||||||
class="bargainBnt"
|
|
||||||
@click="getBargainStart"
|
|
||||||
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
|
|
||||||
>我也要参与</view>
|
|
||||||
<view
|
|
||||||
class="bargainBnt"
|
|
||||||
@click="goPay"
|
|
||||||
v-if="
|
|
||||||
surplusPrice === 0 &&
|
|
||||||
bargainPartake === userInfo.uid &&
|
|
||||||
userBargainStatus === 1
|
|
||||||
"
|
|
||||||
>立即支付</view>
|
|
||||||
<view class="bargainBnt on" @click="goList">抢更多商品</view>
|
|
||||||
<view class="tip">
|
|
||||||
已有
|
|
||||||
<span class="font-color-red" v-text="helpCount"></span>
|
|
||||||
位好友成功帮您砍价
|
|
||||||
</view>
|
|
||||||
<view class="lock"></view>
|
|
||||||
</view>
|
|
||||||
<view class="bargainGang">
|
|
||||||
<view class="title font-color-red acea-row row-center-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
|
||||||
</view>
|
|
||||||
<view class="titleCon">砍价帮</view>
|
|
||||||
<view class="pictrue on">
|
|
||||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
|
||||||
<view
|
|
||||||
class="item acea-row row-between-wrapper"
|
|
||||||
v-for="(item, bargainHelpListIndex) in bargainHelpList"
|
|
||||||
:key="bargainHelpListIndex"
|
|
||||||
>
|
|
||||||
<view class="pictxt acea-row row-between-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.avatar" />
|
|
||||||
</view>
|
|
||||||
<view class="text">
|
|
||||||
<view class="name line1" v-text="item.nickname"></view>
|
|
||||||
<view class="line1" v-text="item.add_time"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="money font-color-red">
|
|
||||||
<text class="iconfont icon-kanjia"></text>
|
|
||||||
砍掉{{ item.price }}元
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="load font-color-red"
|
|
||||||
v-if="!helpListStatus && !helpListLoading"
|
|
||||||
@click="getBargainHelpList"
|
|
||||||
>点击加载更多</view>
|
|
||||||
<view class="lock"></view>
|
|
||||||
</view>
|
|
||||||
<view class="goodsDetails">
|
|
||||||
<view class="title font-color-red acea-row row-center-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
|
||||||
</view>
|
|
||||||
<view class="titleCon">商品详情</view>
|
|
||||||
<view class="pictrue on">
|
|
||||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="conter" v-html="bargain.description"></view>
|
|
||||||
<view class="lock"></view>
|
|
||||||
</view>
|
|
||||||
<view class="goodsDetails">
|
|
||||||
<view class="title font-color-red acea-row row-center-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
|
||||||
</view>
|
|
||||||
<view class="titleCon">活动规则</view>
|
|
||||||
<view class="pictrue on">
|
|
||||||
<image :src="webUrl+'/20230304134450627525.png'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="conter" v-html="bargain.rule"></view>
|
|
||||||
</view>
|
|
||||||
<view class="bargainTip" :class="active === true ? 'on' : ''">
|
|
||||||
<!-- <view class="pictrue">
|
|
||||||
<image src="@/static/images/bargainBg.jpg" />
|
|
||||||
<view class="iconfont icon-guanbi" @click="close"></view>
|
|
||||||
</view>-->
|
|
||||||
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
|
|
||||||
您已砍掉
|
|
||||||
<text class="font-color-red" v-text="bargainHelpPrice"></text>元,听说分享次数越多砍价成功的机会越大哦!
|
|
||||||
</view>
|
|
||||||
<view class="cutOff on" v-else>
|
|
||||||
<view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>,您也可以砍价低价拿哦,快去挑选心仪的商品吧~
|
|
||||||
</view>
|
|
||||||
<view class="tipBnt" @click="goPoster" v-if="bargainPartake === userInfo.uid">邀请好友帮砍价</view>
|
|
||||||
<view class="tipBnt" @click="getBargainStart" v-else>我也要参与</view>
|
|
||||||
</view>
|
|
||||||
<view class="mask" @touchmove.prevent :hidden="active === false" @click="close"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import CountDown from "@/components/CountDown";
|
|
||||||
import {
|
|
||||||
getBargainDetail,
|
|
||||||
getBargainShare,
|
|
||||||
getBargainStart,
|
|
||||||
getBargainHelp,
|
|
||||||
getBargainHelpPrice,
|
|
||||||
getBargainHelpList,
|
|
||||||
getBargainHelpCount,
|
|
||||||
getBargainStartUser
|
|
||||||
} from "@/api/activity";
|
|
||||||
import { postCartAdd } from "@/api/store";
|
|
||||||
import { mapGetters } from "vuex";
|
|
||||||
import {} from "@/libs/wechat";
|
|
||||||
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
|
||||||
|
|
||||||
const NAME = "DargainDetails";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "DargainDetails",
|
|
||||||
components: {
|
|
||||||
CountDown
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
|
||||||
price: 0,
|
|
||||||
bargainId: 0, //砍价编号
|
|
||||||
bargainPartake: 0, //参与砍价
|
|
||||||
bargain: [], //砍价产品信息
|
|
||||||
partake: null,
|
|
||||||
bargainSumCount: 0, //砍价成功人数
|
|
||||||
activeMsg: "",
|
|
||||||
active: false,
|
|
||||||
loading: false,
|
|
||||||
datatime: 0,
|
|
||||||
lookCount: 0, //查看人数
|
|
||||||
shareCount: 0, //分享人数
|
|
||||||
userCount: 0, //参与人数
|
|
||||||
bargainHelpPrice: 0, //砍掉金额
|
|
||||||
bargainHelpList: [],
|
|
||||||
helpListStatus: false, //砍价列表是否获取完成 false 未完成 true 完成
|
|
||||||
helpListLoading: false, //当前接口是否请求完成 false 完成 true 未完成
|
|
||||||
page: 1, //页码
|
|
||||||
limit: 2, //数量
|
|
||||||
helpCount: 0, //砍价帮总人数
|
|
||||||
surplusPrice: 0, //剩余金额
|
|
||||||
alreadyPrice: 0, //已砍掉价格
|
|
||||||
pricePercent: 0, //砍价进度条
|
|
||||||
bargainUserInfo: [], //砍价 开启砍价用户信息
|
|
||||||
userBargainStatus: 2, //砍价状态
|
|
||||||
statusUser: false ,// 是否帮别人砍,没砍是true,砍了false
|
|
||||||
share:{
|
|
||||||
title:'',
|
|
||||||
path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`,
|
|
||||||
imageUrl:'',
|
|
||||||
desc:'',
|
|
||||||
content:''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: mapGetters(["userInfo", "isLogin"]),
|
|
||||||
// watch: {
|
|
||||||
// $yroute: function(n) {
|
|
||||||
// var that = this;
|
|
||||||
// if (n.name === NAME) {
|
|
||||||
// that.mountedStart();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
mounted: function() {
|
|
||||||
var that = this;
|
|
||||||
that.mountedStart();
|
|
||||||
setTimeout(function() {
|
|
||||||
that.loading = true;
|
|
||||||
}, 500);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//参与砍价
|
|
||||||
goParticipate() {
|
|
||||||
if (this.bargainPartake === this.userInfo.uid) this.getBargainStart();
|
|
||||||
else this.getBargainStartUser();
|
|
||||||
this.getBargainHelpCount();
|
|
||||||
},
|
|
||||||
openAlone: function() {
|
|
||||||
this.$yrouter.push({ path: "/detail/" + this.bargain.productId });
|
|
||||||
},
|
|
||||||
mountedStart: function() {
|
|
||||||
var that = this;
|
|
||||||
let url = handleQrCode();
|
|
||||||
if (url) {
|
|
||||||
that.bargainId = url.bargainId;
|
|
||||||
that.partake = url.uid;
|
|
||||||
} else {
|
|
||||||
that.bargainId = that.$yroute.query.id;
|
|
||||||
that.partake = parseInt(that.$yroute.query.partake);
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
this.partake === undefined ||
|
|
||||||
this.partake <= 0 ||
|
|
||||||
isNaN(this.partake)
|
|
||||||
) {
|
|
||||||
that.bargainPartake = that.userInfo.uid;
|
|
||||||
// that.$yrouter.push({
|
|
||||||
// path: "/pages/activity/DargainDetails/index",
|
|
||||||
// query: { id: that.bargainId, partake: that.bargainPartake }
|
|
||||||
// });
|
|
||||||
} else {
|
|
||||||
that.bargainPartake = parseInt(this.partake);
|
|
||||||
}
|
|
||||||
that.getBargainHelpCountStart();
|
|
||||||
that.getBargainDetail();
|
|
||||||
that.getBargainShare(0);
|
|
||||||
// if (that.bargainPartake !== that.userInfo.uid) that.getBargainStartUser();
|
|
||||||
if (that.bargainPartake === that.userInfo.uid) {
|
|
||||||
// that.getBargainStart();
|
|
||||||
} else {
|
|
||||||
that.getBargainStartUser();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
goPay: function() {
|
|
||||||
var data = {};
|
|
||||||
var that = this;
|
|
||||||
data.productId = that.bargain.productId;
|
|
||||||
data.cartNum = that.bargain.num;
|
|
||||||
data.uniqueId = "";
|
|
||||||
data.bargainId = that.bargainId;
|
|
||||||
data.new = 1;
|
|
||||||
postCartAdd(data)
|
|
||||||
.then(res => {
|
|
||||||
that.$yrouter.push({
|
|
||||||
path: "/pages/order/OrderSubmission/index",
|
|
||||||
query: { id: res.data.cartId }
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goPoster: function() {
|
|
||||||
var that = this;
|
|
||||||
that.getBargainShare(that.bargainId);
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/Poster/index",
|
|
||||||
query: { id: that.bargainId, type: 2 }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goList: function() {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/GoodsBargain/index"
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//砍价分享
|
|
||||||
//bargainId 0 获取 查看人数 分享人数 参与人数
|
|
||||||
//bargainId 砍价产品编号 添加分享次数 获取 查看人数 分享人数 参与人数
|
|
||||||
getBargainShare: function(bargainId) {
|
|
||||||
var that = this;
|
|
||||||
getBargainShare({ bargainId: bargainId }).then(res => {
|
|
||||||
that.lookCount = res.data.lookCount;
|
|
||||||
that.shareCount = res.data.shareCount;
|
|
||||||
that.userCount = res.data.userCount;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 获取产品详情
|
|
||||||
getBargainDetail: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainDetail(that.bargainId)
|
|
||||||
.then(res => {
|
|
||||||
res.data.bargain = res.data.bargain.replace(
|
|
||||||
/\<img/gi,
|
|
||||||
'<img style="max-width:100%;height:auto;"'
|
|
||||||
);
|
|
||||||
that.bargain = res.data.bargain;
|
|
||||||
that.datatime = that.bargain.stopTime / 1000;
|
|
||||||
that.getBargainHelpCount();
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//开启砍价
|
|
||||||
getBargainStart: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainStart({ bargainId: that.bargainId })
|
|
||||||
.then(() => {
|
|
||||||
that.bargainPartake = that.userInfo.uid;
|
|
||||||
that.getBargainHelp();
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//参与砍价
|
|
||||||
getBargainHelp: function() {
|
|
||||||
var that = this;
|
|
||||||
if (
|
|
||||||
that.surplusPrice === 0 &&
|
|
||||||
that.bargainPartake !== that.userInfo.uid
|
|
||||||
) {
|
|
||||||
return uni.showToast({
|
|
||||||
title: "好友已经砍价成功",
|
|
||||||
icon: "success",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var data = {
|
|
||||||
bargainId: that.bargainId,
|
|
||||||
bargainUserUid: that.bargainPartake
|
|
||||||
};
|
|
||||||
getBargainHelp(data)
|
|
||||||
.then(res => {
|
|
||||||
that.activeMsg = res.data.status;
|
|
||||||
if (
|
|
||||||
res.data.status === "SUCCESSFUL" &&
|
|
||||||
that.bargainPartake !== that.userInfo.uid
|
|
||||||
) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "您已经砍过了",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
that.helpListStatus = false;
|
|
||||||
that.page = 1;
|
|
||||||
that.bargainHelpList = [];
|
|
||||||
that.getBargainHelpPrice();
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//获取砍掉的金额
|
|
||||||
getBargainHelpPrice: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainHelpPrice({
|
|
||||||
bargainId: that.bargainId,
|
|
||||||
bargainUserUid: that.bargainPartake
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
that.bargainHelpPrice = res.data.price;
|
|
||||||
that.getBargainHelpCount();
|
|
||||||
that.getBargainHelpList();
|
|
||||||
switch (that.activeMsg) {
|
|
||||||
case "SUCCESSFUL":
|
|
||||||
break;
|
|
||||||
case "SUCCESS":
|
|
||||||
that.active = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//砍价帮
|
|
||||||
getBargainHelpList: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.helpListLoading === true) return;
|
|
||||||
if (that.helpListStatus === true) return;
|
|
||||||
that.helpListLoading = true;
|
|
||||||
getBargainHelpList({
|
|
||||||
bargainId: that.bargainId,
|
|
||||||
bargainUserUid: that.bargainPartake,
|
|
||||||
page: that.page,
|
|
||||||
limit: that.limit
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
that.helpListStatus = res.data.length < that.limit;
|
|
||||||
that.helpListLoading = false;
|
|
||||||
that.page++;
|
|
||||||
that.bargainHelpList.push.apply(that.bargainHelpList, res.data);
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getBargainHelpCountStart: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainHelpCount({
|
|
||||||
bargainId: that.bargainId,
|
|
||||||
bargainUserUid: that.bargainPartake
|
|
||||||
})
|
|
||||||
.then(() => {})
|
|
||||||
.catch(() => {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/DargainDetails/index",
|
|
||||||
query: { id: that.bargainId, partake: that.userInfo.uid }
|
|
||||||
});
|
|
||||||
// that.$router.push({
|
|
||||||
// path:
|
|
||||||
// "/activity/dargain_detail/" +
|
|
||||||
// that.bargainId +
|
|
||||||
// "/" +
|
|
||||||
// that.userInfo.uid
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getBargainHelpCount: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainHelpCount({
|
|
||||||
bargainId: that.bargainId,
|
|
||||||
bargainUserUid: that.bargainPartake
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
that.userBargainStatus = res.data.status;
|
|
||||||
that.helpCount = res.data.count;
|
|
||||||
that.surplusPrice = res.data.price;
|
|
||||||
that.alreadyPrice = res.data.alreadyPrice;
|
|
||||||
that.pricePercent = res.data.pricePercent;
|
|
||||||
that.price = (that.bargain.price - that.alreadyPrice).toFixed(2);
|
|
||||||
console.log(that);
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
that.bargainPartake = that.userInfo.uid;
|
|
||||||
// that.$yrouter.push({
|
|
||||||
// path: "/pages/activity/DargainDetails/index",
|
|
||||||
// query: { id: that.bargainId, partake: that.userInfo.uid }
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getBargainStartUser: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainStartUser({
|
|
||||||
bargainId: that.bargainId,
|
|
||||||
bargainUserUid: that.bargainPartake
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
that.bargainUserInfo = res.data;
|
|
||||||
that.getBargainHelpList();
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
close: function() {
|
|
||||||
this.active = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ,
|
|
||||||
// onShareAppMessage() {
|
|
||||||
// return {
|
|
||||||
// path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
page {
|
|
||||||
background-color: #eb3729;
|
|
||||||
}
|
|
||||||
.bargainBnt_hui {
|
|
||||||
font-size: 0.3 * 100rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #fff;
|
|
||||||
width: 6 * 100rpx;
|
|
||||||
height: 0.8 * 100rpx;
|
|
||||||
border-radius: 0.4 * 100rpx;
|
|
||||||
background: #bbb;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 0.8 * 100rpx;
|
|
||||||
margin-top: 0.32 * 100rpx;
|
|
||||||
}
|
|
||||||
.bargain_view {
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 0.48 * 100rpx;
|
|
||||||
background: rgba(0, 0, 0, 0.5);
|
|
||||||
opacity: 1;
|
|
||||||
border-radius: 0 0 0.06 * 100rpx 0.06 * 100rpx;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
font-size: 0.22 * 100rpx;
|
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 0.48 * 100rpx;
|
|
||||||
}
|
|
||||||
.iconfonts {
|
|
||||||
font-size: 0.22 * 100rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="bargain-list">
|
|
||||||
<!-- <view class="header">
|
|
||||||
<image src="@/static/images/cut-bg.png" alt="">
|
|
||||||
</view>-->
|
|
||||||
<view class="list" v-if="bargainLis.length > 0">
|
|
||||||
<view class="item acea-row row-between-wrapper" v-for="(item, bargainLisIndex) in bargainLis"
|
|
||||||
:key="bargainLisIndex">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.image" />
|
|
||||||
</view>
|
|
||||||
<view class="text acea-row row-column-around">
|
|
||||||
<view class="line1" v-text="item.title"></view>
|
|
||||||
<view class="num">
|
|
||||||
<text class="iconfont icon-pintuan"></text>
|
|
||||||
{{ item.people }}人正在参与
|
|
||||||
</view>
|
|
||||||
<view class="money font-color-red">
|
|
||||||
可砍至: ¥
|
|
||||||
<text class="price">{{item.minPrice}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="cutBnt bg-color-red" @click="goDetail(item.id)">
|
|
||||||
<text class="iconfont icon-kanjia"></text>参与砍价
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="load font-color-red" v-if="!status" @click="getBargainList">点击加载更多</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
getBargainList
|
|
||||||
} from "@/api/activity";
|
|
||||||
export default {
|
|
||||||
name: "GoodsBargain",
|
|
||||||
components: {},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
bargainLis: [], //砍价列表
|
|
||||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
|
||||||
loading: false, //当前接口是否请求完成 false 完成 true 未完成
|
|
||||||
page: 1, //页码
|
|
||||||
limit: 20 //数量
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.getBargainList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getBargainList: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.loading) return;
|
|
||||||
if (that.status) return;
|
|
||||||
that.loading = true;
|
|
||||||
getBargainList({
|
|
||||||
page: that.page,
|
|
||||||
limit: that.limit
|
|
||||||
}).then(res => {
|
|
||||||
that.status = res.data.length < that.limit;
|
|
||||||
that.bargainLis.push.apply(that.bargainLis, res.data);
|
|
||||||
that.page++;
|
|
||||||
that.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goDetail: function(id) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/DargainDetails/index",
|
|
||||||
query: {
|
|
||||||
id,
|
|
||||||
partake: 0
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
page {
|
|
||||||
background-color: rgb(245, 245, 245);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="group-list" ref="container">
|
|
||||||
<view class="list" v-if="combinationList.length>0">
|
|
||||||
<view
|
|
||||||
class="item acea-row row-between-wrapper"
|
|
||||||
v-for="(item, combinationListIndex) in combinationList"
|
|
||||||
:key="combinationListIndex"
|
|
||||||
@click="link(item.id)"
|
|
||||||
>
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.image" />
|
|
||||||
</view>
|
|
||||||
<view class="text">
|
|
||||||
<view class="line1" v-text="item.title"></view>
|
|
||||||
<view class="acea-row">
|
|
||||||
<view class="team acea-row row-middle cart-color">
|
|
||||||
<view class="iconfont icon-pintuan"></view>
|
|
||||||
<view class="num" v-text="item.people + '人团'"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="bottom acea-row row-between-wrapper">
|
|
||||||
<view class="money">
|
|
||||||
¥
|
|
||||||
<text class="num" v-text="item.price"></text>
|
|
||||||
<text class="y-money" v-text="'¥' + item.productPrice"></text>
|
|
||||||
</view>
|
|
||||||
<view class="groupBnt bg-color-red">
|
|
||||||
去拼团
|
|
||||||
<text class="iconfont icon-jiantou"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
|
||||||
</view>
|
|
||||||
<view class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
|
|
||||||
<view class="noPictrue">
|
|
||||||
<image :src="webUrl+'/20210203153900181449.png'" class="image" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getCombinationList } from "@/api/activity";
|
|
||||||
import Loading from "@/components/Loading";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "GoodsGroup",
|
|
||||||
components: {
|
|
||||||
Loading
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
|
||||||
combinationList: [],
|
|
||||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
|
||||||
loading: false, //当前接口是否请求完成 false 完成 true 未完成
|
|
||||||
page: 1, //页码
|
|
||||||
limit: 20, //数量
|
|
||||||
loadingList: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
// document.querySelector('body').setAttribute('style', 'background-color:#eb3729');
|
|
||||||
this.getCombinationList();
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
!this.loadingList && this.getCombinationList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getCombinationList: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.loading) return;
|
|
||||||
if (that.status) return;
|
|
||||||
getCombinationList({ page: that.page, limit: that.limit }).then(res => {
|
|
||||||
that.status = res.data.length < that.limit;
|
|
||||||
that.combinationList.push.apply(that.combinationList, res.data);
|
|
||||||
that.page++;
|
|
||||||
that.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
link: function(id) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/GroupDetails/index",
|
|
||||||
query: { id }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,261 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="flash-sale" ref="container">
|
|
||||||
<view class="header" v-if="headerImg">
|
|
||||||
<image :src="headerImg"/>
|
|
||||||
</view>
|
|
||||||
<scroll-view scroll-y="false" scroll-x="true">
|
|
||||||
<view class="timeScroll">
|
|
||||||
<view v-for="(item, index) in timeList" :key="index">
|
|
||||||
<view v-if="active==index" class="timeItem active" @click="setTime(index)">
|
|
||||||
<view class="time">{{ item.time }}</view>
|
|
||||||
<view class="state">{{ item.state }}</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="active!=index" class="timeItem" @click="setTime(index)">
|
|
||||||
<view class="time">{{ item.time }}</view>
|
|
||||||
<view class="state">{{ item.state }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
<view v-for="(item, index) in timeList" :key="index">
|
|
||||||
<view v-if="active == index">
|
|
||||||
<view class="countDown font-color-red acea-row row-center-wrapper">
|
|
||||||
<view v-if="item.status === 0" class="activity">活动已结束</view>
|
|
||||||
<count-down
|
|
||||||
:isDay="false"
|
|
||||||
:tipText="'距结束仅剩 '"
|
|
||||||
:dayText="false"
|
|
||||||
:hourText="' : '"
|
|
||||||
:minuteText="' : '"
|
|
||||||
:secondText="false"
|
|
||||||
:datatime="datatime"
|
|
||||||
v-if="item.status === 1"
|
|
||||||
></count-down>
|
|
||||||
<view v-if="item.status === 2" class="activity">活动即将开始</view>
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
|
||||||
<view
|
|
||||||
class="item acea-row row-between-wrapper"
|
|
||||||
v-for="(itemSeckill, indexSeckill) in seckillList"
|
|
||||||
:key="indexSeckill"
|
|
||||||
>
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="itemSeckill.image"/>
|
|
||||||
</view>
|
|
||||||
<view class="text acea-row row-column-around">
|
|
||||||
<view class="line1" v-text="itemSeckill.title"></view>
|
|
||||||
<view class="money">
|
|
||||||
限时价
|
|
||||||
<text class="num font-color-red" v-text="'¥' + itemSeckill.price"></text>
|
|
||||||
</view>
|
|
||||||
<view class="progress cart-color">
|
|
||||||
<view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view>
|
|
||||||
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="grab bg-color-red"
|
|
||||||
v-if="item.status === 1 && itemSeckill.stock > 0"
|
|
||||||
@click="goDetail(itemSeckill.id)"
|
|
||||||
>马上抢
|
|
||||||
</view>
|
|
||||||
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
|
||||||
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
|
||||||
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="noCommodity"
|
|
||||||
style="background-color: #fff;"
|
|
||||||
v-if="seckillList.length === 0 && page > 1"
|
|
||||||
>
|
|
||||||
<view class="noPictrue">
|
|
||||||
<image :src="webUrl+'/20210203153900181449.png'" class="image"/>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import {getSeckillConfig, getSeckillList} from "@/api/activity";
|
|
||||||
import CountDown from "@/components/CountDown";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "GoodsSeckill",
|
|
||||||
components: {
|
|
||||||
CountDown
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function () {
|
|
||||||
return {
|
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
|
||||||
headerImg: "",
|
|
||||||
timeList: [],
|
|
||||||
sticky: false,
|
|
||||||
loading: false,
|
|
||||||
datatime: 0,
|
|
||||||
active: 0,
|
|
||||||
seckillList: [],
|
|
||||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
|
||||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
|
||||||
page: 1, //页码
|
|
||||||
limit: 5, //数量
|
|
||||||
title: []
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function () {
|
|
||||||
this.mountedStart();
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
!this.loadingList && this.getSeckillList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeTime: function (index) {
|
|
||||||
this.active = index;
|
|
||||||
this.getSeckillList();
|
|
||||||
},
|
|
||||||
mountedStart: function () {
|
|
||||||
var that = this;
|
|
||||||
uni.showLoading();
|
|
||||||
getSeckillConfig().then(res => {
|
|
||||||
that.$set(that, "headerImg", res.data.lovely);
|
|
||||||
that.$set(that, "timeList", res.data.seckillTime);
|
|
||||||
that.$set(that, "active", res.data.seckillTimeIndex);
|
|
||||||
|
|
||||||
let title = [];
|
|
||||||
title = res.data.seckillTime.map((item, index) => {
|
|
||||||
return {
|
|
||||||
name: "div",
|
|
||||||
attrs: {
|
|
||||||
class: "timeItem"
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "div",
|
|
||||||
attrs: {
|
|
||||||
class: "time"
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
type: "text",
|
|
||||||
text: item.time
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "div",
|
|
||||||
attrs: {
|
|
||||||
class: "state"
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
type: "text",
|
|
||||||
text: item.state
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
});
|
|
||||||
that.$set(that, "title", title);
|
|
||||||
that.datatime = that.timeList[that.active].stop;
|
|
||||||
that.getSeckillList();
|
|
||||||
that.$nextTick(function () {
|
|
||||||
that.sticky = true;
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setTime: function (index) {
|
|
||||||
var that = this;
|
|
||||||
that.page = 1;
|
|
||||||
that.loadingList = false;
|
|
||||||
that.status = false;
|
|
||||||
that.active = index;
|
|
||||||
that.datatime = that.timeList[that.active].stop;
|
|
||||||
this.seckillList = [];
|
|
||||||
that.getSeckillList();
|
|
||||||
},
|
|
||||||
getSeckillList: function () {
|
|
||||||
var that = this;
|
|
||||||
if (that.loadingList) return;
|
|
||||||
if (that.status) return;
|
|
||||||
var time = that.timeList[that.active].id;
|
|
||||||
getSeckillList(time, {
|
|
||||||
page: that.page,
|
|
||||||
limit: that.limit
|
|
||||||
}).then(res => {
|
|
||||||
that.status = res.data.length < that.limit;
|
|
||||||
that.seckillList.push.apply(that.seckillList, res.data);
|
|
||||||
that.page++;
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goDetail: function (id) {
|
|
||||||
var that = this;
|
|
||||||
var time = that.timeList[that.active].stop;
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/SeckillDetails/index",
|
|
||||||
query: {
|
|
||||||
id,
|
|
||||||
time
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.timeScroll {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeItem {
|
|
||||||
font-size: 0.22 * 100rpx;
|
|
||||||
color: #282828;
|
|
||||||
width: 150rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: 0.11 * 100rpx 0;
|
|
||||||
background-color: none;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
.time {
|
|
||||||
color: #eb3729;
|
|
||||||
}
|
|
||||||
|
|
||||||
.state {
|
|
||||||
background-color: #eb3729;
|
|
||||||
color: #fff;
|
|
||||||
opacity: 1;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
padding: 0 0.2 * 100rpx;
|
|
||||||
font-weight: 800;
|
|
||||||
height: 0.37 * 100rpx;
|
|
||||||
line-height: 0.37 * 100rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeItem .time {
|
|
||||||
font-size: 0.32 * 100rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
height: 0.37 * 100rpx;
|
|
||||||
line-height: 0.37 * 100rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeItem .state {
|
|
||||||
height: 0.37 * 100rpx;
|
|
||||||
line-height: 0.37 * 100rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flash-sale .list .item .grab {
|
|
||||||
background-color: #999;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,375 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
|
|
||||||
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="share acea-row row-between row-bottom">
|
|
||||||
<view class="money font-color-red">
|
|
||||||
¥
|
|
||||||
<text class="num" v-text="storeInfo.price"></text>
|
|
||||||
<text class="y-money" v-text="'¥' + storeInfo.productPrice"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="introduce" v-text="storeInfo.title"></view>
|
|
||||||
<view class="label acea-row row-between-wrapper">
|
|
||||||
<view v-text="'类型:' + storeInfo.people + '人团'"></view>
|
|
||||||
<view v-text="'库存:' + storeInfo.stock + storeInfo.unitName"></view>
|
|
||||||
<view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="notice acea-row row-middle">
|
|
||||||
<view class="num font-color-red">
|
|
||||||
<text class="iconfont icon-laba"></text>
|
|
||||||
已拼{{ storeInfo.sales
|
|
||||||
}}{{ storeInfo.unitName }}
|
|
||||||
<text class="line">|</text>
|
|
||||||
</view>
|
|
||||||
<view class="swiper-no-swiping swiper">
|
|
||||||
<swiper class="swiper-wrapper" :options="swiperTip" :autoplay="true" :interval="3000">
|
|
||||||
<block v-for="(item, itemNewIndex) in itemNew" :key="itemNewIndex">
|
|
||||||
<swiper-item>
|
|
||||||
<view class="line1">{{ item }}</view>
|
|
||||||
</swiper-item>
|
|
||||||
</block>
|
|
||||||
</swiper>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="assemble">
|
|
||||||
<view v-for="(item, groupListindex) in groupList" :key="groupListindex">
|
|
||||||
<view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
|
|
||||||
<view class="pictxt acea-row row-between-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.avatar" class="image" />
|
|
||||||
</view>
|
|
||||||
<view class="text line1" v-text="item.nickname"></view>
|
|
||||||
</view>
|
|
||||||
<view class="right acea-row row-middle">
|
|
||||||
<view>
|
|
||||||
<view class="lack">
|
|
||||||
<text>还差</text>
|
|
||||||
<text class="font-color-red" v-text="item.count"></text>
|
|
||||||
<text>人成团</text>
|
|
||||||
</view>
|
|
||||||
<count-down
|
|
||||||
:isDay="false"
|
|
||||||
:tipText="'剩余 '"
|
|
||||||
:dayText="false"
|
|
||||||
:hourText="':'"
|
|
||||||
:minuteText="':'"
|
|
||||||
:secondText="false"
|
|
||||||
:datatime="item.stopTime/1000"
|
|
||||||
></count-down>
|
|
||||||
</view>
|
|
||||||
<view class="spellBnt" @click="groupRule(item.id)">
|
|
||||||
去拼单
|
|
||||||
<text class="iconfont icon-jiantou"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="more" v-if="groupList.length > groupListCount" @click="setGroupListCount">
|
|
||||||
查看更多
|
|
||||||
<text class="iconfont icon-xiangxia"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="playWay">
|
|
||||||
<view class="title acea-row row-between-wrapper">
|
|
||||||
<view>拼团玩法</view>
|
|
||||||
</view>
|
|
||||||
<view class="way acea-row row-middle">
|
|
||||||
<view class="item">
|
|
||||||
<text class="num">①</text>开团/参团
|
|
||||||
</view>
|
|
||||||
<view class="iconfont icon-arrow"></view>
|
|
||||||
<view class="item">
|
|
||||||
<text class="num">②</text>邀请好友
|
|
||||||
</view>
|
|
||||||
<view class="iconfont icon-arrow"></view>
|
|
||||||
<view class="item">
|
|
||||||
<view>
|
|
||||||
<text class="num">③</text>满员发货
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="userEvaluation">
|
|
||||||
<view class="title acea-row row-between-wrapper">
|
|
||||||
<view v-text="'用户评价(' + replyCount + ')'"></view>
|
|
||||||
<view class="praise" @click="goReply">
|
|
||||||
<text class="font-color-red" v-text="replyChance + '%'"></text>好评率
|
|
||||||
<text class="iconfont icon-jiantou"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<UserEvaluation :reply="reply"></UserEvaluation>
|
|
||||||
</view>
|
|
||||||
<view class="product-intro">
|
|
||||||
<view class="title">产品介绍</view>
|
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
|
||||||
<!-- <view class="conter" v-html=""></view> -->
|
|
||||||
</view>
|
|
||||||
<view style="height:100rpx;"></view>
|
|
||||||
<view class="footer-group acea-row row-between-wrapper">
|
|
||||||
<!-- <view class="customerSer acea-row row-center-wrapper row-column">
|
|
||||||
<view class="iconfont icon-kefu"></view>
|
|
||||||
<view>客服</view>
|
|
||||||
</view>-->
|
|
||||||
<view class="customerSer acea-row row-center-wrapper row-column" @click="setCollect">
|
|
||||||
<view class="iconfont" :class="userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
|
||||||
<text>收藏</text>
|
|
||||||
</view>
|
|
||||||
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
|
|
||||||
<view class="bnt bg-color-red" @click="openTeam">立即开团</view>
|
|
||||||
</view>
|
|
||||||
<ProductWindow v-if="cartNum" v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
|
||||||
<StorePoster
|
|
||||||
v-on:setPosterImageStatus="setPosterImageStatus"
|
|
||||||
:posterImageStatus="posterImageStatus"
|
|
||||||
:posterData="posterData"
|
|
||||||
></StorePoster>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
|
||||||
|
|
||||||
import ProductConSwiper from "@/components/ProductConSwiper";
|
|
||||||
import CountDown from "@/components/CountDown";
|
|
||||||
import UserEvaluation from "@/components/UserEvaluation";
|
|
||||||
import ProductWindow from "@/components/ProductWindow";
|
|
||||||
import StorePoster from "@/components/StorePoster";
|
|
||||||
import { getCombinationDetail } from "@/api/activity";
|
|
||||||
import { postCartAdd } from "@/api/store";
|
|
||||||
import { imageBase64 } from "@/api/public";
|
|
||||||
import {
|
|
||||||
getCoupon,
|
|
||||||
getCollectAdd,
|
|
||||||
getCollectDel,
|
|
||||||
getUserInfo
|
|
||||||
} from "@/api/user";
|
|
||||||
const NAME = "GroupDetails";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "GroupDetails",
|
|
||||||
components: {
|
|
||||||
ProductConSwiper,
|
|
||||||
CountDown,
|
|
||||||
UserEvaluation,
|
|
||||||
// swiper,
|
|
||||||
// swiperSlide,
|
|
||||||
ProductWindow,
|
|
||||||
StorePoster
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
domStatus: false,
|
|
||||||
posterData: {
|
|
||||||
image: "",
|
|
||||||
title: "",
|
|
||||||
price: "",
|
|
||||||
code: ""
|
|
||||||
},
|
|
||||||
posterImageStatus: false,
|
|
||||||
reply: [],
|
|
||||||
replyCount: 0,
|
|
||||||
replyChance: 0,
|
|
||||||
imgUrls: [],
|
|
||||||
storeInfo: {},
|
|
||||||
itemNew: {},
|
|
||||||
groupListCount: 2,
|
|
||||||
groupList: {},
|
|
||||||
swiperTip: {
|
|
||||||
direction: "vertical",
|
|
||||||
autoplay: {
|
|
||||||
disableOnInteraction: false,
|
|
||||||
delay: 2000
|
|
||||||
},
|
|
||||||
loop: true,
|
|
||||||
speed: 1000,
|
|
||||||
observer: true,
|
|
||||||
observeParents: true
|
|
||||||
},
|
|
||||||
attr: {
|
|
||||||
cartAttr: false,
|
|
||||||
productSelect: {
|
|
||||||
image: "",
|
|
||||||
store_name: "",
|
|
||||||
price: "",
|
|
||||||
stock: "",
|
|
||||||
unique: "",
|
|
||||||
cart_num: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cartNum: 1,
|
|
||||||
userCollect: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$yroute: function(n) {
|
|
||||||
var that = this;
|
|
||||||
if (n.name === NAME) {
|
|
||||||
that.mountedStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow: function() {
|
|
||||||
this.mountedStart();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
openAlone: function() {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/shop/GoodsCon/index",
|
|
||||||
query: { id: this.storeInfo.productId }
|
|
||||||
});
|
|
||||||
// this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
|
|
||||||
},
|
|
||||||
//收藏商品
|
|
||||||
setCollect: function() {
|
|
||||||
let that = this,
|
|
||||||
id = that.storeInfo.id,
|
|
||||||
category = "product";
|
|
||||||
if (that.userCollect) {
|
|
||||||
getCollectDel(id, category).then(function() {
|
|
||||||
that.userCollect = !that.userCollect;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
getCollectAdd(id, category).then(function() {
|
|
||||||
that.userCollect = !that.userCollect;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mountedStart: function() {
|
|
||||||
var that = this;
|
|
||||||
let id = that.$yroute.query.id;
|
|
||||||
getCombinationDetail(id).then(res => {
|
|
||||||
that.userCollect = res.data.userCollect;
|
|
||||||
res.data.storeInfo.description = res.data.storeInfo.description.replace(
|
|
||||||
/\<img/gi,
|
|
||||||
'<img style="max-width:100%;height:auto;"'
|
|
||||||
);
|
|
||||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
|
||||||
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
|
|
||||||
that.$set(that, "itemNew", res.data.pinkOkList);
|
|
||||||
that.$set(that, "groupList", res.data.pink);
|
|
||||||
that.$set(that, "reply", [res.data.reply]);
|
|
||||||
that.$set(that, "replyCount", res.data.replyCount);
|
|
||||||
that.$set(that, "replyChance", res.data.replyChance);
|
|
||||||
that.setProductSelect();
|
|
||||||
that.posterData.image = that.storeInfo.image;
|
|
||||||
if (that.storeInfo.title.length > 30) {
|
|
||||||
that.posterData.title = that.storeInfo.title.substring(0, 30) + "...";
|
|
||||||
} else {
|
|
||||||
that.posterData.title = that.storeInfo.title;
|
|
||||||
}
|
|
||||||
that.posterData.price = that.storeInfo.price;
|
|
||||||
that.posterData.code = that.storeInfo.code_base;
|
|
||||||
that.domStatus = true;
|
|
||||||
//that.getImageBase64();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getImageBase64: function() {
|
|
||||||
let that = this;
|
|
||||||
imageBase64(this.posterData.image, that.posterData.code).then(res => {
|
|
||||||
that.posterData.image = res.data.image;
|
|
||||||
that.posterData.code = res.data.code;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setPosterImageStatus: function() {
|
|
||||||
// var sTop = document.body || document.documentElement;
|
|
||||||
// sTop.scrollTop = 0;
|
|
||||||
this.posterImageStatus = !this.posterImageStatus;
|
|
||||||
},
|
|
||||||
groupRule: function(id) {
|
|
||||||
var that = this;
|
|
||||||
that.$yrouter.push({
|
|
||||||
path: "/pages/activity/GroupRule/index",
|
|
||||||
query: { id }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goReply: function() {
|
|
||||||
var that = this;
|
|
||||||
that.$yrouter.push({
|
|
||||||
path: "/pages/shop/EvaluateList/index",
|
|
||||||
query: { id: that.storeInfo.product_id }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setGroupListCount: function() {
|
|
||||||
this.groupListCount = this.groupListCount + 2;
|
|
||||||
},
|
|
||||||
//将父级向子集多次传送的函数合二为一;
|
|
||||||
changeFun: function(opt) {
|
|
||||||
if (typeof opt !== "object") opt = {};
|
|
||||||
let action = opt.action || "";
|
|
||||||
let value = opt.value === undefined ? "" : opt.value;
|
|
||||||
this[action] && this[action](value);
|
|
||||||
},
|
|
||||||
changeattr: function(res) {
|
|
||||||
var that = this;
|
|
||||||
that.attr.cartAttr = res;
|
|
||||||
},
|
|
||||||
ChangeCartNum: function(res) {
|
|
||||||
var that = this;
|
|
||||||
that.attr.productSelect.cart_num = 1;
|
|
||||||
that.cartNum = 1;
|
|
||||||
uni.showToast({
|
|
||||||
title: "每人每次限购1" + that.storeInfo.unitName,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setProductSelect: function() {
|
|
||||||
var that = this;
|
|
||||||
var attr = that.attr;
|
|
||||||
attr.productSelect.image = that.storeInfo.image;
|
|
||||||
attr.productSelect.store_name = that.storeInfo.title;
|
|
||||||
attr.productSelect.price = that.storeInfo.price;
|
|
||||||
attr.productSelect.stock = that.storeInfo.stock;
|
|
||||||
attr.cartAttr = false;
|
|
||||||
that.$set(that, "attr", attr);
|
|
||||||
},
|
|
||||||
openTeam: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.attr.cartAttr == false) {
|
|
||||||
that.attr.cartAttr = !this.attr.cartAttr;
|
|
||||||
} else {
|
|
||||||
var data = {};
|
|
||||||
data.productId = that.storeInfo.productId;
|
|
||||||
data.cartNum = that.attr.productSelect.cart_num;
|
|
||||||
data.uniqueId = that.attr.productSelect.unique;
|
|
||||||
data.combinationId = that.storeInfo.id;
|
|
||||||
data.new = 1;
|
|
||||||
postCartAdd(data)
|
|
||||||
.then(res => {
|
|
||||||
that.$yrouter.push({
|
|
||||||
path: "/pages/order/OrderSubmission/index",
|
|
||||||
query: { id: res.data.cartId }
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.product-con .wrapper {
|
|
||||||
padding-bottom: 0.26 * 100rpx;
|
|
||||||
}
|
|
||||||
.noscroll {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.product-con .footer-group .bnt {
|
|
||||||
// flex:1;
|
|
||||||
width: 43%;
|
|
||||||
}
|
|
||||||
.product-con .footer-group .bnt.bg-color-violet {
|
|
||||||
background-color: #fa8013;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,248 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="group-con">
|
|
||||||
<view class="header acea-row row-between-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="storeCombination.image" />
|
|
||||||
</view>
|
|
||||||
<view class="text">
|
|
||||||
<view class="line1" v-text="storeCombination.title"></view>
|
|
||||||
<view class="money">
|
|
||||||
<text>¥</text>
|
|
||||||
<text class="num" v-text="storeCombination.price"></text>
|
|
||||||
<text class="team cart-color" v-text="storeCombination.people + '人拼'"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view>
|
|
||||||
<view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view>
|
|
||||||
</view>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="title acea-row row-center-wrapper">
|
|
||||||
<view class="line"></view>
|
|
||||||
<view class="name acea-row row-center-wrapper">
|
|
||||||
<text>剩余</text>
|
|
||||||
<count-down
|
|
||||||
:isDay="false"
|
|
||||||
:tipText="false"
|
|
||||||
:dayText="false"
|
|
||||||
:hourText="' : '"
|
|
||||||
:minuteText="' : '"
|
|
||||||
:secondText="false"
|
|
||||||
:datatime="pinkT.stopTime/1000"
|
|
||||||
></count-down>
|
|
||||||
<text>结束</text>
|
|
||||||
</view>
|
|
||||||
<view class="line"></view>
|
|
||||||
</view>
|
|
||||||
<view class="tips-warp">
|
|
||||||
<text class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</text>
|
|
||||||
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text>
|
|
||||||
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="list acea-row row-middle"
|
|
||||||
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']"
|
|
||||||
>
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="pinkT.avatar" />
|
|
||||||
</view>
|
|
||||||
<view class="acea-row row-middle" v-if="pinkAll.length > 0">
|
|
||||||
<view class="pictrue" v-for="(item, pinkAllIndex) in pinkAll" :key="pinkAllIndex">
|
|
||||||
<image :src="item.avatar" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="pictrue" v-for="countIndex in count" :key="countIndex">
|
|
||||||
<image class="img-none" :src="webUrl+'/20230304204903336964.png'" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9"
|
|
||||||
class="lookAll acea-row row-center-wrapper"
|
|
||||||
@click="lookAll"
|
|
||||||
>
|
|
||||||
{{ iShidden ? "收起" : "查看全部" }}
|
|
||||||
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="teamBnt bg-color-red"
|
|
||||||
v-if="userBool === 1 && isOk == 0 && pinkBool === 0"
|
|
||||||
@click="goPoster"
|
|
||||||
>邀请好友参团</view>
|
|
||||||
<view
|
|
||||||
class="teamBnt bg-color-red"
|
|
||||||
v-else-if="userBool === 0 && pinkBool === 0 && count > 0"
|
|
||||||
@click="pay"
|
|
||||||
>我要参团</view>
|
|
||||||
<view
|
|
||||||
class="teamBnt bg-color-red"
|
|
||||||
v-if="pinkBool === 1 || pinkBool === -1"
|
|
||||||
@click="goDetail(storeCombination.id)"
|
|
||||||
>再次开团</view>
|
|
||||||
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
|
|
||||||
<text class="iconfont icon-guanbi3"></text>
|
|
||||||
<text>取消开团</text>
|
|
||||||
</view>
|
|
||||||
<view class="lookOrder" v-if="pinkBool === 1" @click="goOrder">
|
|
||||||
<text>查看订单信息</text>
|
|
||||||
<text class="iconfont icon-xiangyou"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import CountDown from "@/components/CountDown";
|
|
||||||
import { getCombinationPink, getCombinationRemove } from "@/api/activity";
|
|
||||||
import { postCartAdd } from "@/api/store";
|
|
||||||
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
|
||||||
|
|
||||||
const NAME = "GroupRule";
|
|
||||||
export default {
|
|
||||||
name: NAME,
|
|
||||||
components: {
|
|
||||||
CountDown
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
|
||||||
currentPinkOrder: "", //当前拼团订单
|
|
||||||
isOk: 0, //判断拼团是否完成
|
|
||||||
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功
|
|
||||||
userBool: 0, //判断当前用户是否在团内|0=未在,1=在
|
|
||||||
pinkAll: [], //团员
|
|
||||||
pinkT: [], //团长信息
|
|
||||||
storeCombination: [], //拼团产品
|
|
||||||
pinkId: 0,
|
|
||||||
count: 0, //拼团剩余人数
|
|
||||||
iShidden: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$yroute(n) {
|
|
||||||
var that = this;
|
|
||||||
if (n.name === NAME) {
|
|
||||||
that.pinkId = that.$yroute.query.id;
|
|
||||||
that.getCombinationPink();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
var that = this;
|
|
||||||
let url = handleQrCode();
|
|
||||||
if (url) {
|
|
||||||
that.pinkId = url.pinkId;
|
|
||||||
} else {
|
|
||||||
that.pinkId = that.$yroute.query.id;
|
|
||||||
}
|
|
||||||
that.getCombinationPink();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
pay: function() {
|
|
||||||
var that = this;
|
|
||||||
var data = {};
|
|
||||||
data.productId = that.storeCombination.productId;
|
|
||||||
data.cartNum = that.pinkT.totalNum;
|
|
||||||
data.uniqueId = "";
|
|
||||||
data.combinationId = that.storeCombination.id;
|
|
||||||
data.new = 1;
|
|
||||||
postCartAdd(data)
|
|
||||||
.then(res => {
|
|
||||||
that.$yrouter.push({
|
|
||||||
path: "/pages/order/OrderSubmission/index",
|
|
||||||
query: {
|
|
||||||
id: res.data.cartId,
|
|
||||||
pinkid: that.pinkId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goPoster: function() {
|
|
||||||
var that = this;
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/Poster/index",
|
|
||||||
query: {
|
|
||||||
id: that.pinkId,
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goOrder: function() {
|
|
||||||
var that = this;
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/order/OrderDetails/index",
|
|
||||||
query: {
|
|
||||||
id: that.currentPinkOrder
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//拼团列表
|
|
||||||
goList: function() {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/GoodsGroup/index"
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//拼团详情
|
|
||||||
goDetail: function(id) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/GroupDetails/index",
|
|
||||||
query: {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//拼团信息
|
|
||||||
getCombinationPink: function() {
|
|
||||||
var that = this;
|
|
||||||
getCombinationPink(that.pinkId).then(res => {
|
|
||||||
that.$set(that, "storeCombination", res.data.storeCombination);
|
|
||||||
that.$set(that, "pinkT", res.data.pinkT);
|
|
||||||
that.$set(that, "pinkAll", res.data.pinkAll);
|
|
||||||
that.$set(that, "count", res.data.count);
|
|
||||||
that.$set(that, "userBool", res.data.userBool);
|
|
||||||
that.$set(that, "pinkBool", res.data.pinkBool);
|
|
||||||
that.$set(that, "isOk", res.data.isOk);
|
|
||||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//拼团取消
|
|
||||||
getCombinationRemove: function() {
|
|
||||||
var that = this;
|
|
||||||
getCombinationRemove({
|
|
||||||
id: that.pinkId,
|
|
||||||
cid: that.storeCombination.id
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
lookAll: function() {
|
|
||||||
this.iShidden = !this.iShidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
.tips-warp {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="poster-poster" v-if="status === false">
|
|
||||||
<view class="tip">
|
|
||||||
<text class="iconfont icon-shuoming"></text>提示:长按图片保存至手机相册
|
|
||||||
</view>
|
|
||||||
<view class="poster">
|
|
||||||
<image :src="image" mode="widthFix" show-menu-by-longpress />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getBargainPoster, getCombinationPoster } from "@/api/activity";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Poster",
|
|
||||||
components: {},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
status: true,
|
|
||||||
id: 0,
|
|
||||||
image: ""
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
var that = this;
|
|
||||||
var id = that.$yroute.query.id;
|
|
||||||
var type = that.$yroute.query.type;
|
|
||||||
that.id = id;
|
|
||||||
if (type == 2) {
|
|
||||||
that.getBargainPoster();
|
|
||||||
} else {
|
|
||||||
that.getCombinationPoster();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getBargainPoster: function() {
|
|
||||||
var that = this;
|
|
||||||
getBargainPoster({ bargainId: that.id, from: "wechat" })
|
|
||||||
.then(res => {
|
|
||||||
that.image = res.data.url;
|
|
||||||
that.status = false;
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 拼团海报
|
|
||||||
getCombinationPoster: function() {
|
|
||||||
var that = this;
|
|
||||||
getCombinationPoster({ id: that.id, from: "wechat" })
|
|
||||||
.then(res => {
|
|
||||||
that.image = res.data.url;
|
|
||||||
that.status = false;
|
|
||||||
})
|
|
||||||
.catch(res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
page {
|
|
||||||
background-color: #eb3729;
|
|
||||||
}
|
|
||||||
.poster-poster {
|
|
||||||
height: unset !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,235 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
|
|
||||||
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
|
|
||||||
<view class="nav acea-row row-between-wrapper">
|
|
||||||
<view class="money">
|
|
||||||
¥
|
|
||||||
<text class="num" v-text="storeInfo.price"></text>
|
|
||||||
<text class="y-money" v-text="'¥' + storeInfo.price"></text>
|
|
||||||
</view>
|
|
||||||
<view class="acea-row row-middle">
|
|
||||||
<view class="times">
|
|
||||||
<view>距秒杀结束仅剩</view>
|
|
||||||
<count-down
|
|
||||||
:isDay="false"
|
|
||||||
:tipText="false"
|
|
||||||
:dayText="false"
|
|
||||||
:hourText="' : '"
|
|
||||||
:minuteText="' : '"
|
|
||||||
:secondText="false"
|
|
||||||
:datatime="datatime"
|
|
||||||
></count-down>
|
|
||||||
</view>
|
|
||||||
<view class="iconfont icon-jiantou"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="wrapperRush">
|
|
||||||
<view class="introduce acea-row row-between">
|
|
||||||
<view class="infor" v-text="storeInfo.title"></view>
|
|
||||||
<!-- <view class="iconfont icon-fenxiang" @click="setPosterImageStatus"></view> -->
|
|
||||||
</view>
|
|
||||||
<view class="label acea-row row-middle">
|
|
||||||
<view class="stock" v-text="'库存:' + storeInfo.stock + '件'"></view>
|
|
||||||
<view v-text="'销量:' + storeInfo.sales + '件'"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="product-intro">
|
|
||||||
<view class="title">产品介绍</view>
|
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
|
||||||
</view>
|
|
||||||
<view style="height:100rpx;"></view>
|
|
||||||
<view class="footerRush acea-row row-between-wrapper">
|
|
||||||
<!-- <view
|
|
||||||
class="customerSer acea-row row-center-wrapper row-column"
|
|
||||||
@click="routerGo()"
|
|
||||||
>
|
|
||||||
<view class="iconfont icon-kefu"></view>
|
|
||||||
<view>客服</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
|
|
||||||
</view>
|
|
||||||
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
|
||||||
<StorePoster
|
|
||||||
v-on:setPosterImageStatus="setPosterImageStatus"
|
|
||||||
:posterImageStatus="posterImageStatus"
|
|
||||||
:posterData="posterData"
|
|
||||||
></StorePoster>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.noscroll {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
import ProductConSwiper from "@/components/ProductConSwiper";
|
|
||||||
import CountDown from "@/components/CountDown";
|
|
||||||
import ProductWindow from "@/components/ProductWindow";
|
|
||||||
import StorePoster from "@/components/StorePoster";
|
|
||||||
import { getSeckillDetail } from "@/api/activity";
|
|
||||||
import { postCartAdd } from "@/api/store";
|
|
||||||
import { imageBase64 } from "@/api/public";
|
|
||||||
const NAME = "SeckillDetails";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "SeckillDetails",
|
|
||||||
components: {
|
|
||||||
ProductConSwiper,
|
|
||||||
CountDown,
|
|
||||||
ProductWindow,
|
|
||||||
StorePoster
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
domStatus: false,
|
|
||||||
posterData: {
|
|
||||||
image: "",
|
|
||||||
title: "",
|
|
||||||
price: "",
|
|
||||||
code: ""
|
|
||||||
},
|
|
||||||
posterImageStatus: false,
|
|
||||||
action: "",
|
|
||||||
imgUrls: [],
|
|
||||||
storeInfo: [],
|
|
||||||
replyCount: 0,
|
|
||||||
reply: [],
|
|
||||||
cartNum: 1,
|
|
||||||
attr: {
|
|
||||||
cartAttr: false,
|
|
||||||
productSelect: {
|
|
||||||
image: "",
|
|
||||||
store_name: "",
|
|
||||||
price: "",
|
|
||||||
stock: "",
|
|
||||||
unique: "",
|
|
||||||
cart_num: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
datatime: 0
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$yroute: function(n) {
|
|
||||||
var that = this;
|
|
||||||
if (n.name === NAME) {
|
|
||||||
that.mountedStart();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.mountedStart();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
routerGo(item) {
|
|
||||||
this.$yrouter.push({ path: '/pages/user/CustomerList/index' })
|
|
||||||
},
|
|
||||||
mountedStart: function() {
|
|
||||||
var that = this;
|
|
||||||
let id = that.$yroute.query.id;
|
|
||||||
that.datatime = parseInt(that.$yroute.query.time);
|
|
||||||
getSeckillDetail(id).then(res => {
|
|
||||||
res.data.storeInfo.description = res.data.storeInfo.description.replace(
|
|
||||||
/\<img/gi,
|
|
||||||
'<img style="max-width:100%;height:auto;"'
|
|
||||||
);
|
|
||||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
|
||||||
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
|
|
||||||
that.$set(that, "replyCount", res.data.replyCount);
|
|
||||||
that.$set(that, "reply", res.data.reply);
|
|
||||||
that.posterData.image = that.storeInfo.image_base;
|
|
||||||
that.updateTitle();
|
|
||||||
if (that.storeInfo.title.length > 30) {
|
|
||||||
that.posterData.title = that.storeInfo.title.substring(0, 30) + "...";
|
|
||||||
} else {
|
|
||||||
that.posterData.title = that.storeInfo.title;
|
|
||||||
}
|
|
||||||
that.posterData.price = that.storeInfo.price;
|
|
||||||
that.posterData.code = that.storeInfo.code_base;
|
|
||||||
that.setProductSelect();
|
|
||||||
that.domStatus = true;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
updateTitle() {
|
|
||||||
// document.title = this.storeInfo.title || this.$yroute.meta.title;
|
|
||||||
},
|
|
||||||
setPosterImageStatus: function() {
|
|
||||||
// var sTop = document.body || document.documentElement;
|
|
||||||
// sTop.scrollTop = 0;
|
|
||||||
this.posterImageStatus = !this.posterImageStatus;
|
|
||||||
},
|
|
||||||
//将父级向子集多次传送的函数合二为一;
|
|
||||||
changeFun: function(opt) {
|
|
||||||
if (typeof opt !== "object") opt = {};
|
|
||||||
let action = opt.action || "";
|
|
||||||
let value = opt.value === undefined ? "" : opt.value;
|
|
||||||
this[action] && this[action](value);
|
|
||||||
},
|
|
||||||
changeattr: function(res) {
|
|
||||||
var that = this;
|
|
||||||
that.attr.cartAttr = res;
|
|
||||||
},
|
|
||||||
ChangeCartNum: function(res) {
|
|
||||||
var that = this;
|
|
||||||
if (res) {
|
|
||||||
if (that.attr.productSelect.cart_num < that.storeInfo.stock) {
|
|
||||||
that.attr.productSelect.cart_num++;
|
|
||||||
this.cartNum++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (that.attr.productSelect.cart_num > 1) {
|
|
||||||
that.attr.productSelect.cart_num--;
|
|
||||||
this.cartNum--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setProductSelect: function() {
|
|
||||||
var that = this;
|
|
||||||
var attr = that.attr;
|
|
||||||
attr.productSelect.image = that.storeInfo.image;
|
|
||||||
attr.productSelect.store_name = that.storeInfo.title;
|
|
||||||
attr.productSelect.price = that.storeInfo.price;
|
|
||||||
attr.productSelect.stock = that.storeInfo.stock;
|
|
||||||
attr.cartAttr = false;
|
|
||||||
that.$set(that, "attr", attr);
|
|
||||||
},
|
|
||||||
selecAttrTap: function() {
|
|
||||||
this.cartAttr = true;
|
|
||||||
},
|
|
||||||
tapBuy: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.attr.cartAttr == false) {
|
|
||||||
that.attr.cartAttr = !this.attr.attrcartAttr;
|
|
||||||
} else {
|
|
||||||
var data = {};
|
|
||||||
data.productId = that.storeInfo.productId;
|
|
||||||
data.cartNum = that.attr.productSelect.cart_num;
|
|
||||||
data.uniqueId = that.attr.productSelect.unique;
|
|
||||||
data.secKillId = that.storeInfo.id;
|
|
||||||
data.new = 1;
|
|
||||||
postCartAdd(data)
|
|
||||||
.then(res => {
|
|
||||||
that.$yrouter.push({
|
|
||||||
path: "/pages/order/OrderSubmission/index",
|
|
||||||
query: { id: res.data.cartId }
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.product-con .nav {
|
|
||||||
padding: 0 0.2*100rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
+192
-57
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pages-auth">
|
<view class="pages-auth v12-justify-between v12-flex-column">
|
||||||
<view class="tip-1">为了提供更优质的服务,需要获取</view>
|
<!-- <view class="tip-1">为了提供更优质的服务,需要获取</view>
|
||||||
<view class="tip-2">您的头像、昵称</view>
|
<view class="tip-2">您的头像、昵称</view>
|
||||||
|
|
||||||
<view class="wechat flex jc-between ai-center">
|
<view class="wechat flex jc-between ai-center">
|
||||||
@@ -12,18 +12,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="select" :src="webUrl+'/20220613104953149068.png'" mode="scaleToFill"/>
|
<image class="select" :src="webUrl+'/20220613104953149068.png'" mode="scaleToFill"/>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
<view class="agree-box">
|
|
||||||
<checkbox-group @change="changeAgree">
|
|
||||||
<label>
|
|
||||||
<checkbox value="yes" style="transform:scale(0.8)"/>
|
|
||||||
</label>
|
|
||||||
<text @click="changeShow">我已阅读并同意
|
|
||||||
<text class="btn-show">《用户服务协议及隐私政策》</text>
|
|
||||||
</text>
|
|
||||||
</checkbox-group>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="dialog-mask" v-if="show">
|
<view class="dialog-mask" v-if="show">
|
||||||
<view class="dialog-body">
|
<view class="dialog-body">
|
||||||
@@ -40,19 +31,130 @@
|
|||||||
|
|
||||||
<view class="dialog-mask" v-if="showFillOut">
|
<view class="dialog-mask" v-if="showFillOut">
|
||||||
<view class="dialog-fill flex flex-col ai-center">
|
<view class="dialog-fill flex flex-col ai-center">
|
||||||
<view class="title bold">请完善您的头像和昵称</view>
|
<!-- <view class="title bold">请完善您的信息</view> -->
|
||||||
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
<view class="v12-align-center v12-justify-start v12-py-4" style="width:550rpx">
|
||||||
<image class="avatar" :src="avatarUrl"></image>
|
<view class="v12-mr-3">
|
||||||
|
<image class="app-logo__image--inner" :src="webUrl+'/orderIcon/applogo.png'" mode="aspectFit|aspectFill|widthFix" lazy-load="true"></image>
|
||||||
|
</view>
|
||||||
|
<view class="v12-dark-text v12-font-bold">
|
||||||
|
<text class="v12-font-40">
|
||||||
|
地标文化特产
|
||||||
|
</text>
|
||||||
|
<text class="v12-mx-1">
|
||||||
|
|
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-24">
|
||||||
|
申请使用
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-dark-text v12-font-40 v12-mt-3 v12-font-bold" style="width:550rpx">
|
||||||
|
获取你的昵称、头像
|
||||||
|
</view>
|
||||||
|
<view class="v12-align-center v12-justify-between v12-mb-3 v12-mt-6" style="width:550rpx">
|
||||||
|
<view class="v12-align-center">
|
||||||
|
<view class="v12-dark-text v12-mr-3">
|
||||||
|
头像
|
||||||
|
</view>
|
||||||
|
<button
|
||||||
|
class="avatar-wrapper v12-ma-0"
|
||||||
|
open-type="chooseAvatar"
|
||||||
|
@chooseavatar="onChooseAvatar"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="avatarUrl"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
<input type="nickname" class="input-wrapper" placeholder="请输入昵称" @input="inputName" @confirm="inputName"
|
</view>
|
||||||
@blur="inputName"/>
|
<view>
|
||||||
<view class="btn-submit" @click="onSubmit">确认</view>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="v12-align-center v12-justify-between v12-my-4" style="width:550rpx">
|
||||||
|
<view class="v12-align-center">
|
||||||
|
<view class="v12-dark-text v12-mr-3">
|
||||||
|
昵称
|
||||||
|
</view>
|
||||||
|
<input
|
||||||
|
type="nickname"
|
||||||
|
maxlength="12"
|
||||||
|
class="input-wrapper "
|
||||||
|
placeholder="请填写您的昵称"
|
||||||
|
v-model="nickname"
|
||||||
|
@input="inputName"
|
||||||
|
@confirm="inputName"
|
||||||
|
@blur="inputName"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<u-icon name="close" @click="clearName"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="input-wrapper">
|
||||||
|
<picker
|
||||||
|
:value="form.birthday"
|
||||||
|
mode="date"
|
||||||
|
class="picker"
|
||||||
|
@change="birthdayChange"
|
||||||
|
>
|
||||||
|
{{ form.birthday || '请选择出生日期' }}
|
||||||
|
</picker>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="gender-row">
|
||||||
|
性别:
|
||||||
|
<u-radio-group
|
||||||
|
v-model="form.gender"
|
||||||
|
placement="row"
|
||||||
|
>
|
||||||
|
<u-radio
|
||||||
|
:name="1"
|
||||||
|
:customStyle="{marginRight: '16px'}"
|
||||||
|
active-color="#C41617"
|
||||||
|
label="男"
|
||||||
|
/>
|
||||||
|
<u-radio
|
||||||
|
:name="2"
|
||||||
|
active-color="#C41617"
|
||||||
|
label="女"
|
||||||
|
/>
|
||||||
|
</u-radio-group>
|
||||||
|
</view> -->
|
||||||
|
<view class="v12-justify-between v12-py-6 " style="width: 550rpx">
|
||||||
|
<view class="v12-primary-border v12-primary v12-white-text v12-btn v12-px-8 v12-py-1" @click="onSubmit">允许</view>
|
||||||
|
<view class="v12-dark-border v12-dark-text v12-btn v12-px-8 v12-py-1" @click="back">拒绝</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="app-logo v12-align-center v12-flex-column">
|
||||||
|
<image class="app-logo__image" :src="webUrl+'/orderIcon/applogo.png'" mode="aspectFit|aspectFill|widthFix" lazy-load="true"></image>
|
||||||
|
<view class="v12-mt-3 v12-font-32 v12-dark-text v12-font-weight-600">发现家乡好物</view>
|
||||||
|
</view>
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
<button class="btn-yes" type="default" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">同意</button>
|
<button class="btn-yes v12-primary" type="mini" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">快捷登录</button>
|
||||||
<button class="btn-no" type="default" @tap="back">拒绝</button>
|
<!-- <button class="btn-no" type="default" @tap="back">拒绝</button> -->
|
||||||
|
</view>
|
||||||
|
<view class="agree-box v12-align-center">
|
||||||
|
<u-checkbox-group
|
||||||
|
@change="changeAgree"
|
||||||
|
v-model="isAgree"
|
||||||
|
>
|
||||||
|
<u-checkbox
|
||||||
|
activeColor="#C52733"
|
||||||
|
size="16"
|
||||||
|
name="yes"
|
||||||
|
>
|
||||||
|
</u-checkbox>
|
||||||
|
</u-checkbox-group>
|
||||||
|
<text @click="changeShow">我已阅读并同意
|
||||||
|
<text class="btn-show">《用户服务协议及隐私政策》</text>
|
||||||
|
</text>
|
||||||
|
<!-- <checkbox-group @change="changeAgree">
|
||||||
|
<label>
|
||||||
|
<checkbox value="yes" style="transform:scale(0.6)" iconColor="#C52733" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</checkbox-group> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -61,10 +163,8 @@
|
|||||||
import {mapActions, mapMutations, mapState} from 'vuex'
|
import {mapActions, mapMutations, mapState} from 'vuex'
|
||||||
import cookie from '@/utils/store/cookie'
|
import cookie from '@/utils/store/cookie'
|
||||||
import {login, uploadImage} from '@/utils'
|
import {login, uploadImage} from '@/utils'
|
||||||
import {getAgree} from "@/api/public";
|
import {getAgree} from "@/api/public"
|
||||||
import {postUserEdit} from "@/api/user";
|
import {postUserEdit} from "@/api/user"
|
||||||
|
|
||||||
const defaultAvatarUrl = "/20230506100714762257.png"
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -73,12 +173,15 @@ export default {
|
|||||||
authorize: false,
|
authorize: false,
|
||||||
canIUseGetUserProfile: false,
|
canIUseGetUserProfile: false,
|
||||||
agreeInfo: {},
|
agreeInfo: {},
|
||||||
isAgree: false,
|
isAgree: [],
|
||||||
show: false,
|
show: false,
|
||||||
|
|
||||||
showFillOut: false,
|
showFillOut: false,
|
||||||
nickname: "",
|
nickname: '',
|
||||||
avatarUrl: this.$VUE_APP_RESOURCES_URL + defaultAvatarUrl,
|
avatarUrl: this.$VUE_APP_RESOURCES_URL + '/20230506100714762257.png',
|
||||||
|
form: {
|
||||||
|
gender: '',
|
||||||
|
birthday: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -106,7 +209,10 @@ export default {
|
|||||||
this.show=!this.show;
|
this.show=!this.show;
|
||||||
},
|
},
|
||||||
changeAgree(event) {
|
changeAgree(event) {
|
||||||
this.isAgree = event.detail.value.length > 0
|
this.isAgree = event
|
||||||
|
},
|
||||||
|
clearName() {
|
||||||
|
this.nickname = ''
|
||||||
},
|
},
|
||||||
toLogin() {
|
toLogin() {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
@@ -132,7 +238,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUserInfoProfile() {
|
getUserInfoProfile() {
|
||||||
if (!this.isAgree) {
|
if (!this.isAgree[0]) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请先阅读并同意《用户服务协议及隐私政策》",
|
title: "请先阅读并同意《用户服务协议及隐私政策》",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@@ -174,6 +280,10 @@ export default {
|
|||||||
inputName(e) {
|
inputName(e) {
|
||||||
this.nickname = e.detail.value;
|
this.nickname = e.detail.value;
|
||||||
},
|
},
|
||||||
|
birthdayChange(e) {
|
||||||
|
const value = e.detail.value
|
||||||
|
this.form.birthday = value
|
||||||
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
||||||
@@ -205,9 +315,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveUserInfo() {
|
saveUserInfo() {
|
||||||
let param = {
|
const param = {
|
||||||
nickname: this.nickname,
|
nickname: this.nickname,
|
||||||
avatar: this.avatarUrl
|
avatar: this.avatarUrl,
|
||||||
|
gender: this.form.gender || 0,
|
||||||
|
birthday: this.form.birthday || ''
|
||||||
}
|
}
|
||||||
postUserEdit(param).then(res => {
|
postUserEdit(param).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -232,10 +344,20 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="less">
|
||||||
|
.app-logo{
|
||||||
|
margin-top: 70rpx;
|
||||||
|
}
|
||||||
|
.app-logo__image--inner{
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
.pages-auth {
|
.pages-auth {
|
||||||
padding: 148rpx 48rpx;
|
padding: 148rpx 48rpx;
|
||||||
|
padding: 148rpx 48rpx;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
.tip-1 {
|
.tip-1 {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
@@ -279,12 +401,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.agree-box {
|
.agree-box {
|
||||||
margin: 200rpx 0 60rpx;
|
// margin: 200rpx 0 60rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #333;
|
||||||
|
padding: 0 20rpx;
|
||||||
.btn-show {
|
.btn-show {
|
||||||
color: #000;
|
color: #4099FF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,7 +424,7 @@ export default {
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
width: 630rpx;
|
width: 686rpx;
|
||||||
height: 70vh;
|
height: 70vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 60rpx;
|
padding: 60rpx;
|
||||||
@@ -335,8 +457,7 @@ export default {
|
|||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 516rpx;
|
width: 686rpx;
|
||||||
height: 576rpx;
|
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
@@ -348,15 +469,14 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatar-wrapper {
|
.avatar-wrapper {
|
||||||
width: 180rpx;
|
width: 80rpx;
|
||||||
height: 180rpx;
|
height: 80rpx;
|
||||||
margin-top: 38rpx;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: none;
|
background: none;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 180rpx;
|
width: 80rpx;
|
||||||
height: 180rpx;
|
height: 80rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -366,21 +486,28 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input-wrapper {
|
.input-wrapper {
|
||||||
width: 360rpx;
|
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
margin-top: 32rpx;
|
|
||||||
background: rgba(248, 249, 251, 1);
|
background: rgba(248, 249, 251, 1);
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
text-align: left;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
.gender-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
}
|
||||||
|
.picker {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 72rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-submit {
|
.btn-submit {
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
margin: 32rpx 0 0 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: 2rpx solid #E0E0E0;
|
border-top: 2rpx solid #E0E0E0;
|
||||||
color: #3A87FC;
|
color: #3A87FC;
|
||||||
@@ -392,9 +519,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-box {
|
.btn-box {
|
||||||
width: 338rpx;
|
// width: 338rpx;
|
||||||
margin: 0 auto;
|
// margin: 0 auto;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
padding-bottom: 340rpx;
|
||||||
button::after {
|
button::after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@@ -405,8 +533,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-yes {
|
.btn-yes {
|
||||||
background: #FF564A;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-no {
|
.btn-no {
|
||||||
@@ -416,4 +546,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.app-logo__image{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+841
-114
File diff suppressed because it is too large
Load Diff
+108
-48
@@ -57,9 +57,20 @@
|
|||||||
@click="bannerItemTapHandle(banner)"
|
@click="bannerItemTapHandle(banner)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<!--9-2 推荐信息-->
|
<!--全国特产和文玩的推荐信息-->
|
||||||
<view class="recommendInfo" v-if="recommendInfo && type < 2">
|
<view
|
||||||
<template v-if="(type === 0 && recommendInfo.hotelList) || (type === 1 && recommendInfo.productList)">
|
v-if="recommendInfo && type < 2"
|
||||||
|
class="recommendInfo"
|
||||||
|
>
|
||||||
|
<!--bug#1060-增加控制-->
|
||||||
|
<template
|
||||||
|
v-if="recommendInfo.displayStatus === 1 &&
|
||||||
|
(
|
||||||
|
(type === 0 && recommendInfo.hotelList) ||
|
||||||
|
(type === 1 && recommendInfo.productList)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
<view class="red-border-title">{{ recommendInfo.title }}</view>
|
<view class="red-border-title">{{ recommendInfo.title }}</view>
|
||||||
<image
|
<image
|
||||||
:src="recommendInfo.backgroundImage"
|
:src="recommendInfo.backgroundImage"
|
||||||
@@ -126,33 +137,31 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
import MescrollMixins from '@/mixins/mescroll-mixins.js'
|
||||||
import {fetchCity} from "@/api/wenwan";
|
import {fetchCity} from '@/api/wenwan'
|
||||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue'
|
||||||
import {getCurAddress, getLocation} from "@/utils/common.js";
|
import {getCurAddress, getLocation} from '@/utils/common.js'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "choseCity",
|
name: 'ChoseCity',
|
||||||
components: {
|
components: {
|
||||||
MescrollBody
|
MescrollBody
|
||||||
},
|
},
|
||||||
props: {},
|
|
||||||
mixins: [
|
mixins: [
|
||||||
MescrollMixins({
|
MescrollMixins({
|
||||||
getPageData(mescroll) {
|
getPageData(mescroll) {
|
||||||
// 此时mescroll会携带page的参数:
|
mescroll.endSuccess(10)
|
||||||
// let pageNum = mescroll.num; // 页码, 默认从1开始
|
|
||||||
// let pageSize = mescroll.size; // 页长, 默认每页10条
|
|
||||||
|
|
||||||
mescroll.endSuccess(10);
|
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
|
pageListenMixins
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
upOption: {
|
upOption: {
|
||||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
// 如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||||
|
noMoreSize: 10,
|
||||||
auto: false,
|
auto: false,
|
||||||
empty: {
|
empty: {
|
||||||
tip: '暂无城市'
|
tip: '暂无城市'
|
||||||
@@ -162,23 +171,47 @@ export default {
|
|||||||
auto: true
|
auto: true
|
||||||
},
|
},
|
||||||
listGroup: [],
|
listGroup: [],
|
||||||
provinceName: "",
|
provinceName: '',
|
||||||
listCity: [],
|
listCity: [],
|
||||||
navActive: 0,
|
navActive: 0,
|
||||||
keyword: "",
|
keyword: '',
|
||||||
|
// 0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票
|
||||||
type: null,
|
type: null,
|
||||||
location: "",
|
location: '',
|
||||||
banner: {},
|
banner: {},
|
||||||
recommendInfo: null // 推荐信息
|
// 推荐信息
|
||||||
};
|
recommendInfo: null,
|
||||||
|
pageKeyId: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.type = Number(options.type);
|
const type = Number(options.type)
|
||||||
this.location = options.city;
|
this.type = type
|
||||||
if (this.location === undefined) {
|
switch(type) {
|
||||||
this.getMapData();
|
case 0:
|
||||||
|
this.pageKeyId = 'goodsIndex'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
this.pageKeyId = 'wenwanIndex'
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
this.pageKeyId = 'customizedGiftIndex'
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
this.pageKeyId = 'wellnessFoodIndex'
|
||||||
|
break
|
||||||
|
case 5:
|
||||||
|
this.pageKeyId = 'countyFamousIndex'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
this.pageKeyId = ''
|
||||||
|
break
|
||||||
}
|
}
|
||||||
this.init();
|
this.location = options.city
|
||||||
|
if (this.location === undefined) {
|
||||||
|
this.getMapData()
|
||||||
|
}
|
||||||
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reload() {
|
reload() {
|
||||||
@@ -218,20 +251,20 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getMapData() {
|
async getMapData() {
|
||||||
const map = await getLocation();
|
const map = await getLocation()
|
||||||
if (map) {
|
if (map) {
|
||||||
const {latitude, longitude} = map[1];
|
const {latitude, longitude} = map[1]
|
||||||
const address = await getCurAddress(latitude, longitude);
|
const address = await getCurAddress(latitude, longitude)
|
||||||
this.location = address[1].data.result.ad_info.city;
|
this.location = address[1].data.result.ad_info.city
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
fetchCity(this.type).then(res => {
|
fetchCity(this.type).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.listGroup = res.data.group;
|
this.listGroup = res.data.group
|
||||||
if (this.listGroup.length > 0) {
|
if (this.listGroup.length > 0) {
|
||||||
this.listCity = this.listGroup[0].city;
|
this.listCity = this.listGroup[0].city
|
||||||
this.provinceName = this.listGroup[0].label;
|
this.provinceName = this.listGroup[0].label
|
||||||
this.recommendInfo = this.listGroup[0].recommendInfo
|
this.recommendInfo = this.listGroup[0].recommendInfo
|
||||||
this.banner = {
|
this.banner = {
|
||||||
...this.listGroup[0],
|
...this.listGroup[0],
|
||||||
@@ -243,9 +276,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
asideTap(index) {
|
asideTap(index) {
|
||||||
this.navActive = index;
|
this.navActive = index
|
||||||
this.listCity = this.listGroup[index].city;
|
this.listCity = this.listGroup[index].city
|
||||||
this.provinceName = this.listGroup[index].label;
|
this.provinceName = this.listGroup[index].label
|
||||||
this.recommendInfo = this.listGroup[index].recommendInfo
|
this.recommendInfo = this.listGroup[index].recommendInfo
|
||||||
this.banner = {
|
this.banner = {
|
||||||
...this.listGroup[index],
|
...this.listGroup[index],
|
||||||
@@ -253,8 +286,8 @@ export default {
|
|||||||
url: this.listGroup[index].uniappUrl
|
url: this.listGroup[index].uniappUrl
|
||||||
}
|
}
|
||||||
// 触发加载请求
|
// 触发加载请求
|
||||||
this.mescroll.scrollTo(0, 0);
|
this.mescroll.scrollTo(0, 0)
|
||||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
this.mescroll && this.mescroll.resetUpScroll(false)
|
||||||
},
|
},
|
||||||
emptyClick: function () {
|
emptyClick: function () {
|
||||||
//触发加载请求
|
//触发加载请求
|
||||||
@@ -262,9 +295,9 @@ export default {
|
|||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.listGroup.findIndex((group, index) => {
|
this.listGroup.findIndex((group, index) => {
|
||||||
let result;
|
let result
|
||||||
group.city.forEach(item => {
|
group.city.forEach(item => {
|
||||||
result = item.cityName.indexOf(this.keyword, 0);
|
result = item.cityName.indexOf(this.keyword, 0)
|
||||||
if (result !== -1) {
|
if (result !== -1) {
|
||||||
this.asideTap(index);
|
this.asideTap(index);
|
||||||
return null;
|
return null;
|
||||||
@@ -276,8 +309,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
select(item) {
|
select(item) {
|
||||||
if (this.type === 0 && item.hasData === 0) return;
|
if (this.type === 0 && item.hasData === 0) return
|
||||||
if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return;
|
if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return
|
||||||
uni.setStorageSync("cityName", item.cityName)
|
uni.setStorageSync("cityName", item.cityName)
|
||||||
|
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
@@ -285,20 +318,20 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pkg_product/views/nativeList?cityId=${item.cityId}`
|
url: `/pkg_product/views/nativeList?cityId=${item.cityId}`
|
||||||
})
|
})
|
||||||
break;
|
break
|
||||||
case 1:
|
case 1:
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/wenwan/views/storeList?cityId=${item.cityId}`
|
url: `/wenwan/views/storeList?cityId=${item.cityId}`
|
||||||
})
|
})
|
||||||
break;
|
break
|
||||||
case 6:
|
case 6:
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pkg_product/views/scenicSpot?cityId=${item.cityId}`
|
url: `/pkg_product/views/scenicSpot?cityId=${item.cityId}`
|
||||||
})
|
})
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goToStore(id) {
|
goToStore(id) {
|
||||||
@@ -306,14 +339,41 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesInn/inn/innHome?id=" + id
|
url: '/pagesInn/inn/innHome?id=' + id + '&from=' + this.getOptionsParams()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goToGoods(productId) {
|
goToGoods(productId) {
|
||||||
if (!productId) {
|
if (!productId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$global.navToGoods(productId)
|
uni.navigateTo({
|
||||||
|
url: `/pages/shop/GoodsCon/index?id=${productId}&from=${this.getOptionsParams()}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getOptionsParams() {
|
||||||
|
// 0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票
|
||||||
|
let from = ''
|
||||||
|
switch(this.type) {
|
||||||
|
case 0:
|
||||||
|
from = 'techan'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
from = 'wenwan'
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
from = 'gift'
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
from = 'wellness'
|
||||||
|
break
|
||||||
|
case 5:
|
||||||
|
from = 'famous'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
from = ''
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return from
|
||||||
},
|
},
|
||||||
bannerItemTapHandle(banner) {
|
bannerItemTapHandle(banner) {
|
||||||
if (!banner) {
|
if (!banner) {
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ export default {
|
|||||||
margin: 20rpx 0 0 0;
|
margin: 20rpx 0 0 0;
|
||||||
.cover-box {
|
.cover-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 328rpx;
|
width: 338rpx;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.cover {
|
.cover {
|
||||||
width: 328rpx;
|
width: 338rpx;
|
||||||
height: 328rpx;
|
height: 338rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
|
|||||||
+159
-38
@@ -1,21 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="have-fun">
|
<view class="have-fun tabbar-page">
|
||||||
<view class="top-box">
|
<view class="top-box">
|
||||||
<view class="search-box flex jc-between ai-center">
|
<view class="v12-justify-start v12-align-center">
|
||||||
|
<view class="flex jc-end">
|
||||||
|
<view class="city-box" @click="goCity('cloud')">
|
||||||
|
<text style="white-space:nowrap; width: 90rpx" class="v12-primary-text one-t">{{ cityName }}</text>
|
||||||
|
<image :src="webUrl+'/orderIcon/map.png'" mode="scaleToFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="search-box v12-primary-border flex jc-between ai-center">
|
||||||
<input
|
<input
|
||||||
v-model="name"
|
v-model="name"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="搜索店铺"
|
placeholder="请输入关键词~"
|
||||||
placeholder-style="color:#949494"
|
placeholder-style="color:#949494"
|
||||||
@confirm="search"
|
@confirm="search"
|
||||||
>
|
>
|
||||||
|
<view class="search-btn v12-primary v12-white-text v12-radius-60" @click="search">
|
||||||
|
<text class="v12-font-bold">搜索</text>
|
||||||
<image
|
<image
|
||||||
class="icon"
|
class="icon v12-ml-1"
|
||||||
:src="webUrl+'/20220903142935869059.png'"
|
:src="webUrl+'/orderIcon/搜索 (1).png'"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
@click="search"
|
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<scroll-view class="type-box flex" scroll-x enable-flex>
|
<scroll-view class="type-box flex" scroll-x enable-flex>
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in typeList"
|
v-for="(item, index) in typeList"
|
||||||
@@ -31,12 +41,39 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="type-banner-wrap">
|
||||||
<view class="flex jc-end">
|
<view v-if="currType.titleImage" class="title">
|
||||||
<view class="city-box" @click="goCity('cloud')">
|
<image
|
||||||
<image :src="webUrl+'/20220903142929759087.png'" mode="scaleToFill"></image>
|
:src="currType.titleImage"
|
||||||
<text>{{ cityName }}</text>
|
mode="heightFix"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="currType.carousel" class="slider-wrap">
|
||||||
|
<swiper
|
||||||
|
indicatorDots="true"
|
||||||
|
indicator-color="rgba(255, 255, 255, .3)"
|
||||||
|
indicator-active-color="#ffffff"
|
||||||
|
autoplay
|
||||||
|
circular
|
||||||
|
style="height: 330rpx;"
|
||||||
|
>
|
||||||
|
<block
|
||||||
|
v-for="(item, bannerIndex) in currType.carousel"
|
||||||
|
:key="bannerIndex"
|
||||||
|
>
|
||||||
|
<swiper-item>
|
||||||
|
<view class="swiper-item" @click="typeBannerItemClick(item)">
|
||||||
|
<image :src="item.carouselImage" class="img" />
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</block>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view>
|
||||||
|
<text class="v12-font-bold" v-if="currType.carousel">推荐</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="isLoad">
|
<view v-if="isLoad">
|
||||||
<view v-if="hotelList.length > 0">
|
<view v-if="hotelList.length > 0">
|
||||||
@@ -68,20 +105,26 @@
|
|||||||
<view class="text">暂无数据</view>
|
<view class="text">暂无数据</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<goo-skeleton v-else />
|
<goo-skeleton
|
||||||
|
v-else
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<xdd-tabbar :curr-index="4" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getHotelList, getHotelTypeList } from "@/api/inn.js"
|
import { getHotelList, getHotelTypeList } from "@/api/inn.js"
|
||||||
import { getCurAddress, getLocation } from "@/utils/common"
|
import { getCurAddress, getLocation } from "@/utils/common"
|
||||||
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
|
||||||
import FunHotelItem from './components/HotelItem'
|
import FunHotelItem from './components/HotelItem'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
import XddTabbar from '@/components/xdd-tabbar'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GooSkeleton,
|
FunHotelItem,
|
||||||
FunHotelItem
|
XddTabbar
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
@@ -89,9 +132,13 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
typeList: [],
|
typeList: [],
|
||||||
typeIndex: 0,
|
typeIndex: 0,
|
||||||
|
// 当前选中的类型
|
||||||
|
currType: {},
|
||||||
cityName: '',
|
cityName: '',
|
||||||
hotelList: [],
|
hotelList: [],
|
||||||
isLoad: false
|
isLoad: false,
|
||||||
|
pageKeyId: Object.freeze('findFunIndex'),
|
||||||
|
isNext: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -102,22 +149,46 @@ export default {
|
|||||||
hotelEvenList() {
|
hotelEvenList() {
|
||||||
const arr = this.hotelList.filter(function(item, index) { return index % 2 === 0 })
|
const arr = this.hotelList.filter(function(item, index) { return index % 2 === 0 })
|
||||||
return arr
|
return arr
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// 后端接口结构需要调整下,需要补充总页数,前端可判断当前页数大于等于总页数则不发送网络请求
|
||||||
|
if(this.isNext) {
|
||||||
|
this.page++
|
||||||
|
this.fetchList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getMapData()
|
|
||||||
getHotelTypeList().then(({data}) => {
|
|
||||||
this.typeList = data;
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
const memCityName = uni.getStorageSync('cityName')
|
const memCityName = uni.getStorageSync('cityName')
|
||||||
|
this.page = 1
|
||||||
|
this.currType = {}
|
||||||
|
this.typeIndex = 0
|
||||||
|
this.name = ''
|
||||||
|
getHotelTypeList().then(({data}) => {
|
||||||
|
this.typeList = data
|
||||||
|
this.currType = data[this.typeIndex]
|
||||||
|
this.getMapData()
|
||||||
|
})
|
||||||
if (memCityName.length) {
|
if (memCityName.length) {
|
||||||
this.cityName = memCityName
|
this.cityName = memCityName
|
||||||
uni.removeStorageSync('cityName')
|
uni.removeStorageSync('cityName')
|
||||||
|
this.name = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
cityName: {
|
||||||
|
handler(value) {
|
||||||
|
if(value) {
|
||||||
this.search()
|
this.search()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goCity() {
|
goCity() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -126,7 +197,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goInnDetail(item) {
|
goInnDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pagesInn/inn/innHome?id=${item.id}`
|
url: `/pagesInn/inn/innHome?id=${item.id}&from=fun`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getMapData() {
|
async getMapData() {
|
||||||
@@ -134,13 +205,17 @@ export default {
|
|||||||
if (map.length > 1) {
|
if (map.length > 1) {
|
||||||
const {latitude, longitude} = map[1]
|
const {latitude, longitude} = map[1]
|
||||||
const address = await getCurAddress(latitude, longitude)
|
const address = await getCurAddress(latitude, longitude)
|
||||||
|
if(!this.cityName) {
|
||||||
this.cityName = address[1].data.result.ad_info.city
|
this.cityName = address[1].data.result.ad_info.city
|
||||||
this.search()
|
}
|
||||||
|
// this.search()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tapType(index) {
|
tapType(index) {
|
||||||
if (this.typeIndex === index) return
|
if (this.typeIndex === index) return
|
||||||
this.typeIndex = index
|
this.typeIndex = index
|
||||||
|
this.currType = this.typeList[index]
|
||||||
|
this.name = ''
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
@@ -173,28 +248,48 @@ export default {
|
|||||||
data[i].videoCover = ''
|
data[i].videoCover = ''
|
||||||
}
|
}
|
||||||
this.hotelList.push(data[i])
|
this.hotelList.push(data[i])
|
||||||
|
if(data.length < 10) {
|
||||||
|
this.isNext = false
|
||||||
|
} else {
|
||||||
|
this.isNext = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.isLoad = true
|
this.isLoad = true
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
typeBannerItemClick(item) {
|
||||||
|
if (!item.hotelId) return
|
||||||
|
uni.navigateTo({ url: `/pagesInn/inn/innHome?id=${item.hotelId}` })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.search-btn{
|
||||||
|
position: absolute;
|
||||||
|
top: 2rpx;
|
||||||
|
bottom: 2rpx;
|
||||||
|
right: 2rpx;
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
.have-fun {
|
.have-fun {
|
||||||
//padding-top: 120rpx;
|
//padding-top: 120rpx;
|
||||||
|
|
||||||
.top-box {
|
.top-box {
|
||||||
padding: 32rpx 0 20rpx;
|
padding: 32rpx 0 0rpx;
|
||||||
background: #fff;
|
background: #f5f5f5;
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
width: 686rpx;
|
position: relative;
|
||||||
|
width: 575rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0 auto;
|
// margin: 0 auto;
|
||||||
padding: 0 24rpx 0 32rpx;
|
padding: 0 24rpx 0 32rpx;
|
||||||
border: 2rpx solid #BBD2D2;
|
border: 2rpx solid #BBD2D2;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
@@ -210,20 +305,20 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.type-box {
|
.type-box {
|
||||||
height: 180rpx;
|
height: 200rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: 20rpx 20rpx 0 48rpx;
|
padding: 20rpx 20rpx 0 20rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 160rpx;
|
width: 154rpx;
|
||||||
height: 160rpx;
|
height: 154rpx;
|
||||||
margin-right: 20rpx;
|
// margin-right: 20rpx;
|
||||||
border-radius: 26rpx;
|
border-radius: 26rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 72rpx;
|
width: 92rpx;
|
||||||
height: 72rpx;
|
height: 92rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
@@ -245,16 +340,16 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
padding: 20rpx 32rpx;
|
padding: 20rpx 20rpx;
|
||||||
background: #F9F9F9;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.city-box {
|
.city-box {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8rpx 18rpx 8rpx 16rpx;
|
padding: 8rpx 20rpx 8rpx 20rpx;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
background: #fff;
|
background: #f5f5f5;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
@@ -272,7 +367,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.list {
|
.list {
|
||||||
width: 328rpx;
|
width: 348rpx;
|
||||||
.item {
|
.item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -280,4 +375,30 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tabbar-page {
|
||||||
|
padding: 0 0 180rpx 0;
|
||||||
|
}
|
||||||
|
.type-banner-wrap {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
.title {
|
||||||
|
padding: 0 0 20rpx;
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
height: 48rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.slider-wrap {
|
||||||
|
width: 100%;
|
||||||
|
height: 330rpx;
|
||||||
|
padding: 0 0 20rpx 0;
|
||||||
|
.swiper-item {
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 330rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="culture v12-d-grid-columns-2">
|
||||||
|
<view class="img-item " v-for="(item, index) in list" :key="index">
|
||||||
|
<image class="img-item" :src="item" mode="widthFix|heightFix" lazy-load="false"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="list.length === 0"
|
||||||
|
:src="webUrl + '/20231023131208675588.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getCulture,
|
||||||
|
} from "@/api/product"
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
landmarkDataId: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
list: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
landmarkDataId(value) {
|
||||||
|
if(value) {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
getCulture({landmarkDataId: this.landmarkDataId}).then(res => {
|
||||||
|
this.list = res.data.cultureImages
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.culture{
|
||||||
|
grid-gap: 20rpx 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.img-item{
|
||||||
|
width: 340rpx;
|
||||||
|
height: 320rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
.img-nodata {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 352rpx;
|
||||||
|
height: 338rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<view class="list-box flex flex-wrap">
|
||||||
|
<view
|
||||||
|
v-for="item in goods"
|
||||||
|
:key="item.id"
|
||||||
|
class="item"
|
||||||
|
@click="goGoods(item.productId)"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/mark-land.png'"
|
||||||
|
class="mark-img"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="item.storeImage"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="good-img"
|
||||||
|
/>
|
||||||
|
<view class="content flex flex-col jc-between">
|
||||||
|
<view class="more-t bold">{{ item.title }}</view>
|
||||||
|
<view class="one-t desc">{{ item.description }}</view>
|
||||||
|
<view class="flex jc-between ai-center">
|
||||||
|
<text class="price">¥{{ item.price }}</text>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/icon-cart.png'"
|
||||||
|
class="btn"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="goods.length === 0"
|
||||||
|
:src="webUrl + '/20231023131208675588.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
goods: {
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goGoods(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.img-nodata {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 352rpx;
|
||||||
|
height: 338rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
.list-box {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
.item {
|
||||||
|
position: relative;
|
||||||
|
width: 344rpx;
|
||||||
|
margin-right: 22rpx;
|
||||||
|
margin-bottom: 22rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
overflow: hidden;
|
||||||
|
.mark-img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 3;
|
||||||
|
display: block;
|
||||||
|
width: 84rpx;
|
||||||
|
height: 74rpx;
|
||||||
|
}
|
||||||
|
.good-img {
|
||||||
|
display: block;
|
||||||
|
width: 344rpx;
|
||||||
|
height: 344rpx;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
height: 156rpx;
|
||||||
|
padding: 8rpx 8rpx 18rpx 8rpx;
|
||||||
|
.more-t {
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.desc {
|
||||||
|
padding: 5rpx 0;
|
||||||
|
height: 34rpx;
|
||||||
|
color: #FFC543;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
font-size: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #C52733;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
display: block;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item:nth-child(2n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.list-wrap {
|
||||||
|
margin: 20rpx 0 0 0;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
.loadend {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,287 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view v-if="infoArray.length > 0" class="info-wrapper">
|
||||||
|
<view class="info-list">
|
||||||
|
<view v-for="(item, index) in infoArray" :key="index" class="info-item">
|
||||||
|
<view
|
||||||
|
:class="item.isTop === 1 ? 'info-item-top' : ''"
|
||||||
|
:style="{
|
||||||
|
'background-image': item.isTop
|
||||||
|
? 'url(' + webUrl + '/page/hotel/info-top-bg.png)'
|
||||||
|
: 'none',
|
||||||
|
}"
|
||||||
|
class="info-item-header"
|
||||||
|
>
|
||||||
|
<view class="name">
|
||||||
|
{{ item.title }}
|
||||||
|
</view>
|
||||||
|
<view class="intro">
|
||||||
|
{{ item.content }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="info-item-body">
|
||||||
|
<img-box
|
||||||
|
:imgList="item.images"
|
||||||
|
:num="item.images.length"
|
||||||
|
:img-radius="10"
|
||||||
|
style="width: 100%"
|
||||||
|
@click="infoItemViewClick(item)"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="info-item-bottom">
|
||||||
|
<view class="time">
|
||||||
|
{{
|
||||||
|
item.createTime
|
||||||
|
? item.createTime.replace(/-/g, ".").substr(0, 10)
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</view>
|
||||||
|
<view class="btns">
|
||||||
|
<view class="flex">
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
|
class="icon"
|
||||||
|
/>
|
||||||
|
<text class="seeNum-txt v12-font-28">{{ item.pv }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex">
|
||||||
|
<image
|
||||||
|
v-if="!item.hasZan"
|
||||||
|
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
||||||
|
class="zan-off-icon"
|
||||||
|
@click="likeInfoItemHandle(item, index, item.zan + 1, true)"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
||||||
|
class="zan-on-icon"
|
||||||
|
@click="likeInfoItemHandle(item, index, item.zan - 1, false)"
|
||||||
|
/>
|
||||||
|
<text
|
||||||
|
v-show="item.zan > 0"
|
||||||
|
:class="item.hasZan ? 'on' : ''"
|
||||||
|
class="seeNum-txt v12-font-28 v12-ml-1"
|
||||||
|
>{{ item.zan }}</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
|
mode="widthFix"
|
||||||
|
class="no-data-loadend"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="infoArray.length === 0"
|
||||||
|
:src="webUrl + '/20231023131208675588.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getNews,
|
||||||
|
hadLike,
|
||||||
|
hadView
|
||||||
|
} from "@/api/product"
|
||||||
|
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
landmarkDataId: null
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
imgBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
infoArray: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
landmarkDataId(value) {
|
||||||
|
if(value) {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
const params = {
|
||||||
|
landmarkDataId: this.landmarkDataId,
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
}
|
||||||
|
getNews(params).then(res => {
|
||||||
|
this.infoArray = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
likeInfoItemHandle(item, index, value, voValue) {
|
||||||
|
hadLike({ landmarkNewsId: item.id }).then(res => {
|
||||||
|
const { success } = res
|
||||||
|
if (success) {
|
||||||
|
this.$dialog.toast({
|
||||||
|
mes: '操作成功!'
|
||||||
|
})
|
||||||
|
this.$set(this.infoArray[index], 'zan', value)
|
||||||
|
this.$set(this.infoArray[index], 'hasZan', voValue)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
infoItemViewClick(item) {
|
||||||
|
uni.$u.debounce(() => {
|
||||||
|
hadView({ landmarkNewsId: item.id }).finally(() => {
|
||||||
|
this.infoArray.map(info => {
|
||||||
|
if (info.id === item.id) {
|
||||||
|
info.pv += 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.info-item + .info-item {
|
||||||
|
margin: 22rpx 0 0 0;
|
||||||
|
}
|
||||||
|
.info-item {
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
.info-item-header {
|
||||||
|
position: relative;
|
||||||
|
padding: 20rpx 20rpx 0 20rpx;
|
||||||
|
&.info-item-top {
|
||||||
|
padding-top: 60rpx;
|
||||||
|
background-size: 100% 80rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-image: url();
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.intro {
|
||||||
|
margin: 10rpx 0 0 0;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info-item-body {
|
||||||
|
padding: 0 20rpx 20rpx 20rpx;
|
||||||
|
.video {
|
||||||
|
padding: 20rpx 0 0 0;
|
||||||
|
.video-item {
|
||||||
|
width: 100%;
|
||||||
|
height: 400rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info-item-bottom {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-top: 1px solid #f1f1f1;
|
||||||
|
font-size: 16px;
|
||||||
|
.time {
|
||||||
|
flex: 1;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.btns {
|
||||||
|
display: flex;
|
||||||
|
color: #999;
|
||||||
|
.flex + .flex {
|
||||||
|
margin: 0 0 0 32rpx;
|
||||||
|
}
|
||||||
|
.flex {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin: 0 8rpx 0 0;
|
||||||
|
}
|
||||||
|
.zan-off-icon {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
}
|
||||||
|
.zan-on-icon {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
}
|
||||||
|
.seeNum-txt {
|
||||||
|
&.on {
|
||||||
|
color: #D81E06;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.more-btn {
|
||||||
|
position: relative;
|
||||||
|
.more-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
right: -20rpx;
|
||||||
|
top: -150rpx;
|
||||||
|
z-index: 5;
|
||||||
|
width: 200rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0px 1px 6px rgba(0,0,0,0.16);
|
||||||
|
.more-item + .more-item {
|
||||||
|
border-top: 1px solid #d5d5d5;
|
||||||
|
}
|
||||||
|
.more-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 70rpx;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
.more-icon {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
margin: 0 10rpx 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info-item-top {
|
||||||
|
padding-top: 60rpx;
|
||||||
|
background-size: 100% 80rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-image: url();
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.intro {
|
||||||
|
margin: 10rpx 0 0 0;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.img-nodata {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 352rpx;
|
||||||
|
height: 338rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
<template>
|
||||||
|
<view class="policy">
|
||||||
|
<view class="list-item" v-for="(item, index) in currentList" :key="index" @click="fileItemClick(item)">
|
||||||
|
<view class="v12-justify-start v12-align-center">
|
||||||
|
<view class="v12-font-bold v12-font-28">·</view>
|
||||||
|
<view class="item-title one-t">{{ item.title }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-action v12-dark"><u-icon name="arrow-right" color="#fff" size="8"></u-icon></view>
|
||||||
|
</view>
|
||||||
|
<view class="more-wrap" v-if="isMore ? isMore : list.length > 3">
|
||||||
|
<view class="more-btn v12-primary v12-align-center" @click="showMore">
|
||||||
|
{{ isMore ? '收起' : '查看更多' }}
|
||||||
|
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733 " size="12"></u-icon></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="list.length === 0"
|
||||||
|
:src="webUrl + '/20231023131208675588.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getPorjectPolicyFiles,
|
||||||
|
} from "@/api/product"
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
landmarkDataId: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
list: [],
|
||||||
|
currentList: [],
|
||||||
|
isMore: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
landmarkDataId(value) {
|
||||||
|
if(value) {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
const params = {
|
||||||
|
landmarkDataId: this.landmarkDataId,
|
||||||
|
page: 1,
|
||||||
|
limit: 99999
|
||||||
|
}
|
||||||
|
getPorjectPolicyFiles(params).then(res => {
|
||||||
|
this.list = res.data.records
|
||||||
|
if(this.isMore) {
|
||||||
|
this.currentList = this.list
|
||||||
|
} else {
|
||||||
|
this.currentList = this.list.filter((item, index) => index < 3)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showMore() {
|
||||||
|
this.isMore = !this.isMore
|
||||||
|
if(this.isMore) {
|
||||||
|
this.currentList = this.list
|
||||||
|
} else {
|
||||||
|
this.currentList = this.list.filter((item, index) => index < 3)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fileItemClick(file) {
|
||||||
|
const url = file.attachment || ''
|
||||||
|
if (!url) return
|
||||||
|
uni.downloadFile({
|
||||||
|
url,
|
||||||
|
success: res => {
|
||||||
|
const filePath = res.tempFilePath
|
||||||
|
wx.openDocument({
|
||||||
|
filePath,
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.more-btn{
|
||||||
|
.item-action{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.policy{
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
.list-item{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
.item-action{
|
||||||
|
font-size: 22rpx;
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
padding: 5rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 24rpx;
|
||||||
|
}
|
||||||
|
.item-title{
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
.log-img{
|
||||||
|
width: 68rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
background: rgba(197,39,51,0.39);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.more-wrap{
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.more-btn{
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 5rpx 20rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
.img-nodata {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 352rpx;
|
||||||
|
height: 338rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<view class="projects">
|
||||||
|
<view class="tabs-wrap">
|
||||||
|
<view
|
||||||
|
@click="handleTab(item.value)"
|
||||||
|
class="tab-item"
|
||||||
|
:class="{
|
||||||
|
'tab-isActived': actived === item.value
|
||||||
|
}"
|
||||||
|
v-for="(item, index) in tabs"
|
||||||
|
:key="index">
|
||||||
|
<view
|
||||||
|
:class="{
|
||||||
|
'tab-isActived': actived === item.value,
|
||||||
|
'no-actived-1': actived === 2 && item.value === 1,
|
||||||
|
'no-actived-2': actived === 1 && item.value === 2,
|
||||||
|
'no-actived-3': actived === 3 && item.value === 2,
|
||||||
|
'no-actived-4': actived === 2 && item.value === 3,
|
||||||
|
}"
|
||||||
|
>{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="content"
|
||||||
|
:class="{
|
||||||
|
'first-one': actived === 1,
|
||||||
|
'last-one': actived === 3
|
||||||
|
}"
|
||||||
|
|
||||||
|
>
|
||||||
|
<recommend v-if="actived === 1" :landmarkDataId="landmarkDataId"></recommend>
|
||||||
|
<policy v-if="actived === 2" :landmarkDataId="landmarkDataId"></policy>
|
||||||
|
<serviec v-if="actived === 3" :info="info"></serviec>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import recommend from './recommend.vue'
|
||||||
|
import policy from './policy.vue'
|
||||||
|
import serviec from './serviec.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
recommend,
|
||||||
|
policy,
|
||||||
|
serviec
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
landmarkDataId: null,
|
||||||
|
info: {
|
||||||
|
default:() => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actived: 1,
|
||||||
|
tabs: [
|
||||||
|
{name: '企业推荐', value: 1},
|
||||||
|
{name: '政策', value: 2},
|
||||||
|
{name: '服务', value: 3},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTab(value) {
|
||||||
|
this.actived = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.fit-box-inner{
|
||||||
|
background: #f0f0f0;
|
||||||
|
width: initial;
|
||||||
|
height: inherit;
|
||||||
|
width: 40rpx;
|
||||||
|
}
|
||||||
|
.first-one{
|
||||||
|
border-radius: 0 24rpx 24rpx 24rpx !important;
|
||||||
|
}
|
||||||
|
.last-one{
|
||||||
|
border-radius: 24rpx 0 24rpx 24rpx !important;
|
||||||
|
}
|
||||||
|
.fit-box{
|
||||||
|
width: 40rpx;
|
||||||
|
height: initial;
|
||||||
|
background: #fff;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.projects{
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.tabs-wrap{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.tab-item{
|
||||||
|
text-align: center;
|
||||||
|
flex: 1;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
background: #fff;
|
||||||
|
view{
|
||||||
|
padding: 20rpx 0;
|
||||||
|
background: #f0f0f0;
|
||||||
|
width: inherit;
|
||||||
|
height: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no-actived-1{
|
||||||
|
border-radius: 0 0 24rpx 0 !important;
|
||||||
|
}
|
||||||
|
.no-actived-2{
|
||||||
|
border-radius: 0 0 0 24rpx !important;
|
||||||
|
}
|
||||||
|
.no-actived-3{
|
||||||
|
border-radius: 0 0 24rpx 0 !important;
|
||||||
|
}
|
||||||
|
.no-actived-4{
|
||||||
|
border-radius: 0 0 0 24rpx !important;
|
||||||
|
}
|
||||||
|
.tab-isActived{
|
||||||
|
background: #fff !important;
|
||||||
|
border-radius: 24rpx 24rpx 0 0 !important;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
background: #fff;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<view class="recommend">
|
||||||
|
<view class="list-item" v-for="(item, index) in currentList" :key="index" @click="toStore(item.hotelId)">
|
||||||
|
<view class="v12-justify-start v12-align-center">
|
||||||
|
<view class="log-img">
|
||||||
|
<image class="log-img" :src="item.logo" mode="aspectFit|aspectFill|widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<view class="item-title one-t">{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-action-wrap v12-primary">
|
||||||
|
点击查看
|
||||||
|
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733" size="8"></u-icon></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="more-wrap" v-if="isMore ? isMore : list.length > 3">
|
||||||
|
<view class="more-btn v12-primary" @click="showMore">
|
||||||
|
{{ isMore ? '收起' : '查看更多' }}
|
||||||
|
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733 " size="12"></u-icon></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="list.length === 0"
|
||||||
|
:src="webUrl + '/20231023131208675588.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getPorjectRecommend,
|
||||||
|
} from "@/api/product"
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
landmarkDataId: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
list: [],
|
||||||
|
currentList: [],
|
||||||
|
isMore: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
landmarkDataId(value) {
|
||||||
|
if(value) {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => {
|
||||||
|
this.list = res.data
|
||||||
|
if(this.isMore) {
|
||||||
|
this.currentList = this.list
|
||||||
|
} else {
|
||||||
|
this.currentList = this.list.filter((item, index) => index < 3)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toStore(id) {
|
||||||
|
if (!id) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesInn/inn/innHome?id=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showMore() {
|
||||||
|
this.isMore = !this.isMore
|
||||||
|
if(this.isMore) {
|
||||||
|
this.currentList = this.list
|
||||||
|
} else {
|
||||||
|
this.currentList = this.list.filter((item, index) => index < 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.more-btn{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.item-action{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
padding: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.recommend{
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
.list-item{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
.item-action-wrap{
|
||||||
|
font-size: 22rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
color: #fff;
|
||||||
|
padding: 5rpx 10rpx;
|
||||||
|
}
|
||||||
|
.item-action{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
.item-title{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
.log-img{
|
||||||
|
width: 68rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.more-wrap{
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.more-btn{
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 5rpx 20rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
.img-nodata {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 352rpx;
|
||||||
|
height: 338rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<view class="service">
|
||||||
|
<view class="map-cont">
|
||||||
|
<map
|
||||||
|
:longitude="info.longitude"
|
||||||
|
:latitude="info.latitude"
|
||||||
|
style="width: 100%;height: 400rpx; border-radius: 20rpx;"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="v12-mt-3 info-wrap">
|
||||||
|
<view>
|
||||||
|
<view class="v12-font-32 v12-font-bold v12-mb-2">{{ info.name }}</view>
|
||||||
|
<view class="v12-font-24 v12-mb-1 v12-dark1-text">办公时间:{{ info.officeTime }}</view>
|
||||||
|
<view class="v12-font-24 v12-mb-1 v12-dark1-text">{{ info.address }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="action-wrap">
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<image :src="webUrl + '/page/qianxian/icon-addr.png'" class="img" />
|
||||||
|
</view>
|
||||||
|
<view class="text-center">导航</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<image :src="webUrl + '/page/qianxian/icon-phone.png'" class="img" />
|
||||||
|
</view>
|
||||||
|
<view class="text-center">客服</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="padding: 0 20rpx;"><u-divider></u-divider></view>
|
||||||
|
<view class="intro-wrap">
|
||||||
|
<view class="v12-dark-text v12-font-bold">
|
||||||
|
简介
|
||||||
|
</view>
|
||||||
|
<view class="intro-text">
|
||||||
|
{{ info.intro }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
info: {
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log(this.info);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.intro-text{
|
||||||
|
color: #999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
.intro-wrap{
|
||||||
|
padding: 0 20rpx 20rpx;
|
||||||
|
}
|
||||||
|
.action-wrap{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.text-center{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info-wrap{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 40rpx 0 0;
|
||||||
|
}
|
||||||
|
.service{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.map-cont {
|
||||||
|
height: 400rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background: #f2f1ed;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
display: block;
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
margin: 0 0 16rpx 16rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+599
-927
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+196
-363
@@ -1,429 +1,262 @@
|
|||||||
<script>
|
<template>
|
||||||
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
|
<view class="pkg-product-land-mark">
|
||||||
|
<view v-if="isLoad">
|
||||||
|
<view class="top-wrap">
|
||||||
|
<view class="top-box">
|
||||||
|
<view class="nav flex">
|
||||||
|
<view
|
||||||
|
v-for="(item,index) in navList"
|
||||||
|
:key="index"
|
||||||
|
:class="{
|
||||||
|
'active': navIndex === index
|
||||||
|
}"
|
||||||
|
class="flex flex-0 ai-center nav-item"
|
||||||
|
@click="changeNav(index)"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/landmark-icon.png'"
|
||||||
|
class="bg"
|
||||||
|
/>
|
||||||
|
{{ item.provinceName }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="view-box">
|
||||||
|
<view class="map-box">
|
||||||
|
<image
|
||||||
|
:src="mapData.mapImage"
|
||||||
|
mode="widthFix"
|
||||||
|
class="img-map"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="middle-img-wrap"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
v-if="mapData.middleImage"
|
||||||
|
:src="mapData.middleImage"
|
||||||
|
mode="widthFix"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
|
<view class="tabs-wrap">
|
||||||
|
<view @click="handleTab(item.value)" :class="{ 'tab-actived' : item.value === actived }" class="tab-item" v-for="(item, index) in tabs" :key="index">{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-wrap">
|
||||||
|
<view v-if="actived === 1">
|
||||||
|
<projects :landmarkDataId="landmarkDataId" :info="mapData.serviceInfo"></projects>
|
||||||
|
</view>
|
||||||
|
<view v-if="actived === 2">
|
||||||
|
<culture :landmarkDataId="landmarkDataId"></culture>
|
||||||
|
</view>
|
||||||
|
<view v-if="actived === 3">
|
||||||
|
<information :landmarkDataId="landmarkDataId"></information>
|
||||||
|
</view>
|
||||||
|
<view v-if="actived === 4">
|
||||||
|
<goods :goods="goods" v-if="goods.length > 0"></goods>
|
||||||
|
<image
|
||||||
|
v-if="isCompleteLoadGood"
|
||||||
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
|
mode="widthFix"
|
||||||
|
class="loadend"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<goo-skeleton
|
||||||
|
v-else
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getProvince,
|
||||||
|
getProvinceGoods,
|
||||||
|
getProvinceList
|
||||||
|
} from "@/api/product"
|
||||||
|
import goods from "./components/goods.vue"
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
import projects from './components/projects.vue'
|
||||||
|
import culture from "./components/culture.vue"
|
||||||
|
import information from "./components/information.vue"
|
||||||
export default {
|
export default {
|
||||||
name: "landMark",
|
name: 'LandMarkPage',
|
||||||
|
components: {
|
||||||
|
goods,
|
||||||
|
projects,
|
||||||
|
culture,
|
||||||
|
information
|
||||||
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
actived: 1,
|
||||||
|
tabs: [
|
||||||
|
{name: '项目', value: 1},
|
||||||
|
{name: '文化', value: 2},
|
||||||
|
{name: '资讯', value: 3},
|
||||||
|
{name: '产品', value: 4},
|
||||||
|
],
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
|
isLoad: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
navList: [],
|
navList: [],
|
||||||
navIndex: 0,
|
navIndex: 0,
|
||||||
mapData: null,
|
mapData: null,
|
||||||
mapLocations: [],
|
|
||||||
goods: [],
|
goods: [],
|
||||||
directionClass: ['', 'up', 'right', 'down', 'left'],
|
isCompleteLoadGood: false,
|
||||||
|
pageKeyId: Object.freeze('landmarkGoodsIndex')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
topBoxBgColor() {
|
landmarkDataId() {
|
||||||
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
|
return this.navList[this.navIndex] ? this.navList[this.navIndex]['id'] : null
|
||||||
},
|
|
||||||
viewBoxBgColor() {
|
|
||||||
return this.mapData?.backgroundColor || '#FFFFFF';
|
|
||||||
},
|
|
||||||
scale() {
|
|
||||||
return 718 / (this.mapData?.mapImageWidth || 1);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getNavList();
|
this.getNavList()
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
this.pageToHideHandle()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.page++;
|
if (this.isCompleteLoadGood) {
|
||||||
this.fetchGoods();
|
return
|
||||||
|
}
|
||||||
|
this.page++
|
||||||
|
this.fetchGoods()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleTab(value) {
|
||||||
|
this.actived = value
|
||||||
|
},
|
||||||
getNavList() {
|
getNavList() {
|
||||||
getProvinceList().then(({data}) => {
|
getProvinceList().then(({data}) => {
|
||||||
this.navList = data;
|
this.navList = data
|
||||||
this.changeNav(this.navIndex);
|
this.changeNav(this.navIndex)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
search() {
|
|
||||||
this.page = 1;
|
|
||||||
this.fetchGoods();
|
|
||||||
},
|
|
||||||
|
|
||||||
changeNav(index) {
|
changeNav(index) {
|
||||||
this.navIndex = index;
|
this.navIndex = index
|
||||||
this.page = 1;
|
this.page = 1
|
||||||
this.getMap();
|
this.goods = []
|
||||||
this.fetchGoods();
|
this.isCompleteLoadGood = false
|
||||||
|
this.actived = 1
|
||||||
|
this.getMap()
|
||||||
|
this.fetchGoods()
|
||||||
},
|
},
|
||||||
|
|
||||||
getMap() {
|
getMap() {
|
||||||
const id = this.navList[this.navIndex]['id']
|
const id = this.navList[this.navIndex]['id']
|
||||||
getProvince(id).then(({data}) => {
|
getProvince(id).then(({data}) => {
|
||||||
this.mapData = data;
|
this.mapData = data || {}
|
||||||
this.mapLocations = data.mapLocations;
|
this.isLoad = true
|
||||||
this.calcPosition();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 计算位置
|
|
||||||
calcPosition() {
|
|
||||||
this.mapLocations?.forEach(item => {
|
|
||||||
item.gx = item.x * this.scale;
|
|
||||||
item.gy = item.y * this.scale;
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchGoods() {
|
fetchGoods() {
|
||||||
const id = this.navList[this.navIndex]['id']
|
const id = this.navList[this.navIndex]['id']
|
||||||
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
|
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
|
||||||
if (this.page === 1) this.goods = [];
|
const len = data.length
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < len; i++) {
|
||||||
this.goods.push(data[i]);
|
this.goods.push(data[i])
|
||||||
}
|
}
|
||||||
|
if (len === 0 || len < 10) {
|
||||||
|
this.isCompleteLoadGood = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goGoods(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
|
||||||
<view class="pkg-product-land-mark" v-if="mapData">
|
|
||||||
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
|
|
||||||
<view class="view-box">
|
|
||||||
<view class="search-box flex ai-center">
|
|
||||||
<input
|
|
||||||
v-model="keyword"
|
|
||||||
type="text"
|
|
||||||
placeholder="搜索商品"
|
|
||||||
placeholder-style="color:#999"
|
|
||||||
@confirm="search()"
|
|
||||||
/>
|
|
||||||
<image
|
|
||||||
:src="webUrl+'/20231223183627184005.png'"
|
|
||||||
mode="scaleToFill"
|
|
||||||
style="width:30rpx;height:30rpx"
|
|
||||||
@click="search()"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="map-box">
|
|
||||||
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
|
|
||||||
|
|
||||||
<view class="item" :style="{'left':item.gx+'rpx','top':item.gy+'rpx'}" v-for="item in mapLocations" @click="$global.navToGoods(item.productId)">
|
|
||||||
<view class="round">
|
|
||||||
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
|
|
||||||
</view>
|
|
||||||
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
|
|
||||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
|
|
||||||
<view class="title flex ai-center">{{ item.mapTitle }}</view>
|
|
||||||
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="nav flex">
|
|
||||||
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
|
|
||||||
:key="index" @click="changeNav(index)">{{ item.provinceName }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="main-box" v-if="mapData.recommended.storeImage"
|
|
||||||
@click="$global.navToGoods(mapData.recommended.productId)">
|
|
||||||
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
|
|
||||||
<view class="box-mask flex flex-col jc-end">
|
|
||||||
<view class="one-t bold">{{ mapData.recommended.title }}</view>
|
|
||||||
<view class="more-t">{{ mapData.recommended.description }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="list-box flex flex-wrap">
|
|
||||||
<view class="item" v-for="item in goods" :key="item.id" @click="$global.navToGoods(item.productId)">
|
|
||||||
<image :src="item.storeImage" mode="scaleToFill"/>
|
|
||||||
<view class="content flex flex-col jc-between">
|
|
||||||
<view class="more-t bold">{{ item.title }}</view>
|
|
||||||
<view class="flex jc-between ai-center">
|
|
||||||
<text class="price">¥{{ item.price }}</text>
|
|
||||||
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
|
|
||||||
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
|
|
||||||
v-if="goods.length===0"/>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.pkg-product-land-mark {
|
.tabs-wrap{
|
||||||
background: #F7F3ED;
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
image {
|
padding: 20rpx 20rpx 0;
|
||||||
vertical-align: middle;
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
|
.tab-item{
|
||||||
|
|
||||||
|
}
|
||||||
|
.tab-actived{
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
background: linear-gradient(to right, #C52733 0%, rgba(211,92,101,0.91) 54%, rgba(255,255,255,0.62) 100%);
|
||||||
|
border-radius: 38rpx 0rpx 0 38rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
.top-wrap{
|
||||||
|
padding: 20rpx 20rpx 0;
|
||||||
|
}
|
||||||
|
.pkg-product-land-mark {
|
||||||
|
background: #f0f0f0;
|
||||||
.top-box {
|
.top-box {
|
||||||
padding: 32rpx 0 20rpx;
|
border-radius: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
.view-box {
|
.view-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0 16rpx;
|
padding: 20rpx;
|
||||||
border-radius: 40rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.search-box {
|
|
||||||
position: absolute;
|
|
||||||
top: 20rpx;
|
|
||||||
left: 34rpx;
|
|
||||||
width: 650rpx;
|
|
||||||
height: 64rpx;
|
|
||||||
padding: 0 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 32rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
z-index: 10;
|
|
||||||
|
|
||||||
input {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
line-height: 64rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-box {
|
|
||||||
position: relative;
|
|
||||||
width: 718rpx;
|
|
||||||
|
|
||||||
.img-map {
|
.img-map {
|
||||||
width: 718rpx;
|
display: block;
|
||||||
height: auto;
|
width: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
.round {
|
|
||||||
width: 8rpx;
|
|
||||||
height: 8rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
|
|
||||||
background: #E12641;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
|
||||||
position: relative;
|
|
||||||
border: 2rpx solid #E12641;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-up {
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -100%);
|
|
||||||
width: 0;
|
|
||||||
height: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-right {
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(0, -50%);
|
|
||||||
width: 30rpx;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-down {
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, 0);
|
|
||||||
width: 0;
|
|
||||||
height: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-left {
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(-100%, -50%);
|
|
||||||
width: 30rpx;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.cover {
|
|
||||||
width: 60rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 6rpx solid #E12641;
|
|
||||||
border-radius: 50%;
|
|
||||||
z-index: 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
height: 32rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
padding: 0 16rpx;
|
|
||||||
background: #E12641;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-size: 22rpx;
|
|
||||||
line-height: 32rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-up {
|
|
||||||
top: -80rpx;
|
|
||||||
left: -50%;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
margin-right: -9rpx;
|
|
||||||
border-radius: 20rpx 0 0 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.label-right {
|
|
||||||
top: -40rpx;
|
|
||||||
left: 32rpx;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
margin-right: -9rpx;
|
|
||||||
border-radius: 20rpx 0 0 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.label-down {
|
|
||||||
left: -50%;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
margin-right: -9rpx;
|
|
||||||
border-radius: 20rpx 0 0 20rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.label-left {
|
|
||||||
left: -100%;
|
|
||||||
transform: translate(-30rpx, -40rpx);
|
|
||||||
|
|
||||||
.title {
|
|
||||||
margin-left: -9rpx;
|
|
||||||
border-radius: 0 20rpx 20rpx 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
padding: 30rpx 20rpx 0;
|
padding: 20rpx 20rpx 0 20rpx;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
.nav-item + .nav-item {
|
||||||
view {
|
margin: 0 0 0 20rpx;
|
||||||
height: 52rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0 18rpx;
|
|
||||||
border: 4rpx solid transparent;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-size: 32rpx;
|
|
||||||
}
|
}
|
||||||
|
.nav-item {
|
||||||
.active {
|
|
||||||
border-color: #FFFFFF;
|
|
||||||
border-radius: 26rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-box {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 718rpx;
|
box-sizing: border-box;
|
||||||
height: 360rpx;
|
padding: 0 32rpx 20rpx 0;
|
||||||
margin: 24rpx 16rpx;
|
color: #333;
|
||||||
border-radius: 16rpx;
|
font-size: 32rpx;
|
||||||
overflow: hidden;
|
.bg {
|
||||||
|
display: none;
|
||||||
.bg-main {
|
|
||||||
width: 718rpx;
|
|
||||||
height: 360rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-mask {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
right: 6rpx;
|
||||||
height: 200rpx;
|
width: 63rpx;
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 20rpx 16rpx 16rpx;
|
|
||||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
|
||||||
color: #FFFFFF;
|
|
||||||
|
|
||||||
.one-t {
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
font-size: 46rpx;
|
|
||||||
line-height: 52rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more-t {
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-top: 10rpx;
|
|
||||||
border-top: 1rpx solid #FFFFFF;
|
|
||||||
font-size: 28rpx;
|
|
||||||
line-height: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-box {
|
|
||||||
margin-top: 24rpx;
|
|
||||||
padding: 0 16rpx 34rpx;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
width: 234rpx;
|
|
||||||
height: 380rpx;
|
|
||||||
margin-right: 8rpx;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 234rpx;
|
|
||||||
height: 234rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
height: 122rpx;
|
|
||||||
margin: 6rpx 6rpx 18rpx;
|
|
||||||
|
|
||||||
.more-t {
|
|
||||||
font-size: 28rpx;
|
|
||||||
line-height: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.price {
|
|
||||||
font-size: 28rpx;
|
|
||||||
line-height: 36rpx;
|
|
||||||
color: #DC1616;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 118rpx;
|
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
|
}
|
||||||
//border-radius: 4rpx;
|
}
|
||||||
//color: #764A00;
|
.active {
|
||||||
//font-size: 24rpx;
|
font-size: 40rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
.bg {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.item:nth-child(3n) {
|
.middle-img-wrap {
|
||||||
margin-right: 0;
|
margin: 20rpx 0 0 0;
|
||||||
|
background: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-nodata {
|
.img-nodata {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@@ -0,0 +1,454 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pkg-product-land-mark" v-if="mapData">
|
||||||
|
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
|
||||||
|
<view class="view-box">
|
||||||
|
<view class="search-box flex ai-center">
|
||||||
|
<input
|
||||||
|
v-model="keyword"
|
||||||
|
type="text"
|
||||||
|
placeholder="搜索商品"
|
||||||
|
placeholder-style="color:#999"
|
||||||
|
@confirm="search()"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20231223183627184005.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
style="width:30rpx;height:30rpx"
|
||||||
|
@click="search()"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="map-box">
|
||||||
|
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
|
||||||
|
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in mapLocations"
|
||||||
|
:key="index"
|
||||||
|
class="item"
|
||||||
|
:style="{'left':item.gx+'rpx','top':item.gy+'rpx'}"
|
||||||
|
@click="goGoods(item.productId)"
|
||||||
|
>
|
||||||
|
<view class="round">
|
||||||
|
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
|
||||||
|
</view>
|
||||||
|
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
|
||||||
|
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
|
||||||
|
<view class="title flex ai-center">{{ item.mapTitle }}</view>
|
||||||
|
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="nav flex">
|
||||||
|
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
|
||||||
|
:key="index" @click="changeNav(index)">{{ item.provinceName }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="main-box" v-if="mapData.recommended.storeImage"
|
||||||
|
@click="goGoods(mapData.recommended.productId)">
|
||||||
|
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
|
||||||
|
<view class="box-mask flex flex-col jc-end">
|
||||||
|
<view class="one-t bold">{{ mapData.recommended.title }}</view>
|
||||||
|
<view class="more-t">{{ mapData.recommended.description }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list-box flex flex-wrap">
|
||||||
|
<view class="item" v-for="item in goods" :key="item.id" @click="goGoods(item.productId)">
|
||||||
|
<image :src="item.storeImage" mode="scaleToFill"/>
|
||||||
|
<view class="content flex flex-col jc-between">
|
||||||
|
<view class="more-t bold">{{ item.title }}</view>
|
||||||
|
<view class="flex jc-between ai-center">
|
||||||
|
<text class="price">¥{{ item.price }}</text>
|
||||||
|
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
|
||||||
|
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
|
||||||
|
v-if="goods.length===0"/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'LandMarkPage',
|
||||||
|
mixins: [pageListenMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
keyword: '',
|
||||||
|
page: 1,
|
||||||
|
navList: [],
|
||||||
|
navIndex: 0,
|
||||||
|
mapData: null,
|
||||||
|
mapLocations: [],
|
||||||
|
goods: [],
|
||||||
|
directionClass: ['', 'up', 'right', 'down', 'left'],
|
||||||
|
pageKeyId: Object.freeze('landmarkGoodsIndex')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
topBoxBgColor() {
|
||||||
|
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
|
||||||
|
},
|
||||||
|
viewBoxBgColor() {
|
||||||
|
return this.mapData?.backgroundColor || '#FFFFFF';
|
||||||
|
},
|
||||||
|
scale() {
|
||||||
|
return 718 / (this.mapData?.mapImageWidth || 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getNavList();
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
this.pageToHideHandle()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.page++;
|
||||||
|
this.fetchGoods();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getNavList() {
|
||||||
|
getProvinceList().then(({data}) => {
|
||||||
|
this.navList = data;
|
||||||
|
this.changeNav(this.navIndex);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
search() {
|
||||||
|
this.page = 1;
|
||||||
|
this.fetchGoods();
|
||||||
|
},
|
||||||
|
|
||||||
|
changeNav(index) {
|
||||||
|
this.navIndex = index;
|
||||||
|
this.page = 1;
|
||||||
|
this.getMap();
|
||||||
|
this.fetchGoods();
|
||||||
|
},
|
||||||
|
|
||||||
|
getMap() {
|
||||||
|
const id = this.navList[this.navIndex]['id']
|
||||||
|
getProvince(id).then(({data}) => {
|
||||||
|
this.mapData = data;
|
||||||
|
this.mapLocations = data.mapLocations;
|
||||||
|
this.calcPosition();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 计算位置
|
||||||
|
calcPosition() {
|
||||||
|
this.mapLocations?.forEach(item => {
|
||||||
|
item.gx = item.x * this.scale;
|
||||||
|
item.gy = item.y * this.scale;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
fetchGoods() {
|
||||||
|
const id = this.navList[this.navIndex]['id']
|
||||||
|
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
|
||||||
|
if (this.page === 1) this.goods = [];
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
this.goods.push(data[i]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goGoods(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.pkg-product-land-mark {
|
||||||
|
background: #F7F3ED;
|
||||||
|
|
||||||
|
image {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-box {
|
||||||
|
padding: 32rpx 0 20rpx;
|
||||||
|
|
||||||
|
.view-box {
|
||||||
|
position: relative;
|
||||||
|
margin: 0 16rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
position: absolute;
|
||||||
|
top: 20rpx;
|
||||||
|
left: 34rpx;
|
||||||
|
width: 650rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 64rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-box {
|
||||||
|
position: relative;
|
||||||
|
width: 718rpx;
|
||||||
|
|
||||||
|
.img-map {
|
||||||
|
width: 718rpx;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
.round {
|
||||||
|
width: 8rpx;
|
||||||
|
height: 8rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
|
||||||
|
background: #E12641;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
position: relative;
|
||||||
|
border: 2rpx solid #E12641;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-up {
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -100%);
|
||||||
|
width: 0;
|
||||||
|
height: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-right {
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
width: 30rpx;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-down {
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 0;
|
||||||
|
height: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-left {
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-100%, -50%);
|
||||||
|
width: 30rpx;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 6rpx solid #E12641;
|
||||||
|
border-radius: 50%;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
padding: 0 16rpx;
|
||||||
|
background: #E12641;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 32rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-up {
|
||||||
|
top: -80rpx;
|
||||||
|
left: -50%;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-right: -9rpx;
|
||||||
|
border-radius: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-right {
|
||||||
|
top: -40rpx;
|
||||||
|
left: 32rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-right: -9rpx;
|
||||||
|
border-radius: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-down {
|
||||||
|
left: -50%;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-right: -9rpx;
|
||||||
|
border-radius: 20rpx 0 0 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-left {
|
||||||
|
left: -100%;
|
||||||
|
transform: translate(-30rpx, -40rpx);
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-left: -9rpx;
|
||||||
|
border-radius: 0 20rpx 20rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav {
|
||||||
|
padding: 30rpx 20rpx 0;
|
||||||
|
overflow-x: scroll;
|
||||||
|
|
||||||
|
view {
|
||||||
|
height: 52rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 18rpx;
|
||||||
|
border: 4rpx solid transparent;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
border-color: #FFFFFF;
|
||||||
|
border-radius: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-box {
|
||||||
|
position: relative;
|
||||||
|
width: 718rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
margin: 24rpx 16rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.bg-main {
|
||||||
|
width: 718rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-mask {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20rpx 16rpx 16rpx;
|
||||||
|
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
||||||
|
color: #FFFFFF;
|
||||||
|
|
||||||
|
.one-t {
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
font-size: 46rpx;
|
||||||
|
line-height: 52rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.more-t {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
border-top: 1rpx solid #FFFFFF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-box {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
padding: 0 16rpx 34rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 234rpx;
|
||||||
|
height: 380rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 234rpx;
|
||||||
|
height: 234rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
height: 122rpx;
|
||||||
|
margin: 6rpx 6rpx 18rpx;
|
||||||
|
|
||||||
|
.more-t {
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
color: #DC1616;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 118rpx;
|
||||||
|
height: 42rpx;
|
||||||
|
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
|
||||||
|
//border-radius: 4rpx;
|
||||||
|
//color: #764A00;
|
||||||
|
//font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:nth-child(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-nodata {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
width: 352rpx;
|
||||||
|
height: 338rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</picker>
|
</picker>
|
||||||
<view class="item textarea acea-row row-between">
|
<view class="item textarea acea-row row-between">
|
||||||
<view>备注说明</view>
|
<view>备注说明</view>
|
||||||
<textarea placeholder="填写备注信息,100字以内" class="num" v-model="refundReasonWapExplain"></textarea>
|
<textarea placeholder="填写备注信息,100字以内" class="num inp" v-model="refundReasonWapExplain"></textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="returnBnt bg-color-red" @click="submit">申请退款</view>
|
<view class="returnBnt bg-color-red" @click="submit">申请退款</view>
|
||||||
@@ -55,12 +55,14 @@
|
|||||||
import {
|
import {
|
||||||
VUE_APP_API_URL
|
VUE_APP_API_URL
|
||||||
} from "@/config";
|
} from "@/config";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "goodsReturn",
|
name: "goodsReturn",
|
||||||
components: {
|
components: {
|
||||||
// VueCoreImageUpload
|
// VueCoreImageUpload
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: `${VUE_APP_API_URL}/upload/image`,
|
url: `${VUE_APP_API_URL}/upload/image`,
|
||||||
@@ -71,7 +73,8 @@
|
|||||||
orderInfo: {},
|
orderInfo: {},
|
||||||
reasonList: [],
|
reasonList: [],
|
||||||
reason: "",
|
reason: "",
|
||||||
refundReasonWapExplain: ""
|
refundReasonWapExplain: "",
|
||||||
|
pageKeyId: Object.freeze('userOrderRefundApply')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -138,3 +141,9 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.apply-return .list .item .inp {
|
||||||
|
padding: 4rpx 20rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+399
-96
@@ -1,103 +1,142 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="my-order" ref="container">
|
<view class="my-order v12-mx-2" ref="container" @click="handleBody">
|
||||||
|
<view class="m-search-wrap v12-mb-2 v12-mt-3">
|
||||||
|
<u-search placeholder="请输入商品名/订单号" shape="round" :inputStyle="inputStyle" :showAction="false" bgColor="#FFF" v-model="keyword" @search="changeType"></u-search>
|
||||||
|
</view>
|
||||||
|
<view class="m-tab-warp">
|
||||||
|
<u-tabs
|
||||||
|
lineHeight="0"
|
||||||
|
lineColor="#FF564A"
|
||||||
|
:activeStyle="activeStyle"
|
||||||
|
:inactiveStyle="inactiveStyle"
|
||||||
|
:current="type"
|
||||||
|
:list="tabList"
|
||||||
|
@click="tabChange">
|
||||||
|
</u-tabs>
|
||||||
|
</view>
|
||||||
|
<!-- <u-tabs lineColor="#FF564A" activeStyle="#FF564A" inactiveStyle="#C2C5CC" :current="type" :list="tabList"
|
||||||
|
@click="tabChange"></u-tabs> -->
|
||||||
|
|
||||||
<u-tabs lineColor="#FF564A" activeStyle="#FF564A" inactiveStyle="#C2C5CC" :current="type" :list="tabList"
|
<view class="list v12-ma-0" style="padding: 0rpx 0 30rpx;">
|
||||||
@click="tabChange"></u-tabs>
|
|
||||||
|
|
||||||
<view class="list" style="padding: 80rpx 0 30rpx;">
|
|
||||||
<view class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
|
<view class="item" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
|
||||||
<view class="shop-info flex jc-between ai-center" v-if="order.merName">
|
<view class="shop-info flex jc-between ai-center" v-if="order.merName" @click="goStore(order)">
|
||||||
<view class="flex ai-center">
|
<view class="flex ai-center">
|
||||||
<image :src="webUrl+'/20221008152431059973.png'" style="width: 40rpx;height: 40rpx"/>
|
<image :src="webUrl+'/orderIcon/shop.png'" style="width: 32rpx;height: 32rpx"/>
|
||||||
<text class="name">{{ order.merName }}</text>
|
<text class="name v12-font-weight-400 v12-dark-text v12-font-24">{{ order.merName }}</text>
|
||||||
|
<image :src="webUrl+'/orderIcon/arrow.png'" style="width: 24rpx;height: 24rpx; margin-top: 5rpx"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex ai-center">
|
<view class="flex ai-center">
|
||||||
<image :src="webUrl+'/20221008152418897577.png'" style="width: 24rpx;height: 24rpx"/>
|
<image :src="webUrl+'/orderIcon/map.png'" style="width: 28rpx;height: 28rpx"/>
|
||||||
<text class="address">{{ order.merCityName }}</text>
|
<text class="address v12-dark-text v12-font-bold v12-font-24">{{ order.merCityName }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="title acea-row row-between-wrapper" style="padding: 0 0 0 30rpx !important;">
|
<view class="title acea-row row-between-wrapper" style="padding: 0 0 0 30rpx !important;">
|
||||||
<view class="acea-row row-middle">
|
<view class="acea-row row-middle">
|
||||||
<span class="sign cart-color acea-row row-center-wrapper"
|
<span class="sign cart-color acea-row row-center-wrapper v12-priamry-text v12-priamry-border v12-radius-40" v-if="order.combinationId > 0">拼团</span>
|
||||||
v-if="order.combinationId > 0">拼团</span>
|
<span class="sign cart-color acea-row row-center-wrapper v12-priamry-text v12-priamry-border v12-radius-40" v-if="order.seckillId > 0">秒杀</span>
|
||||||
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
|
<span class="sign cart-color acea-row row-center-wrapper v12-priamry-text v12-priamry-border v12-radius-40" v-if="order.bargainId > 0">砍价</span>
|
||||||
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
|
<span class="sign cart-color acea-row row-center-wrapper v12-priamry-text v12-priamry-border v12-radius-40" v-if="order.storeId > 0">门店</span>
|
||||||
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span>
|
|
||||||
订单号:{{ order.orderId }}
|
订单号:{{ order.orderId }}
|
||||||
</view>
|
</view>
|
||||||
<view class="font-color-white statusTag" v-if="order.isTickets===1 && order._status._type === 1">
|
<view class="font-color-white statusTag v12-primary" v-if="order.isTickets===1 && order._status._type === 1">
|
||||||
待核销
|
待核销
|
||||||
</view>
|
</view>
|
||||||
<view class="font-color-white statusTag" v-else>{{ getStatus(order) }}</view>
|
<view class="font-color-white statusTag v12-primary" v-else>{{ getStatus(order) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goOrderDetails(order)">
|
<view @click="goOrderDetails(order)">
|
||||||
<view class="item-info acea-row row-between row-top" v-for="(cart,cartInfoIndex) in order.cartInfo"
|
<view class="item-info acea-row row-between row-top" v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||||
:key="cartInfoIndex">
|
:key="cartInfoIndex">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="cart.productInfo.image" @click.stop="
|
<image
|
||||||
$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:cart.productInfo.id} })
|
v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"
|
||||||
" v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"/>
|
:src="cart.productInfo.image"
|
||||||
<image :src="cart.productInfo.image" @click.stop="
|
@click.stop="gotoGoodDetail(cart, 1, { id: cart.productInfo.id })"
|
||||||
$yrouter.push({
|
/>
|
||||||
path: '/pages/activity/GroupDetails/index',query:{id:cart.combinationId}
|
<image
|
||||||
})
|
v-else-if="cart.combinationId > 0"
|
||||||
" v-else-if="cart.combinationId > 0"/>
|
:src="cart.productInfo.image"
|
||||||
<image :src="cart.productInfo.image" @click.stop="
|
@click.stop="gotoGoodDetail(cart, 2, { id: cart.combinationId })"
|
||||||
$yrouter.push({
|
/>
|
||||||
path: '/pages/activity/DargainDetails/index',query:{id:cart.bargainId}
|
<image
|
||||||
})
|
v-else-if="cart.bargainId > 0"
|
||||||
" v-else-if="cart.bargainId > 0"/>
|
:src="cart.productInfo.image"
|
||||||
<image :src="cart.productInfo.image" @click.stop="
|
@click.stop="gotoGoodDetail(cart, 3, { id: cart.bargainId })"
|
||||||
$yrouter.push({
|
/>
|
||||||
path: '/pages/activity/SeckillDetails/index',query:{id:cart.seckillId}
|
<image
|
||||||
})
|
v-else-if="cart.seckillId > 0"
|
||||||
" v-else-if="cart.seckillId > 0"/>
|
:src="cart.productInfo.image"
|
||||||
</view>
|
@click.stop="gotoGoodDetail(cart, 4, { id: cart.seckillId })"
|
||||||
<view class="text acea-row row-between">
|
/>
|
||||||
<view class="acea-row row-column" style="width: 100%">
|
|
||||||
<view class="name line2">{{ cart.productInfo.storeName }}</view>
|
|
||||||
<view class="attr line1" style="color: #999999;" v-if="cart.productInfo.attrInfo">
|
|
||||||
属性:{{ cart.productInfo.attrInfo.sku }}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
<view class="acea-row name-wrap">
|
||||||
|
<view class="name more-t v12-font-bold">{{ cart.productInfo.storeName }}</view>
|
||||||
<view class="money">
|
<view class="money">
|
||||||
<view>¥{{ force2Decimal(cart.truePrice) }}</view>
|
<view>
|
||||||
<view>x{{ cart.cartNum }}</view>
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">{{ force2Decimal(cart.truePrice) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="acea-row attr-wrap ">
|
||||||
|
<view
|
||||||
|
v-if="cart.productInfo.attrInfo"
|
||||||
|
class="attr v12-secondary-dark-text v12-font-24 "
|
||||||
|
>
|
||||||
|
{{ cart.productInfo.attrInfo.sku }}
|
||||||
|
</view>
|
||||||
|
<view class="v12-dark-text v12-font-22">x{{ cart.cartNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="totalPrice acea-row row-between row-middle">
|
<view class="totalPrice acea-row row-between row-middle">
|
||||||
<view class="" v-if="order.createTime"><span class="orderTime">{{ order.createTime }}</span></view>
|
<view class="" v-if="order.createTime"><span class="orderTime v12-font-24 v12-dark1-text">{{ order.createTime }}</span></view>
|
||||||
<view class="">共{{ order.totalNum || 0 }}件商品,总金额
|
<view class="v12-font-24 v12-dark1-text">共{{ order.totalNum || 0 }}件商品,
|
||||||
<text class="money font-color-lightred">¥{{ force2Decimal(order.payPrice) }}</text>
|
<text class="v12-dark-text v12-font-28 v12-font-bold">
|
||||||
|
总金额
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-22 v12-primary-text v12-font-bold">
|
||||||
|
¥
|
||||||
|
</text>
|
||||||
|
<text class="money font-color-lightred v12-font-28 v12-primary-text v12-font-bold">{{ force2Decimal(order.payPrice) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom flex jc-between ai-center">
|
<view class="bottom flex jc-between ai-center">
|
||||||
<view class="group-btn"
|
<view class="group-btn"
|
||||||
v-if="(Number(order._status._type) === 2 || Number(order._status._type) === 3) &&
|
v-if="(Number(order._status._type) === 2 || Number(order._status._type) === 3) &&
|
||||||
order.isTickets === 0">
|
order.isTickets === 0">
|
||||||
<text class="btn-more" @click="tapShowMore(order,orderListIndex)">更多</text>
|
<text class="btn-more v12-font-28 v12-font-bold" @click.stop="tapShowMore(order,orderListIndex)">更多</text>
|
||||||
<view class="group-float" v-show="order.showMore">
|
<view class="group-float" v-show="order.showMore">
|
||||||
<view class="btn btn-service flex jc-center ai-center" @click="goRoom(order)"
|
<view class="btn btn-service flex jc-center ai-center v12-font-24" @click="goRoom(order)"
|
||||||
v-if="order.merName">联系客服
|
v-if="order.merName">联系商家
|
||||||
</view>
|
</view>
|
||||||
<view class="btn flex jc-center ai-center" @click="goRefund(order)">申请退款</view>
|
<view class="btn flex jc-center ai-center v12-font-24" @click="goRefund(order)">申请退款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="bnt service" @click="goRoom(order)" v-if="order.merName">联系客服</view>
|
<view class="v12-justify-between" style="width: 100%">
|
||||||
<view v-else></view>
|
<view>
|
||||||
|
<view class="bnt service" @click="goRoom(order)" v-if="order.merName && order._status._type != 0 && Number(order._status._type) !== 9">联系商家</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between">
|
||||||
|
<view class="bnt service" @click="goOrderDetails(order)" v-if="['-1','-2','-3'].includes(order._status._type)">查看详情</view>
|
||||||
|
<view class="bnt service" @click="delOrder(order)" v-if="['9'].includes(order._status._type)">删除订单</view>
|
||||||
|
<!-- <view class="bnt v12-primary-text v12-primary-border" @click="takeOrder(order)" v-if="['-2','-3'].includes(order._status._type)">确认收货</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view v-else></view> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<template v-if="order._status._type == 0">
|
<template v-if="order._status._type == 0">
|
||||||
<view class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</view>
|
<view class="bnt cancelBnt v12-dark-text v12-dark-border" @click="cancelOrder(order)">取消订单</view>
|
||||||
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">立即付款</view>
|
<view class="bnt cancelBnt v12-dark-text v12-dark-border" @click="addressTap(order)">修改地址</view>
|
||||||
|
<view class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" @click="subscribePay(order)">立即付款</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="(order._status._type == 1 || order._status._type == 9) && order.isTickets==0">
|
<template v-if="(order._status._type == 1 ) && order.isTickets==0">
|
||||||
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">查看详情</view>
|
<view class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" @click="goOrderDetails(order)">查看详情</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type == 1 && order.isTickets == 1">
|
<template v-if="order._status._type == 1 && order.isTickets == 1">
|
||||||
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">立即核销</view>
|
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">立即核销</view>
|
||||||
@@ -106,23 +145,31 @@
|
|||||||
<view class="bnt default" v-if="order.isExtendedDelivery==0"
|
<view class="bnt default" v-if="order.isExtendedDelivery==0"
|
||||||
@click="toDelay(order.orderId)">延长收货
|
@click="toDelay(order.orderId)">延长收货
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt default" @click="goLogistics(order)">查看物流</view>
|
<view class="bnt default v12-radius-40" @click="goLogistics(order)">查看物流</view>
|
||||||
<view class="bnt bg-color-lightred" @click="takeOrder(order)">确认收货</view>
|
<view class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" @click="takeOrder(order)">确认收货</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type == 3">
|
<template v-if="order._status._type == 3">
|
||||||
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">去评价</view>
|
<view class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" @click="goOrderDetails(order)">去评价</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type === 4">
|
<template v-if="order._status._type === 4">
|
||||||
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">查看订单</view>
|
<view class="bnt bg-color-lightred" @click="goOrderDetails(order)">查看订单</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="v12-px-3 v12-pb-4" v-if="order._status._type == 1">
|
||||||
|
<view class="v12-font-22 v12-secondary-dark-text order-tips" v-if="order.isFastPost !== 0">商家已接收您的订单,支付成功后预计{{ order.isFastPost === 1 ? 48 : 72 }}小时内发货</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-modal :show="showExtend" title="确认延长收货时间?" content='每笔订单只能延长一次哦' showCancelButton
|
<u-modal
|
||||||
@cancel="showExtend=false" @confirm="doneDelay"></u-modal>
|
:show="showExtend"
|
||||||
|
title="确认延长收货时间?"
|
||||||
|
content='每笔订单只能延长一次哦'
|
||||||
|
showCancelButton
|
||||||
|
@cancel="showExtend=false"
|
||||||
|
@confirm="doneDelay">
|
||||||
|
</u-modal>
|
||||||
<view class="noCart" v-if="orderList.length === 0 && page > 1">
|
<view class="noCart" v-if="orderList.length === 0 && page > 1">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="webUrl+'/20240102232734472795.png'"/>
|
<image :src="webUrl+'/20240102232734472795.png'"/>
|
||||||
@@ -130,25 +177,57 @@
|
|||||||
</view>
|
</view>
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||||
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
||||||
|
<passkeyborad
|
||||||
|
:money="orderInfo.payPrice"
|
||||||
|
showMoney
|
||||||
|
:show="isShowPayPwdPop"
|
||||||
|
ref='payPwdPop'
|
||||||
|
@close="pwdPopClose"
|
||||||
|
@finish="pwdPopFinish"
|
||||||
|
></passkeyborad>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {getOrderData, getOrderList, orderDelay} from "@/api/order";
|
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||||
import {cancelOrderHandle, payOrderHandle, takeOrderHandle} from "@/libs/order";
|
import {getOrderData, getOrderList, orderDelay, editAddress } from "@/api/order";
|
||||||
|
import {cancelOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle, delOrderHandle} from "@/libs/order";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
import Payment from "@/components/Payment";
|
import Payment from "@/components/Payment";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MyOrder",
|
name: "MyOrder",
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isShowPayPwdPop: false,
|
||||||
|
inputStyle: {
|
||||||
|
height: '64rpx',
|
||||||
|
},
|
||||||
|
activeStyle: {
|
||||||
|
color: '#C52733',
|
||||||
|
background: 'rgba(197,39,51,0.1)',
|
||||||
|
borderRadius: '30rpx',
|
||||||
|
padding: '5rpx 20rpx',
|
||||||
|
fontWeight: '600'
|
||||||
|
},
|
||||||
|
inactiveStyle: {
|
||||||
|
height: '48rpx !important',
|
||||||
|
background: '#fff !important',
|
||||||
|
borderRadius: '30rpx !important',
|
||||||
|
color: '#333333 !important',
|
||||||
|
padding: '5rpx 15rpx',
|
||||||
|
fontSize: '28rpx !important',
|
||||||
|
lineHeight: '48rpx !important'
|
||||||
|
},
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
tabList: [
|
tabList: [
|
||||||
{name: '全部'},
|
{name: '全部'},
|
||||||
{name: '待付款'},
|
{name: '待付款'},
|
||||||
{name: '待发货'},
|
{name: '待发货'},
|
||||||
{name: '待收货/待核销'},
|
{name: '待收货/待核销'},
|
||||||
|
{name: '退款/售后'},
|
||||||
{name: '待评价'},
|
{name: '待评价'},
|
||||||
{name: '已完成'}],
|
{name: '已完成'}],
|
||||||
offlinePayStatus: 2,
|
offlinePayStatus: 2,
|
||||||
@@ -162,42 +241,174 @@ export default {
|
|||||||
pay: false,
|
pay: false,
|
||||||
payType: ["yue", "weixin"],
|
payType: ["yue", "weixin"],
|
||||||
from: this.$deviceType,
|
from: this.$deviceType,
|
||||||
|
orderInfo: {},
|
||||||
showExtend: false,
|
showExtend: false,
|
||||||
delayId: null,
|
delayId: null,
|
||||||
|
pageKeyId: Object.freeze('userOrderIndex'),
|
||||||
|
keyword: '',
|
||||||
|
_orderId: '',
|
||||||
|
addressId: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Loading,
|
Loading,
|
||||||
Payment
|
Payment,
|
||||||
|
passkeyborad
|
||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo"]),
|
computed: mapGetters(["userInfo"]),
|
||||||
onShow: function () {
|
onShow() {
|
||||||
this.type = parseInt(this.$yroute.query.type) || 0;
|
this.type = this.type || parseInt(this.$yroute.query.type) || 0;
|
||||||
this.changeType(this.type);
|
this.changeType(this.type);
|
||||||
this.getOrderData();
|
this.getOrderData();
|
||||||
this.getOrderList();
|
this.getOrderListReq();
|
||||||
|
uni.$on('chooseAddress', (res) => {
|
||||||
|
this.addressId = res.id
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide() {
|
||||||
this.orderList = [];
|
this.orderList = [];
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.limit = 20;
|
this.limit = 20;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
addressId(val) {
|
||||||
|
if(val) {
|
||||||
|
const params = {
|
||||||
|
addressId: this.addressId,
|
||||||
|
orderId: this._orderId
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.showModal({
|
||||||
|
title:'确定修改地址吗?',
|
||||||
|
content: '',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确认',
|
||||||
|
success:(success)=>{
|
||||||
|
if(success.confirm) {
|
||||||
|
uni.showLoading()
|
||||||
|
editAddress(params).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
title: '修改成功!'
|
||||||
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete:(complete)=>{
|
||||||
|
this.addressId = ''
|
||||||
|
this._orderId = ''
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleBody() {
|
||||||
|
this.orderList.forEach((e) => {
|
||||||
|
e.showMore = false
|
||||||
|
})
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
delOrder(order) {
|
||||||
|
delOrderHandle(order.orderId).then(() => {
|
||||||
|
// this.goBack()
|
||||||
|
this.page = 1
|
||||||
|
this.orderList = [];
|
||||||
|
this.getOrderListReq()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goStore(order) {
|
||||||
|
if(!order.hotelId) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未找到相关店铺!'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pagesInn/inn/innHome",
|
||||||
|
query: {
|
||||||
|
id: order.hotelId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async toYuePay(payPwd) {
|
||||||
|
const that = this;
|
||||||
|
//网络请求
|
||||||
|
await yuePayOrderHandle(this.orderInfo.orderId, "yue", that.from, payPwd);
|
||||||
|
that.changeType();
|
||||||
|
this.payPassword = "";
|
||||||
|
},
|
||||||
|
pwdPopClose() {
|
||||||
|
this.isShowPayPwdPop = false;
|
||||||
|
},
|
||||||
|
pwdPopFinish(payPwd) {
|
||||||
|
this.payPassword = payPwd;
|
||||||
|
|
||||||
|
this.toYuePay(payPwd);
|
||||||
|
|
||||||
|
this.isShowPayPwdPop = false;
|
||||||
|
},
|
||||||
|
subscribePay(order) {
|
||||||
|
this.orderInfo = order
|
||||||
|
uni.requestSubscribeMessage({
|
||||||
|
tmplIds: ['7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE', 'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU', '9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU'],
|
||||||
|
complete: () => this.pay = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addressTap(order) {
|
||||||
|
this._orderId = order.orderId
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/user/address/AddressManagement/index",
|
||||||
|
query: {
|
||||||
|
choosMode: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
force2Decimal(v) {
|
force2Decimal(v) {
|
||||||
return this.$force2Decimal(v);
|
return this.$force2Decimal(v);
|
||||||
},
|
},
|
||||||
goRoom(order) {
|
goRoom(order) {
|
||||||
|
const params = {
|
||||||
|
goodsId: order.cartInfo[0].productId,
|
||||||
|
goodsName: order.cartInfo[0].productInfo.storeName,
|
||||||
|
skuStr: order.cartInfo[0].productInfo.attrInfo.sku,
|
||||||
|
price: order.cartInfo[0].productInfo.attrInfo.price,
|
||||||
|
seckillId: order.cartInfo[0].seckillId,
|
||||||
|
cover: order.cartInfo[0].productInfo.attrInfo.image,
|
||||||
|
goodsData: '',
|
||||||
|
seckillData: ''
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}`
|
url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}¶ms=${JSON.stringify(params)}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goRefund(order) {
|
goRefund(order) {
|
||||||
|
// fix bug#1631
|
||||||
|
if (this.type === 4 || parseInt(order._status._type) === 3) {
|
||||||
|
// 打开售后的目的就是开启已完成/待评价订单的退款功能,确认打开售后之后,小程序用户再点击申请退款,就可以进入退款申请填写页面,正常走退款流程,提交退款申请以后,订单状态变为退款中
|
||||||
|
if (order.refundSystemStatus === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单已收货,如需退款请联系商家',
|
||||||
|
mask: false,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pkg_orders/views/refund?id=${order.orderId}`
|
url: `/pkg_orders/views/refund?id=${order.orderId}`
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pkg_orders/views/refund?id=${order.orderId}`
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
goLogistics(order) {
|
goLogistics(order) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
@@ -224,6 +435,30 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
gotoGoodDetail(cart, type, query){
|
||||||
|
// isProductStillExist:0-不存在,1-存在
|
||||||
|
const isProductStillExist = cart.isProductStillExist || 0
|
||||||
|
if (isProductStillExist === 0) {
|
||||||
|
this.$dialog.toast({ mes: '商品已下架' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let path = ''
|
||||||
|
switch(type) {
|
||||||
|
case 1:
|
||||||
|
path = '/pages/shop/GoodsCon/index'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
path = '/pages/activity/GroupDetails/index'
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
path = '/pages/activity/DargainDetails/index'
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
path = '/pages/activity/SeckillDetails/index'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
this.$yrouter.push({ path, query })
|
||||||
|
},
|
||||||
getOrderData() {
|
getOrderData() {
|
||||||
getOrderData().then(res => {
|
getOrderData().then(res => {
|
||||||
this.orderData = res.data;
|
this.orderData = res.data;
|
||||||
@@ -252,7 +487,9 @@ export default {
|
|||||||
this.changeType(this.type);
|
this.changeType(this.type);
|
||||||
},
|
},
|
||||||
tabChange(item) {
|
tabChange(item) {
|
||||||
this.type = item.index;
|
|
||||||
|
|
||||||
|
this.type = item.index
|
||||||
this.changeType();
|
this.changeType();
|
||||||
},
|
},
|
||||||
changeType() {
|
changeType() {
|
||||||
@@ -260,20 +497,31 @@ export default {
|
|||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.getOrderList();
|
this.getOrderListReq();
|
||||||
},
|
},
|
||||||
getOrderList() {
|
getOrderListReq() {
|
||||||
if (this.loading || this.loaded) return;
|
if (this.loading || this.loaded) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
const types = {
|
||||||
|
0: 0,
|
||||||
|
1: 1,
|
||||||
|
2: 2,
|
||||||
|
3: 3,
|
||||||
|
4: -3,
|
||||||
|
5: 4,
|
||||||
|
6: 5,
|
||||||
|
}
|
||||||
|
const type = types[this.type]
|
||||||
const {
|
const {
|
||||||
page,
|
page,
|
||||||
limit,
|
limit,
|
||||||
type
|
keyword
|
||||||
} = this;
|
} = this;
|
||||||
getOrderList({
|
getOrderList({
|
||||||
page,
|
page,
|
||||||
limit,
|
limit,
|
||||||
type
|
type,
|
||||||
|
keyword
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.orderList = this.orderList.concat(res.data);
|
this.orderList = this.orderList.concat(res.data);
|
||||||
if (this.orderList.length > 0) {
|
if (this.orderList.length > 0) {
|
||||||
@@ -284,6 +532,9 @@ export default {
|
|||||||
this.page++;
|
this.page++;
|
||||||
this.loaded = res.data.length < this.limit;
|
this.loaded = res.data.length < this.limit;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
// console.log('???',this.loading);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
tapShowMore(order, index) {
|
tapShowMore(order, index) {
|
||||||
@@ -313,10 +564,15 @@ export default {
|
|||||||
status = "退款中";
|
status = "退款中";
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
status = "已退款";
|
status = "退款成功";
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
status = "已驳回";
|
status = "退款失败";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
status = "已取消";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
@@ -332,7 +588,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
paymentTap: function (order) {
|
paymentTap: function (order) {
|
||||||
var that = this;
|
const that = this;
|
||||||
if (
|
if (
|
||||||
!(order.combinationId > 0 || order.bargainId > 0 || order.seckillId > 0)
|
!(order.combinationId > 0 || order.bargainId > 0 || order.seckillId > 0)
|
||||||
) {
|
) {
|
||||||
@@ -353,7 +609,16 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
toPay() {
|
toPay(type) {
|
||||||
|
const that = this;
|
||||||
|
console.log(type, "支付方式");
|
||||||
|
//余额支付需要输入支付密码
|
||||||
|
if (type == "yue") {
|
||||||
|
this.isShowPayPwdPop = true;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
payOrderHandle(this.orderInfo.orderId, type, that.from);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toDelay(id) {
|
toDelay(id) {
|
||||||
@@ -368,16 +633,39 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
!this.loading && this.getOrderList();
|
!this.loading && this.getOrderListReq();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.my-order .u-tabs{
|
||||||
|
background-color: transparent !important;
|
||||||
|
position: sticky !important;
|
||||||
|
}
|
||||||
|
.my-order .u-tabs__wrapper__nav__item{
|
||||||
|
padding: 0 8rpx !important;
|
||||||
|
}
|
||||||
|
.my-order .u-search__content{
|
||||||
|
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
page {
|
page {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
.order-tips{
|
||||||
|
height: 44rpx;
|
||||||
|
background: rgba(0,0,0,0.05);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 5rpx 24rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
.m-tab-warp{
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
/deep/ .u-tabs {
|
/deep/ .u-tabs {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -387,13 +675,16 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
|
.item:first-child{
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
.item {
|
.item {
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
|
|
||||||
.shop-info {
|
.shop-info {
|
||||||
padding: 20rpx 16rpx;
|
padding: 20rpx 16rpx;
|
||||||
border-bottom: 2rpx solid #DADADA;
|
// border-bottom: 2rpx solid #eee;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
margin-left: 6rpx;
|
margin-left: 6rpx;
|
||||||
@@ -417,8 +708,7 @@ page {
|
|||||||
|
|
||||||
.item-info {
|
.item-info {
|
||||||
margin: 0 30rpx;
|
margin: 0 30rpx;
|
||||||
padding: 22rpx 0 0;
|
padding: 0 0 0 0;
|
||||||
border-top: 1rpx solid #eee;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.totalPrice {
|
.totalPrice {
|
||||||
@@ -426,22 +716,25 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
border-top: 2rpx solid #DADADA;
|
border-top: 0rpx solid #eee;
|
||||||
|
|
||||||
.bnt {
|
.bnt {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 160rpx;
|
width: 128rpx;
|
||||||
height: 56rpx;
|
height: 44rpx;
|
||||||
box-sizing: border-box;
|
border-radius: 40rpx;
|
||||||
border-radius: 20rpx;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
// font-weight: bold;
|
||||||
|
border: 1px solid #707070;
|
||||||
|
color: #333;
|
||||||
|
padding: 1px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.service {
|
.service {
|
||||||
border: 2rpx solid #0DC5C5;
|
border: 1px solid #707070;
|
||||||
color: #0DC5C5;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -465,13 +758,13 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.statusTag {
|
.statusTag {
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 0 20rpx;
|
padding: 4rpx 20rpx;
|
||||||
background: #0DC5C5;
|
background: #0DC5C5;
|
||||||
height: 38rpx;
|
height: 38rpx;
|
||||||
line-height: 38rpx;
|
line-height: 38rpx;
|
||||||
border-radius: 20rpx 0px 0px 20rpx;
|
border-radius: 60rpx 0px 0px 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-btn {
|
.group-btn {
|
||||||
@@ -503,4 +796,14 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.my-order .list .item .item-info .name-wrap,
|
||||||
|
.my-order .list .item .item-info .attr-wrap {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.my-order .list .item .item-info .attr-wrap {
|
||||||
|
margin: 10rpx 0 0 0;
|
||||||
|
}
|
||||||
|
.my-order .list .item .item-info .text .name {
|
||||||
|
width: calc(100% - 160rpx);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,25 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order-details" style="padding: 30rpx;">
|
<view class="order-details" style="padding: 30rpx;" @click="handleBody">
|
||||||
<!-- 给header上与data上加on为退款订单-->
|
<!-- 给header上与data上加on为退款订单-->
|
||||||
<view class="header acea-row row-middle" :class="refundOrder ? 'on' : ''"
|
<view class=" v12-pa-3 v12-white" :class="refundOrder ? 'on' : ''" style="border-radius: 20rpx;">
|
||||||
style="background: #0DC5C5;border-radius: 24rpx;">
|
<!-- <view class="status-img-box">
|
||||||
<view class="status-img-box">
|
|
||||||
<image class="status-img" :src="getStatusImg(orderInfo)" mode=""></image>
|
<image class="status-img" :src="getStatusImg(orderInfo)" mode=""></image>
|
||||||
|
</view> -->
|
||||||
|
<view :class="refundOrder ? 'on' : ''">
|
||||||
|
<view class="state v12-primary-text v12-font-32 v12-font-bold" v-if="orderInfo.isTickets===1 && orderInfo._status._type == 2">待核销</view>
|
||||||
|
<view class="state v12-primary-text v12-font-32 v12-font-bold" v-else>{{ getStatus(orderInfo) }}</view>
|
||||||
|
<view v-if="getStatus(orderInfo)!=='待付款'" class="v12-mt-2 v12-font-24 v12-secondary-dark-text" :class="{'fails-bg': orderInfo._status._type == -3}">{{ orderInfo._status._msg }}</view>
|
||||||
|
<view class="pending-payments flex ai-center v12-mt-2 v12-font-24 v12-secondary-dark-text" v-else>
|
||||||
|
<text>需支付{{ orderInfo.payPrice }}元,</text>
|
||||||
|
<!-- {{ orderInfo.paymentTimeout }} -->
|
||||||
|
剩余<u-count-down format="HH:mm:ss" autoStart :time="$global.diffSSS(orderInfo.paymentTimeout)" />订单将自动取消
|
||||||
</view>
|
</view>
|
||||||
<view class="data" :class="refundOrder ? 'on' : ''">
|
<u-divider></u-divider>
|
||||||
<view class="state" v-if="orderInfo.isTickets===1 && orderInfo._status._type == 2">待核销</view>
|
<div class="name v12-mb-3 v12-font-28 v12-font-bold">
|
||||||
<view class="state" v-else>{{ getStatus(orderInfo) }}</view>
|
<text class="v12-mr-3"> {{ orderInfo.realName }}</text>
|
||||||
<view v-if="getStatus(orderInfo)!=='待付款'">{{ orderInfo._status._msg }}</view>
|
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||||||
<view class="pending-payments flex ai-center" v-else>
|
</div>
|
||||||
<text>请在</text>
|
<div class="v12-font-28 v12-secondary-dark-text v12-justify-between">
|
||||||
<u-count-down :time="$global.diffSSS(this.orderInfo.paymentTimeout)"/>
|
<text class=" more-t" style="flex: 2;">{{ orderInfo.userAddress }}</text>
|
||||||
<text>内支付,逾期订单将自动取消</text>
|
<view v-if="getStatus(orderInfo) === '待付款'" @click="goAddress" class="v12-btn cancel v12-dark-text v12-dark-border v12-radius-40" >修改地址</view>
|
||||||
</view>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</view>
|
<!-- <view class="reject-reason" v-if="orderInfo._status._type==-3 && orderInfo.refundRejectReason">驳回原因:{{ orderInfo.refundRejectReason }}</view> -->
|
||||||
|
<view @click="goLogistics(orderInfo)" class="v12-radius-20 v12-white v12-pa-3 v12-mt-4" v-if="orderInfo._status._type == 3 || (orderInfo._status._type == 2 && orderInfo.isTickets!==1)">
|
||||||
|
<view >
|
||||||
|
<text class="v12-secondary-dark-text v12-font-28">{{ orderInfo.deliveryName }}:{{ orderInfo.deliveryId }}</text>
|
||||||
|
<text class="v12-font-22 v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(orderInfo.orderId)">
|
||||||
|
复制
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="v12-mt-2 v12-justify-between">
|
||||||
|
<view class="v12-align-center">
|
||||||
|
<view class="v12-align-center v12-mr-2">
|
||||||
|
<image class="logo" :src="webUrl+'/orderIcon/car.png'" mode="" style="margin-right:0; width: 32rpx; height:32rpx"/>
|
||||||
|
</view>
|
||||||
|
<view class="v12-font-28 v12-secondary-dark-text">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptStation : '暂无轨迹信息'}}</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<uni-icons type="right" size="20" color="#707070"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-mt-2">
|
||||||
|
<text class="v12-dark-text v12-font-24">{{ logistics.Traces && logistics.Traces.length > 0 ? logistics.Traces[logistics.Traces.length - 1].acceptTime : '' }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<template v-if="!refundOrder">
|
<template v-if="!refundOrder">
|
||||||
<view class="code-box flex jc-center ai-center" v-if="orderInfo.isTickets===1 && orderInfo._status._type==2">
|
<view class="code-box flex jc-center ai-center" v-if="orderInfo.isTickets===1 && orderInfo._status._type==2">
|
||||||
<image class="code-img" :src="orderInfo.code"/>
|
<image class="code-img" :src="orderInfo.code"/>
|
||||||
@@ -61,26 +90,8 @@
|
|||||||
<span class="iconfont icon-weizhi"></span>查看位置
|
<span class="iconfont icon-weizhi"></span>查看位置
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<view class="address acea-row row-middle" style="margin-top: 30rpx;border-radius: 24rpx;flex-wrap: nowrap;"
|
|
||||||
v-if="orderInfo.shippingType === 1">
|
<div class="address" v-if="orderInfo.shippingType !== 1">
|
||||||
<view class="" style="flex-shrink: 0;margin-right: 20rpx;">
|
|
||||||
<image style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20230304135530688212.png'" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="acea-row row-middle" style="flex-grow: 1;">
|
|
||||||
<view class="name acea-row row-middle row-between" style="flex-wrap: nowrap;width: 100%;">
|
|
||||||
<view class="acea-row row-middle">
|
|
||||||
{{ orderInfo.realName }}
|
|
||||||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="acea-row row-middle">
|
|
||||||
<image style="width: 32rpx;height: 32rpx;" :src="webUrl+'/20210808005541949297.png'" mode=""
|
|
||||||
@click="call(orderInfo.userPhone)"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view>{{ orderInfo.userAddress }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<div class="address" v-else>
|
|
||||||
<div class="name">
|
<div class="name">
|
||||||
{{ system_store.name }}
|
{{ system_store.name }}
|
||||||
<span class="phone">{{ system_store.phone }}</span>
|
<span class="phone">{{ system_store.phone }}</span>
|
||||||
@@ -91,50 +102,139 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<view style="margin-top: 30rpx;border-radius:24rpx;overflow: hidden;">
|
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
|
||||||
<OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods>
|
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
|
||||||
|
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in orderInfo.cartInfo" :key="d">
|
||||||
|
<view class="v12-justify-between">
|
||||||
|
<view class="">
|
||||||
|
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.productInfo.image"></image>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between v12-flex-column v12-ml-2" style="flex: 2">
|
||||||
|
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
||||||
|
{{ cart.productInfo.storeName }}
|
||||||
|
</view>
|
||||||
|
<view v-if="cart.productInfo.attrInfo" class="more-t v12-secondary-dark-text v12-font-24">
|
||||||
|
{{ cart.productInfo.attrInfo.sku }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between v12-flex-column v12-dark-text v12-text-right">
|
||||||
|
<view class=" ">
|
||||||
|
<text class="v12-font-22">
|
||||||
|
¥
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-28">{{ cart.truePrice }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="v12-font-22">
|
||||||
|
<text>x{{ cart.cartNum }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1)">
|
||||||
|
<view class="v12-justify-between v12-mt-3 v12-dark-text">
|
||||||
|
<view class="v12-font-24 v12-dark-text">
|
||||||
|
商品总价
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-right">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.totalPrice) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between v12-mt-3" v-if="orderInfo.payPostage > 0">
|
||||||
|
<view class="v12-font-24 v12-dark-text">
|
||||||
|
运费
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-right">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.payPostage) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between v12-mt-3" v-if="orderInfo.couponPrice > 0">
|
||||||
|
<view class="v12-font-24 v12-dark-text">
|
||||||
|
满减优惠
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-right">
|
||||||
|
-
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.couponPrice) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between v12-mt-3" v-if="orderInfo.useIntegral > 0">
|
||||||
|
<view class="v12-font-24 v12-dark-text">
|
||||||
|
积分抵扣
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-right">
|
||||||
|
-
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.deductionPrice) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-divider></u-divider>
|
||||||
|
<view class="v12-justify-between v12-mt-3">
|
||||||
|
<view class="v12-font-28 v12-font-bold v12-dark-text">
|
||||||
|
实付款
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-right v12-font-bold v12-primary-text">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.payPrice) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="wrapper" style="margin-top: 30rpx;border-radius: 24rpx;">
|
<view class="wrapper v12-radius-20 v12-mt-7" style="margin-top: 30rpx">
|
||||||
<view class="item acea-row row-middle"
|
<!-- <view class="item acea-row row-middle"
|
||||||
style="font-size: 40rpx;color: #080F1A;font-weight: bold;flex-wrap: nowrap;">
|
style="font-size: 40rpx;color: #080F1A;font-weight: bold;flex-wrap: nowrap;">
|
||||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210808003431044270.png'"
|
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210808003431044270.png'"
|
||||||
mode=""></image>
|
mode=""></image>
|
||||||
<text style="font-size: 26rpx;color: #080F1A;">订单信息</text>
|
<text style="font-size: 26rpx;color: #080F1A;">订单信息</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">订单编号:</view>
|
<view class="flex-0">订单编号</view>
|
||||||
<view class="conter acea-row row-middle row-right">
|
<view class="v12-text-right ">
|
||||||
{{ orderInfo.orderId }}
|
{{ orderInfo.orderId }}
|
||||||
<image @click="copyClipboard(orderInfo.orderId)" style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
<text class="v12-px-2 v12-py-1 v12-ml-1 v12-primary-text v12-primary-border v12-radius-40" @click="copyClipboard(orderInfo.orderId)">
|
||||||
:src="webUrl+'/20210808003517657208.png'" mode=""></image>
|
复制
|
||||||
|
</text>
|
||||||
|
<!-- <image @click="copyClipboard(orderInfo.orderId)" style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
||||||
|
:src="webUrl+'/20210808003517657208.png'" mode=""></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">下单时间:</view>
|
<view class="flex-0">下单时间</view>
|
||||||
<view class="conter">
|
<view class="v12-text-right">
|
||||||
<text>{{ orderInfo.createTime }}</text>
|
<text>{{ orderInfo.createTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">订单类型:</view>
|
<view class="flex-0">订单类型</view>
|
||||||
<view class="conter">{{ orderTypeName }}</view>
|
<view class="v12-text-right">{{ orderTypeName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">支付状态:</view>
|
<view class="flex-0">支付状态</view>
|
||||||
<view class="conter">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
|
<view class="v12-text-right">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">支付方式:</view>
|
<view class="flex-0">支付方式</view>
|
||||||
<view class="conter">{{ orderInfo._status._payType }}</view>
|
<view class="v12-text-right">{{ orderInfo._status._payType }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between" v-if="orderInfo.mark">
|
<view class="item acea-row row-between v12-font-24 v12-dark-text" v-if="orderInfo.mark">
|
||||||
<view class="flex-0">买家留言:</view>
|
<view class="flex-0">买家备注:</view>
|
||||||
<view class="conter">{{ orderInfo.mark }}</view>
|
<view class="v12-text-right conttent-left">{{ orderInfo.mark }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="orderInfo.status != 0">
|
<view v-if="false">
|
||||||
<view class="wrapper" v-if="true">
|
<view class="wrapper" v-if="true">
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between">
|
||||||
<view class="flex-0">配送方式:</view>
|
<view class="flex-0">配送方式:</view>
|
||||||
@@ -169,7 +269,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 退款订单详情 -->
|
<!-- 退款订单详情 -->
|
||||||
<view class="wrapper" v-if="refundOrder">
|
<view class="wrapper" v-if="false">
|
||||||
<view class="item acea-row row-between">
|
<view class="item acea-row row-between">
|
||||||
<view>收货人:</view>
|
<view>收货人:</view>
|
||||||
<view class="conter">{{ orderInfo.realName }}</view>
|
<view class="conter">{{ orderInfo.realName }}</view>
|
||||||
@@ -183,7 +283,7 @@
|
|||||||
<view class="conter">{{ orderInfo.userAddress }}</view>
|
<view class="conter">{{ orderInfo.userAddress }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapper" style="margin-top: 30rpx;border-radius: 24rpx;">
|
<view v-if="false" class="wrapper" style="margin-top: 30rpx;border-radius: 24rpx;">
|
||||||
<view class="item acea-row row-between" style="flex-wrap: nowrap;">
|
<view class="item acea-row row-between" style="flex-wrap: nowrap;">
|
||||||
<view class="acea-row row-middle" style="font-size: 40rpx;color: #080F1A;font-weight: bold;flex-wrap: nowrap;">
|
<view class="acea-row row-middle" style="font-size: 40rpx;color: #080F1A;font-weight: bold;flex-wrap: nowrap;">
|
||||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210808003453973795.png'"
|
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210808003453973795.png'"
|
||||||
@@ -212,36 +312,107 @@
|
|||||||
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
|
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
|
||||||
<view class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
|
<view class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
|
||||||
<template v-if="status.type == 0">
|
<template v-if="status.type == 0">
|
||||||
<view class="bnt cancel" @click="cancelOrder">取消订单</view>
|
<view class="v12-justify-between v12-align-center full-width" style="width: 100%">
|
||||||
<view class="bnt bg-color-red" @click="subscribePay">立即付款</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="v12-justify-between v12-align-center">
|
||||||
|
<view class="">
|
||||||
|
<text class="v12-font-22 v12-dark1-text">
|
||||||
|
共{{ orderInfo.totalNum }}件商品
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-bold v12-dark-text v12-font-28 v12-mx-2">
|
||||||
|
实付款
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-bold v12-primary-text v12-font-22">
|
||||||
|
¥
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-bold v12-primary-text v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.payPrice) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border v12-ml-1" @click="subscribePay">立即付款</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 1" >
|
<template v-if="status.type == 1" >
|
||||||
<view class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border cancel" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 2">
|
<template v-if="status.type == 2">
|
||||||
<view class="bnt default"
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="v12-justify-between">
|
||||||
|
<view class="" style="position: relative">
|
||||||
|
<text class="btn-more v12-font-24 v12-mr-2" @click.stop="showMore = !showMore">更多</text>
|
||||||
|
<view class="group-float" v-show="showMore" :style="{top: orderInfo.isExtendedDelivery==0 ? '-60px' : '-32px'}">
|
||||||
|
<view v-if="orderInfo.isExtendedDelivery==0" class="btn flex jc-center ai-center v12-font-24" @click="toDelay(orderInfo.orderId)">延长收货</view>
|
||||||
|
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border default"
|
||||||
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
|
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
|
||||||
v-if="orderInfo.isTickets!==1">查看物流
|
v-if="orderInfo.isTickets!==1">查看物流
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
|
<view class="bnt v12-primary-text v12-primary-border" @click="takeOrder">确认收货</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 3">
|
<template v-if="status.type == 3">
|
||||||
<view class="bnt default" @click="
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="v12-justify-between">
|
||||||
|
<view class="" style="position: relative">
|
||||||
|
<text class="btn-more v12-font-24 v12-mr-2" @click="showMore = !showMore">更多</text>
|
||||||
|
<view class="group-float" v-show="showMore" :style="{top: '-32px'}">
|
||||||
|
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
||||||
|
<!-- <view class="bnt v12-dark-text v12-dark-border default" @click="
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||||
" v-if="orderInfo.isTickets!==1">查看物流
|
" v-if="orderInfo.isTickets!==1">查看物流
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-if="status.type == -1">
|
||||||
|
<view style="width: 100%">
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-if="status.type == -2">
|
||||||
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-if="status.type == -3">
|
||||||
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="v12-justify-between ">
|
||||||
|
|
||||||
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 4">
|
<template v-if="status.type == 4">
|
||||||
<view class="bnt cancel" @click="delOrder">删除订单</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="delOrder">删除订单</view>
|
||||||
<view class="bnt default" @click="
|
<view
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
v-if="orderInfo.isTickets !== 1"
|
||||||
" v-if="orderInfo.isTickets!==1">查看物流
|
class="bnt v12-dark-text v12-dark-border default"
|
||||||
|
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})"
|
||||||
|
>查看物流
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 6">
|
<template v-if="status.type == 6">
|
||||||
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
|
<view class="bnt v12-primary-text v12-primary-border" @click="goGroupRule(orderInfo)">查看拼团</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
<u-modal :show="showExtend" title="确认延长收货时间?" content='每笔订单只能延长一次哦' showCancelButton
|
||||||
|
@cancel="showExtend=false" @confirm="doneDelay"></u-modal>
|
||||||
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
||||||
<view class="geoPage" v-if="mapShow">
|
<view class="geoPage" v-if="mapShow">
|
||||||
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
|
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
|
||||||
@@ -257,12 +428,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||||
import OrderGoods from "@/components/OrderGoods";
|
import OrderGoods from "@/components/OrderGoods";
|
||||||
import {orderDetail} from "@/api/order";
|
import {orderDetail, orderDelay, aginConfirm, express, editAddress} from "@/api/order";
|
||||||
import Payment from "@/components/Payment";
|
import Payment from "@/components/Payment";
|
||||||
import DataFormat from "@/components/DataFormat";
|
import DataFormat from "@/components/DataFormat";
|
||||||
import {copyClipboard} from "@/utils";
|
import {copyClipboard} from "@/utils";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
// import {postCartAdd} from "@/api/store";
|
||||||
|
|
||||||
const STATUS = [
|
const STATUS = [
|
||||||
"待付款",
|
"待付款",
|
||||||
@@ -286,9 +459,13 @@ export default {
|
|||||||
DataFormat,
|
DataFormat,
|
||||||
passkeyborad
|
passkeyborad
|
||||||
},
|
},
|
||||||
props: {},
|
mixins: [pageListenMixins],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
addressId: null,
|
||||||
|
showExtend: false,
|
||||||
|
delayId: '',
|
||||||
|
showMore: false,
|
||||||
isShowPayPwdPop: false,
|
isShowPayPwdPop: false,
|
||||||
offlinePayStatus: 2,
|
offlinePayStatus: 2,
|
||||||
orderTypeName: "普通订单",
|
orderTypeName: "普通订单",
|
||||||
@@ -306,7 +483,9 @@ export default {
|
|||||||
mapKay: "",
|
mapKay: "",
|
||||||
mapShow: false,
|
mapShow: false,
|
||||||
payPassword: null,
|
payPassword: null,
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
pageKeyId: Object.freeze('userOrderInfo'),
|
||||||
|
logistics: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -318,6 +497,46 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.id = this.$yroute.query.id;
|
this.id = this.$yroute.query.id;
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
|
uni.$on('chooseAddress', (res) => {
|
||||||
|
this.addressId = res.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
addressId(val) {
|
||||||
|
if(val) {
|
||||||
|
const params = {
|
||||||
|
addressId: this.addressId,
|
||||||
|
orderId: this.orderInfo.orderId
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.showModal({
|
||||||
|
title:'确定修改地址吗?',
|
||||||
|
content: '',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确认',
|
||||||
|
success:(success)=>{
|
||||||
|
if(success.confirm) {
|
||||||
|
uni.showLoading()
|
||||||
|
editAddress(params).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
title: '修改成功!'
|
||||||
|
})
|
||||||
|
this.getDetail();
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete:(complete)=>{
|
||||||
|
uni.hideLoading()
|
||||||
|
this.addressId = ''
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// inject: ["app"],
|
// inject: ["app"],
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
@@ -325,6 +544,115 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
copyClipboard,
|
copyClipboard,
|
||||||
|
handleBody() {
|
||||||
|
this.showMore = false
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
getExpressInfo() {
|
||||||
|
let params = {
|
||||||
|
orderCode: this.orderInfo.id,
|
||||||
|
shipperCode: this.orderInfo.deliverySn,
|
||||||
|
logisticCode: this.orderInfo.deliveryId
|
||||||
|
};
|
||||||
|
express(params)
|
||||||
|
.then(res => {
|
||||||
|
const {success, data} = res
|
||||||
|
if(success) {
|
||||||
|
this.logistics = data || {}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title:
|
||||||
|
// err.msg || err.response.data.msg || err.response.data.message,
|
||||||
|
// icon: "none",
|
||||||
|
// duration: 2000
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goLogistics(order) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/order/Logistics/index",
|
||||||
|
query: {
|
||||||
|
id: order.orderId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
buyAgin() {
|
||||||
|
const params = {
|
||||||
|
orderId: this.orderInfo.orderId
|
||||||
|
}
|
||||||
|
aginConfirm(params).then(res => {
|
||||||
|
const ids = res.data.cartInfo.map(e => e.id)
|
||||||
|
const addressInfo = res.data.addressInfo
|
||||||
|
if (ids.length === 0) return
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(addressInfo)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goAddress() {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path:'/pages/user/address/AddressManagement/index',
|
||||||
|
query: {
|
||||||
|
choosMode: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toDelay(id) {
|
||||||
|
this.delayId = id;
|
||||||
|
this.showExtend = true;
|
||||||
|
},
|
||||||
|
doneDelay() {
|
||||||
|
orderDelay(this.delayId).then(() => {
|
||||||
|
this.showExtend = false;
|
||||||
|
this.getDetail()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
buyOrder() {
|
||||||
|
let q = {
|
||||||
|
productId: this,
|
||||||
|
cartNum: that.attr.productSelect.cart_num,
|
||||||
|
new: 1,
|
||||||
|
uniqueId: that.attr.productSelect !== undefined ?
|
||||||
|
that.attr.productSelect.unique : ""
|
||||||
|
};
|
||||||
|
const ids = this.orderInfo.cartId
|
||||||
|
if (ids.length === 0) return
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/order/OrderSubmission/index?id=' + ids
|
||||||
|
})
|
||||||
|
},
|
||||||
|
routerGo(cart) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/shop/GoodsEvaluate/index",
|
||||||
|
query: { id: cart.unique }
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goOrderDetails(order) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/order/OrderDetails/index",
|
||||||
|
query: {
|
||||||
|
id: order.orderId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goRoom(order) {
|
||||||
|
const params = {
|
||||||
|
goodsId: order.cartInfo[0].productId,
|
||||||
|
goodsName: order.cartInfo[0].productInfo.storeName,
|
||||||
|
skuStr: order.cartInfo[0].productInfo.attrInfo.sku,
|
||||||
|
price: order.cartInfo[0].productInfo.attrInfo.price,
|
||||||
|
seckillId: order.cartInfo[0].seckillId,
|
||||||
|
cover: order.cartInfo[0].productInfo.attrInfo.image,
|
||||||
|
goodsData: '',
|
||||||
|
seckillData: ''
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}¶ms=${JSON.stringify(params)}`
|
||||||
|
})
|
||||||
|
},
|
||||||
force2Decimal(v) {
|
force2Decimal(v) {
|
||||||
return this.$force2Decimal(v);
|
return this.$force2Decimal(v);
|
||||||
},
|
},
|
||||||
@@ -354,7 +682,7 @@ export default {
|
|||||||
status = "已退款";
|
status = "已退款";
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
status = "已驳回";
|
status = "退款失败";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
@@ -483,8 +811,8 @@ export default {
|
|||||||
},
|
},
|
||||||
delOrder() {
|
delOrder() {
|
||||||
delOrderHandle(this.orderInfo.orderId).then(() => {
|
delOrderHandle(this.orderInfo.orderId).then(() => {
|
||||||
setTimeout(() => this.goBack(), 300);
|
this.goBack()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
setOfflinePayStatus: function (status) {
|
setOfflinePayStatus: function (status) {
|
||||||
var that = this;
|
var that = this;
|
||||||
@@ -558,6 +886,9 @@ export default {
|
|||||||
this.system_store = res.data.systemStore || {};
|
this.system_store = res.data.systemStore || {};
|
||||||
this.mapKey = res.data.mapKay;
|
this.mapKey = res.data.mapKay;
|
||||||
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus);
|
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus);
|
||||||
|
if(this.orderInfo._status._type == 3 || (this.orderInfo._status._type == 2 && this.orderInfo.isTickets!==1)) {
|
||||||
|
this.getExpressInfo()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -586,6 +917,45 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.u-count-down__text{
|
||||||
|
color: #999 !important;
|
||||||
|
}
|
||||||
|
.footer{
|
||||||
|
height: 122rpx;
|
||||||
|
border-radius: 40rpx 40rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
.fails-bg{
|
||||||
|
padding:10rpx;
|
||||||
|
background: rgba(197,39,51,0.2);
|
||||||
|
border-radius: 8rpx;
|
||||||
|
color: #C52733 !important;
|
||||||
|
line-height: 34rpx
|
||||||
|
}
|
||||||
|
.group-float {
|
||||||
|
position: absolute;
|
||||||
|
width: 196rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.16);
|
||||||
|
padding: 0 20rpx;
|
||||||
|
background: #fff;
|
||||||
|
left: -40px;
|
||||||
|
right: 0;
|
||||||
|
top: -62px;
|
||||||
|
.btn {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
color: #333;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-service {
|
||||||
|
border-bottom: 1rpx solid #F0F0F0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bnt{
|
||||||
|
font-size: 28rpx !important;
|
||||||
|
}
|
||||||
.geoPage {
|
.geoPage {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -752,9 +1122,8 @@ export default {
|
|||||||
|
|
||||||
/deep/ .pending-payments {
|
/deep/ .pending-payments {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
letter-spacing: 1px;
|
||||||
.u-count-down__text {
|
.u-count-down__text {
|
||||||
color: #FF5C5C;
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
@@ -768,4 +1137,9 @@ export default {
|
|||||||
color: #FE5261;
|
color: #FE5261;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
.item {
|
||||||
|
.conttent-left {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,28 +3,26 @@
|
|||||||
<view class="allAddress" style="background-color: #f6f6f6;">
|
<view class="allAddress" style="background-color: #f6f6f6;">
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="address acea-row row-middle"
|
class="address acea-row v12-align-start"
|
||||||
style="flex-wrap: nowrap;margin: 0 0 30rpx 0;border-radius: 16rpx;"
|
style="flex-wrap: nowrap;margin: 0 0 30rpx 0;border-radius: 16rpx;"
|
||||||
v-if="shipping_type === 0"
|
v-if="shipping_type === 0"
|
||||||
@click="addressTap"
|
@click="addressTap"
|
||||||
>
|
>
|
||||||
<image style="flex-shrink: 0;width: 48rpx;height: 48rpx;margin-right: 20rpx;"
|
<image style="flex-shrink: 0;width: 36rpx;height: 36rpx;margin-right: 20rpx;"
|
||||||
:src="webUrl+'/20230304135530688212.png'" mode=""></image>
|
:src="webUrl+'/orderIcon/map.png'" mode=""></image>
|
||||||
<view class="acea-row row-between-wrapper" style="flex-wrap: nowrap;flex-grow: 1;">
|
<view class="acea-row row-between-wrapper" style="flex-wrap: nowrap;flex-grow: 1;">
|
||||||
<view class="addressCon" v-if="addressInfo.realName">
|
<view class="addressCon" v-if="addressInfo.realName">
|
||||||
<view class="name">
|
<view class="more-t">
|
||||||
{{ addressInfo.realName }}
|
|
||||||
<text class="phone">{{ addressInfo.phone }}</text>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
|
|
||||||
{{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }}
|
{{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="name v12-font-28 v12-mt-3">
|
||||||
|
<text>{{ addressInfo.realName }}</text>
|
||||||
|
<text class="phone">{{ addressInfo.phone }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="addressCon" v-else>
|
<view class="addressCon" v-else>
|
||||||
<view class="setaddress">设置收货地址</view>
|
<view class="setaddress">设置收货地址</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="iconfont icon-jiantou" style="flex-shrink: 0;"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<div style="flex-wrap: nowrap;" class="address acea-row row-middle" v-else @click="showStoreList">
|
<div style="flex-wrap: nowrap;" class="address acea-row row-middle" v-else @click="showStoreList">
|
||||||
@@ -47,132 +45,116 @@
|
|||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<OrderGoods :evaluate="0" :cartInfo="orderGroupInfo.cartInfo" title="商品列表"></OrderGoods>
|
<OrderGoods :evaluate="0" :cartInfo="orderGroupInfo.cartInfo" title="商品信息"></OrderGoods>
|
||||||
|
|
||||||
<view class="wrapper" style="margin: 30rpx 0;border-radius: 16rpx;">
|
<view class="wrapper" style="margin:0;border-radius:0 0 20rpx 20rpx">
|
||||||
|
|
||||||
|
|
||||||
<view class="item acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-if="shipping_type === 0">
|
<view class="v12-pa-2 acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-if="shipping_type === 0">
|
||||||
<view class="acea-row row-middle" style="flex-wrap: nowrap;">
|
<view class="acea-row row-middle" style="flex-wrap: nowrap;">
|
||||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230820761721.png'"
|
<!-- <image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230820761721.png'"
|
||||||
mode=""></image>
|
mode=""></image> -->
|
||||||
<text class="">快递费用</text>
|
<text class="v12-font-24 v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx">快递费用</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="discount" style="width: auto !important;">
|
<view class="discount v12-secondary-dark-text v12-font-24 " style="width: auto !important;">
|
||||||
{{ orderPrice.payPostage > 0 ? force2Decimal(orderPrice.payPostage) : "免运费" }}
|
{{ orderPrice.payPostage > 0 ? force2Decimal(orderPrice.payPostage) : "包邮" }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="item acea-row row-between-wrapper">
|
<view class="v12-pa-2 acea-row row-between-wrapper">
|
||||||
<view>联系人</view>
|
<view class="v12-font-24 v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx">联系人</view>
|
||||||
<view class="discount">
|
<view class="discount">
|
||||||
<input type="text" placeholder="请填写您的联系姓名" v-model="contacts"/>
|
<input class="v12-font-24" type="text" placeholder="请填写您的联系姓名" v-model="contacts"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between-wrapper">
|
<view class="v12-pa-2 acea-row row-between-wrapper">
|
||||||
<view>联系电话</view>
|
<view class="v12-font-24 v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx">联系电话</view>
|
||||||
<view class="discount">
|
<view class="discount">
|
||||||
<input type="text" placeholder="请填写您的联系电话" v-model="contactsTel"/>
|
<input type="text" placeholder="请填写您的联系电话" v-model="contactsTel"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" style="z-index: -1">
|
<view class=" v12-pa-2 v12-justify-between " style="z-index: -1;">
|
||||||
<view class="acea-row row-middle">
|
<view class="v12-align-start">
|
||||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230836494421.png'"
|
<!-- <image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230836494421.png'"
|
||||||
mode=""></image>
|
mode=""></image> -->
|
||||||
<text class="">备注信息(150字以内)</text>
|
<text class="v12-font-24 v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx;">备注</text>
|
||||||
</view>
|
</view>
|
||||||
<textarea v-model="mark"></textarea>
|
<textarea v-model="mark" placeholder="建议与商家协商一致" class="mark v12-font-24 "></textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrapper" style="margin: 30rpx 0;border-radius: 16rpx;">
|
<!-- v12 -->
|
||||||
<view class="item">
|
<view class="v12-mt-3">
|
||||||
<!-- <view>支付方式</view> -->
|
<view class="v12-white v12-pa-3 v12-radius-20" >
|
||||||
<view class="acea-row row-left row-middle">
|
<view class="v12-justify-between v12-align-center v12-py-1" >
|
||||||
<view class="acea-row row-middle" style="position: relative;">
|
<view class="v12-font-24 v12-dark-text">商品总价:</view>
|
||||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230846995104.png'"
|
<view class="v12-secondary-dark-text">
|
||||||
mode=""></image>
|
<text class="v12-font-22 ">¥</text>
|
||||||
<text class="pay-method-title">支付方式</text>
|
<text class="v12-font-28">{{ force2Decimal(orderPrice.totalPrice) }}</text>
|
||||||
<!-- <text class="pink-dot"></text> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<!-- <view class="v12-justify-between v12-align-center v12-py-1" >
|
||||||
<view
|
<view class="v12-font-24 v12-dark-text">运费</view>
|
||||||
class="payItem acea-row row-middle"
|
<view class="v12-secondary-dark-text">
|
||||||
:class="active === 'weixin' ? 'on' : ''"
|
<text class="v12-font-22 ">¥</text>
|
||||||
@click="payItem('weixin')"
|
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
|
||||||
v-show="isWeixin"
|
|
||||||
style="flex-wrap: nowrap;"
|
|
||||||
>
|
|
||||||
<view class="name acea-row">
|
|
||||||
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>
|
|
||||||
微信支付
|
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">微信快捷支付</view>
|
</view> -->
|
||||||
<label class="radio">
|
<view class="v12-justify-between v12-align-center v12-py-1">
|
||||||
<radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#FF0000"/>
|
<view class="v12-font-24 v12-dark-text v12-align-center">
|
||||||
<text></text>
|
<text>优惠券</text>
|
||||||
</label>
|
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
|
||||||
|
<view class="v12-primary-text v12-primary-border v12-font-22 v12-radius-6 v12-px-1">券</view>
|
||||||
|
<view class="v12-primary-text v12-primary-border v12-font-22 v12-radius-6 v12-px-1">{{ couponTitle }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
|
||||||
class="payItem acea-row row-middle"
|
|
||||||
:class="active === 'weixin' ? 'on' : ''"
|
|
||||||
@click="payItem('weixin')"
|
|
||||||
v-show="!isWeixin"
|
|
||||||
style="flex-wrap: nowrap;"
|
|
||||||
>
|
|
||||||
<view class="name acea-row ">
|
|
||||||
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>
|
|
||||||
微信支付
|
|
||||||
</view>
|
</view>
|
||||||
<view class="tip"></view>
|
<view class="v12-justify-between v12-align-center">
|
||||||
<label class="radio">
|
<view class="v12-mr-2" @click="changeCoupons" v-if="couponList.usable.length !== 0">
|
||||||
<radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#FF0000"/>
|
<text class="v12-dark-text v12-font-24" >{{ couponList.usable.length === 0 ? '无' : '去选择' }}</text>
|
||||||
<text></text>
|
<text class="iconfont icon-jiantou v12-font-24 v12-dark-text"></text>
|
||||||
</label>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view class="v12-secondary-dark-text">
|
||||||
class="payItem acea-row row-middle"
|
<text class="v12-font-22 ">-¥</text>
|
||||||
:class="active === 'yue' ? 'on' : ''"
|
<text class="v12-font-28">{{ force2Decimal(orderPrice.couponPrice) }}</text>
|
||||||
@click="payItem('yue')"
|
|
||||||
style="flex-wrap: nowrap;"
|
|
||||||
>
|
|
||||||
<view class="name acea-row ">
|
|
||||||
<view style="background-color: #007AFF;" class="iconfont icon-icon-test"
|
|
||||||
:class="active === 'yue' ? 'bounceIn' : ''"></view>
|
|
||||||
余额支付
|
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">可用余额:{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}</view>
|
</view>
|
||||||
<label class="radio">
|
</view>
|
||||||
<radio style="transform: scale(0.7);" value="" :checked="active === 'yue'" color="#FF0000"/>
|
<view class="v12-justify-between v12-align-center v12-py-1">
|
||||||
<text></text>
|
<view class="v12-font-24 v12-dark-text">积分抵扣</view>
|
||||||
</label>
|
<view class="v12-secondary-dark-text v12-align-center ">
|
||||||
|
<!-- <view class="v12-mr-2">
|
||||||
|
<u-switch
|
||||||
|
v-model="usePointsCheck"
|
||||||
|
size="14"
|
||||||
|
@change="usePointsCheckChange"
|
||||||
|
/>
|
||||||
|
</view> -->
|
||||||
|
<view>
|
||||||
|
<text class="v12-font-22 ">-¥</text>
|
||||||
|
<text class="v12-font-28">{{ force2Decimal(orderPrice.deductionPrice) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="moneyList" style="margin-bottom:30rpx;border-radius: 16rpx;">
|
<!-- <view class="coupon-cell">
|
||||||
<view class="item acea-row row-between-wrapper" v-if="orderPrice.totalPrice !== undefined">
|
<view class="flex jc-between ai-center">
|
||||||
<view>商品总价:</view>
|
<view class="title">积分抵扣:</view>
|
||||||
<view class="money">¥{{ force2Decimal(orderPrice.totalPrice) }}</view>
|
<view class="flex ai-center">
|
||||||
</view>
|
<u-switch
|
||||||
<view class="item acea-row row-between-wrapper" v-if="orderPrice.payPostage > 0">
|
v-model="usePointsCheck"
|
||||||
<view>运费:</view>
|
size="20"
|
||||||
<view class="money">¥{{ force2Decimal(orderPrice.payPostage) }}</view>
|
@change="usePointsCheckChange"
|
||||||
</view>
|
/>
|
||||||
<view class="item acea-row row-between-wrapper" v-if="orderPrice.couponPrice > 0">
|
|
||||||
<view>优惠券抵扣:</view>
|
|
||||||
<view class="money">-¥{{ force2Decimal(orderPrice.couponPrice) }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between-wrapper" v-if="orderPrice.deductionPrice > 0">
|
|
||||||
<view>积分抵扣:</view>
|
|
||||||
<view class="money">-¥{{ force2Decimal(orderPrice.deductionPrice) }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="usePointsCheck" class="flex jc-between ai-center points-cell">
|
||||||
<view class="coupon-cell flex jc-between ai-center" @click="changeCoupons">
|
<view>积分:{{ orderPrice.usedPoints }}</view>
|
||||||
|
<view class="flex ai-center">
|
||||||
|
-¥{{ force2Decimal(orderPrice.deductionPrice) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="coupon-cell flex jc-between ai-center" @click="changeCoupons">
|
||||||
<view class="title">优惠券:</view>
|
<view class="title">优惠券:</view>
|
||||||
<view class="flex ai-center">
|
<view class="flex ai-center">
|
||||||
<text style="color:#999999" v-if="couponList.usable.length===0">无</text>
|
<text style="color:#999999" v-if="couponList.usable.length===0">无</text>
|
||||||
@@ -182,35 +164,134 @@
|
|||||||
<view class="iconfont icon-jiantou" style="flex-shrink: 0;"></view>
|
<view class="iconfont icon-jiantou" style="flex-shrink: 0;"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="wrapper" style="margin: 30rpx 0;border-radius: 20rpx;">
|
||||||
|
<view class="item">
|
||||||
|
<!-- <view>支付方式</view> -->
|
||||||
|
<view class="acea-row row-left row-middle">
|
||||||
|
<view class="acea-row row-middle" style="position: relative;">
|
||||||
|
<!-- <image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230846995104.png'"
|
||||||
|
mode=""></image> -->
|
||||||
|
<text class="v12-dark-text v12-font-32 v12-font-bold">支付方式</text>
|
||||||
|
<!-- <text class="pink-dot"></text> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list" style="margin-top: 0;">
|
||||||
|
<view
|
||||||
|
class="payItem acea-row row-middle"
|
||||||
|
:class="active === 'weixin' ? 'on' : ''"
|
||||||
|
v-show="isWeixin"
|
||||||
|
@click="payItem('weixin')"
|
||||||
|
style="flex-wrap: nowrap; margin-top: 0"
|
||||||
|
>
|
||||||
|
<view class="name acea-row v12-font-24">
|
||||||
|
<!-- <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view> -->
|
||||||
|
<image style="flex-shrink: 0;width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/orderIcon/微信支付.png'" mode=""></image>
|
||||||
|
微信支付
|
||||||
|
</view>
|
||||||
|
<view class="tip">微信快捷支付</view>
|
||||||
|
<label class="radio">
|
||||||
|
<radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#C52733"/>
|
||||||
|
<text></text>
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="payItem acea-row row-middle"
|
||||||
|
:class="active === 'weixin' ? 'on' : ''"
|
||||||
|
@click="payItem('weixin')"
|
||||||
|
v-show="!isWeixin"
|
||||||
|
style="flex-wrap: nowrap; margin-top: 20rpx"
|
||||||
|
>
|
||||||
|
<view class="name acea-row v12-font-24">
|
||||||
|
<!-- <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view> -->
|
||||||
|
<image style="flex-shrink: 0;width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/orderIcon/微信支付.png'" mode=""></image>
|
||||||
|
微信支付
|
||||||
|
</view>
|
||||||
|
<view class="tip"></view>
|
||||||
|
<label class="radio">
|
||||||
|
<radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#C52733"/>
|
||||||
|
<text></text>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="payItem acea-row row-middle v12-justify-between"
|
||||||
|
:class="active === 'yue' ? 'on' : ''"
|
||||||
|
@click="payItem('yue')"
|
||||||
|
style="flex-wrap: nowrap;"
|
||||||
|
>
|
||||||
|
<view class="name acea-row v12-font-24">
|
||||||
|
<!-- <view style="background-color: #007AFF;" class="iconfont icon-icon-test"
|
||||||
|
:class="active === 'yue' ? 'bounceIn' : ''"></view> -->
|
||||||
|
<image style="flex-shrink: 0;width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/orderIcon/余额宝.png'" mode=""></image>
|
||||||
|
余额支付
|
||||||
|
</view>
|
||||||
|
<!-- <view class="tip">可用余额:{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}</view> -->
|
||||||
|
<label class="radio">
|
||||||
|
<radio style="transform: scale(0.7);" value="" :checked="active === 'yue'" color="#C52733"/>
|
||||||
|
<text></text>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- v9 优惠券开始 -->
|
<!-- v9 优惠券开始 -->
|
||||||
<u-popup :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons">
|
<u-popup
|
||||||
<CouponsPopup :two-list="couponList" @close="changeCoupons" v-if="couponList.usable"/>
|
:show="show"
|
||||||
|
:round="10"
|
||||||
|
mode="bottom"
|
||||||
|
close-on-click-overlay
|
||||||
|
@close="changeCoupons"
|
||||||
|
>
|
||||||
|
<CouponsPopup
|
||||||
|
v-if="couponList.usable.length > 0"
|
||||||
|
:two-list="couponList"
|
||||||
|
@change="changeCoupons"
|
||||||
|
:currentPrice="force2Decimal(orderPrice.totalPrice)"
|
||||||
|
@max="couponMax"
|
||||||
|
:show-tab="false"
|
||||||
|
/>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- v9 优惠券结束 -->
|
<!-- v9 优惠券结束 -->
|
||||||
|
|
||||||
<view style="height:80rpx"></view>
|
<view style="height:80rpx"></view>
|
||||||
<view class="footer acea-row row-between-wrapper" style="height: 80rpx;">
|
<view class="footer v12-justify-end v12-px-3" style="height: 120rpx;">
|
||||||
<view style="margin-left: 30rpx;">
|
<view class="v12-align-center v12-px-4">
|
||||||
<text style="color: #000000;font-size: 24rpx;font-weight: bold;">合计:</text>
|
<view class="v12-mr-2">
|
||||||
<text class="" style="color: #FF564A;font-size: 28rpx;font-weight: bold;">¥{{
|
<view>
|
||||||
force2Decimal(orderPrice.payPrice)
|
<text class="v12-font-28 v12-dark-text v12-mr-2">共{{ total }}件</text>
|
||||||
}}
|
<text class="v12-font-28 v12-dark-text v12-mr-1">合计:</text>
|
||||||
</text>
|
<text class="v12-font-22 v12-primary-text v12-font-bold">¥</text>
|
||||||
|
<text class="v12-font-36 v12-primary-text v12-font-bold">{{ force2Decimal(orderPrice.payPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="v12-primary-text v12-font-22 v12-text-right">
|
||||||
|
<text>共减</text>
|
||||||
|
<text>¥</text>
|
||||||
|
<text>{{ force2Decimal(orderPrice.totalDiscountPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-primary v12-white-text v12-radius-60 v12-px-3 v12-py-2 v12-font-bold" @click="subscribePay">立即付款</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="settlement acea-row row-middle row-center" @click="subscribePay">立即结算</view>
|
|
||||||
</view>
|
</view>
|
||||||
<AddressWindow
|
<AddressWindow
|
||||||
|
v-model="showAddress"
|
||||||
|
ref="mychild"
|
||||||
|
:checked="addressInfo.id"
|
||||||
@checked="changeAddress"
|
@checked="changeAddress"
|
||||||
@redirect="addressRedirect"
|
@redirect="addressRedirect"
|
||||||
v-model="showAddress"
|
/>
|
||||||
:checked="addressInfo.id"
|
<passkeyborad
|
||||||
ref="mychild"
|
ref='payPwdPop'
|
||||||
></AddressWindow>
|
showMoney
|
||||||
|
:money="orderPrice.payPrice"
|
||||||
<passkeyborad :money="orderPrice.payPrice" showMoney :show="isShowPayPwdPop" ref='payPwdPop' @close="pwdPopClose"
|
:show="isShowPayPwdPop"
|
||||||
@finish="pwdPopFinish"></passkeyborad>
|
@close="pwdPopClose"
|
||||||
|
@finish="pwdPopFinish"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -225,6 +306,7 @@ import {isNullOrEmpty, isWeixin} from "@/utils";
|
|||||||
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
||||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
import CouponsPopup from "@/components/CouponsPopup.vue"
|
import CouponsPopup from "@/components/CouponsPopup.vue"
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
const NAME = "OrderSubmission",
|
const NAME = "OrderSubmission",
|
||||||
_isWeixin = isWeixin();
|
_isWeixin = isWeixin();
|
||||||
@@ -238,6 +320,7 @@ export default {
|
|||||||
passkeyborad,
|
passkeyborad,
|
||||||
CouponsPopup
|
CouponsPopup
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
props: {},
|
props: {},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
@@ -272,10 +355,24 @@ export default {
|
|||||||
lotteryRecordId:'',
|
lotteryRecordId:'',
|
||||||
payPassword: null,
|
payPassword: null,
|
||||||
// v9-2
|
// v9-2
|
||||||
couponList: {},
|
couponList: {
|
||||||
couponId: 0,
|
unusable: [],
|
||||||
|
usable: []
|
||||||
|
},
|
||||||
|
couponId: uni.getStorageSync('couponId') || 0,
|
||||||
couponIndex: -1,
|
couponIndex: -1,
|
||||||
show: false
|
show: false,
|
||||||
|
// 是否使用积分开关
|
||||||
|
usePointsCheck: false,
|
||||||
|
// 要使用的积分数量(传0为不使用积分,目前需求是默认使用最大可使用的积分,所以只要传大于0的数值都会变为自动使用最大可用积分)
|
||||||
|
usePointsNumber: 0,
|
||||||
|
// 订单是否可以使用积分
|
||||||
|
canUsePoints: false,
|
||||||
|
// 订单最大可使用积分数量
|
||||||
|
maxPoints: 0,
|
||||||
|
pageKeyId: Object.freeze('orderConfirm'),
|
||||||
|
total: 0,
|
||||||
|
couponTitle: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo", "storeItems"]),
|
computed: mapGetters(["userInfo", "storeItems"]),
|
||||||
@@ -299,7 +396,6 @@ export default {
|
|||||||
//地址切换也要重新计算一下
|
//地址切换也要重新计算一下
|
||||||
that.computedPrice('onLoad chooseAddress');
|
that.computedPrice('onLoad chooseAddress');
|
||||||
})
|
})
|
||||||
console.log(that.$yroute);
|
|
||||||
if (that.$yroute.query.pinkid !== undefined) {
|
if (that.$yroute.query.pinkid !== undefined) {
|
||||||
that.pinkId = that.$yroute.query.pinkid;
|
that.pinkId = that.$yroute.query.pinkid;
|
||||||
}
|
}
|
||||||
@@ -322,6 +418,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isNullOrEmpty,
|
isNullOrEmpty,
|
||||||
|
couponMax(e) {
|
||||||
|
this.couponTitle = e.couponTitle
|
||||||
|
this.couponId = uni.getStorageSync('couponId') || 0
|
||||||
|
},
|
||||||
showStoreList() {
|
showStoreList() {
|
||||||
this.$store.commit("get_to", "orders");
|
this.$store.commit("get_to", "orders");
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
@@ -331,13 +431,17 @@ export default {
|
|||||||
force2Decimal(value) {
|
force2Decimal(value) {
|
||||||
return this.$force2Decimal(value);
|
return this.$force2Decimal(value);
|
||||||
},
|
},
|
||||||
|
usePointsCheckChange(e) {
|
||||||
|
this.computedPrice()
|
||||||
|
},
|
||||||
|
// 计算订单金额
|
||||||
computedPrice(f) {
|
computedPrice(f) {
|
||||||
console.log(f)
|
|
||||||
let shipping_type = this.shipping_type;
|
let shipping_type = this.shipping_type;
|
||||||
postOrderComputed(this.orderGroupInfo.orderKey, {
|
postOrderComputed(this.orderGroupInfo.orderKey, {
|
||||||
addressId: this.addressInfo.id,
|
addressId: this.addressInfo.id,
|
||||||
useIntegral: this.useIntegral ? 1 : 0,
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
couponId: this.couponId || 0,
|
couponId: this.couponId || 0,
|
||||||
|
usePoints: this.usePointsCheck ? 1 : 0,
|
||||||
shipping_type: parseInt(shipping_type) + 1
|
shipping_type: parseInt(shipping_type) + 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
@@ -350,39 +454,71 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.orderPrice = data.result;
|
this.orderPrice = data.result;
|
||||||
|
console.log(this.orderPrice);
|
||||||
|
|
||||||
|
if (this.usePointsCheck) {
|
||||||
|
this.usePointsNumber = data.result.usedPoints
|
||||||
|
} else {
|
||||||
|
this.usePointsNumber = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCartInfo() {
|
getCartInfo() {
|
||||||
var that = this;
|
const _this = this
|
||||||
// const cartIds = this.$yroute.query.id;
|
if (!_this.cartid && !_this.lotteryRecordId) {
|
||||||
if (!that.cartid && !that.lotteryRecordId) {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "参数有误",
|
title: "参数有误",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
|
||||||
return this.$yrouter.back();
|
|
||||||
}
|
|
||||||
postOrderConfirm(that.cartid,that.lotteryRecordId)
|
|
||||||
.then(res => {
|
|
||||||
that.offlinePayStatus = res.data.offline_pay_status;
|
|
||||||
that.orderGroupInfo = res.data;
|
|
||||||
that.deduction = res.data.deduction;
|
|
||||||
that.couponList = res.data.couponList
|
|
||||||
that.addressInfo = res.data.addressInfo || {};
|
|
||||||
that.systemStore = res.data.systemStore || {};
|
|
||||||
that.storeSelfMention = res.data.storeSelfMention;
|
|
||||||
that.couponId = uni.getStorageSync('couponId') || 0
|
|
||||||
that.computedPrice()
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
return this.$yrouter.back()
|
||||||
|
}
|
||||||
|
postOrderConfirm(_this.cartid,_this.lotteryRecordId).then(res => {
|
||||||
|
const { data } = res
|
||||||
|
_this.offlinePayStatus = data.offline_pay_status
|
||||||
|
_this.orderGroupInfo = data
|
||||||
|
_this.deduction = data.deduction
|
||||||
|
_this.couponList = data.couponList
|
||||||
|
if (_this.couponId > 0) {
|
||||||
|
_this.couponList['usable'].map((item, index) => {
|
||||||
|
if (item.id === _this.couponId) {
|
||||||
|
item.checked = true
|
||||||
|
_this.couponIndex = index
|
||||||
|
} else {
|
||||||
|
item.checked = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.removeStorageSync('couponId')
|
||||||
|
}
|
||||||
|
_this.canUsePoints = data.canUsePoints
|
||||||
|
_this.maxPoints = data.maxPoints
|
||||||
|
// 如果允许使用积分,则默认开启
|
||||||
|
_this.total = data.cartInfo.map(i => i.cartNum).reduce((a, b) => {
|
||||||
|
return a + b
|
||||||
|
}, 0)
|
||||||
|
if (data.canUsePoints) {
|
||||||
|
_this.usePointsCheck = true
|
||||||
|
_this.usePointsNumber = data.maxPoints
|
||||||
|
}
|
||||||
|
if(_this.$yroute.query.address !== undefined ) {
|
||||||
|
_this.addressInfo = JSON.parse(_this.$yroute.query.address) || {}
|
||||||
|
} else {
|
||||||
|
_this.addressInfo = data.addressInfo || {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_this.systemStore = data.systemStore || {}
|
||||||
|
_this.storeSelfMention = data.storeSelfMention
|
||||||
|
_this.computedPrice()
|
||||||
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg,
|
title: err.msg,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
addressTap: function () {
|
addressTap: function () {
|
||||||
//改用跳转页面方式
|
//改用跳转页面方式
|
||||||
@@ -514,6 +650,7 @@ export default {
|
|||||||
addressId: this.addressInfo.id,
|
addressId: this.addressInfo.id,
|
||||||
useIntegral: this.useIntegral ? 1 : 0,
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
couponId: this.couponId || 0,
|
couponId: this.couponId || 0,
|
||||||
|
usePoints: this.usePointsNumber || 0,
|
||||||
payType: this.active,
|
payType: this.active,
|
||||||
pinkId: this.pinkId,
|
pinkId: this.pinkId,
|
||||||
seckillId: this.orderGroupInfo.seckill_id,
|
seckillId: this.orderGroupInfo.seckill_id,
|
||||||
@@ -636,16 +773,25 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// v9-2
|
// v9-2
|
||||||
changeCoupons() {
|
changeCoupons(item) {
|
||||||
|
if(!item) return
|
||||||
if (this.couponList.usable.length === 0) return
|
if (this.couponList.usable.length === 0) return
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
this.couponId = uni.getStorageSync('couponId') || 0
|
this.couponId = uni.getStorageSync('couponId') || 0
|
||||||
|
this.couponTitle = item.couponTitle
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.mark{
|
||||||
|
background: rgba(0,0,0,0.05);
|
||||||
|
height: 128rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 5px 10px
|
||||||
|
}
|
||||||
|
|
||||||
.pink-dot {
|
.pink-dot {
|
||||||
width: 24rpx;
|
width: 24rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
@@ -694,6 +840,7 @@ export default {
|
|||||||
|
|
||||||
.order-submission .wrapper .item .list .payItem {
|
.order-submission .wrapper .item .list .payItem {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-submission .wrapper .item .list .payItem.on {
|
.order-submission .wrapper .item .list .payItem.on {
|
||||||
@@ -785,7 +932,6 @@ export default {
|
|||||||
|
|
||||||
.order-submission .allAddress .address {
|
.order-submission .allAddress .address {
|
||||||
width: 6.91 * 100rpx;
|
width: 6.91 * 100rpx;
|
||||||
height: 1.5 * 100rpx;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@@ -806,4 +952,8 @@ export default {
|
|||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
.points-cell {
|
||||||
|
padding: 20rpx 0 0 0;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -48,12 +48,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import {getOrderList} from "@/api/order";
|
import {getOrderList} from "@/api/order";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ReturnList",
|
name: "ReturnList",
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
@@ -61,7 +63,8 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
loading: false,
|
loading: false,
|
||||||
loaded: false
|
loaded: false,
|
||||||
|
pageKeyId: Object.freeze('userOrderRefundList')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -1,354 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="order-details pos-order-details">
|
|
||||||
<view class="header acea-row row-middle">
|
|
||||||
<view class="state">{{ title }}</view>
|
|
||||||
<view class="data">
|
|
||||||
<view class="order-num">订单:{{ orderInfo.orderId }}</view>
|
|
||||||
<view>
|
|
||||||
<text class="time">
|
|
||||||
<data-format :date="orderInfo.addTime"></data-format>
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="orderingUser acea-row row-middle">{{ orderInfo.nickname }}</view>
|
|
||||||
<view class="address">
|
|
||||||
<view class="name">
|
|
||||||
{{ orderInfo.realName}}
|
|
||||||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
|
||||||
</view>
|
|
||||||
<view>{{ orderInfo.userAddress }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="line">
|
|
||||||
<image :src="webUrl+'/20230304135025917856.png'" />
|
|
||||||
</view>
|
|
||||||
<view class="pos-order-goods">
|
|
||||||
<view
|
|
||||||
class="goods acea-row row-between-wrapper"
|
|
||||||
v-for="(item, orderInfoIndex) in orderInfo.cartInfo"
|
|
||||||
:key="orderInfoIndex"
|
|
||||||
>
|
|
||||||
<view class="picTxt acea-row row-between-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.productInfo.image" />
|
|
||||||
</view>
|
|
||||||
<view class="text acea-row row-between row-column">
|
|
||||||
<view class="info line2">{{ item.productInfo.storeName }}</view>
|
|
||||||
<view class="attr">{{ item.productInfo.sku }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="money">
|
|
||||||
<view class="x-money">¥{{ item.productInfo.price }}</view>
|
|
||||||
<view class="num">x{{ item.cartNum }}</view>
|
|
||||||
<view class="y-money">¥{{ item.productInfo.otPrice ? item.productInfo.otPrice : 0 }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="public-total">
|
|
||||||
共{{ orderInfo.totalNum }}件商品,应支付
|
|
||||||
<text class="money">¥{{ orderInfo.payPrice }}</text>
|
|
||||||
( 邮费 ¥{{
|
|
||||||
orderInfo.payPostage
|
|
||||||
}}
|
|
||||||
)
|
|
||||||
</view>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>订单编号:</view>
|
|
||||||
<view class="conter acea-row row-middle row-right">
|
|
||||||
{{ orderInfo.orderId
|
|
||||||
}}
|
|
||||||
<text
|
|
||||||
class="copy copy-data"
|
|
||||||
@click="copyClipboard(orderInfo.orderId)"
|
|
||||||
>复制</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>下单时间:</view>
|
|
||||||
<view class="conter">
|
|
||||||
<data-format :date="orderInfo.addTime"></data-format>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>支付状态:</view>
|
|
||||||
<view class="conter">{{ orderInfo.paid == 1 ? "已支付" : "未支付" }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>支付方式:</view>
|
|
||||||
<view class="conter">{{ payType }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>买家留言:</view>
|
|
||||||
<view class="conter">{{ orderInfo.mark }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>支付金额:</view>
|
|
||||||
<view class="conter">¥{{ orderInfo.totalPrice }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>优惠券抵扣:</view>
|
|
||||||
<view class="conter">-¥{{ orderInfo.couponPrice }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="actualPay acea-row row-right">
|
|
||||||
实付款:
|
|
||||||
<text class="money font-color-red">¥{{ orderInfo.payPrice }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="wrapper"
|
|
||||||
v-if="orderInfo.delivery_type != 'fictitious' && orderInfo._status._type === 2"
|
|
||||||
>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view>配送方式:</view>
|
|
||||||
<view class="conter" v-if="orderInfo.delivery_type === 'express'">快递</view>
|
|
||||||
<view class="conter" v-if="orderInfo.delivery_type === 'send'">送货</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view v-if="orderInfo.delivery_type === 'express'">快递公司:</view>
|
|
||||||
<view v-if="orderInfo.delivery_type === 'send'">送货人:</view>
|
|
||||||
<view class="conter">{{ orderInfo.delivery_name }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between">
|
|
||||||
<view v-if="orderInfo.delivery_type === 'express'">快递单号:</view>
|
|
||||||
<view v-if="orderInfo.delivery_type === 'send'">送货人电话:</view>
|
|
||||||
<view class="conter">
|
|
||||||
{{ orderInfo.delivery_id
|
|
||||||
}}
|
|
||||||
<text
|
|
||||||
class="copy copy-data"
|
|
||||||
@click="copyClipboard(orderInfo.delivery_id)"
|
|
||||||
>复制</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height:100rpx;"></view>
|
|
||||||
<view class="footer acea-row row-right row-middle">
|
|
||||||
<view class="more"></view>
|
|
||||||
<view class="bnt cancel" @click="modify(0)" v-if="types == 0">一键改价</view>
|
|
||||||
<view class="bnt cancel" @click="modify(0)" v-if="types == -1">立即退款</view>
|
|
||||||
<view
|
|
||||||
class="bnt cancel"
|
|
||||||
v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0"
|
|
||||||
@click="offlinePay"
|
|
||||||
>确认付款</view>
|
|
||||||
<view class="bnt delivery" v-if="types == 1" @click="goGoodsDeliver(orderInfo)">去发货</view>
|
|
||||||
</view>
|
|
||||||
<PriceChange
|
|
||||||
:change="change"
|
|
||||||
:orderInfo="orderInfo"
|
|
||||||
v-on:closechange="changeclose($event)"
|
|
||||||
v-on:savePrice="savePrice"
|
|
||||||
:status="status"
|
|
||||||
></PriceChange>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import PriceChange from "@/components/PriceChange";
|
|
||||||
import DataFormat from "@/components/DataFormat";
|
|
||||||
import {
|
|
||||||
getAdminOrderDetail,
|
|
||||||
setAdminOrderPrice,
|
|
||||||
setAdminOrderRemark,
|
|
||||||
setOfflinePay,
|
|
||||||
setOrderRefund
|
|
||||||
} from "@/api/admin";
|
|
||||||
import { required, num } from "@/utils/validate";
|
|
||||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
|
||||||
import { copyClipboard } from "@/utils";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "AdminOrder",
|
|
||||||
components: {
|
|
||||||
PriceChange,
|
|
||||||
DataFormat
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
order: false,
|
|
||||||
change: false,
|
|
||||||
order_id: "",
|
|
||||||
orderInfo: {
|
|
||||||
_status: {}
|
|
||||||
},
|
|
||||||
status: "",
|
|
||||||
title: "",
|
|
||||||
payType: "",
|
|
||||||
types: ""
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
"$yroute.query.oid": function(newVal) {
|
|
||||||
let that = this;
|
|
||||||
if (newVal != undefined) {
|
|
||||||
that.order_id = newVal;
|
|
||||||
that.getIndex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.order_id = this.$yroute.query.oid;
|
|
||||||
this.getIndex();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goGoodsDeliver(orderInfo) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/orderAdmin/GoodsDeliver/index",
|
|
||||||
query: { oid: orderInfo.orderId }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
copyClipboard,
|
|
||||||
more: function() {
|
|
||||||
this.order = !this.order;
|
|
||||||
},
|
|
||||||
modify: function(status) {
|
|
||||||
this.change = true;
|
|
||||||
this.status = status;
|
|
||||||
},
|
|
||||||
changeclose: function(msg) {
|
|
||||||
this.change = msg;
|
|
||||||
},
|
|
||||||
getIndex: function() {
|
|
||||||
let that = this;
|
|
||||||
getAdminOrderDetail(that.order_id).then(
|
|
||||||
res => {
|
|
||||||
that.orderInfo = res.data;
|
|
||||||
that.types = res.data._status._type;
|
|
||||||
that.title = res.data._status._title;
|
|
||||||
that.payType = res.data._status._payType;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
async savePrice(opt) {
|
|
||||||
let that = this,
|
|
||||||
data = {},
|
|
||||||
price = opt.price,
|
|
||||||
remark = opt.remark,
|
|
||||||
refund_price = opt.refund_price.toString();
|
|
||||||
data.orderId = that.orderInfo.orderId;
|
|
||||||
if (that.status == 0 && that.orderInfo.refundStatus === 0) {
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
price: [
|
|
||||||
required(required.message("金额")),
|
|
||||||
num(num.message("金额"))
|
|
||||||
]
|
|
||||||
}).validate({ price });
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
data.price = price;
|
|
||||||
setAdminOrderPrice(data).then(
|
|
||||||
function() {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: "改价成功",
|
|
||||||
icon: "success",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.getIndex();
|
|
||||||
},
|
|
||||||
function() {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: "改价失败",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else if (that.status == 0 && that.orderInfo.refundStatus === 1) {
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
refund_price: [
|
|
||||||
required(required.message("金额")),
|
|
||||||
num(num.message("金额"))
|
|
||||||
]
|
|
||||||
}).validate({ refund_price });
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
data.price = refund_price;
|
|
||||||
data.type = opt.type;
|
|
||||||
setOrderRefund(data).then(
|
|
||||||
res => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.getIndex();
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.getIndex();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
remark: [required(required.message("备注"))]
|
|
||||||
}).validate({ remark });
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
data.remark = remark;
|
|
||||||
setAdminOrderRemark(data).then(
|
|
||||||
res => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.getIndex();
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
offlinePay: function() {
|
|
||||||
setOfflinePay({ order_id: this.orderInfo.order_id }).then(
|
|
||||||
res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getIndex();
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,330 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="pos-order-list" ref="container">
|
|
||||||
<view class="nav acea-row row-around row-middle">
|
|
||||||
<view class="item" :class="where.status == 0 ? 'on' : ''" @click="changeStatus(0)">待付款</view>
|
|
||||||
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">待发货</view>
|
|
||||||
<view class="item" :class="where.status == 2 ? 'on' : ''" @click="changeStatus(2)">待收货</view>
|
|
||||||
<view class="item" :class="where.status == 3 ? 'on' : ''" @click="changeStatus(3)">待评价</view>
|
|
||||||
<view class="item" :class="where.status == 4 ? 'on' : ''" @click="changeStatus(4)">已完成</view>
|
|
||||||
<view class="item" :class="where.status == -3 ? 'on' : ''" @click="changeStatus(-3)">退款</view>
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
|
||||||
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
|
|
||||||
<view class="order-num acea-row row-middle" @click="toDetail(item)">
|
|
||||||
<text>订单号:{{ item.orderId }}</text>
|
|
||||||
<text class="time">
|
|
||||||
<text>下单时间:</text>
|
|
||||||
<data-format :date="item.addTime"></data-format>
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="pos-order-goods" v-for="(val, key) in item.cartInfo" :key="key">
|
|
||||||
<view class="goods acea-row row-between-wrapper" @click="toDetail(item)">
|
|
||||||
<view class="picTxt acea-row row-between-wrapper">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="val.productInfo.image" />
|
|
||||||
</view>
|
|
||||||
<view class="text acea-row row-between row-column">
|
|
||||||
<view class="info line2">{{ val.productInfo.storeName }}</view>
|
|
||||||
<view class="attr" v-if="val.productInfo.sku">{{ val.productInfo.sku }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="money">
|
|
||||||
<view class="x-money">¥{{ val.productInfo.price }}</view>
|
|
||||||
<view class="num">x{{ val.cartNum }}</view>
|
|
||||||
<view class="y-money">¥{{ val.productInfo.otPrice }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="public-total">
|
|
||||||
共{{ item.totalNum }}件商品,应支付
|
|
||||||
<text class="money">¥{{ item.payPrice }}</text>
|
|
||||||
( 邮费 ¥{{
|
|
||||||
item.totalPostage
|
|
||||||
}}
|
|
||||||
)
|
|
||||||
</view>
|
|
||||||
<view class="operation acea-row row-between-wrapper">
|
|
||||||
<view class="more">
|
|
||||||
<!-- <view class="iconfont icon-gengduo" @click="more(index)"></view>-->
|
|
||||||
<!-- <view class="order" v-show="current === index">-->
|
|
||||||
<!-- <view class="items">-->
|
|
||||||
<!-- {{ where.status > 0 ? "删除" : "取消" }}订单-->
|
|
||||||
<!-- </view>-->
|
|
||||||
<!-- <view class="arrow"></view>-->
|
|
||||||
<!-- </view>-->
|
|
||||||
</view>
|
|
||||||
<view class="acea-row row-middle">
|
|
||||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == 0">一键改价</view>
|
|
||||||
<view class="bnt" @click="modify(item, 0)" v-if="where.status == -3 && item.refundStatus === 1">立即退款</view>
|
|
||||||
<view class="bnt cancel" v-if="item.pay_type === 'offline' && item.paid === 0" @click="offlinePay(item)">确认付款</view>
|
|
||||||
<view class="bnt" v-if="where.status == 1" @click="goGoodsDeliver(item)">去发货</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
|
||||||
<PriceChange :change="change" :orderInfo="orderInfo" v-on:closechange="changeclose($event)" v-on:savePrice="savePrice"
|
|
||||||
:status="status"></PriceChange>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import PriceChange from "@/components/PriceChange";
|
|
||||||
import Loading from "@/components/Loading";
|
|
||||||
import DataFormat from "@/components/DataFormat";
|
|
||||||
import {
|
|
||||||
getAdminOrderList,
|
|
||||||
setAdminOrderPrice,
|
|
||||||
setAdminOrderRemark,
|
|
||||||
setOfflinePay,
|
|
||||||
setOrderRefund
|
|
||||||
} from "@/api/admin";
|
|
||||||
import {
|
|
||||||
required,
|
|
||||||
num
|
|
||||||
} from "@/utils/validate";
|
|
||||||
import {
|
|
||||||
validatorDefaultCatch
|
|
||||||
} from "@/utils/dialog";
|
|
||||||
export default {
|
|
||||||
name: "AdminOrderList",
|
|
||||||
components: {
|
|
||||||
PriceChange,
|
|
||||||
Loading,
|
|
||||||
DataFormat
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
current: "",
|
|
||||||
change: false,
|
|
||||||
types: 0,
|
|
||||||
where: {
|
|
||||||
page: 1,
|
|
||||||
limit: 5,
|
|
||||||
status: 0
|
|
||||||
},
|
|
||||||
list: [],
|
|
||||||
loaded: false,
|
|
||||||
loading: false,
|
|
||||||
orderInfo: {},
|
|
||||||
status: ""
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
"$yroute.query.types": function(newVal) {
|
|
||||||
let that = this;
|
|
||||||
if (newVal != undefined) {
|
|
||||||
that.where.status = newVal;
|
|
||||||
that.init();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
types: function() {
|
|
||||||
this.getIndex();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
let that = this;
|
|
||||||
that.where.status = that.$yroute.query.types;
|
|
||||||
that.current = "";
|
|
||||||
that.getIndex();
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
!this.loading && this.getIndex();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goGoodsDeliver(item) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/orderAdmin/GoodsDeliver/index",
|
|
||||||
query: {
|
|
||||||
oid: item.orderId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
more: function(index) {
|
|
||||||
if (this.current === index) this.current = "";
|
|
||||||
else this.current = index;
|
|
||||||
},
|
|
||||||
modify: function(item, status) {
|
|
||||||
this.change = true;
|
|
||||||
this.orderInfo = item;
|
|
||||||
this.status = status;
|
|
||||||
},
|
|
||||||
changeclose: function(msg) {
|
|
||||||
this.change = msg;
|
|
||||||
},
|
|
||||||
async savePrice(opt) {
|
|
||||||
let that = this,
|
|
||||||
data = {},
|
|
||||||
price = opt.price.toString(),
|
|
||||||
refund_price = opt.refund_price.toString(),
|
|
||||||
refund_status = that.orderInfo.refundStatus,
|
|
||||||
remark = opt.remark;
|
|
||||||
data.orderId = that.orderInfo.orderId;
|
|
||||||
if (that.status == 0 && refund_status === 0) {
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
price: [
|
|
||||||
required(required.message("金额")),
|
|
||||||
num(num.message("金额"))
|
|
||||||
]
|
|
||||||
}).validate({
|
|
||||||
price
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
data.price = price;
|
|
||||||
setAdminOrderPrice(data).then(
|
|
||||||
function() {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: "改价成功",
|
|
||||||
icon: "success",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.init();
|
|
||||||
},
|
|
||||||
function() {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: "改价失败",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else if (that.status == 0 && refund_status === 1) {
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
refund_price: [
|
|
||||||
required(required.message("金额")),
|
|
||||||
num(num.message("金额"))
|
|
||||||
]
|
|
||||||
}).validate({
|
|
||||||
refund_price
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
data.price = refund_price;
|
|
||||||
data.type = opt.type;
|
|
||||||
setOrderRefund(data).then(
|
|
||||||
res => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.init();
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
remark: [required(required.message("备注"))]
|
|
||||||
}).validate({
|
|
||||||
remark
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
data.remark = remark;
|
|
||||||
setAdminOrderRemark(data).then(
|
|
||||||
res => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.init();
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
that.change = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
init: function() {
|
|
||||||
this.list = [];
|
|
||||||
this.where.page = 1;
|
|
||||||
this.loaded = false;
|
|
||||||
this.loading = false;
|
|
||||||
this.getIndex();
|
|
||||||
this.current = "";
|
|
||||||
},
|
|
||||||
getIndex: function() {
|
|
||||||
let that = this;
|
|
||||||
if (that.loading || that.loaded) return;
|
|
||||||
that.loading = true;
|
|
||||||
getAdminOrderList(that.where).then(
|
|
||||||
res => {
|
|
||||||
that.loading = false;
|
|
||||||
that.loaded = res.data.length < that.where.limit;
|
|
||||||
that.list.push.apply(that.list, res.data);
|
|
||||||
that.where.page = that.where.page + 1;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
changeStatus: function(val) {
|
|
||||||
if (this.where.status != val) {
|
|
||||||
this.where.status = val;
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toDetail: function(item) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/orderAdmin/AdminOrder/index",
|
|
||||||
query: {
|
|
||||||
oid: item.orderId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
offlinePay: function(item) {
|
|
||||||
setOfflinePay({
|
|
||||||
order_id: item.order_id
|
|
||||||
}).then(
|
|
||||||
res => {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.init();
|
|
||||||
},
|
|
||||||
error => {
|
|
||||||
uni.showToast({
|
|
||||||
title: error.msg,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
</style>
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="deliver-goods">
|
|
||||||
<header>
|
|
||||||
<view class="order-num acea-row row-between-wrapper">
|
|
||||||
<view class="num line1">订单号:{{ delivery.orderId }}</view>
|
|
||||||
<view class="name line1">{{ delivery.nickname }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="address">
|
|
||||||
<view class="name">
|
|
||||||
{{ delivery.realName }}
|
|
||||||
<text class="phone">{{ delivery.userPhone }}</text>
|
|
||||||
</view>
|
|
||||||
<view>{{ delivery.userAddress }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="line">
|
|
||||||
<image :src="webUrl+'/20230304135025917856.png'" />
|
|
||||||
</view>
|
|
||||||
</header>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="item acea-row row-between-wrapper">
|
|
||||||
<view>发货方式</view>
|
|
||||||
<view class="mode acea-row row-middle row-right">
|
|
||||||
<view
|
|
||||||
class="goods"
|
|
||||||
:class="active === typesIndex ? 'on' : ''"
|
|
||||||
v-for="(item, typesIndex) in types"
|
|
||||||
:key="typesIndex"
|
|
||||||
@click="changeType(item, typesIndex)"
|
|
||||||
>
|
|
||||||
{{ item.title }}
|
|
||||||
<text class="iconfont icon-xuanzhong2"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list" v-show="active === 0">
|
|
||||||
<picker
|
|
||||||
mode="selector"
|
|
||||||
:range="logistics"
|
|
||||||
class="mode"
|
|
||||||
range-key="name"
|
|
||||||
@change="changeLog"
|
|
||||||
>
|
|
||||||
<view class="item acea-row row-between-wrapper">
|
|
||||||
<view>快递公司</view>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
placeholder="填写快递公司"
|
|
||||||
disabled="disabled"
|
|
||||||
v-model="deliveryNames"
|
|
||||||
class="mode"
|
|
||||||
/>
|
|
||||||
<!-- <input type="text" placeholder="填写快递公司" v-model="deliveryName" class="mode" /> -->
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
<view class="item acea-row row-between-wrapper">
|
|
||||||
<view>快递单号</view>
|
|
||||||
<input type="text" placeholder="填写快递单号" v-model="deliveryId" class="mode" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="list" v-show="active === 1">
|
|
||||||
<view class="item acea-row row-between-wrapper">
|
|
||||||
<view>送货人</view>
|
|
||||||
<input type="text" placeholder="填写送货人" v-model="deliveryName" class="mode" />
|
|
||||||
</view>
|
|
||||||
<view class="item acea-row row-between-wrapper">
|
|
||||||
<view>送货电话</view>
|
|
||||||
<input type="text" placeholder="填写送货电话" v-model="deliveryId" class="mode" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height:100rpx;"></view>
|
|
||||||
<view class="confirm" @click="saveInfo">确认提交</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getAdminOrderDelivery, setAdminOrderDelivery } from "@/api/admin";
|
|
||||||
import { getLogistics } from "@/api/public";
|
|
||||||
import { required } from "@/utils/validate";
|
|
||||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "GoodsDeliver",
|
|
||||||
components: {},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
|
||||||
types: [
|
|
||||||
{
|
|
||||||
type: "express",
|
|
||||||
title: "发货"
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// type: "send",
|
|
||||||
// title: "送货"
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: "fictitious",
|
|
||||||
// title: "无需发货"
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
active: 0,
|
|
||||||
order_id: "",
|
|
||||||
delivery: [],
|
|
||||||
logistics: [],
|
|
||||||
delivery_type: "express",
|
|
||||||
deliveryName: "",
|
|
||||||
deliveryId: "",
|
|
||||||
deliveryNames: "请选择"
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
"$yroute.query.oid": function(newVal) {
|
|
||||||
let that = this;
|
|
||||||
if (newVal != undefined) {
|
|
||||||
that.order_id = newVal;
|
|
||||||
that.getIndex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.order_id = this.$yroute.query.oid;
|
|
||||||
this.getIndex();
|
|
||||||
this.getLogistics();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeLog: function(value) {
|
|
||||||
this.deliveryNames = this.logistics[value.detail.value].name;
|
|
||||||
this.deliveryName = this.logistics[value.detail.value].id;
|
|
||||||
},
|
|
||||||
changeType: function(item, index) {
|
|
||||||
this.active = index;
|
|
||||||
this.delivery_type = item.type;
|
|
||||||
this.deliveryName = "";
|
|
||||||
this.deliveryId = "";
|
|
||||||
},
|
|
||||||
getIndex: function() {
|
|
||||||
let that = this;
|
|
||||||
getAdminOrderDelivery(that.order_id).then(
|
|
||||||
res => {
|
|
||||||
that.delivery = res.data;
|
|
||||||
},
|
|
||||||
error => {
|
|
||||||
uni.showToast({
|
|
||||||
title: error.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
getLogistics: function() {
|
|
||||||
let that = this;
|
|
||||||
getLogistics().then(
|
|
||||||
res => {
|
|
||||||
console.log(res.data);
|
|
||||||
that.logistics = res.data;
|
|
||||||
},
|
|
||||||
error => {
|
|
||||||
uni.showToast({
|
|
||||||
title: error.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
async saveInfo() {
|
|
||||||
let that = this,
|
|
||||||
delivery_type = that.delivery_type,
|
|
||||||
deliveryName = that.deliveryName.toString(),
|
|
||||||
deliveryId = that.deliveryId,
|
|
||||||
save = {};
|
|
||||||
console.log(deliveryName);
|
|
||||||
save.orderId = that.order_id;
|
|
||||||
save.deliveryType = that.delivery_type;
|
|
||||||
switch (delivery_type) {
|
|
||||||
case "express":
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
deliveryName: [required(required.message("快递公司"))],
|
|
||||||
deliveryId: [required(required.message("快递单号"))]
|
|
||||||
}).validate({ deliveryName, deliveryId });
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
save.deliveryName = deliveryName;
|
|
||||||
save.deliveryId = deliveryId;
|
|
||||||
that.setInfo(save);
|
|
||||||
break;
|
|
||||||
case "send":
|
|
||||||
try {
|
|
||||||
await this.$validator({
|
|
||||||
deliveryName: [required(required.message("发货人姓名"))],
|
|
||||||
deliveryId: [required(required.message("发货人电话"))]
|
|
||||||
}).validate({ deliveryName, deliveryId });
|
|
||||||
} catch (e) {
|
|
||||||
return validatorDefaultCatch(e);
|
|
||||||
}
|
|
||||||
save.deliveryName = deliveryName;
|
|
||||||
save.deliveryId = deliveryId;
|
|
||||||
that.setInfo(save);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setInfo: function(item) {
|
|
||||||
let that = this;
|
|
||||||
console.log(item);
|
|
||||||
setAdminOrderDelivery(item)
|
|
||||||
.then(res => {
|
|
||||||
console.log(res);
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
that.$yrouter.go(-1);
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,184 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="OrderCancellation">
|
|
||||||
<view class="header">
|
|
||||||
<image mode="aspectFit" :src="`${staticUrl}/writeOffBg.jpg`" @click="openQRCode" />
|
|
||||||
</view>
|
|
||||||
<view class="whiteBg">
|
|
||||||
<view class="input">
|
|
||||||
<input type="number" placeholder="0" v-model="verify_code" />
|
|
||||||
</view>
|
|
||||||
<view class="bnt" @click="storeCancellation">立即核销</view>
|
|
||||||
</view>
|
|
||||||
<view class="scan" v-if="iswechat">
|
|
||||||
<image :src="webUrl+'/20200729154546061002.gif'" @click="openQRCode" />
|
|
||||||
</view>
|
|
||||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import WriteOff from "@/components/WriteOff";
|
|
||||||
import {
|
|
||||||
isWeixin
|
|
||||||
} from "@/utils";
|
|
||||||
// import { wechatEvevt } from "@/libs/wechat";
|
|
||||||
import {
|
|
||||||
orderVerific
|
|
||||||
} from "@/api/order";
|
|
||||||
const NAME = "OrderCancellation";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: NAME,
|
|
||||||
components: {
|
|
||||||
WriteOff
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
staticUrl:this.$STATIC_RESOURCE_URL,
|
|
||||||
webUrl: VUE_APP_RESOURCES_URL,
|
|
||||||
iShidden: true,
|
|
||||||
iswechat: isWeixin(),
|
|
||||||
orderInfo: {},
|
|
||||||
verify_code: ""
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function() {},
|
|
||||||
methods: {
|
|
||||||
cancel: function(res) {
|
|
||||||
this.iShidden = res;
|
|
||||||
},
|
|
||||||
confirm: function() {
|
|
||||||
orderVerific(this.verify_code, 1)
|
|
||||||
.then(res => {
|
|
||||||
this.iShidden = true;
|
|
||||||
this.verify_code = "";
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
storeCancellation: function() {
|
|
||||||
let ref = /[0-9]{12}/;
|
|
||||||
if (!this.verify_code) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "请输入核销码",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!ref.test(this.verify_code)) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "请输入正确的核销码",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.showLoading({
|
|
||||||
title: "查询中"
|
|
||||||
});
|
|
||||||
orderVerific(this.verify_code, 0)
|
|
||||||
.then(res => {
|
|
||||||
uni.hideLoading();
|
|
||||||
this.orderInfo = res.data;
|
|
||||||
this.iShidden = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: res.msg,
|
|
||||||
icon: "success",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.showToast({
|
|
||||||
title: error.msg ||
|
|
||||||
error.response.data.msg ||
|
|
||||||
error.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
openQRCode: function() {
|
|
||||||
let that = this;
|
|
||||||
// 这里需要调用扫码功能
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
.OrderCancellation .header {
|
|
||||||
width: 100%;
|
|
||||||
height: 3 * 100rpx;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 3 * 100rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.OrderCancellation .whiteBg {
|
|
||||||
width: 6.9 * 100rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
margin: -0.93 * 100rpx auto 0 auto;
|
|
||||||
padding-top: 0.8 * 100rpx;
|
|
||||||
padding-bottom: 30rpx;
|
|
||||||
z-index: 99;
|
|
||||||
position: relative;
|
|
||||||
border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.OrderCancellation .whiteBg .input {
|
|
||||||
width: 5.8 * 100rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
border-bottom: 0.01 * 100rpx solid #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.OrderCancellation .whiteBg .input input {
|
|
||||||
padding-bottom: 0.25 * 100rpx;
|
|
||||||
font-size: 0.6 * 100rpx;
|
|
||||||
height: auto;
|
|
||||||
color: #282828;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.OrderCancellation .whiteBg .bnt {
|
|
||||||
font-size: 0.32 * 100rpx;
|
|
||||||
color: #fff;
|
|
||||||
width: 5.8 * 100rpx;
|
|
||||||
height: 0.86 * 100rpx;
|
|
||||||
border-radius: 0.43 * 100rpx;
|
|
||||||
background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
|
||||||
background-image: -webkit-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
|
||||||
background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
|
||||||
text-align: center;
|
|
||||||
line-height: 0.86 * 100rpx;
|
|
||||||
margin: 0.55 * 100rpx auto 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.OrderCancellation .scan {
|
|
||||||
width: 3 * 100rpx;
|
|
||||||
height: 3 * 100rpx;
|
|
||||||
margin: 1.1 * 100rpx auto 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.OrderCancellation .scan image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="order-index" ref="container">
|
|
||||||
<image :src="webUrl+'/20230304202119869348.png'" mode="widthFix" class="image" />
|
|
||||||
<view class="header acea-row">
|
|
||||||
<view class="item" @click="goAdminOrderList(0)">
|
|
||||||
<view class="num">{{ census.orderCount.unpaidCount }}</view>
|
|
||||||
<view>待付款</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goAdminOrderList(1)">
|
|
||||||
<view class="num">{{ census.orderCount.unshippedCount }}</view>
|
|
||||||
<view>待发货</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goAdminOrderList(2)">
|
|
||||||
<view class="num">{{ census.orderCount.receivedCount }}</view>
|
|
||||||
<view>待收货</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goAdminOrderList(3)">
|
|
||||||
<view class="num">{{ census.orderCount.evaluatedCount }}</view>
|
|
||||||
<view>待评价</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goAdminOrderList(4)">
|
|
||||||
<view class="num">{{ census.orderCount.refundCount }}</view>
|
|
||||||
<view>退款</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="title">
|
|
||||||
<text class="iconfont icon-shujutongji"></text>数据统计
|
|
||||||
</view>
|
|
||||||
<view class="list acea-row">
|
|
||||||
<view class="item" @click="goStatistics({type:'price',time:'today'})">
|
|
||||||
<view class="num">{{ census.orderTimeCount.todayPrice }}</view>
|
|
||||||
<view>今日成交额</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goStatistics({type:'price',time:'yesterday'})">
|
|
||||||
<view class="num">{{ census.orderTimeCount.proPrice }}</view>
|
|
||||||
<view>昨日成交额</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goStatistics({type:'price',time:'month'})">
|
|
||||||
<view class="num">{{ census.orderTimeCount.monthPrice }}</view>
|
|
||||||
<view>本月成交额</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goStatistics({type:'order',time:'today'})">
|
|
||||||
<view class="num">{{ census.orderTimeCount.todayCount }}</view>
|
|
||||||
<view>今日订单数</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goStatistics({type:'order',time:'yesterday'})">
|
|
||||||
<view class="num">{{ census.orderTimeCount.proCount }}</view>
|
|
||||||
<view>昨日订单数</view>
|
|
||||||
</view>
|
|
||||||
<view class="item" @click="goStatistics({type:'order',time:'month'})">
|
|
||||||
<view class="num">{{ census.orderTimeCount.monthCount }}</view>
|
|
||||||
<view>本月订单数</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="public-wrapper">
|
|
||||||
<view class="title">
|
|
||||||
<text class="iconfont icon-xiangxishuju"></text>详细数据
|
|
||||||
</view>
|
|
||||||
<view class="nav acea-row row-between-wrapper">
|
|
||||||
<view class="data">日期</view>
|
|
||||||
<view class="browse">订单数</view>
|
|
||||||
<view class="turnover">成交额</view>
|
|
||||||
</view>
|
|
||||||
<view class="conter">
|
|
||||||
<view
|
|
||||||
class="item acea-row row-between-wrapper"
|
|
||||||
v-for="(item, orderListIndex) in list"
|
|
||||||
:key="orderListIndex"
|
|
||||||
>
|
|
||||||
<view class="data">{{ item.time }}</view>
|
|
||||||
<view class="browse">{{ item.count }}</view>
|
|
||||||
<view class="turnover">{{ item.price }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getStatisticsInfo, getStatisticsMonth } from "@/api/admin";
|
|
||||||
import Loading from "@/components/Loading";
|
|
||||||
export default {
|
|
||||||
name: "OrderIndex",
|
|
||||||
components: {
|
|
||||||
Loading
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
|
||||||
census: {
|
|
||||||
orderCount: {},
|
|
||||||
orderTimeCount: {}
|
|
||||||
},
|
|
||||||
list: [],
|
|
||||||
where: {
|
|
||||||
page: 1,
|
|
||||||
limit: 15
|
|
||||||
},
|
|
||||||
loaded: false,
|
|
||||||
loading: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.getIndex();
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
!this.loading && this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goStatistics(query) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/orderAdmin/Statistics/index",
|
|
||||||
query
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goAdminOrderList(types) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/orderAdmin/AdminOrderList/index",
|
|
||||||
query: { types }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getIndex: function() {
|
|
||||||
var that = this;
|
|
||||||
getStatisticsInfo().then(
|
|
||||||
res => {
|
|
||||||
that.census = res.data;
|
|
||||||
that.census.unpaidCount = that.census.orderCount.unpaidCount;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
getList: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.loading || that.loaded) return;
|
|
||||||
that.loading = true;
|
|
||||||
getStatisticsMonth(that.where).then(
|
|
||||||
res => {
|
|
||||||
that.loading = false;
|
|
||||||
that.loaded = res.data.length < that.where.limit;
|
|
||||||
that.list.push.apply(that.list, res.data);
|
|
||||||
that.where.page = that.where.page + 1;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
},
|
|
||||||
300
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,446 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="statistical-page" ref="container">
|
|
||||||
<view class="navs">
|
|
||||||
<view class="list">
|
|
||||||
<view class="item" :class="time == 'today' ? 'on' : ''" @click="setTime('today')">今天</view>
|
|
||||||
<view class="item" :class="time == 'yesterday' ? 'on' : ''" @click="setTime('yesterday')">昨天</view>
|
|
||||||
<view class="item" :class="time == 'seven' ? 'on' : ''" @click="setTime('seven')">最近7天</view>
|
|
||||||
<view class="item" :class="time == 'month' ? 'on' : ''" @click="setTime('month')">本月</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="wrapper">
|
|
||||||
<view class="title">{{ title }}{{ this.where.type == 1 ? "营业额(元)" : "订单量(份)" }}</view>
|
|
||||||
<view class="money">{{ time_price }}</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="chart">
|
|
||||||
<view class="company">{{ where.type === 1 ? "单位(元)" : "单位(份)" }}</view>
|
|
||||||
<ECharts :options="polar"></ECharts>
|
|
||||||
</view>-->
|
|
||||||
<view class="public-wrapper">
|
|
||||||
<view class="title">
|
|
||||||
<text class="iconfont icon-xiangxishuju"></text>详细数据
|
|
||||||
</view>
|
|
||||||
<view class="nav acea-row row-between-wrapper">
|
|
||||||
<view class="data">日期</view>
|
|
||||||
<view class="browse">订单量</view>
|
|
||||||
<view class="turnover">成交额</view>
|
|
||||||
</view>
|
|
||||||
<view class="conter">
|
|
||||||
<view
|
|
||||||
class="item acea-row row-between-wrapper"
|
|
||||||
v-for="(item, statisticalIndex) in list"
|
|
||||||
:key="statisticalIndex"
|
|
||||||
>
|
|
||||||
<view class="data">{{ item.time }}</view>
|
|
||||||
<view class="browse">{{ item.count }}</view>
|
|
||||||
<view class="turnover">{{ item.price }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="calendar-wrapper" :class="current === true ? 'on' : ''">
|
|
||||||
<view class="calendar">
|
|
||||||
<Calendar
|
|
||||||
:clean="clean"
|
|
||||||
:lunar="lunar"
|
|
||||||
ref="calendar"
|
|
||||||
:range="isrange"
|
|
||||||
:multi="ismulti"
|
|
||||||
@select="select"
|
|
||||||
@next="next"
|
|
||||||
@prev="prev"
|
|
||||||
:value="value"
|
|
||||||
:weekSwitch="weekSwitch"
|
|
||||||
:monthRange="monthRange"
|
|
||||||
rangeMonthFormat="yyyy年MM月"
|
|
||||||
monFirst
|
|
||||||
responsive
|
|
||||||
:begin="[1992, 5, 20]"
|
|
||||||
:end="[2049, 5, 20]"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</view>-->
|
|
||||||
<view class="mask" @touchmove.prevent v-show="current === true" @click="close"></view>
|
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
// import ECharts from "vue-echarts";
|
|
||||||
// import "echarts/lib/chart/line";
|
|
||||||
// import "echarts/lib/component/polar";
|
|
||||||
// import Calendar from "mpvue-calendar";
|
|
||||||
// import "mpvue-calendar/src/browser-style.css";
|
|
||||||
import { getStatisticsMonth, getStatisticsTime } from "@/api/admin";
|
|
||||||
import Loading from "@/components/Loading";
|
|
||||||
const year = new Date().getFullYear();
|
|
||||||
const month = new Date().getMonth() + 1;
|
|
||||||
const day = new Date().getDate();
|
|
||||||
export default {
|
|
||||||
name: "Statistics",
|
|
||||||
components: {
|
|
||||||
// ECharts,
|
|
||||||
// Calendar,
|
|
||||||
Loading
|
|
||||||
},
|
|
||||||
props: {},
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
polar: {
|
|
||||||
tooltip: {
|
|
||||||
trigger: "axis"
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: [""]
|
|
||||||
},
|
|
||||||
toolbox: {
|
|
||||||
show: false,
|
|
||||||
feature: {
|
|
||||||
mark: { show: true },
|
|
||||||
dataView: { show: true, readOnly: false },
|
|
||||||
magicType: { show: true, type: ["line"] },
|
|
||||||
restore: { show: true },
|
|
||||||
saveAsImage: { show: true }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
calculable: true,
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
boundaryGap: false,
|
|
||||||
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
|
||||||
splitLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
lineStyle: {
|
|
||||||
color: "#999",
|
|
||||||
width: 1 //这里是为了突出显示加上的
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: ["#f5f5f5"],
|
|
||||||
width: 1,
|
|
||||||
type: "solid"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
lineStyle: {
|
|
||||||
color: "#999",
|
|
||||||
width: 1 //这里是为了突出显示加上的
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "邮件营销",
|
|
||||||
type: "line",
|
|
||||||
stack: "总量",
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: "#2291f8", //折点颜色
|
|
||||||
lineStyle: {
|
|
||||||
color: "#2291f8" //折线颜色
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: [120, 132.5, 101, 134, 90, 150, 30]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
grid: {
|
|
||||||
x: 30,
|
|
||||||
x2: 10,
|
|
||||||
y: 20,
|
|
||||||
y2: 110
|
|
||||||
},
|
|
||||||
animationDuration: 2000
|
|
||||||
},
|
|
||||||
value: [
|
|
||||||
[year, month, day - 1],
|
|
||||||
[year, month, day]
|
|
||||||
],
|
|
||||||
isrange: true,
|
|
||||||
weekSwitch: false,
|
|
||||||
ismulti: false,
|
|
||||||
monFirst: true,
|
|
||||||
clean: false, //简洁模式
|
|
||||||
lunar: false, //显示农历
|
|
||||||
renderValues: [],
|
|
||||||
monthRange: [],
|
|
||||||
current: false,
|
|
||||||
where: {
|
|
||||||
start: "",
|
|
||||||
stop: "",
|
|
||||||
type: "",
|
|
||||||
cate: 1
|
|
||||||
},
|
|
||||||
types: "", //类型|order=订单数|price=营业额
|
|
||||||
time: "", //时间|today=今天|yesterday=昨天|month=本月
|
|
||||||
title: "", //时间|today=今天|yesterday=昨天|month=本月
|
|
||||||
growth_rate: "", //增长率
|
|
||||||
increase_time: "", //增长率
|
|
||||||
increase_time_status: "", //增长率
|
|
||||||
time_price: "", //增长率
|
|
||||||
loaded: false,
|
|
||||||
loading: false,
|
|
||||||
filter: {
|
|
||||||
page: 1,
|
|
||||||
limit: 10
|
|
||||||
},
|
|
||||||
list: []
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
"$yroute.params": function(newVal) {
|
|
||||||
var that = this;
|
|
||||||
if (newVal != undefined) {
|
|
||||||
that.setType(newVal.type);
|
|
||||||
that.setTime(newVal.time);
|
|
||||||
that.getIndex();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
|
||||||
this.handelRenderValues();
|
|
||||||
this.setTime(this.$yroute.query.time);
|
|
||||||
this.setType(this.$yroute.query.type);
|
|
||||||
// this.getIndex();
|
|
||||||
this.getInfo();
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
!this.loading && this.getInfo();
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
monthRangeText() {
|
|
||||||
return this.monthRange.length ? "固定" : "指定范围";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getIndex: function() {
|
|
||||||
var that = this;
|
|
||||||
getStatisticsTime(that.where).then(
|
|
||||||
res => {
|
|
||||||
var _info = res.data.chart,
|
|
||||||
day = [],
|
|
||||||
num = [];
|
|
||||||
_info.forEach(function(item) {
|
|
||||||
day.push(item.time);
|
|
||||||
num.push(item.num);
|
|
||||||
});
|
|
||||||
that.polar.xAxis[0].data = day;
|
|
||||||
that.polar.series[0].data = num;
|
|
||||||
that.growth_rate = res.data.growth_rate;
|
|
||||||
that.increase_time = res.data.increase_time;
|
|
||||||
that.increase_time_status = res.data.increase_time_status;
|
|
||||||
that.time_price = res.data.time;
|
|
||||||
},
|
|
||||||
error => {
|
|
||||||
uni.showToast({
|
|
||||||
title: error.msg,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
setTime: function(time) {
|
|
||||||
this.time = time;
|
|
||||||
var year = new Date().getFullYear(),
|
|
||||||
month = new Date().getMonth() + 1,
|
|
||||||
day = new Date().getDate();
|
|
||||||
switch (time) {
|
|
||||||
case "today":
|
|
||||||
this.where.cate = 1;
|
|
||||||
this.title = "今日";
|
|
||||||
this.getIndex();
|
|
||||||
break;
|
|
||||||
case "yesterday":
|
|
||||||
this.where.cate = 2;
|
|
||||||
this.title = "昨日";
|
|
||||||
this.getIndex();
|
|
||||||
break;
|
|
||||||
case "month":
|
|
||||||
this.where.cate = 4;
|
|
||||||
this.title = "本月";
|
|
||||||
this.getIndex();
|
|
||||||
break;
|
|
||||||
case "seven":
|
|
||||||
this.where.cate = 3;
|
|
||||||
this.title = "七日";
|
|
||||||
this.getIndex();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setType: function(type) {
|
|
||||||
switch (type) {
|
|
||||||
case "price":
|
|
||||||
this.where.type = 1;
|
|
||||||
break;
|
|
||||||
case "order":
|
|
||||||
this.where.type = 2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clickSomeThing(data) {
|
|
||||||
this.value = [
|
|
||||||
[2019, 4, 1],
|
|
||||||
[2019, 4, 8]
|
|
||||||
];
|
|
||||||
},
|
|
||||||
setMonthRange() {
|
|
||||||
this.monthRange = this.monthRange.length ? [] : ["2019-4", "2020-1"];
|
|
||||||
},
|
|
||||||
switchMode() {
|
|
||||||
this.weekSwitch = !this.weekSwitch;
|
|
||||||
setTimeout(() => {
|
|
||||||
// this.$refs.calendar.renderer(2019, 1); //渲染2018年8月份
|
|
||||||
}, 0);
|
|
||||||
},
|
|
||||||
handelRenderValues(data) {
|
|
||||||
if (this.ismulti) {
|
|
||||||
this.renderValues = this.value.map(v => v.join("-"));
|
|
||||||
} else if (this.isrange) {
|
|
||||||
const values = [];
|
|
||||||
data || this.value;
|
|
||||||
this.value.forEach((v, i) => {
|
|
||||||
values.push(v.join("-"));
|
|
||||||
if (!i) {
|
|
||||||
values.push("~");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.renderValues = values;
|
|
||||||
} else {
|
|
||||||
this.renderValues = [this.value.join("-")];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
multiMode() {
|
|
||||||
this.ismulti = true;
|
|
||||||
this.isrange = false;
|
|
||||||
this.value = [
|
|
||||||
[year, month, 16],
|
|
||||||
[year, month, 18]
|
|
||||||
];
|
|
||||||
this.handelRenderValues();
|
|
||||||
// this.$refs.calendar.renderer(year, month);
|
|
||||||
},
|
|
||||||
rangeMode() {
|
|
||||||
this.ismulti = false;
|
|
||||||
this.isrange = true;
|
|
||||||
this.value = [
|
|
||||||
[year, month, 16],
|
|
||||||
[year, month, 22]
|
|
||||||
];
|
|
||||||
this.handelRenderValues();
|
|
||||||
// this.$refs.calendar.renderer(year, month);
|
|
||||||
},
|
|
||||||
valueMode() {
|
|
||||||
this.ismulti = false;
|
|
||||||
this.isrange = false;
|
|
||||||
this.value = [year, month, 16];
|
|
||||||
this.handelRenderValues();
|
|
||||||
// this.$refs.calendar.renderer(year, month);
|
|
||||||
},
|
|
||||||
selectMonth(month, year) {},
|
|
||||||
prev(y, m, w) {},
|
|
||||||
next(year, month, week) {},
|
|
||||||
selectYear(year) {},
|
|
||||||
setToday() {
|
|
||||||
// this.$refs.calendar.setToday();
|
|
||||||
},
|
|
||||||
dateInfo() {
|
|
||||||
// const info = this.$refs.calendar.dateInfo(2018, 8, 23);
|
|
||||||
},
|
|
||||||
renderer() {
|
|
||||||
if (this.monthRange.length) {
|
|
||||||
this.monthRange = ["2018-8", "2018-8"];
|
|
||||||
}
|
|
||||||
// this.$refs.calendar.renderer(2018, 8); //渲染2018年8月份
|
|
||||||
},
|
|
||||||
select(val, val2) {
|
|
||||||
if (this.isrange) {
|
|
||||||
this.handelRenderValues([val, val2]);
|
|
||||||
} else if (this.ismulti) {
|
|
||||||
this.handelRenderValues(val);
|
|
||||||
} else {
|
|
||||||
this.handelRenderValues([val]);
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
this.where.start != new Date(val) / 1000 ||
|
|
||||||
this.where.stop != new Date(val2) / 1000 + 24 * 60 * 60 - 1
|
|
||||||
) {
|
|
||||||
this.time = "date";
|
|
||||||
this.title = "";
|
|
||||||
this.where.start =
|
|
||||||
new Date(Date.parse(val[0] + "/" + val[1] + "/" + val[2])).getTime() /
|
|
||||||
1000;
|
|
||||||
this.where.stop =
|
|
||||||
new Date(
|
|
||||||
Date.parse(val2[0] + "/" + val2[1] + "/" + val2[2])
|
|
||||||
).getTime() /
|
|
||||||
1000 +
|
|
||||||
24 * 60 * 60 -
|
|
||||||
1;
|
|
||||||
this.getIndex();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dateTitle: function() {
|
|
||||||
this.current = true;
|
|
||||||
},
|
|
||||||
close: function() {
|
|
||||||
this.current = false;
|
|
||||||
},
|
|
||||||
getInfo: function() {
|
|
||||||
var that = this;
|
|
||||||
if (that.loading || that.loaded) return;
|
|
||||||
that.loading = true;
|
|
||||||
getStatisticsMonth(that.filter).then(
|
|
||||||
res => {
|
|
||||||
that.loading = false;
|
|
||||||
that.loaded = res.data.length < that.filter.limit;
|
|
||||||
// that.list.push.apply(that.list, res.data);
|
|
||||||
that.list = res.data;
|
|
||||||
that.filter.page = that.filter.page + 1;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
uni.showToast({
|
|
||||||
title:
|
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.echarts {
|
|
||||||
width: 100%;
|
|
||||||
height: 5.5 * 100rpx;
|
|
||||||
}
|
|
||||||
.calendar-wrapper {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 66;
|
|
||||||
transform: translate3d(0, 100%, 0);
|
|
||||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
|
||||||
}
|
|
||||||
.calendar-wrapper.on {
|
|
||||||
transform: translate3d(0, 0, 0);
|
|
||||||
}
|
|
||||||
.statistical-page .wrapper .increase {
|
|
||||||
font-size: 0.26 * 100rpx;
|
|
||||||
}
|
|
||||||
.statistical-page .wrapper .increase .iconfont {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -5,8 +5,9 @@
|
|||||||
<input
|
<input
|
||||||
v-model.trim="search"
|
v-model.trim="search"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="搜索商品"
|
placeholder="请输入"
|
||||||
placeholder-style="color:#999"
|
placeholder-style="color:#999"
|
||||||
|
@confirm="submit"
|
||||||
/>
|
/>
|
||||||
<view class="btn flex-0 flex jc-center ai-center" @click="submit">
|
<view class="btn flex-0 flex jc-center ai-center" @click="submit">
|
||||||
<text class="iconfont icon-sousuo2"></text>
|
<text class="iconfont icon-sousuo2"></text>
|
||||||
@@ -15,7 +16,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="historyKey.length" class="page-content">
|
<view v-if="historyKey.length" class="page-content">
|
||||||
<view class="title">历史搜索</view>
|
<view
|
||||||
|
class="title"
|
||||||
|
>
|
||||||
|
历史搜索
|
||||||
|
<u-icon
|
||||||
|
name="trash-fill"
|
||||||
|
color="#aaa"
|
||||||
|
size="20"
|
||||||
|
@click="deleteHistoryHandle"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view class="list acea-row limit-box">
|
<view class="list acea-row limit-box">
|
||||||
<view
|
<view
|
||||||
v-for="item of historyKey"
|
v-for="item of historyKey"
|
||||||
@@ -59,10 +70,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.getData();
|
this.getData()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getHistory();
|
this.getHistory()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
@@ -92,9 +103,25 @@ export default {
|
|||||||
}
|
}
|
||||||
this.historyKey.unshift({id: this.$global.generateMixed(10), word })
|
this.historyKey.unshift({id: this.$global.generateMixed(10), word })
|
||||||
uni.setStorageSync('historyKey', JSON.stringify(this.historyKey))
|
uni.setStorageSync('historyKey', JSON.stringify(this.historyKey))
|
||||||
|
},
|
||||||
|
deleteHistoryHandle() {
|
||||||
|
const _this = this
|
||||||
|
uni.showModal({
|
||||||
|
title: '确认删除最近的搜索记录吗?',
|
||||||
|
content: '',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确认',
|
||||||
|
success: (result) => {
|
||||||
|
if (result.confirm) {
|
||||||
|
_this.historyKey = []
|
||||||
|
uni.setStorageSync('historyKey', JSON.stringify([]))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@@ -139,6 +166,8 @@ export default {
|
|||||||
padding: 0 32rpx;
|
padding: 0 32rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
margin: 22rpx 0 24rpx;
|
margin: 22rpx 0 24rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|||||||
@@ -263,15 +263,6 @@
|
|||||||
goGoodSearch() {
|
goGoodSearch() {
|
||||||
this.$yrouter.push("/pages/shop/GoodSearch/index");
|
this.$yrouter.push("/pages/shop/GoodSearch/index");
|
||||||
},
|
},
|
||||||
goGoodsList(child) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/shop/GoodsList/index",
|
|
||||||
query: {
|
|
||||||
id: child.id,
|
|
||||||
title: child.cateName
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
activeCateId(n) {
|
activeCateId(n) {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
n = parseInt(n);
|
n = parseInt(n);
|
||||||
@@ -314,18 +305,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm: function() {
|
|
||||||
var val = trim(this.search);
|
|
||||||
if (val) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/shop/GoodsList/index",
|
|
||||||
query: {
|
|
||||||
s: val
|
|
||||||
}
|
|
||||||
});
|
|
||||||
setTimeout(() => (this.search = ""), 500);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
asideTap(index) {
|
asideTap(index) {
|
||||||
this.navActive = index;
|
this.navActive = index;
|
||||||
|
|
||||||
|
|||||||
+730
-590
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<view class="v12-px-3 v12-py-5 qua-card ">
|
||||||
|
<view class="v12-white v12-radius-16">
|
||||||
|
<view class="v12-justify-between v12-pa-3">
|
||||||
|
<text class="v12-font-32 v12-dark-text">
|
||||||
|
商家名称
|
||||||
|
</text>
|
||||||
|
<text class="v12-font-32 v12-dark-text v12-font-bold">
|
||||||
|
{{ merInfo.name }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="v12-my-3 v12-justify-center v12-pb-3" v-for="(item , i) in merInfo.qualifications" :key="i">
|
||||||
|
<image @tap="previewImage(i)" class="img" :src="item.image" :data-src="item.image" mode="widthFix" lazy-load="true" v-if="more || i === 0"></image>
|
||||||
|
</view>
|
||||||
|
<view class="v12-align-center v12-justify-center v12-font-24 v12-pb-3" @click="showMore" v-if="!more && merInfo.qualifications.length > 1">
|
||||||
|
<text class="v12-dark1-text">查看更多</text>
|
||||||
|
<u-icon name="arrow-down"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
merInfo: {
|
||||||
|
qualifications: []
|
||||||
|
},
|
||||||
|
more: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(opts) {
|
||||||
|
this.merInfo = JSON.parse(opts.mer)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
previewImage (i) {
|
||||||
|
uni.previewImage({
|
||||||
|
current: i,
|
||||||
|
urls: this.merInfo.qualifications
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showMore() {
|
||||||
|
this.more = !this.more
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.qua-card {
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 662rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+126
-137
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="evaluate-con">
|
<view class="evaluate-con">
|
||||||
<view class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
|
<view
|
||||||
|
v-if="orderCon.productInfo"
|
||||||
|
class="goodsStyle acea-row row-between"
|
||||||
|
>
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="orderCon.productInfo.image" class="image"/>
|
<image :src="orderCon.productInfo.image" class="image"/>
|
||||||
</view>
|
</view>
|
||||||
@@ -14,77 +17,86 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="score">
|
<view class="score">
|
||||||
<view
|
<view
|
||||||
class="item acea-row row-middle"
|
|
||||||
v-for="(item, scoreListIndexw) in scoreList"
|
v-for="(item, scoreListIndexw) in scoreList"
|
||||||
:key="scoreListIndexw"
|
:key="scoreListIndexw"
|
||||||
|
class="item acea-row row-middle"
|
||||||
>
|
>
|
||||||
<view>{{ item.name }}</view>
|
<view>{{ item.name }}</view>
|
||||||
<view class="starsList">
|
<view class="starsList">
|
||||||
<text
|
<text
|
||||||
@click="stars(starsIndexn, scoreListIndexw)"
|
|
||||||
v-for="(itemn, starsIndexn) in item.stars"
|
v-for="(itemn, starsIndexn) in item.stars"
|
||||||
:key="starsIndexn"
|
:key="starsIndexn"
|
||||||
class="iconfont"
|
|
||||||
:class="item.index >= starsIndexn ? 'icon-shitixing font-color-red' : 'icon-kongxinxing'"
|
:class="item.index >= starsIndexn ? 'icon-shitixing font-color-red' : 'icon-kongxinxing'"
|
||||||
></text>
|
class="iconfont"
|
||||||
|
@click="stars(starsIndexn, scoreListIndexw)"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="evaluate">{{ item.index === -1 ? "" : item.index + 1 + "分" }}</text>
|
<text class="evaluate">{{ item.index === -1 ? "" : item.index + 1 + "分" }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="textarea">
|
<view class="textarea">
|
||||||
<textarea placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~" v-model="expect"></textarea>
|
<textarea
|
||||||
|
v-model="expect"
|
||||||
<u-upload
|
placeholder="商品满足你的期待么?说说你的想法,分享给想买的他们吧~"
|
||||||
:fileList="uploadPictures"
|
/>
|
||||||
@afterRead="afterRead"
|
<view class="upload-title">
|
||||||
@delete="deletePic"
|
添加视频/图片
|
||||||
name="uploadPictures"
|
<text class="txt">
|
||||||
multiple
|
({{ videoArr.length + picArr.length }}/9)
|
||||||
:maxCount="9"
|
</text>
|
||||||
></u-upload>
|
</view>
|
||||||
<!-- <view class="list acea-row row-middle">-->
|
<view class="upload-wrapper">
|
||||||
<!-- <view-->
|
<view v-show="picArr.length < 9" class="video-upload">
|
||||||
<!-- class="pictrue"-->
|
<tm-upload
|
||||||
<!-- v-for="(item, uploadPicturesIndex) in uploadPictures"-->
|
:upload_img_wh="uploadImgWH"
|
||||||
<!-- :key="uploadPicturesIndex"-->
|
:upload_max="1"
|
||||||
<!-- >-->
|
:upload_count="1"
|
||||||
<!-- <image :src="item"/>-->
|
:url="uploadUrl"
|
||||||
<!-- <text-->
|
:header="uploadHeader"
|
||||||
<!-- class="iconfont icon-guanbi1 font-color-red"-->
|
type='video'
|
||||||
<!-- @click="uploadPictures.splice(uploadPicturesIndex, 1)"-->
|
@change="uploadedVideoChange"
|
||||||
<!-- ></text>-->
|
/>
|
||||||
<!-- </view>-->
|
</view>
|
||||||
<!-- <view class="pictrue uploadBnt acea-row row-center-wrapper row-column" @tap="chooseImage">-->
|
<view class="pic-upload">
|
||||||
<!-- <text class="iconfont icon-icon25201"></text>-->
|
<tm-upload
|
||||||
<!-- <view>上传图片</view>-->
|
:upload_img_wh="uploadImgWH"
|
||||||
<!-- </view>-->
|
:upload_max="9 - videoArr.length"
|
||||||
<!-- </view>-->
|
:upload_count="9 - videoArr.length"
|
||||||
|
:url="uploadUrl"
|
||||||
|
:header="uploadHeader"
|
||||||
|
:showBlankPlaceholder="picArr.length !== 9"
|
||||||
|
type='image'
|
||||||
|
@change="uploadedPicChange"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
|
<view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="less">
|
|
||||||
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
import {postOrderComment, postOrderProduct} from "@/api/store";
|
import { postOrderComment, postOrderProduct } from '@/api/store'
|
||||||
import {trim, uploadImage} from "@/utils";
|
import { trim } from '@/utils'
|
||||||
import {required} from "@/utils/validate";
|
import { required } from '@/utils/validate'
|
||||||
import {validatorDefaultCatch} from "@/utils/dialog";
|
import { validatorDefaultCatch } from '@/utils/dialog'
|
||||||
|
import tmUpload from '@/components/tm-upload/tm-upload.vue'
|
||||||
const NAME = "GoodsEvaluate";
|
import {
|
||||||
|
VUE_APP_API_URL
|
||||||
|
} from '@/config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: NAME,
|
name: 'GoodsEvaluate',
|
||||||
components: {
|
components: {
|
||||||
// VueCoreImageUpload
|
tmUpload
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
uploadUrl: VUE_APP_API_URL + '/api/upload',
|
||||||
|
uploadImgWH: (750 - 3 * 16 - 2 * 32 - 16) / 3.0,
|
||||||
|
uploadHeader: {
|
||||||
|
Authorization: "Bearer " + this.$store.getters.token
|
||||||
|
},
|
||||||
orderCon: {
|
orderCon: {
|
||||||
cartProduct: {
|
cartProduct: {
|
||||||
productInfo: {}
|
productInfo: {}
|
||||||
@@ -92,136 +104,113 @@ export default {
|
|||||||
},
|
},
|
||||||
scoreList: [
|
scoreList: [
|
||||||
{
|
{
|
||||||
name: "商品质量",
|
name: '商品质量',
|
||||||
stars: ["", "", "", "", ""],
|
stars: ['', '', '', '', ''],
|
||||||
index: -1
|
index: -1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "服务态度",
|
name: '服务态度',
|
||||||
stars: ["", "", "", "", ""],
|
stars: ['', '', '', '', ''],
|
||||||
index: -1
|
index: -1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
uploadPictures: [],
|
uploadPictures: [],
|
||||||
expect: "",
|
expect: '',
|
||||||
unique: ""
|
unique: '',
|
||||||
};
|
picArr: [],
|
||||||
},
|
videoArr: []
|
||||||
mounted: function () {
|
|
||||||
this.unique = this.$yroute.query.id;
|
|
||||||
this.getOrderProduct();
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$yroute(n) {
|
|
||||||
if (n.name === NAME && this.unique !== n.params.id) {
|
|
||||||
this.unique = n.params.id;
|
|
||||||
this.$set(this.scoreList[0], "index", -1);
|
|
||||||
this.$set(this.scoreList[1], "index", -1);
|
|
||||||
this.expect = "";
|
|
||||||
this.uploadPictures = [];
|
|
||||||
this.getOrderProduct();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.unique = this.$yroute.query.id
|
||||||
|
this.getOrderProduct()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getOrderProduct: function () {
|
getOrderProduct() {
|
||||||
let that = this,
|
postOrderProduct(this.unique).then(res => {
|
||||||
unique = that.unique;
|
this.orderCon = res.data
|
||||||
postOrderProduct(unique).then(res => {
|
})
|
||||||
that.orderCon = res.data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
stars: function (indexn, indexw) {
|
stars: function (indexn, indexw) {
|
||||||
this.scoreList[indexw].index = indexn;
|
this.scoreList[indexw].index = indexn
|
||||||
},
|
},
|
||||||
// chooseImage() {
|
uploadedVideoChange(uploadList) {
|
||||||
// chooseImage(img => {
|
this.videoArr = uploadList
|
||||||
// this.uploadPictures.push(img);
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
// 删除图片
|
|
||||||
deletePic(event) {
|
|
||||||
this[`${event.name}`].splice(event.index, 1)
|
|
||||||
},
|
},
|
||||||
|
uploadedPicChange(uploadList) {
|
||||||
afterRead(event) {
|
this.picArr = uploadList
|
||||||
let that = this;
|
|
||||||
if (event.file.length > 0) {
|
|
||||||
event.file.map(item => {
|
|
||||||
uploadImage(item.url, img => {
|
|
||||||
that.uploadPictures.push({url: img})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async submit() {
|
async submit() {
|
||||||
const expect = trim(this.expect),
|
const expect = trim(this.expect)
|
||||||
product_score =
|
const product_score = this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1
|
||||||
this.scoreList[0].index + 1 === 0 ? "" : this.scoreList[0].index + 1,
|
const service_score = this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1
|
||||||
service_score =
|
|
||||||
this.scoreList[1].index + 1 === 0 ? "" : this.scoreList[1].index + 1;
|
|
||||||
try {
|
try {
|
||||||
await this.$validator({
|
await this.$validator({
|
||||||
product_score: [
|
product_score: [
|
||||||
required("请选择商品质量分数", {
|
required('请选择商品质量分数', {
|
||||||
type: "number"
|
type: 'number'
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
service_score: [
|
service_score: [
|
||||||
required("请选择服务态度分数", {
|
required('请选择服务态度分数', {
|
||||||
type: "number"
|
type: 'number'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
}).validate({
|
}).validate({
|
||||||
product_score,
|
product_score,
|
||||||
service_score
|
service_score
|
||||||
});
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return validatorDefaultCatch(e);
|
return validatorDefaultCatch(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
let temp = this.uploadPictures.map(item => item.url)
|
|
||||||
let pics = temp.join(",")
|
|
||||||
postOrderComment({
|
postOrderComment({
|
||||||
productScore: product_score,
|
productScore: product_score,
|
||||||
serviceScore: service_score,
|
serviceScore: service_score,
|
||||||
unique: this.unique,
|
unique: this.unique,
|
||||||
pics,
|
pics: this.picArr.join(','),
|
||||||
comment: expect
|
comment: expect,
|
||||||
})
|
video: this.videoArr.join(',')
|
||||||
.then(() => {
|
}).then(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "评价成功",
|
title: '评价成功',
|
||||||
icon: "success",
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
|
||||||
|
|
||||||
// ? 回跳到上一页
|
|
||||||
this.$yrouter.back();
|
|
||||||
|
|
||||||
// ? 默认跳转到详情页
|
|
||||||
// this.$yrouter.push({
|
|
||||||
// path: "/pages/order/OrderDetails/index",
|
|
||||||
// query: {
|
|
||||||
// id: this.orderCon.orderId
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// ? 可选重定向到详情页,这时左上角会有一个返回首页的图标
|
|
||||||
// this.$yrouter.reLaunch({
|
|
||||||
// path: "/pages/home/index",
|
|
||||||
// });
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
this.$yrouter.back()
|
||||||
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:
|
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||||
err.msg || err.response.data.msg || err.response.data.message,
|
icon: 'none',
|
||||||
icon: "none",
|
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
.upload-title {
|
||||||
|
padding: 0 0 20rpx 16rpx;
|
||||||
|
.txt {
|
||||||
|
color: #999;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.upload-wrapper {
|
||||||
|
position: relative;
|
||||||
|
padding: 0 0 0 16rpx;
|
||||||
|
.video-upload {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 16rpx;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
.pic-upload {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
+423
-258
@@ -1,62 +1,75 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="productList" ref="container">
|
<view class="productList">
|
||||||
<form @submit.prevent="submitForm">
|
<form @submit.prevent="submitForm">
|
||||||
<view class="search bg-color-red acea-row row-between-wrapper">
|
<view class="search search-wrap acea-row row-between-wrapper">
|
||||||
<view class="input acea-row row-between-wrapper">
|
<view class="input acea-row row-between-wrapper">
|
||||||
<text class="iconfont icon-sousuo"></text>
|
<view class="search-type-wrap" @click="toggleSearchType(true)">
|
||||||
<input placeholder="搜索商品信息" v-model="where.keyword" confirm-type="search" @confirm="submitForm"/>
|
{{ searchType === 'good' ? '商品' : '店铺' }}
|
||||||
|
<text class="d3"></text>
|
||||||
|
</view>
|
||||||
|
<input
|
||||||
|
v-model="query.keyword"
|
||||||
|
placeholder="请输入"
|
||||||
|
confirm-type="search"
|
||||||
|
class="inp"
|
||||||
|
@confirm="submitForm"
|
||||||
|
/>
|
||||||
|
<text class="iconfont icon-sousuo" @click="submitForm"></text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
|
||||||
class="iconfont"
|
|
||||||
:class="Switch === true ? 'icon-pailie' : 'icon-tupianpailie'"
|
|
||||||
@click="switchTap"
|
|
||||||
></view>
|
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
<view class="nav acea-row row-middle">
|
<view v-if="showSearchTypeLayer" class="search-type-layer">
|
||||||
|
<view class="layer" @click="toggleSearchType(false)" />
|
||||||
|
<view class="content">
|
||||||
<view
|
<view
|
||||||
|
v-for="(item, index) in searchTypeList"
|
||||||
|
:key="index"
|
||||||
|
:class="item.value === searchType ? 'on' : ''"
|
||||||
class="item"
|
class="item"
|
||||||
:class="title ? 'font-color-red' : ''"
|
@click="searchTypeItemClick(item)"
|
||||||
@click="set_where(0)"
|
>
|
||||||
>{{ title ? title : "默认" }}
|
{{ item.text }}
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="set_where(1)">
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="searchType === 'good'"
|
||||||
|
class="nav acea-row row-middle"
|
||||||
|
>
|
||||||
|
<view class="item">
|
||||||
|
<text class="tag">
|
||||||
|
综合
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="setQuery('priceOrder')">
|
||||||
价格
|
价格
|
||||||
<image src="@/static/images/horn.png" v-if="price === 0"/>
|
<image v-if="!query.priceOrder" src="@/static/images/horn.png" />
|
||||||
<image src="@/static/images/up.png" v-if="price === 1"/>
|
<image v-if="query.priceOrder === 'asc'" src="@/static/images/up.png" />
|
||||||
<image src="@/static/images/down.png" v-if="price === 2"/>
|
<image v-if="query.priceOrder === 'desc'" src="@/static/images/down.png" />
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="set_where(2)">
|
<view class="item" @click="setQuery('salesOrder')">
|
||||||
销量
|
销量
|
||||||
<image src="@/static/images/horn.png" v-if="stock === 0"/>
|
<image v-if="!query.salesOrder" src="@/static/images/horn.png" />
|
||||||
<image src="@/static/images/up.png" v-if="stock === 1"/>
|
<image v-if="query.salesOrder === 'asc'" src="@/static/images/up.png" />
|
||||||
<image src="@/static/images/down.png" v-if="stock === 2"/>
|
<image v-if="query.salesOrder === 'desc'" src="@/static/images/down.png" />
|
||||||
</view>
|
</view>
|
||||||
<!-- down -->
|
|
||||||
<view class="item" :class="nows ? 'font-color-red' : ''" @click="set_where(3)">新品</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="searchType === 'good'">
|
||||||
|
<view class="list acea-row row-between-wrapper">
|
||||||
<view
|
<view
|
||||||
class="list acea-row row-between-wrapper"
|
v-for="(item, listIndex) in list"
|
||||||
:class="Switch === true ? '' : 'on'"
|
:key="listIndex"
|
||||||
ref="container"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
@click="goGoodsCon(item)"
|
|
||||||
class="item"
|
class="item"
|
||||||
:class="Switch === true ? '' : 'on'"
|
@click="goGoodsCon(item.id)"
|
||||||
v-for="(item, productListIndex) in productList"
|
|
||||||
:key="productListIndex"
|
|
||||||
:title="item.storeName"
|
|
||||||
>
|
>
|
||||||
<view class="pictrue" :class="Switch === true ? '' : 'on'">
|
<view class="pictrue">
|
||||||
<image :src="item.image" :class="Switch === true ? '' : 'on'"/>
|
<image :src="item.image"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="text" :class="Switch === true ? '' : 'on'">
|
<view class="text">
|
||||||
<view class="name more-t">{{ item.storeName }}</view>
|
<view class="name more-t">{{ item.storeName }}</view>
|
||||||
|
<view class="vip acea-row row-between-wrapper">
|
||||||
<view class="vip acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'">
|
|
||||||
<view class="flex ai-end">
|
<view class="flex ai-end">
|
||||||
<view class="money" :class="Switch === true ? '' : 'on'">
|
<view class="money">
|
||||||
¥
|
¥
|
||||||
<text class="num" v-if="item.vipPrice && item.vipPrice > 0">{{ force2Decimal(item.vipPrice) }}</text>
|
<text class="num" v-if="item.vipPrice && item.vipPrice > 0">{{ force2Decimal(item.vipPrice) }}</text>
|
||||||
<text class="num" v-else>{{ force2Decimal(item.price) }}</text>
|
<text class="num" v-else>{{ force2Decimal(item.price) }}</text>
|
||||||
@@ -68,242 +81,242 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<no-good-data v-if="productList.length === 0 && where.page > 1" />
|
<goo-skeleton
|
||||||
<Recommend v-if="productList.length === 0 && where.page > 1"></Recommend>
|
v-if="loading"
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
|
<!-- <u-loadmore
|
||||||
|
v-if="loadend && list.length > 0"
|
||||||
|
:line="true"
|
||||||
|
status="nomore"
|
||||||
|
nomore-text="到底了"
|
||||||
|
/> -->
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view
|
||||||
|
:class="list.length > 0 ? '' : 'no-hotel'"
|
||||||
|
class="hotel-wrap"
|
||||||
|
>
|
||||||
|
<view class="list">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="index"
|
||||||
|
class="hotel-item"
|
||||||
|
>
|
||||||
|
<view class="hotel-item-main" @click="hotelItemClick(item)">
|
||||||
|
<image :src="item.logo" class="logo" />
|
||||||
|
<view class="info">
|
||||||
|
<view class="name one-t">
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
<view class="type">
|
||||||
|
<view v-if="item.typeName" class="type-tag">
|
||||||
|
{{ item.typeName }}
|
||||||
|
</view>
|
||||||
|
<view v-else> </view>
|
||||||
|
</view>
|
||||||
|
<view class="desc">
|
||||||
|
<view class="tip one-t">
|
||||||
|
{{ item.tips || ' ' }}
|
||||||
|
</view>
|
||||||
|
<view class="btn">进店</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.products" class="good-list">
|
||||||
|
<view
|
||||||
|
v-for="(good) in item.products"
|
||||||
|
:key="good.productId"
|
||||||
|
class="good-item"
|
||||||
|
@click="goGoodsCon(good.productId)"
|
||||||
|
>
|
||||||
|
<image :src="good.productImage" class="img" />
|
||||||
|
<view class="price">
|
||||||
|
<text class="txt">¥</text>
|
||||||
|
{{ force2Decimal(good.productPrice) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton
|
||||||
|
v-if="loading"
|
||||||
|
/>
|
||||||
|
<!-- <u-loadmore
|
||||||
|
v-if="loadend && list.length > 0"
|
||||||
|
:line="true"
|
||||||
|
status="nomore"
|
||||||
|
nomore-text="到底了"
|
||||||
|
/> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="list.length === 0 && query.page > 1"
|
||||||
|
:class="'no-data-wrap-' + searchType"
|
||||||
|
class="no-data-wrap"
|
||||||
|
>
|
||||||
|
<no-good-data :type="searchType"/>
|
||||||
|
<recommend
|
||||||
|
v-if="searchType === 'good' && loadend && list.length === 0"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Recommend from "@/components/Recommend";
|
import { getProducts, getHotels } from '@/api/store'
|
||||||
import {getProducts} from "@/api/store";
|
import { mapGetters } from 'vuex'
|
||||||
import {mapGetters} from 'vuex';
|
import NP from 'number-precision'
|
||||||
import NP from "number-precision";
|
|
||||||
import NoGoodData from '@/components/good/NoData'
|
import NoGoodData from '@/components/good/NoData'
|
||||||
|
import Recommend from '@/components/Recommend'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "GoodsList",
|
name: 'GoodsList',
|
||||||
components: {
|
components: {
|
||||||
Recommend,
|
NoGoodData,
|
||||||
NoGoodData
|
Recommend
|
||||||
},
|
},
|
||||||
props: {},
|
|
||||||
computed: mapGetters(["userInfo"]),
|
|
||||||
data: function () {
|
data: function () {
|
||||||
// const { s = "", id = 0, title = "" } = this.$yroute.query;
|
|
||||||
const s = "",
|
|
||||||
id = 0,
|
|
||||||
title = "";
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
hostProduct: [],
|
|
||||||
productList: [],
|
list: [],
|
||||||
Switch: true,
|
query: {
|
||||||
where: {
|
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 8,
|
limit: 10,
|
||||||
keyword: s,
|
keyword: '',
|
||||||
sid: id, //二级分类id
|
priceOrder: '',
|
||||||
news: 0,
|
salesOrder: ''
|
||||||
priceOrder: "",
|
|
||||||
salesOrder: ""
|
|
||||||
},
|
},
|
||||||
title: title && id ? title : "",
|
|
||||||
loadTitle: "",
|
|
||||||
loading: false,
|
loading: false,
|
||||||
loadend: false,
|
loadend: false,
|
||||||
price: 0,
|
searchTypeList: Object.freeze([
|
||||||
stock: 0,
|
{ text: '商品', value: 'good' },
|
||||||
nows: false
|
{ text: '店铺', value: 'hotel' }
|
||||||
};
|
]),
|
||||||
},
|
searchType: 'good',
|
||||||
watch: {
|
showSearchTypeLayer: false
|
||||||
title() {
|
|
||||||
this.updateTitle();
|
|
||||||
},
|
|
||||||
$yroute(to) {
|
|
||||||
// if (to.name !== "GoodsList") return;
|
|
||||||
// const { s = "", id = 0, title = "" } = to.query;
|
|
||||||
// if (s !== this.where.keyword || id !== this.where.sid) {
|
|
||||||
// this.where.keyword = s;
|
|
||||||
// this.loadend = false;
|
|
||||||
// this.loading = false;
|
|
||||||
// this.where.page = 1;
|
|
||||||
// this.where.sid = id;
|
|
||||||
// this.title = title && id ? title : "";
|
|
||||||
// this.nows = false;
|
|
||||||
// this.$set(this, "productList", []);
|
|
||||||
// this.price = 0;
|
|
||||||
// this.stock = 0;
|
|
||||||
// this.get_product_list();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function (e) {
|
computed: mapGetters(['userInfo']),
|
||||||
const {s = "", id = 0, title = ""} = this.$yroute.query;
|
onLoad(e) {
|
||||||
if (s !== this.where.keyword || id !== this.where.sid) {
|
const { s = '' } = this.$yroute.query
|
||||||
this.where.keyword = s;
|
this.query.keyword = s
|
||||||
this.loadend = false;
|
this.getList()
|
||||||
this.loading = false;
|
|
||||||
this.where.page = 1;
|
|
||||||
this.where.sid = id;
|
|
||||||
this.title = title && id ? title : "";
|
|
||||||
this.nows = false;
|
|
||||||
this.$set(this, "productList", []);
|
|
||||||
this.price = 0;
|
|
||||||
this.stock = 0;
|
|
||||||
// this.get_product_list();
|
|
||||||
}
|
|
||||||
this.updateTitle();
|
|
||||||
this.get_product_list();
|
|
||||||
},
|
|
||||||
mounted: function () {
|
|
||||||
// const { s = "", id = 0, title = "" } = this.$yroute.query;
|
|
||||||
// this.updateTitle();
|
|
||||||
// this.get_product_list();
|
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
!this.loading && this.get_product_list();
|
!this.loading && this.getList()
|
||||||
},
|
|
||||||
onHide() {
|
|
||||||
// this.hostProduct = [];
|
|
||||||
// this.productList = [];
|
|
||||||
// this.Switch = true;
|
|
||||||
// this.where = {
|
|
||||||
// page: 1,
|
|
||||||
// limit: 8,
|
|
||||||
// keyword: s,
|
|
||||||
// sid: id, //二级分类id
|
|
||||||
// news: 0,
|
|
||||||
// priceOrder: "",
|
|
||||||
// salesOrder: ""
|
|
||||||
// };
|
|
||||||
// this.loadTitle = "";
|
|
||||||
// this.loading = false;
|
|
||||||
// this.loadend = false;
|
|
||||||
// this.price = 0;
|
|
||||||
// this.stock = 0;
|
|
||||||
// this.nows = fals;
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toggleSearchType(value) {
|
||||||
|
this.showSearchTypeLayer = value
|
||||||
|
},
|
||||||
|
searchTypeItemClick(item) {
|
||||||
|
if (item.value === this.searchType) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.searchType = item.value
|
||||||
|
this.toggleSearchType(false)
|
||||||
|
this.submitForm()
|
||||||
|
},
|
||||||
force2Decimal(price) {
|
force2Decimal(price) {
|
||||||
|
|
||||||
return this.$force2Decimal(price);
|
return this.$force2Decimal(price);
|
||||||
},
|
},
|
||||||
goGoodsCon(item) {
|
goGoodsCon(id) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/shop/GoodsCon/index",
|
path: '/pages/shop/GoodsCon/index',
|
||||||
query: {id: item.id}
|
query: { id }
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
updateTitle() {
|
hotelItemClick(item) {
|
||||||
// document.title = this.title || this.$yroute.meta.title;
|
this.$yrouter.push({
|
||||||
|
path: '/pagesInn/inn/innHome',
|
||||||
|
query: {
|
||||||
|
id: item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
get_product_list() {
|
getList() {
|
||||||
var that = this;
|
if (this.loading || this.loadend) {
|
||||||
this.setWhere();
|
return
|
||||||
// if (to.name !== "GoodsList") return;
|
}
|
||||||
// const { s = "", id = 0, title = "" } = this.$yroute.query;
|
let reqFn = null
|
||||||
// if (s !== this.where.keyword || id !== this.where.sid) {
|
if (this.searchType === 'good') {
|
||||||
// this.where.keyword = s;
|
reqFn = getProducts
|
||||||
// this.loadend = false;
|
} else {
|
||||||
// this.loading = false;
|
reqFn = getHotels
|
||||||
// this.where.page = 1;
|
}
|
||||||
// this.where.sid = id;
|
this.loading = true
|
||||||
// this.title = title && id ? title : "";
|
reqFn(this.query).then(res => {
|
||||||
// this.nows = false;
|
const { success, data } = res
|
||||||
// this.$set(this, "productList", []);
|
if (success) {
|
||||||
// this.price = 0;
|
this.loading = false
|
||||||
// this.stock = 0;
|
this.list.push.apply(this.list, data.map((item) => {
|
||||||
// // this.get_product_list();
|
if (this.searchType === 'good') {
|
||||||
// }
|
|
||||||
let q = that.where;
|
|
||||||
getProducts(q).then(res => {
|
|
||||||
that.loading = false;
|
|
||||||
//that.productList.push.apply(that.productList, res.data);
|
|
||||||
that.productList.push.apply(that.productList, res.data.map((item) => {
|
|
||||||
|
|
||||||
// 如果已经登录获取用户信息
|
// 如果已经登录获取用户信息
|
||||||
if (that.$store.getters.token && that.userInfo) {
|
if (this.$store.getters.token && this.userInfo) {
|
||||||
var p = NP.times(item.price, NP.divide(parseFloat(that.userInfo.discount), 100))
|
const p = NP.times(item.price, NP.divide(parseFloat(this.userInfo.discount), 100))
|
||||||
item.vipPrice = p;
|
item.vipPrice = p
|
||||||
}
|
}
|
||||||
return item;
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
that.loadend = res.data.length < that.where.limit; //判断所有数据是否加载完成;
|
|
||||||
that.where.page = that.where.page + 1;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
submitForm: function () {
|
|
||||||
this.$set(this, "productList", []);
|
|
||||||
this.where.page = 1;
|
|
||||||
this.loadend = false;
|
|
||||||
this.loading = false;
|
|
||||||
this.get_product_list();
|
|
||||||
},
|
|
||||||
//点击事件处理
|
|
||||||
set_where: function (index) {
|
|
||||||
let that = this;
|
|
||||||
switch (index) {
|
|
||||||
case 0:
|
|
||||||
// return that.$yrouter.push({path: "/pages/shop/GoodsClass/index"});
|
|
||||||
that.nows = false;
|
|
||||||
that.price = 0;
|
|
||||||
that.stock = 0;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
if (that.price === 0) that.price = 1;
|
|
||||||
else if (that.price === 1) that.price = 2;
|
|
||||||
else if (that.price === 2) that.price = 0;
|
|
||||||
that.stock = 0;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (that.stock === 0) that.stock = 1;
|
|
||||||
else if (that.stock === 1) that.stock = 2;
|
|
||||||
else if (that.stock === 2) that.stock = 0;
|
|
||||||
that.price = 0;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
that.nows = !that.nows;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
that.$set(that, "productList", []);
|
return item
|
||||||
that.where.page = 1;
|
}))
|
||||||
that.loadend = false;
|
// 判断所有数据是否加载完成
|
||||||
that.get_product_list();
|
this.loadend = data.length < this.query.limit
|
||||||
},
|
this.query.page++
|
||||||
//设置where条件
|
|
||||||
setWhere: function () {
|
|
||||||
let that = this;
|
|
||||||
if (that.price === 0) {
|
|
||||||
that.where.priceOrder = "";
|
|
||||||
} else if (that.price === 1) {
|
|
||||||
that.where.priceOrder = "asc";
|
|
||||||
} else if (that.price === 2) {
|
|
||||||
that.where.priceOrder = "desc";
|
|
||||||
}
|
}
|
||||||
if (that.stock === 0) {
|
}).catch(() => {
|
||||||
that.where.salesOrder = "";
|
this.loading = false
|
||||||
} else if (that.stock === 1) {
|
})
|
||||||
that.where.salesOrder = "asc";
|
|
||||||
} else if (that.stock === 2) {
|
|
||||||
that.where.salesOrder = "desc";
|
|
||||||
}
|
|
||||||
that.where.news = that.nows ? "1" : "0";
|
|
||||||
},
|
},
|
||||||
switchTap: function () {
|
submitForm() {
|
||||||
let that = this;
|
this.$set(this, 'list', [])
|
||||||
that.Switch = !that.Switch;
|
this.query.page = 1
|
||||||
|
this.loadend = false
|
||||||
|
this.loading = false
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
setQuery(key) {
|
||||||
|
const value = this.query[key]
|
||||||
|
if (!value) {
|
||||||
|
this.query[key] = 'asc'
|
||||||
|
} else if (value === 'asc') {
|
||||||
|
this.query[key] = 'desc'
|
||||||
|
} else {
|
||||||
|
this.query[key] = ''
|
||||||
|
}
|
||||||
|
if (key === 'priceOrder') {
|
||||||
|
this.query.salesOrder = ''
|
||||||
|
}
|
||||||
|
if (key === 'salesOrder') {
|
||||||
|
this.query.priceOrder = ''
|
||||||
|
}
|
||||||
|
this.submitForm()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.productList {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
.list {
|
||||||
|
margin: 0;
|
||||||
|
padding: 172rpx 20rpx 0 20rpx;
|
||||||
|
}
|
||||||
|
.no-hotel {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.no-data-wrap {
|
||||||
|
position: relative;
|
||||||
|
min-height: calc(100vh - 172rpx);
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.no-data-wrap-hotel {
|
||||||
|
min-height: calc(100vh - 86rpx);
|
||||||
|
}
|
||||||
|
}
|
||||||
.noCommodity {
|
.noCommodity {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -343,33 +356,185 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.search-type-layer {
|
||||||
.list.on {
|
position: fixed;
|
||||||
padding: 0 32rpx;
|
top: 0;
|
||||||
background: none;
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
.layer {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
position: absolute;
|
||||||
|
top: 80rpx;
|
||||||
|
left: 23rpx;
|
||||||
|
z-index: 5;
|
||||||
|
width: 70px;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #fff;
|
||||||
|
.item + .item {
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
}
|
||||||
.item {
|
.item {
|
||||||
box-sizing: border-box;
|
text-align: center;
|
||||||
margin-top: 24rpx;
|
line-height: 40px;
|
||||||
padding: 24rpx 22rpx;
|
font-size: 16px;
|
||||||
border-bottom: none;
|
color: #333;
|
||||||
|
&.on {
|
||||||
.pictrue {
|
color: #E92727;
|
||||||
width: 136rpx !important;
|
|
||||||
height: 136rpx !important;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.text {
|
}
|
||||||
|
}
|
||||||
|
.search-wrap {
|
||||||
|
background-color: #fff;
|
||||||
|
.input {
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 18px;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
.search-type-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
|
padding: 0 20rpx 0 0;
|
||||||
|
border-right: 1px solid #ddd;
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
.d3 {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
margin: 0 0 -6px 4px;
|
||||||
|
border-width: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #999 transparent transparent transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.inp {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0 0 0 20rpx;
|
||||||
|
}
|
||||||
|
.iconfont {
|
||||||
|
color: #E92727;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.nav {
|
||||||
|
.item {
|
||||||
|
width: 33.3333%;
|
||||||
|
.tag {
|
||||||
|
display: inline-block;
|
||||||
|
width: 72px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 1px solid #E92727;
|
||||||
|
color: #E92727;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hotel-wrap {
|
||||||
|
padding: 0 0 23rpx 0;
|
||||||
|
.list {
|
||||||
|
padding-top: 86rpx;
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hotel-item {
|
||||||
|
padding: 15rpx;
|
||||||
|
margin: 23rpx 0 0 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0px 3px 6px rgba(0,0,0,0.16);
|
||||||
|
.hotel-item-main {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
display: block;
|
||||||
|
width: 136rpx;
|
||||||
|
height: 136rpx;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
width: calc(100% - 160rpx);
|
||||||
|
padding: 0 0 0 20rpx;
|
||||||
|
.name {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.type {
|
||||||
|
display: flex;
|
||||||
|
margin: 10rpx 0 0 0;
|
||||||
|
.type-tag {
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #946300;
|
||||||
|
background: linear-gradient(to bottom, #FDF8B9, #E3A72C);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.desc {
|
||||||
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
.money {
|
font-size: 14px;
|
||||||
margin-top: 0;
|
.tip {
|
||||||
|
flex: 1;
|
||||||
|
width: calc(100% - 120rpx);
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
padding: 0 15px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 14px;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 28px;
|
||||||
|
background-color: #C51919;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.good-list {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
padding: 23rpx 0 0 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
.good-item + .good-item {
|
||||||
|
margin: 0 0 0 15rpx;
|
||||||
|
}
|
||||||
|
.good-item {
|
||||||
|
position: relative;
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 210rpx;
|
||||||
|
height: 210rpx;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 50%;
|
||||||
|
padding: 8rpx 20rpx;
|
||||||
|
border-radius: 23rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
background-color: #fff;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
.txt {
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vip-money {
|
|
||||||
margin-left: 8rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,282 @@
|
|||||||
|
<template>
|
||||||
|
<view class="v12-pb-10">
|
||||||
|
<view class="v12-justify-around v12-pa-2 v12-white data-nav">
|
||||||
|
<view
|
||||||
|
v-for="(day, i) in currentWeek"
|
||||||
|
:key="i"
|
||||||
|
class="v12-font-26"
|
||||||
|
>
|
||||||
|
<view style="color:#BCBCBC" class="day-wrap">{{ getDate(day) }}</view>
|
||||||
|
<view class="v12-dark-text day-wrap" :class="{'active': actived === i, 'disabled': disabled(day)}" @click="handle(day, i)">{{ getDay(day) }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="isLoad" class="history-wrap">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in items"
|
||||||
|
:key="index"
|
||||||
|
class="v12-mt-3"
|
||||||
|
:id="`history-${item.historyDate}`"
|
||||||
|
>
|
||||||
|
<view class="" style="height: 56px; width: 100%" v-if="isSrcoll"></view>
|
||||||
|
<view >
|
||||||
|
<text class="v12-font-bold v12-font-32">{{ item.historyDate }}</text>
|
||||||
|
<view class="wrapper">
|
||||||
|
<view
|
||||||
|
v-for="(historyItem, historyKey) in item.histories"
|
||||||
|
:key="historyKey"
|
||||||
|
class="v12-white v12-radius-20 history-card"
|
||||||
|
@click="goodsDetail(historyItem)"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
class="goods-img"
|
||||||
|
:src="historyItem.image"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
<view class="good-info">
|
||||||
|
<view
|
||||||
|
:style="{
|
||||||
|
opacity: !historyItem.couponName ? 0 : 1
|
||||||
|
}"
|
||||||
|
class="v12-align-center v12-mt-2"
|
||||||
|
>
|
||||||
|
<view class="v12-primary-text v12-primary-border v12-radius-6 v12-font-18 v12-px-1">券</view>
|
||||||
|
<view class="v12-primary-text v12-primary-border v12-radius-6 v12-font-18 v12-px-1">{{ historyItem.couponName }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between v12-mt-2 price">
|
||||||
|
<view class="v12-font-bold v12-primary-text v12-align-center">
|
||||||
|
<text class="v12-font-16">¥</text>
|
||||||
|
<text class="v12-font-24">{{ historyItem.price }}</text>
|
||||||
|
<view class="ot-price v12-font-weight-400">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-22">{{ historyItem.otPrice }}</text>
|
||||||
|
<view class="under-line"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/orderIcon/组 355.png'"
|
||||||
|
class="icon"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-px-6" v-if="items.length > 0">
|
||||||
|
<u-divider text=" · 已经到底啦 · " textPosition="center"></u-divider>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="items.length === 0"
|
||||||
|
:src="webUrl + '/orderIcon/nohistory.png'"
|
||||||
|
class="img-nodata v12-mt-16"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton
|
||||||
|
v-else
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getHistory } from '@/api/user'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentWeek: [],
|
||||||
|
actived: 0,
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
isLoad: false,
|
||||||
|
items: [],
|
||||||
|
isSrcoll: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.queryHistory()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.currentWeek = this.getWeek()
|
||||||
|
this.actived = this.getActived()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
disabled(day) {
|
||||||
|
const dayItems = this.items.filter(item => {
|
||||||
|
return item.historyDate === day
|
||||||
|
}).map(e => {
|
||||||
|
return e.histories
|
||||||
|
}).flat()
|
||||||
|
return dayItems.length === 0
|
||||||
|
},
|
||||||
|
getActived() {
|
||||||
|
const weekMap = this.currentWeek.map(e => new Date(e).getDay())
|
||||||
|
const today = new Date().getDay()
|
||||||
|
return weekMap.indexOf(today)
|
||||||
|
},
|
||||||
|
getWeek() {
|
||||||
|
const dates = []
|
||||||
|
const now = new Date();
|
||||||
|
// 0-6, 0是周日
|
||||||
|
const dayOfWeek = now.getDay()
|
||||||
|
// 当前日
|
||||||
|
const numDate = now.getDate()
|
||||||
|
const numDaysToMonday = dayOfWeek - 1 > -1 ? dayOfWeek : 0
|
||||||
|
|
||||||
|
// 得到本周周一的日期
|
||||||
|
const monday = new Date(now)
|
||||||
|
monday.setDate(numDate - numDaysToMonday)
|
||||||
|
|
||||||
|
// 生成本周剩余的日期
|
||||||
|
for (let i = 0; i < 7; i++) {
|
||||||
|
dates.push(new Date(monday).toISOString().slice(0, 10))
|
||||||
|
monday.setDate(monday.getDate() + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return dates
|
||||||
|
},
|
||||||
|
getDay(date) {
|
||||||
|
return new Date(date).getDate()
|
||||||
|
},
|
||||||
|
getDate(date) {
|
||||||
|
const dateMap = {
|
||||||
|
1: '一',
|
||||||
|
2: '二',
|
||||||
|
3: '三',
|
||||||
|
4: '四',
|
||||||
|
5: '五',
|
||||||
|
6: '六',
|
||||||
|
0: '日'
|
||||||
|
}
|
||||||
|
const d = new Date(date).getDay()
|
||||||
|
return dateMap[d]
|
||||||
|
},
|
||||||
|
handle(day, i) {
|
||||||
|
if(this.disabled(day)) return
|
||||||
|
this.actived = i
|
||||||
|
this.isSrcoll = true
|
||||||
|
uni.pageScrollTo({
|
||||||
|
selector:`#history-${day}`,
|
||||||
|
duration:200,
|
||||||
|
success:(success)=>{
|
||||||
|
this.isSrcoll = false
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatStr(str) {
|
||||||
|
const regx = /-/g
|
||||||
|
return str.replace(regx, '')
|
||||||
|
},
|
||||||
|
goodsDetail (item) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: '/pages/shop/GoodsCon/index',
|
||||||
|
query: {
|
||||||
|
id: item.productId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryHistory() {
|
||||||
|
this.items = []
|
||||||
|
this.isLoad = false
|
||||||
|
getHistory().then(res => {
|
||||||
|
const { data = [] } = res
|
||||||
|
if (data.length > 0) {
|
||||||
|
this.items = data.filter(e => e.histories && e.histories.length > 0).reverse()
|
||||||
|
// data.map(item => {
|
||||||
|
// if (item.histories) {
|
||||||
|
// if (item.histories.length > 0) {
|
||||||
|
// this.items.push(item)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.isLoad = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.data-nav{
|
||||||
|
position: sticky;
|
||||||
|
width: 100%;
|
||||||
|
top: 0;
|
||||||
|
z-index: 9;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.disabled{
|
||||||
|
color: #CBCBCB !important;
|
||||||
|
}
|
||||||
|
.history-wrap {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
.img-nodata {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.under-line{
|
||||||
|
width: 100%;
|
||||||
|
height: 3rpx;
|
||||||
|
background-color: #CBCBCB;
|
||||||
|
position: absolute;
|
||||||
|
top: 4rpx;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
.wrapper{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 710rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.history-card{
|
||||||
|
width: 226rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
&:nth-child(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.goods-img {
|
||||||
|
display: block;
|
||||||
|
width: 226rpx;
|
||||||
|
height: 226rpx;
|
||||||
|
}
|
||||||
|
.good-info {
|
||||||
|
padding: 12rpx 12rpx 20rpx 12rpx;
|
||||||
|
.price {
|
||||||
|
line-height: 34rpx;
|
||||||
|
.ot-price {
|
||||||
|
margin: 0 0 0 10rpx;
|
||||||
|
color: #CBCBCB;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: block;
|
||||||
|
width: 34rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.active{
|
||||||
|
background: #C52733;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.day-wrap{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,368 @@
|
|||||||
|
<template>
|
||||||
|
<view class="point-page">
|
||||||
|
<view v-if="isLoad">
|
||||||
|
<view class="rule-btn" @click="showHidePopup(true)">
|
||||||
|
积分规则
|
||||||
|
</view>
|
||||||
|
<view class="tab-wrap">
|
||||||
|
<view
|
||||||
|
:class="query.pm === 1 ? 'curr' : ''"
|
||||||
|
class="tab-item"
|
||||||
|
@click="tabItemClick(1)"
|
||||||
|
>
|
||||||
|
<view class="txt">当前总积分</view>
|
||||||
|
<view class="number">
|
||||||
|
<image
|
||||||
|
v-if="query.pm === 1"
|
||||||
|
:src="webUrl + '/page/my/coin.png'"
|
||||||
|
class="icon"
|
||||||
|
/>
|
||||||
|
{{ point.currentPoints }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="query.pm === 0 ? 'curr' : ''"
|
||||||
|
class="tab-item"
|
||||||
|
@click="tabItemClick(0)"
|
||||||
|
>
|
||||||
|
<view class="txt">已使用积分</view>
|
||||||
|
<view class="number">
|
||||||
|
<image
|
||||||
|
v-if="query.pm === 0"
|
||||||
|
:src="webUrl + '/page/my/coin.png'"
|
||||||
|
class="icon"
|
||||||
|
/>
|
||||||
|
{{ point.totalUsedPoints }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-wrap">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="index"
|
||||||
|
class="item"
|
||||||
|
>
|
||||||
|
<view v-if="item.orderId" class="order">
|
||||||
|
<view class="title">
|
||||||
|
<view class="img">
|
||||||
|
<image :src="item.image" class="img" />
|
||||||
|
</view>
|
||||||
|
<view class="name more-t">
|
||||||
|
<view class="more-t">
|
||||||
|
{{ item.title }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="item.pm ? 'red' : 'green'"
|
||||||
|
class="number"
|
||||||
|
>
|
||||||
|
{{ item.pm ? '+' : '-' }}{{ item.number }}
|
||||||
|
<text class="txt">积分</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom" @click="goOrderDetails(item)">
|
||||||
|
<view class="txt">
|
||||||
|
点击查看详情 >>
|
||||||
|
</view>
|
||||||
|
<text class="iconfont icon-jiantou"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="lottery">
|
||||||
|
<image :src="webUrl + '/points-lottery.png'" class="img" />
|
||||||
|
<view class="one-t title">
|
||||||
|
{{ item.title }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="item.pm ? 'red' : 'green'"
|
||||||
|
class="number"
|
||||||
|
>
|
||||||
|
{{ item.pm ? '+' : '-' }}{{ item.number }}
|
||||||
|
<text class="txt">积分</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton
|
||||||
|
v-if="isLoading"
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
|
<view v-else>
|
||||||
|
<view v-if="list.length === 0" class="no-data">
|
||||||
|
暂无数据
|
||||||
|
</view>
|
||||||
|
<!-- <u-loadmore
|
||||||
|
v-if="query.page >= totalPage && list.length > 0"
|
||||||
|
:line="true"
|
||||||
|
status="nomore"
|
||||||
|
nomore-text="到底了"
|
||||||
|
/> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton
|
||||||
|
v-else
|
||||||
|
:show-avatar="false"
|
||||||
|
/>
|
||||||
|
<u-popup
|
||||||
|
:show="show"
|
||||||
|
mode="center"
|
||||||
|
round="10"
|
||||||
|
closeable
|
||||||
|
@close="showHidePopup(false)"
|
||||||
|
>
|
||||||
|
<view class="popup-body">
|
||||||
|
<view class="title bold">积分规则</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="content-html">
|
||||||
|
<rich-text :nodes="point.pointsRule" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getUserPointInfo,
|
||||||
|
getUserPointBill
|
||||||
|
} from '@/api/user'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
export default {
|
||||||
|
name: 'UserPoints',
|
||||||
|
mixins: [pageListenMixins],
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
query: {
|
||||||
|
pm: 1, // 0-支出,1-收入
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
isLoading: false,
|
||||||
|
list: [],
|
||||||
|
totalPage: 1,
|
||||||
|
isLoad: false,
|
||||||
|
point: {
|
||||||
|
currentPoints: 0, // 当前总积分
|
||||||
|
totalUsedPoints: 0, // 累计使用积分
|
||||||
|
pointsRule: ''
|
||||||
|
},
|
||||||
|
show: false,
|
||||||
|
pageKeyId: Object.freeze('userPointsBill')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.isLoading || this.query.page >= this.totalPage) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.query.page++
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
tabItemClick(type) {
|
||||||
|
if (this.query.pm === type) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.query.pm = type
|
||||||
|
this.query.page = 1
|
||||||
|
this.list = []
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
getUserPointInfo().then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.isLoad = true
|
||||||
|
this.point = data
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.isLoading = true
|
||||||
|
getUserPointBill(this.query).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.totalPage = data.pages || 1
|
||||||
|
if (data.records.length > 0) {
|
||||||
|
data.records.map(item => {
|
||||||
|
this.list.push(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.isLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goOrderDetails(order) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: '/pages/order/OrderDetails/index',
|
||||||
|
query: {
|
||||||
|
id: order.orderId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showHidePopup(value) {
|
||||||
|
this.show = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.point-page {
|
||||||
|
padding: 30rpx;
|
||||||
|
.rule-btn {
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
top: 255rpx;
|
||||||
|
z-index: 9;
|
||||||
|
height: 24rpx;
|
||||||
|
padding: 20rpx 30rpx 20rpx 40rpx;
|
||||||
|
border-top-left-radius: 35rpx;
|
||||||
|
border-bottom-left-radius: 35rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 24rpx;
|
||||||
|
background-color: #C51919;
|
||||||
|
}
|
||||||
|
.tab-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.tab-item {
|
||||||
|
flex: 1;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
.txt {
|
||||||
|
width: 100px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #C51919;
|
||||||
|
line-height: 36px;
|
||||||
|
text-align: center;
|
||||||
|
color: #C51919;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.number {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 20rpx 0 0 0;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 26px;
|
||||||
|
.icon {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
margin: 0 20rpx 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.curr {
|
||||||
|
padding: 35rpx 20rpx;
|
||||||
|
background-color: #C51919;
|
||||||
|
.txt {
|
||||||
|
border-color: #fff;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.number {
|
||||||
|
font-size: 26px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.list-wrap {
|
||||||
|
padding: 60rpx 0 0 0;
|
||||||
|
.item {
|
||||||
|
margin: 30rpx 0 0 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: #fff;
|
||||||
|
.order {
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
margin: 0 20rpx 0 0;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
width: calc(100% - 140rpx);
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-top: 1rpx solid #f6f6f6;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666;
|
||||||
|
.txt {
|
||||||
|
flex: 1;
|
||||||
|
color: #FD5749;
|
||||||
|
}
|
||||||
|
.iconfont {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.lottery {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 62rpx;
|
||||||
|
height: 62rpx;
|
||||||
|
margin: 0 20rpx 0 0;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.number {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
.txt {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
&.red {
|
||||||
|
color: #FD5749;
|
||||||
|
}
|
||||||
|
&.green {
|
||||||
|
color: #3DC260;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no-data {
|
||||||
|
line-height: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.popup-body {
|
||||||
|
.title {
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
padding: 0 30rpx 30rpx 30rpx;
|
||||||
|
.content-html {
|
||||||
|
max-height: 70vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
+69
-13
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="user user-page">
|
<view class="user user-page tabbar-page">
|
||||||
<view
|
<view
|
||||||
v-if="$store.getters.token || userInfo.uid"
|
v-if="$store.getters.token || userInfo.uid"
|
||||||
class="acea-row row-column"
|
class="acea-row row-column"
|
||||||
@@ -31,7 +31,9 @@
|
|||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name-cont">
|
<view class="name-cont">
|
||||||
<view class="txt flex">
|
<view class="txt flex">
|
||||||
|
<view class="txt-cont">
|
||||||
{{ userInfo.nickname }}
|
{{ userInfo.nickname }}
|
||||||
|
</view>
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/my/img-vip.png'"
|
:src="webUrl + '/page/my/img-vip.png'"
|
||||||
class="vip"
|
class="vip"
|
||||||
@@ -57,7 +59,7 @@
|
|||||||
余额
|
余额
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item" @click="linkTo('/pages/user/Points/index')">
|
||||||
<view class="number">
|
<view class="number">
|
||||||
{{ userInfo.integral || 0 }}
|
{{ userInfo.integral || 0 }}
|
||||||
</view>
|
</view>
|
||||||
@@ -154,7 +156,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>待评价</text>
|
<text>待评价</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goReturnList()" class="item">
|
<view @click="goMyOrder(5)" class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image
|
<image
|
||||||
:src="webUrl+'/icon/icon-order-status5.png'"
|
:src="webUrl+'/icon/icon-order-status5.png'"
|
||||||
@@ -201,12 +203,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 我的服务结束 -->
|
<!-- 我的服务结束 -->
|
||||||
<view v-if="bannerBgUrl" class="banner-wrap">
|
<view v-if="userCenterCarouselShow === 1 && userCenterCarousel.length > 0" class="banner-wrap">
|
||||||
<image
|
<!-- <image
|
||||||
:src="bannerBgUrl"
|
:src="bannerBgUrl"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="bg"
|
class="bg"
|
||||||
/>
|
@click="bannerClickHandle"
|
||||||
|
/> -->
|
||||||
|
<u-swiper
|
||||||
|
:list="userCenterCarousel"
|
||||||
|
keyName="image"
|
||||||
|
img-mode="aspectFit"
|
||||||
|
@click="handleSwiper"
|
||||||
|
></u-swiper>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -236,10 +245,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
<xdd-tabbar :curr-index="3" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import XddTabbar from '@/components/xdd-tabbar'
|
||||||
import {mapGetters, mapMutations} from "vuex"
|
import {mapGetters, mapMutations} from "vuex"
|
||||||
import {
|
import {
|
||||||
getSpreadImg,
|
getSpreadImg,
|
||||||
@@ -250,10 +261,17 @@ import {
|
|||||||
} from "@/api/user"
|
} from "@/api/user"
|
||||||
import {isWeixin} from "@/utils"
|
import {isWeixin} from "@/utils"
|
||||||
import cookie from "@/utils/store/cookie"
|
import cookie from "@/utils/store/cookie"
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
name: 'UserPage',
|
name: 'UserPage',
|
||||||
|
components: {
|
||||||
|
XddTabbar
|
||||||
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
userCenterCarousel: [],
|
||||||
|
userCenterCarouselShow: 0,
|
||||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
isWeixin: false,
|
isWeixin: false,
|
||||||
@@ -315,11 +333,10 @@ export default {
|
|||||||
allowEnter: true
|
allowEnter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '帮助中心',
|
text: '商品足迹',
|
||||||
url: '',
|
url: '/pages/user/History/index',
|
||||||
icon: '/icon/icon-help.png',
|
icon: '/icon/icon-help.png',
|
||||||
allowEnter: true,
|
allowEnter: true
|
||||||
showTip: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '设置中心',
|
text: '设置中心',
|
||||||
@@ -328,7 +345,9 @@ export default {
|
|||||||
allowEnter: true
|
allowEnter: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
bannerBgUrl: ''
|
bannerBgUrl: '',
|
||||||
|
userCenterBannerUrl: '',
|
||||||
|
pageKeyId: Object.freeze('userIndex')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(['userInfo']),
|
computed: mapGetters(['userInfo']),
|
||||||
@@ -356,9 +375,14 @@ export default {
|
|||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
this.updateAuthorizationPage(false)
|
this.updateAuthorizationPage(false)
|
||||||
|
this.pageToHideHandle()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['updateAuthorizationPage']),
|
...mapMutations(['updateAuthorizationPage']),
|
||||||
|
handleSwiper(e) {
|
||||||
|
const url = this.userCenterCarousel[e].url
|
||||||
|
this.linkTo(url)
|
||||||
|
},
|
||||||
goRoomLogs() {
|
goRoomLogs() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg_common/views/roomLogs'
|
url: '/pkg_common/views/roomLogs'
|
||||||
@@ -402,10 +426,18 @@ export default {
|
|||||||
this.$yrouter.push('/pages/order/ReturnList/index')
|
this.$yrouter.push('/pages/order/ReturnList/index')
|
||||||
},
|
},
|
||||||
goMyOrder(type) {
|
goMyOrder(type) {
|
||||||
|
const types = {
|
||||||
|
0: 0,
|
||||||
|
1: 1,
|
||||||
|
2: 2,
|
||||||
|
3: 3,
|
||||||
|
4: 5,
|
||||||
|
5: 4,
|
||||||
|
}
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: '/pages/order/MyOrder/index',
|
path: '/pages/order/MyOrder/index',
|
||||||
query: {
|
query: {
|
||||||
type
|
type: types[type]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -427,6 +459,11 @@ export default {
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
if (err.toLogin) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/authorization/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
@@ -434,8 +471,11 @@ export default {
|
|||||||
getUserCenterBanner().then(res => {
|
getUserCenterBanner().then(res => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
|
this.userCenterCarousel = data.userCenterCarousel || []
|
||||||
|
this.userCenterCarouselShow = data.userCenterCarouselShow
|
||||||
if (data.userCenterBanner) {
|
if (data.userCenterBanner) {
|
||||||
this.bannerBgUrl = data.userCenterBanner
|
this.bannerBgUrl = data.userCenterBanner
|
||||||
|
this.userCenterBannerUrl = data.userCenterBannerUrl || ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -485,12 +525,21 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.navigateTo({ url })
|
uni.navigateTo({ url })
|
||||||
|
},
|
||||||
|
bannerClickHandle() {
|
||||||
|
if (!this.userCenterBannerUrl) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.linkTo(this.userCenterBannerUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
.full-width{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.innTag {
|
.innTag {
|
||||||
margin-left: -30rpx;
|
margin-left: -30rpx;
|
||||||
width: 196rpx;
|
width: 196rpx;
|
||||||
@@ -621,10 +670,13 @@ export default {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
.name-cont {
|
.name-cont {
|
||||||
.txt {
|
.txt {
|
||||||
align-items: flex-end;
|
align-items: baseline;
|
||||||
margin: 0 0 32rpx 0;
|
margin: 0 0 32rpx 0;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
|
.txt-cont {
|
||||||
|
max-width: 400rpx;
|
||||||
|
}
|
||||||
.vip {
|
.vip {
|
||||||
margin: 0 0 0 12rpx;
|
margin: 0 0 0 12rpx;
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
@@ -634,6 +686,7 @@ export default {
|
|||||||
.qrcode {
|
.qrcode {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 160rpx;
|
||||||
padding: 10rpx 16rpx;
|
padding: 10rpx 16rpx;
|
||||||
border: 1rpx solid #FFFBD3;
|
border: 1rpx solid #FFFBD3;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
@@ -716,4 +769,7 @@ export default {
|
|||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tabbar-page {
|
||||||
|
padding: 0 0 180rpx 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -25,19 +25,24 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||||
|
<view v-if="loaded && list.length === 0">
|
||||||
|
<image :src="webUrl + '/noConsumption.png'" class="no-data"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCommissionInfo } from "@/api/user";
|
import { getCommissionInfo } from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
name: "UserBill",
|
name: "UserBill",
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
props: {},
|
mixins: [pageListenMixins],
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
types: 0,
|
types: 0,
|
||||||
where: {
|
where: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -45,7 +50,8 @@ export default {
|
|||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
loaded: false,
|
loaded: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
pageKeyId: Object.freeze('userBalanceBill')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -112,3 +118,11 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.no-data {
|
||||||
|
display: block;
|
||||||
|
width: 500rpx;
|
||||||
|
height: 500rpx;
|
||||||
|
margin: 100rpx auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between-wrapper">
|
<view class="item acea-row row-between-wrapper">
|
||||||
<view class="name">联系电话</view>
|
<view class="name">联系电话</view>
|
||||||
<input type="text" placeholder="请输入联系电话" v-model="userAddress.phone" required :maxlength="11"/>
|
<input type="number" placeholder="请输入联系电话" v-model="userAddress.phone" required :maxlength="11"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between-wrapper">
|
<view class="item acea-row row-between-wrapper">
|
||||||
<view class="name">所在地区</view>
|
<view class="name">所在地区</view>
|
||||||
@@ -29,6 +29,31 @@
|
|||||||
<!-- <textarea v-model="userAddress.detail" placeholder="请填写具体地址" /> -->
|
<!-- <textarea v-model="userAddress.detail" placeholder="请填写具体地址" /> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="address-analysis-wrap">
|
||||||
|
<view class="inp">
|
||||||
|
<textarea
|
||||||
|
v-model.trim="addressInput"
|
||||||
|
placeholder="请粘贴收件人手机号、姓名、收货地址并用空格区分,系统将自动识别地址信息"
|
||||||
|
placeholder-style="font-size:24rpx;color:#C2C5CC;"
|
||||||
|
class="inp-textarea"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="btn-wrap">
|
||||||
|
<view
|
||||||
|
class="txt"
|
||||||
|
@click="clearHandle"
|
||||||
|
>
|
||||||
|
清空
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="addressInput ? '' : 'disable'"
|
||||||
|
class="btn"
|
||||||
|
@click="distinguishHandle"
|
||||||
|
>
|
||||||
|
识别
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="default acea-row row-middle">
|
<view class="default acea-row row-middle">
|
||||||
<view class="select-btn">
|
<view class="select-btn">
|
||||||
<view class="checkbox-wrapper">
|
<view class="checkbox-wrapper">
|
||||||
@@ -48,71 +73,94 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/babel">
|
<script type="text/babel">
|
||||||
import CitySelect from "@/components/CitySelect";
|
import CitySelect from '@/components/CitySelect'
|
||||||
import config from '@/utils/mapConfig';
|
import config from '@/utils/mapConfig'
|
||||||
import {getAddress, getCity, postAddress} from "@/api/user";
|
import { getAddress, getCity, postAddress, analysisAddress } from '@/api/user'
|
||||||
import attrs, {chs_extphone, required} from "@/utils/validate";
|
import attrs, { chs_extphone, required } from '@/utils/validate'
|
||||||
import {validatorDefaultCatch} from "@/utils/dialog";
|
import { validatorDefaultCatch } from '@/utils/dialog'
|
||||||
// import { openAddress } from "@/libs/wechat";
|
import { isWeixin } from '@/utils'
|
||||||
import {isWeixin} from "@/utils";
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddAddress",
|
name: "AddAddress",
|
||||||
components: {
|
components: {
|
||||||
CitySelect
|
CitySelect
|
||||||
},
|
},
|
||||||
computed: {},
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
district: [],
|
district: [],
|
||||||
id: 0,
|
id: 0,
|
||||||
userAddress: {isDefault: 0},
|
userAddress: {
|
||||||
|
realName: '',
|
||||||
|
phone: '',
|
||||||
|
detail: '',
|
||||||
|
isDefault: 0
|
||||||
|
},
|
||||||
address: {},
|
address: {},
|
||||||
isWechat: isWeixin(),
|
isWechat: isWeixin(),
|
||||||
addressText: ""
|
addressText: "",
|
||||||
|
pageKeyId: Object.freeze('userAddressEdit'),
|
||||||
|
addressInput: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
let id = this.$yroute.query.id;
|
const id = this.$yroute.query.id
|
||||||
this.id = id;
|
this.id = id
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: '编辑地址'
|
title: '编辑地址'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.getUserAddress();
|
this.getUserAddress()
|
||||||
this.getCityList();
|
this.getCityList()
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
// addressText(nextModel2) {
|
|
||||||
// console.log(nextModel2, 8585858585);
|
|
||||||
// }
|
|
||||||
//定位成功后回调
|
|
||||||
// province(newVal,oldVal){
|
|
||||||
// uni.hideLoading();
|
|
||||||
// //if(newVal!=oldVal){
|
|
||||||
|
|
||||||
// this.addressText =
|
|
||||||
// this.province + " " + this.city + " " + this.county;
|
|
||||||
// this.address.province = this.province;
|
|
||||||
// this.address.city = this.city;
|
|
||||||
// this.address.district = this.county;
|
|
||||||
// this.userAddress.detail = this.detailAddress;
|
|
||||||
|
|
||||||
// //}
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
getIndex(value, arr) {
|
getIndex(value, arr) {
|
||||||
var idx = -1;
|
var idx = -1
|
||||||
for (var i = 0; i < arr.length; i++) {
|
for (var i = 0; i < arr.length; i++) {
|
||||||
if (arr[i].n == value) {
|
if (arr[i].n == value) {
|
||||||
idx = i;
|
idx = i
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return idx;
|
return idx
|
||||||
|
},
|
||||||
|
clearHandle() {
|
||||||
|
if (!this.addressInput) return
|
||||||
|
this.addressInput = ''
|
||||||
|
},
|
||||||
|
// 识别
|
||||||
|
distinguishHandle() {
|
||||||
|
if (!this.addressInput) return
|
||||||
|
uni.showLoading()
|
||||||
|
analysisAddress({
|
||||||
|
content: this.addressInput
|
||||||
|
}).then((res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log(res)
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.address = {
|
||||||
|
province: data.province || '',
|
||||||
|
city: data.city || '',
|
||||||
|
district: data.district || '',
|
||||||
|
city_id: data.cityId
|
||||||
|
}
|
||||||
|
this.userAddress.realName = data.realName || ''
|
||||||
|
this.userAddress.phone = data.phone || ''
|
||||||
|
this.userAddress.detail = data.detail || ''
|
||||||
|
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title: err.msg + '',
|
||||||
|
icon: 'none',
|
||||||
|
mask: false,
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//获取当前定位地址
|
//获取当前定位地址
|
||||||
getCurAddress() {
|
getCurAddress() {
|
||||||
@@ -254,8 +302,7 @@ export default {
|
|||||||
let that = this;
|
let that = this;
|
||||||
getAddress(that.id).then(res => {
|
getAddress(that.id).then(res => {
|
||||||
that.userAddress = res.data;
|
that.userAddress = res.data;
|
||||||
that.addressText =
|
that.addressText = res.data.province + " " + res.data.city + " " + res.data.district;
|
||||||
res.data.province + " " + res.data.city + " " + res.data.district;
|
|
||||||
that.address.province = res.data.province;
|
that.address.province = res.data.province;
|
||||||
that.address.city = res.data.city;
|
that.address.city = res.data.city;
|
||||||
that.address.district = res.data.district;
|
that.address.district = res.data.district;
|
||||||
@@ -279,11 +326,11 @@ export default {
|
|||||||
getAddress() {
|
getAddress() {
|
||||||
},
|
},
|
||||||
async submit() {
|
async submit() {
|
||||||
let name = this.userAddress.realName,
|
const name = this.userAddress.realName || ''
|
||||||
phone = this.userAddress.phone,
|
const phone = this.userAddress.phone || ''
|
||||||
addressText = this.addressText,
|
const addressText = this.addressText || ''
|
||||||
detail = this.userAddress.detail,
|
const detail = this.userAddress.detail || ''
|
||||||
isDefault = this.userAddress.isDefault;
|
const isDefault = this.userAddress.isDefault
|
||||||
|
|
||||||
if (phone.length < 11) {
|
if (phone.length < 11) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -321,7 +368,7 @@ export default {
|
|||||||
is_default: isDefault ? true : false,
|
is_default: isDefault ? true : false,
|
||||||
post_code: ""
|
post_code: ""
|
||||||
};
|
};
|
||||||
postAddress(data).then(function () {
|
postAddress(data).then(function (res) {
|
||||||
if (that.id) {
|
if (that.id) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "修改成功",
|
title: "修改成功",
|
||||||
@@ -335,6 +382,20 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(that.$yroute.query.choosMode == 1) {
|
||||||
|
const item = {
|
||||||
|
id: res.data.id,
|
||||||
|
realName: name,
|
||||||
|
phone: phone,
|
||||||
|
district: that.address.district,
|
||||||
|
province: that.address.province,
|
||||||
|
city: that.address.city,
|
||||||
|
detail: detail,
|
||||||
|
is_default: isDefault ? true : false,
|
||||||
|
post_code: ""
|
||||||
|
}
|
||||||
|
uni.$emit('chooseAddress', item)
|
||||||
|
}
|
||||||
that.$yrouter.back();
|
that.$yrouter.back();
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -372,4 +433,34 @@ export default {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.address-analysis-wrap {
|
||||||
|
padding: 20rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
.inp-textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
.btn-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
margin: 20rpx 0 0 0;
|
||||||
|
.txt {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
padding: 12rpx 25rpx;
|
||||||
|
margin: 0 0 0 20rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #FE5261;
|
||||||
|
&.disable {
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
>
|
>
|
||||||
<view style="margin-bottom: 12rpx;" class="line" v-if="addressList.length > 0">
|
<view style="margin-bottom: 12rpx;" class="line" v-if="addressList.length > 0">
|
||||||
<image :src="webUrl+'/20230304135025917856.png'"/>
|
<!-- <image :src="webUrl+'/20230304135025917856.png'"/> -->
|
||||||
</view>
|
</view>
|
||||||
<view style="position: relative;" class="item" v-for="(item, addressListIndex) in addressList"
|
<view style="position: relative;" class="item" v-for="(item, addressListIndex) in addressList"
|
||||||
:key="addressListIndex" @click="tapAddress(item)">
|
:key="addressListIndex" @click="tapAddress(item)">
|
||||||
@@ -81,11 +81,13 @@
|
|||||||
import {getAddressDefaultSet, getAddressList, getAddressRemove} from "@/api/user";
|
import {getAddressDefaultSet, getAddressList, getAddressRemove} from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
import {isWeixin} from "@/utils";
|
import {isWeixin} from "@/utils";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
@@ -96,7 +98,8 @@ export default {
|
|||||||
loadTitle: "",
|
loadTitle: "",
|
||||||
loading: false,
|
loading: false,
|
||||||
loadend: false,
|
loadend: false,
|
||||||
isWechat: isWeixin()
|
isWechat: isWeixin(),
|
||||||
|
pageKeyId: Object.freeze('userAddressIndex')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
|||||||
@@ -41,13 +41,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
|
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CommissionDetails",
|
name: "CommissionDetails",
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
props: {},
|
mixins: [pageListenMixins],
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
info: [],
|
info: [],
|
||||||
@@ -58,7 +59,8 @@ export default {
|
|||||||
},
|
},
|
||||||
types: 9,//3,
|
types: 9,//3,
|
||||||
loaded: false,
|
loaded: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
pageKeyId: Object.freeze('userSpreadBill')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
@@ -111,3 +113,10 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
.promoterHeader {
|
||||||
|
.headerCon {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -126,13 +126,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import {getSpreadUser} from "@/api/user";
|
import {getSpreadUser} from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PromoterList",
|
name: "PromoterList",
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
props: {},
|
mixins: [pageListenMixins],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
fixedState: false,
|
fixedState: false,
|
||||||
@@ -153,7 +154,8 @@ export default {
|
|||||||
loadTitle: "",
|
loadTitle: "",
|
||||||
first: "",
|
first: "",
|
||||||
second: "",
|
second: "",
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
pageKeyId: Object.freeze('userSpreadStat')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="flex-grow: 1;font-size: 24rpx;">
|
<view class="" style="flex-grow: 1;font-size: 24rpx;">
|
||||||
返佣说明:1.下线客户下单成功后,平台设置为默认7天收货成功,佣金便自动计算添加到上线的返佣;2.如过程中下单客户有退货退款,则此订单返佣无效,会自动取消或相应扣除。
|
{{ ruleText }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,14 +60,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getSpreadOrder } from "@/api/user";
|
import { getSpreadOrder, getUserSpreadRule } from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
name: "PromoterOrder",
|
name: "PromoterOrder",
|
||||||
components: {
|
components: {
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
props: {},
|
mixins: [pageListenMixins],
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
@@ -77,39 +78,49 @@ export default {
|
|||||||
},
|
},
|
||||||
loaded: false,
|
loaded: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
loadTitle: "",
|
loadTitle: '',
|
||||||
count: ""
|
count: '',
|
||||||
};
|
ruleText: '',
|
||||||
|
pageKeyId: Object.freeze('userSpreadOrder')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted() {
|
||||||
this.getIndex();
|
this.getIndex()
|
||||||
|
this.getRuleText()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
!this.loading && this.getIndex();
|
!this.loading && this.getIndex()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getIndex: function() {
|
getRuleText() {
|
||||||
let there = this;
|
getUserSpreadRule().then(res => {
|
||||||
if (there.loaded == true || there.loading == true) return;
|
const { success, data } = res
|
||||||
there.loading = true;
|
if (success) {
|
||||||
|
this.ruleText = data.userSpreadRule || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getIndex() {
|
||||||
|
let there = this
|
||||||
|
if (there.loaded == true || there.loading == true) return
|
||||||
|
there.loading = true
|
||||||
getSpreadOrder(there.where).then(
|
getSpreadOrder(there.where).then(
|
||||||
res => {
|
res => {
|
||||||
there.loading = false;
|
there.loading = false
|
||||||
there.loaded = res.data.list.length < there.where.limit;
|
there.loaded = res.data.list.length < there.where.limit
|
||||||
there.loadTitle = there.loaded ? "人家是有底线的" : "上拉加载更多";
|
there.loadTitle = there.loaded ? "人家是有底线的" : "上拉加载更多"
|
||||||
there.where.page = there.where.page + 1;
|
there.where.page = there.where.page + 1
|
||||||
there.list.push.apply(there.list, res.data.list);
|
there.list.push.apply(there.list, res.data.list)
|
||||||
there.count = res.data.count;
|
there.count = res.data.count
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
300
|
)
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -100,11 +100,11 @@
|
|||||||
|
|
||||||
|
|
||||||
import { getSpreadInfo } from "@/api/user";
|
import { getSpreadInfo } from "@/api/user";
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserPromotion",
|
name: "UserPromotion",
|
||||||
components: {},
|
mixins: [pageListenMixins],
|
||||||
props: {},
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
Info: {
|
Info: {
|
||||||
@@ -112,7 +112,8 @@ export default {
|
|||||||
extractCount: 0,
|
extractCount: 0,
|
||||||
commissionCount: 0
|
commissionCount: 0
|
||||||
},
|
},
|
||||||
webUrl:this.$VUE_APP_RESOURCES_URL
|
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||||
|
pageKeyId: Object.freeze('userSpreadIndex')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CitySelect from "@/components/CitySelect";
|
import CitySelect from "@/components/CitySelect";
|
||||||
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue';
|
import tmUpload from '@/components/tm-upload/tm-upload.vue';
|
||||||
import {getCity} from "@/api/user";
|
import {getCity} from "@/api/user";
|
||||||
import {chooseImage, isWeixin} from "@/utils";
|
import {chooseImage, isWeixin} from "@/utils";
|
||||||
import {getHomeData} from "@/api/public";
|
import {getHomeData} from "@/api/public";
|
||||||
|
|||||||
@@ -55,12 +55,10 @@ import {
|
|||||||
getHotelGoodList
|
getHotelGoodList
|
||||||
} from "@/api/inn.js";
|
} from "@/api/inn.js";
|
||||||
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||||
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
imgBox,
|
imgBox
|
||||||
GooSkeleton
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
+120
-45
@@ -117,7 +117,7 @@
|
|||||||
<view class="map-info-hd">
|
<view class="map-info-hd">
|
||||||
<image :src="webUrl + '/page/hotel/icon-location.png'" class="icon" />
|
<image :src="webUrl + '/page/hotel/icon-location.png'" class="icon" />
|
||||||
</view>
|
</view>
|
||||||
<view class="map-info-bd">
|
<view class="map-info-bd more-t">
|
||||||
{{ inn.address }}
|
{{ inn.address }}
|
||||||
</view>
|
</view>
|
||||||
<view class="map-info-ft flex">
|
<view class="map-info-ft flex">
|
||||||
@@ -217,10 +217,10 @@
|
|||||||
class="info-item-header"
|
class="info-item-header"
|
||||||
@click="infoClick(item)"
|
@click="infoClick(item)"
|
||||||
>
|
>
|
||||||
<view class="name one-t">
|
<view class="name">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="intro more-t">
|
<view class="intro">
|
||||||
{{ item.intro }}
|
{{ item.intro }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -232,6 +232,7 @@
|
|||||||
controls
|
controls
|
||||||
play-btn-position="center"
|
play-btn-position="center"
|
||||||
class="video-item"
|
class="video-item"
|
||||||
|
@play="infoItemViewClick(item)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
@@ -240,6 +241,7 @@
|
|||||||
:num="item.resources.length"
|
:num="item.resources.length"
|
||||||
:img-radius="10"
|
:img-radius="10"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
@click="infoItemViewClick(item)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -258,21 +260,21 @@
|
|||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
v-if="!item.zanVo"
|
v-if="!item.zanVo"
|
||||||
:src="webUrl + '/page/hotel/zan-off.png'"
|
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
||||||
class="zan-off-icon"
|
class="zan-off-icon"
|
||||||
@click="likeInfoItemHandle(item, index, 1)"
|
@click="likeInfoItemHandle(item, index, item.zan + 1, 1)"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else
|
v-else
|
||||||
:src="webUrl + '/page/hotel/zan-on.png'"
|
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
||||||
class="zan-on-icon"
|
class="zan-on-icon"
|
||||||
@click="likeInfoItemHandle(item, index, 0)"
|
@click="likeInfoItemHandle(item, index, item.zan -1, 0)"
|
||||||
/>
|
/>
|
||||||
<!-- <image
|
<text
|
||||||
:src="webUrl + '/20230803151302213857.png'"
|
v-show="item.zan > 0"
|
||||||
class="icon"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
/>
|
class="seeNum-txt"
|
||||||
<text class="seeNum-txt">{{ item.zan }}</text> -->
|
>{{ item.zan }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
|
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
|
||||||
<image
|
<image
|
||||||
@@ -300,7 +302,7 @@
|
|||||||
@click="setTopInfoHandle(item, 0)"
|
@click="setTopInfoHandle(item, 0)"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/hotel/delete.png'"
|
:src="webUrl + '/page/hotel/down.png'"
|
||||||
class="more-icon"
|
class="more-icon"
|
||||||
/>
|
/>
|
||||||
取消置顶
|
取消置顶
|
||||||
@@ -421,20 +423,22 @@ import {
|
|||||||
getHotelGoodList,
|
getHotelGoodList,
|
||||||
postHotelNewsDel,
|
postHotelNewsDel,
|
||||||
setTopHotelNew,
|
setTopHotelNew,
|
||||||
getHotelNewsZan
|
getHotelNewsZan,
|
||||||
|
getHotelShareBackgroundImage,
|
||||||
|
hotelNewsView
|
||||||
} from "@/api/inn.js"
|
} from "@/api/inn.js"
|
||||||
import {formatDateTime} from "@/utils"
|
import {formatDateTime} from "@/utils"
|
||||||
import {getUrlParam} from "@/utils/common.js"
|
import {getUrlParam} from "@/utils/common.js"
|
||||||
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||||
import cookie from "@/utils/store/cookie"
|
import cookie from "@/utils/store/cookie"
|
||||||
import {addStore, removeStore} from "@/api/favorite"
|
import {addStore, removeStore} from "@/api/favorite"
|
||||||
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
imgBox,
|
imgBox
|
||||||
GooSkeleton
|
|
||||||
},
|
},
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
@@ -465,13 +469,15 @@ export default {
|
|||||||
height: '500rpx'
|
height: '500rpx'
|
||||||
},
|
},
|
||||||
tabList: [
|
tabList: [
|
||||||
{ text: '精选商品', value: 0, isShow: true },
|
{ text: '商品', value: 0, isShow: true },
|
||||||
{ text: '最新资讯', value: 1, isShow: true },
|
{ text: '资讯', value: 1, isShow: true },
|
||||||
{ text: '企业文化', value: 2, isShow: true },
|
{ text: '文化', value: 2, isShow: true },
|
||||||
{ text: '商家资质', value: 3, isShow: true }
|
{ text: '资质', value: 3, isShow: true }
|
||||||
],
|
],
|
||||||
isLoadGoodListoSuccess: false,
|
isLoadGoodListoSuccess: false,
|
||||||
isLoadInfoListSuccess: false
|
isLoadInfoListSuccess: false,
|
||||||
|
pageKeyId: '',
|
||||||
|
shareImg: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||||
@@ -479,8 +485,43 @@ export default {
|
|||||||
this.scrollData = e
|
this.scrollData = e
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (options.id) {
|
const id = options.id || ''
|
||||||
this.id = options.id || null
|
const from = options.from
|
||||||
|
switch (from) {
|
||||||
|
// 特产
|
||||||
|
case 'techan':
|
||||||
|
this.pageKeyId = `hotel_from_techan_hotelId_${id}`
|
||||||
|
break
|
||||||
|
// 千县
|
||||||
|
case 'famous':
|
||||||
|
this.pageKeyId = `hotel_from_famous_hotelId_${id}`
|
||||||
|
break
|
||||||
|
// 特色礼品
|
||||||
|
case 'gift':
|
||||||
|
this.pageKeyId = `hotel_from_gift_hotelId_${id}`
|
||||||
|
break
|
||||||
|
// 文玩
|
||||||
|
case 'wenwan':
|
||||||
|
this.pageKeyId = `hotel_from_wenwan_hotelId_${id}`
|
||||||
|
break
|
||||||
|
// 寻趣味
|
||||||
|
case 'fun':
|
||||||
|
this.pageKeyId = `hotel_from_findFun_hotelId_${id}`
|
||||||
|
break
|
||||||
|
// 养生圣地
|
||||||
|
case 'wellness':
|
||||||
|
this.pageKeyId = `hotel_from_wellnessPlace_hotelId_${id}`
|
||||||
|
break
|
||||||
|
// 民宿
|
||||||
|
case 'homestay':
|
||||||
|
this.pageKeyId = `product_from_countyFamous_productId_${id}`
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
this.pageKeyId = `hotel_from_common_hotelId_${id}`
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (id) {
|
||||||
|
this.id = id || null
|
||||||
this.partnerId = options.partnerId || null
|
this.partnerId = options.partnerId || null
|
||||||
} else {
|
} else {
|
||||||
let obj = uni.getEnterOptionsSync()
|
let obj = uni.getEnterOptionsSync()
|
||||||
@@ -501,15 +542,27 @@ export default {
|
|||||||
this.picColumnWidth = (e.screenWidth - uni.upx2px(92)) / 2 + 'px'
|
this.picColumnWidth = (e.screenWidth - uni.upx2px(92)) / 2 + 'px'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
getHotelShareBackgroundImage(this.id).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.shareImg = data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: this.inn.name,
|
||||||
|
path: '/pagesInn/inn/innHome?id=' + this.inn.id,
|
||||||
|
imageUrl: this.shareImg
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (!this.isLoad) {
|
if (!this.isLoad) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.inn.hasProduct > 0) {
|
if (uni.getStorageSync('hotelInfoPublish') === '1') {
|
||||||
this.fetchGoods()
|
|
||||||
}
|
|
||||||
this.fetchInnInfoList()
|
this.fetchInnInfoList()
|
||||||
|
}
|
||||||
this.fetchInnDetail()
|
this.fetchInnDetail()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -605,7 +658,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
infoClick: function (info) {
|
infoClick: function (info) {
|
||||||
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
|
// this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
|
||||||
|
},
|
||||||
|
infoItemViewClick(item) {
|
||||||
|
uni.$u.debounce(() => {
|
||||||
|
hotelNewsView({ id: item.id }).finally(() => {
|
||||||
|
this.infoArray.map(info => {
|
||||||
|
if (info.id === item.id) {
|
||||||
|
info.pv += 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
},
|
},
|
||||||
publishBtnClick: function () {
|
publishBtnClick: function () {
|
||||||
this.$yrouter.push('/pagesInn/inn/innInfoPublish?hotelId=' + this.inn.id)
|
this.$yrouter.push('/pagesInn/inn/innInfoPublish?hotelId=' + this.inn.id)
|
||||||
@@ -657,6 +721,7 @@ export default {
|
|||||||
_this.isLoadInfoListSuccess = false
|
_this.isLoadInfoListSuccess = false
|
||||||
_this.loading = true
|
_this.loading = true
|
||||||
_this.infoArray = []
|
_this.infoArray = []
|
||||||
|
uni.removeStorageSync('hotelInfoPublish')
|
||||||
getHotelNewsList({
|
getHotelNewsList({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999,
|
limit: 9999,
|
||||||
@@ -688,13 +753,14 @@ export default {
|
|||||||
reqFn(_this.id).then((res) => {
|
reqFn(_this.id).then((res) => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
_this.isLoad = true
|
|
||||||
_this.inn = data
|
_this.inn = data
|
||||||
_this.isLike = data.zanVo !== null
|
_this.isLike = data.zanVo !== null
|
||||||
_this.isFavorite = data.hasFavorite
|
_this.isFavorite = data.hasFavorite
|
||||||
_this.favoriteCount = data.favoriteCount
|
_this.favoriteCount = data.favoriteCount
|
||||||
_this.inn.latitude = _this.inn.latitude ? parseFloat(_this.inn.latitude) : 24.993587
|
_this.inn.latitude = _this.inn.latitude > 0 ? _this.inn.latitude : 24.993587
|
||||||
_this.inn.longitude = _this.inn.longitude ? parseFloat(_this.inn.longitude) : 102.779656
|
_this.inn.longitude = _this.inn.longitude > 0 ? _this.inn.longitude : 102.779656
|
||||||
|
// fix bug#1107
|
||||||
|
if (!_this.isLoad) {
|
||||||
// 该店铺无商品则不显示“精选商品”
|
// 该店铺无商品则不显示“精选商品”
|
||||||
if (data.hasProduct <= 0) {
|
if (data.hasProduct <= 0) {
|
||||||
_this.activeIndex = 1
|
_this.activeIndex = 1
|
||||||
@@ -702,6 +768,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
_this.fetchGoods()
|
_this.fetchGoods()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// coverType: 1-图片,2-视频
|
// coverType: 1-图片,2-视频
|
||||||
if (data.coverType === 2) {
|
if (data.coverType === 2) {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
@@ -739,6 +806,7 @@ export default {
|
|||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
_this.isLoad = true
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
@@ -772,7 +840,6 @@ export default {
|
|||||||
this.fetchInnInfoList()
|
this.fetchInnInfoList()
|
||||||
break
|
break
|
||||||
case 0:
|
case 0:
|
||||||
this.goodsList = []
|
|
||||||
this.fetchGoods()
|
this.fetchGoods()
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
@@ -781,6 +848,7 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchGoods() {
|
fetchGoods() {
|
||||||
this.isLoadGoodListoSuccess = false
|
this.isLoadGoodListoSuccess = false
|
||||||
|
this.goodsList = []
|
||||||
getHotelGoodList({
|
getHotelGoodList({
|
||||||
id: this.inn.id,
|
id: this.inn.id,
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -857,18 +925,20 @@ export default {
|
|||||||
this.fetchInnInfoList()
|
this.fetchInnInfoList()
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
setTimeout(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
}, 3000)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
likeInfoItemHandle(item, index, value) {
|
likeInfoItemHandle(item, index, value, voValue) {
|
||||||
getHotelNewsZan(item.id).then(res => {
|
getHotelNewsZan(item.id).then(res => {
|
||||||
const { success } = res
|
const { success } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
this.$dialog.toast({
|
this.$dialog.toast({
|
||||||
mes: '操作成功!'
|
mes: '操作成功!'
|
||||||
})
|
})
|
||||||
this.$set(this.infoArray[index], 'zanVo', value)
|
this.$set(this.infoArray[index], 'zan', value)
|
||||||
// this.fetchInnInfoList()
|
this.$set(this.infoArray[index], 'zanVo', voValue)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1028,7 +1098,7 @@ export default {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
.bg-color {
|
.bg-color {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: -5px;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -1203,7 +1273,7 @@ export default {
|
|||||||
z-index: 5;
|
z-index: 5;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 40rpx 32rpx;
|
padding: 40rpx 10rpx 40rpx 32rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
.map-info-hd {
|
.map-info-hd {
|
||||||
@@ -1220,16 +1290,16 @@ export default {
|
|||||||
}
|
}
|
||||||
.map-info-ft {
|
.map-info-ft {
|
||||||
.item + .item {
|
.item + .item {
|
||||||
margin: 0 0 0 36rpx;
|
margin: 0 0 0 6rpx;
|
||||||
}
|
}
|
||||||
.item {
|
.item {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: 500;
|
||||||
.img {
|
.img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 72rpx;
|
width: 96rpx;
|
||||||
height: 72rpx;
|
height: 96rpx;
|
||||||
margin: 0 0 20rpx 0;
|
margin: 0 0 -16rpx 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1318,13 +1388,18 @@ export default {
|
|||||||
margin: 0 8rpx 0 0;
|
margin: 0 8rpx 0 0;
|
||||||
}
|
}
|
||||||
.zan-off-icon {
|
.zan-off-icon {
|
||||||
width: 138rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
.zan-on-icon {
|
.zan-on-icon {
|
||||||
width: 80rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
|
.seeNum-txt {
|
||||||
|
&.on {
|
||||||
|
color: #D81E06;
|
||||||
|
}
|
||||||
|
}
|
||||||
.more-btn {
|
.more-btn {
|
||||||
position: relative;
|
position: relative;
|
||||||
.more-wrapper {
|
.more-wrapper {
|
||||||
@@ -1362,6 +1437,6 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
line-height: 80rpx;
|
line-height: 200rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
@change="uploadedImgChange"
|
@change="uploadedImgChange"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<!--
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="title">资讯详情:</view>
|
<view class="title">资讯详情:</view>
|
||||||
<view class="inp">
|
<view class="inp">
|
||||||
@@ -55,6 +56,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
-->
|
||||||
<view class="form-btn">
|
<view class="form-btn">
|
||||||
<button form-type="submit">发布</button>
|
<button form-type="submit">发布</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -63,8 +65,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue'
|
import tmUpload from '@/components/tm-upload/tm-upload.vue'
|
||||||
import jinEdit from '@/pagesInn/components/jin-edit/jin-edit.vue'
|
|
||||||
import {
|
import {
|
||||||
VUE_APP_API_URL
|
VUE_APP_API_URL
|
||||||
} from '@/config'
|
} from '@/config'
|
||||||
@@ -73,8 +74,7 @@
|
|||||||
} from '@/api/inn.js'
|
} from '@/api/inn.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tmUpload,
|
tmUpload
|
||||||
jinEdit
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
},
|
},
|
||||||
//文件上传结果
|
//文件上传结果
|
||||||
uploadedImgChange: function(uploadedFilesList) {
|
uploadedImgChange: function(uploadedFilesList) {
|
||||||
this.uploadedFilesArray = uploadedFilesList;
|
this.uploadedFilesArray = uploadedFilesList
|
||||||
},
|
},
|
||||||
formSubmit(e) {
|
formSubmit(e) {
|
||||||
if (!this.form.title) {
|
if (!this.form.title) {
|
||||||
@@ -140,10 +140,10 @@
|
|||||||
this.$dialog.error('请输入简介')
|
this.$dialog.error('请输入简介')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.form.content) {
|
// if (!this.form.content) {
|
||||||
this.$dialog.error('请输入资讯详情')
|
// this.$dialog.error('请输入资讯详情')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (this.uploadedFilesArray.length == 0) {
|
if (this.uploadedFilesArray.length == 0) {
|
||||||
this.$dialog.error('请上传动态图片或视频')
|
this.$dialog.error('请上传动态图片或视频')
|
||||||
return
|
return
|
||||||
@@ -162,6 +162,8 @@
|
|||||||
this.$dialog.toast({
|
this.$dialog.toast({
|
||||||
mes: '发布成功!'
|
mes: '发布成功!'
|
||||||
})
|
})
|
||||||
|
// 写入缓存,返回至商户主页时监听用于刷新资讯列表
|
||||||
|
uni.setStorageSync('hotelInfoPublish', '1')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$yrouter.back()
|
this.$yrouter.back()
|
||||||
}, 3000)
|
}, 3000)
|
||||||
|
|||||||
+119
-24
@@ -34,6 +34,30 @@
|
|||||||
</view>
|
</view>
|
||||||
<text class="iconfont icon-jiantou"></text>
|
<text class="iconfont icon-jiantou"></text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item is_required">
|
||||||
|
<view class="cell acea-row row-between row-middle">
|
||||||
|
<view class="cell-title">封面类型</view>
|
||||||
|
<view>
|
||||||
|
<u-radio-group
|
||||||
|
v-model="innApplyInfo.coverType"
|
||||||
|
placement="row"
|
||||||
|
>
|
||||||
|
<u-radio
|
||||||
|
:name="1"
|
||||||
|
:customStyle="{marginRight: '16px'}"
|
||||||
|
active-color="red"
|
||||||
|
label="图片"
|
||||||
|
/>
|
||||||
|
<u-radio
|
||||||
|
:name="2"
|
||||||
|
active-color="red"
|
||||||
|
label="视频"
|
||||||
|
/>
|
||||||
|
</u-radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text class="iconfont icon-jiantou"></text>
|
||||||
|
</view>
|
||||||
<view v-if="innApplyInfo.coverType === 1" class="item is_required" @click="chooseCoverImg()">
|
<view v-if="innApplyInfo.coverType === 1" class="item is_required" @click="chooseCoverImg()">
|
||||||
<view class="cell acea-row row-between row-middle">
|
<view class="cell acea-row row-between row-middle">
|
||||||
<view class="cell-title">封面照片</view>
|
<view class="cell-title">封面照片</view>
|
||||||
@@ -112,7 +136,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="item">
|
<view class="item is_required">
|
||||||
|
<view class="cell acea-row row-between row-middle">
|
||||||
|
<view class="cell-title">
|
||||||
|
店铺图片
|
||||||
|
<text class="txt">最多上传9张图片</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="picsArray.length > 0" class="item">
|
||||||
<view class="img-upload">
|
<view class="img-upload">
|
||||||
<tm-upload
|
<tm-upload
|
||||||
:dataList="picsArray"
|
:dataList="picsArray"
|
||||||
@@ -124,6 +156,26 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item is_required">
|
||||||
|
<view class="cell acea-row row-between row-middle">
|
||||||
|
<view class="cell-title">
|
||||||
|
店铺资质
|
||||||
|
<text class="txt">最多上传9张图片</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="picsArray.length > 0" class="item">
|
||||||
|
<view class="img-upload">
|
||||||
|
<tm-upload
|
||||||
|
:dataList="qualificationsArray"
|
||||||
|
:upload_img_wh="(750 - 3 * 16 - 2 * 32) / 3.0"
|
||||||
|
:upload_max="10"
|
||||||
|
:url="uploadUrl"
|
||||||
|
:header="uploadHeader"
|
||||||
|
@change="uploadedImg2Change"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn" @tap="submit">确定修改</view>
|
<view class="submit-btn" @tap="submit">确定修改</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -131,7 +183,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CitySelect from '@/components/CitySelect'
|
import CitySelect from '@/components/CitySelect'
|
||||||
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue'
|
import tmUpload from '@/components/tm-upload/tm-upload.vue'
|
||||||
import {
|
import {
|
||||||
chooseImage,
|
chooseImage,
|
||||||
chooseVideoToUpload
|
chooseVideoToUpload
|
||||||
@@ -152,10 +204,12 @@ export default {
|
|||||||
},
|
},
|
||||||
innHistory: {}, // 历史信息
|
innHistory: {}, // 历史信息
|
||||||
picsArray: [],
|
picsArray: [],
|
||||||
|
qualificationsArray: [],
|
||||||
typeList: [], // 类型列表
|
typeList: [], // 类型列表
|
||||||
typeIndex: 0, // 选中的类型
|
typeIndex: 0, // 选中的类型
|
||||||
typeRange: [], // 类型数据源
|
typeRange: [], // 类型数据源
|
||||||
uploadedFilesArray: [],
|
uploadedFilesArray: [],
|
||||||
|
uploadedQualificationFilesArray: [],
|
||||||
innApplyInfo: {
|
innApplyInfo: {
|
||||||
'address': '',
|
'address': '',
|
||||||
'areaId': 0,
|
'areaId': 0,
|
||||||
@@ -169,12 +223,14 @@ export default {
|
|||||||
'name': '',
|
'name': '',
|
||||||
'ownerName': '',
|
'ownerName': '',
|
||||||
'pics': [],
|
'pics': [],
|
||||||
|
'qualification': [],
|
||||||
'position': '',
|
'position': '',
|
||||||
'tel': '',
|
'tel': '',
|
||||||
'qrcode': '',
|
'qrcode': '',
|
||||||
'tips': '',
|
'tips': '',
|
||||||
'type': ''
|
'type': ''
|
||||||
}
|
},
|
||||||
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -185,6 +241,7 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
// 赋值
|
// 赋值
|
||||||
const hotel = JSON.parse(uni.getStorageSync('MY_HOTEL_INFO'))
|
const hotel = JSON.parse(uni.getStorageSync('MY_HOTEL_INFO'))
|
||||||
|
console.log(hotel)
|
||||||
this.innHistory = hotel
|
this.innHistory = hotel
|
||||||
this.fillData(this.innApplyInfo, this.innHistory)
|
this.fillData(this.innApplyInfo, this.innHistory)
|
||||||
if (hotel.coverType === 2) {
|
if (hotel.coverType === 2) {
|
||||||
@@ -192,13 +249,25 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.innApplyInfo.coverVideo = ''
|
this.innApplyInfo.coverVideo = ''
|
||||||
}
|
}
|
||||||
// 图片填充
|
// 店铺图片
|
||||||
this.picsArray = hotel.pics.map(function (item) {
|
this.picsArray = hotel.pics.map(item => {
|
||||||
return {
|
return {
|
||||||
path: item,
|
path: item,
|
||||||
upload_percent: 100
|
upload_percent: 100
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.uploadedFilesArray = hotel.pics || []
|
||||||
|
// 资质
|
||||||
|
const uploadedQualificationFilesArray = []
|
||||||
|
this.qualificationsArray = hotel.qualifications.map(item => {
|
||||||
|
const image = item.image || ''
|
||||||
|
uploadedQualificationFilesArray.push(image)
|
||||||
|
return {
|
||||||
|
path: item.image,
|
||||||
|
upload_percent: 100
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.uploadedQualificationFilesArray = uploadedQualificationFilesArray
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -236,6 +305,10 @@ export default {
|
|||||||
uploadedImgChange: function (uploadedFilesList) {
|
uploadedImgChange: function (uploadedFilesList) {
|
||||||
this.uploadedFilesArray = uploadedFilesList
|
this.uploadedFilesArray = uploadedFilesList
|
||||||
},
|
},
|
||||||
|
// 文件上传结果
|
||||||
|
uploadedImg2Change: function (uploadedFilesList) {
|
||||||
|
this.uploadedQualificationFilesArray = uploadedFilesList
|
||||||
|
},
|
||||||
chooseQrcodeImg() {
|
chooseQrcodeImg() {
|
||||||
chooseImage(img => {
|
chooseImage(img => {
|
||||||
this.$set(this.innApplyInfo, 'qrcode', img)
|
this.$set(this.innApplyInfo, 'qrcode', img)
|
||||||
@@ -249,6 +322,7 @@ export default {
|
|||||||
chooseLogoVideo() {
|
chooseLogoVideo() {
|
||||||
chooseVideoToUpload(path => {
|
chooseVideoToUpload(path => {
|
||||||
this.$set(this.innApplyInfo, 'coverVideo', path)
|
this.$set(this.innApplyInfo, 'coverVideo', path)
|
||||||
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseCoverImg() {
|
chooseCoverImg() {
|
||||||
@@ -257,32 +331,44 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (this.innApplyInfo.logo.length === 0) {
|
const suffixs = ['.png', '.jpg', '.jpeg', '.bmp', '.gif', '.webp', '.psd', '.svg', '.tiff']
|
||||||
this.$dialog.error('请上传店铺LOGO图片')
|
const suffix = this.innApplyInfo.cover ? this.innApplyInfo.cover.substring(this.innApplyInfo.cover.lastIndexOf(".")) : '';
|
||||||
|
const isImg = suffixs.indexOf(suffix.toLowerCase()) > -1
|
||||||
|
console.log(suffix);
|
||||||
|
|
||||||
|
if(this.loading) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.cover.length === 0 && this.innApplyInfo.coverType === 1) {
|
if (!this.innApplyInfo.logo) {
|
||||||
|
this.$dialog.error('请上传店铺LOGO')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!isImg && this.innApplyInfo.coverType === 1) {
|
||||||
this.$dialog.error('请上传店铺封面图片')
|
this.$dialog.error('请上传店铺封面图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.coverVideo.length === 0 && this.innApplyInfo.coverType === 2) {
|
if (!this.innApplyInfo.coverVideo && this.innApplyInfo.coverType === 2) {
|
||||||
this.$dialog.error('请上传店铺封面视频')
|
this.$dialog.error('请上传店铺封面视频')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.ownerName.length === 0) {
|
if (!this.innApplyInfo.ownerName) {
|
||||||
this.$dialog.error('请输入店主名字')
|
this.$dialog.error('请输入店主名字')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.content.length === 0) {
|
if (!this.innApplyInfo.content) {
|
||||||
this.$dialog.error('请输入一句话介绍')
|
this.$dialog.error('请输入一句话介绍')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.desc.length === 0) {
|
// if (!this.innApplyInfo.desc) {
|
||||||
this.$dialog.error('请输入店铺简介')
|
// this.$dialog.error('请输入店铺简介')
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
if (this.uploadedFilesArray.length === 0) {
|
||||||
|
this.$dialog.error('请上传店铺图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.uploadedFilesArray.length === 0) {
|
if (this.uploadedQualificationFilesArray.length === 0) {
|
||||||
this.$dialog.error('请上传至少一张店铺图片')
|
this.$dialog.error('请上传资质图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 深拷贝
|
// 深拷贝
|
||||||
@@ -290,23 +376,27 @@ export default {
|
|||||||
if (this.uploadedFilesArray.length > 0) {
|
if (this.uploadedFilesArray.length > 0) {
|
||||||
param.pics = this.uploadedFilesArray.join(',')
|
param.pics = this.uploadedFilesArray.join(',')
|
||||||
}
|
}
|
||||||
|
param.qualification = this.uploadedQualificationFilesArray
|
||||||
param.id = this.innHistory.id
|
param.id = this.innHistory.id
|
||||||
if (param.coverType === 2) {
|
if (param.coverType === 2) {
|
||||||
param.cover = param.coverVideo
|
param.cover = param.coverVideo
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
postHotelInfoEdit(param).then((res) => {
|
postHotelInfoEdit(param).then((res) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showModal({
|
||||||
title: '修改成功!',
|
title: '提示',
|
||||||
mask: false,
|
content: '修改成功!',
|
||||||
duration: 1500
|
showCancel: false,
|
||||||
})
|
success: () => {
|
||||||
setTimeout(function () {
|
this.loading = false
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}, 1000)
|
}
|
||||||
|
})
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
this.loading = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg + '',
|
title: err.msg + '',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -329,8 +419,8 @@ export default {
|
|||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
}
|
}
|
||||||
.video-item {
|
.video-item {
|
||||||
width: 64rpx;
|
width: 120rpx;
|
||||||
height: 64rpx;
|
height: 120rpx;
|
||||||
}
|
}
|
||||||
.inp-textarea {
|
.inp-textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -404,6 +494,11 @@ export default {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
.base-info-section .item.is_required .cell .cell-title .txt {
|
||||||
|
margin: 0 0 0 8px;
|
||||||
|
color: red;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.base-info-section .item.is_required .cell .cell-value {
|
.base-info-section .item.is_required .cell .cell-value {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|||||||
@@ -37,14 +37,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getLogs, takePrize} from "@/api/lottery";
|
import {getLogs, takePrize} from '@/api/lottery'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
loading: false,
|
loading: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
list: []
|
list: [],
|
||||||
|
pageKeyId: Object.freeze('lotteryRecords')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -80,7 +83,7 @@ export default {
|
|||||||
this.page++
|
this.page++
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
},
|
},
|
||||||
async takeItem(item) {
|
async takeItem(item, index) {
|
||||||
// 领取商品
|
// 领取商品
|
||||||
if (item['prizeType'] === 1 && item['status'] === 1) {
|
if (item['prizeType'] === 1 && item['status'] === 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -98,15 +101,15 @@ export default {
|
|||||||
confirmText: '查看订单',
|
confirmText: '查看订单',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
console.log('用户点击确定');
|
console.log('用户点击确定')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/order/MyOrder/index'
|
url: '/pages/order/MyOrder/index'
|
||||||
})
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
console.log('用户点击取消');
|
console.log('用户点击取消')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,11 +80,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDetail, getPrize, takePrize } from '@/api/lottery'
|
import { getDetail, getPrize, takePrize, getLotteryShareInfo } from '@/api/lottery'
|
||||||
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
|
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { gbroMarquee },
|
components: { gbroMarquee },
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ready: false,
|
ready: false,
|
||||||
@@ -113,7 +115,9 @@ export default {
|
|||||||
text_color: "#333", //字体颜色
|
text_color: "#333", //字体颜色
|
||||||
back_color: "red", //背景色
|
back_color: "red", //背景色
|
||||||
},
|
},
|
||||||
imgData: []
|
imgData: [],
|
||||||
|
shareAppImg: '',
|
||||||
|
pageKeyId: Object.freeze('lotteryIndex')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -126,6 +130,13 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: '探寻有趣有味的生活方式',
|
||||||
|
path: '/pkg-video/views/lottery',
|
||||||
|
imageUrl: this.shareAppImg
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
getDetail().then(res => {
|
getDetail().then(res => {
|
||||||
@@ -138,6 +149,9 @@ export default {
|
|||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
getLotteryShareInfo().then(res => {
|
||||||
|
this.shareAppImg = res.data || ''
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
|||||||
@@ -3,15 +3,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
name: "pdf",
|
mixins: [pageListenMixins],
|
||||||
|
name: 'PdfView',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pdfPath: ""
|
pdfPath: '',
|
||||||
|
pageKeyId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.pdfPath = options.path;
|
this.pageKeyId = `investmentInfo_id_${options.id}`
|
||||||
|
this.pdfPath = options.path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+93
-30
@@ -13,6 +13,7 @@
|
|||||||
<view class="msg" v-if="item.msg_type===1">
|
<view class="msg" v-if="item.msg_type===1">
|
||||||
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -23,33 +24,78 @@
|
|||||||
<view class="msg" v-if="item.msg_type===1">
|
<view class="msg" v-if="item.msg_type===1">
|
||||||
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="msg v12-d-flex" style="box-sizing: content-box" v-if="item.msg_type===2">
|
||||||
|
<view class="goods-logo">
|
||||||
|
<image class="img v12-radius-8" :src="wsJson(item.msg_content).cover"></image>
|
||||||
|
</view>
|
||||||
|
<view class="conent v12-ml-3 v12-justify-between v12-flex-column">
|
||||||
|
<view class="">
|
||||||
|
<view class="goodsName one-t v12-font-26">
|
||||||
|
{{ wsJson(item.msg_content).goodsName }}
|
||||||
|
</view>
|
||||||
|
<view class="goodsSku v12-secondary-dark-text v12-font-22 v12-font-weight-400 one-t">
|
||||||
|
{{ wsJson(item.msg_content).skuStr }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="price v12-primary-text v12-font-24">
|
||||||
|
¥{{ wsJson(item.msg_content).price }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="cover" :src="item.header || webUrl+'/20221114155314348118.png'"/>
|
<image class="cover" :src="item.header || webUrl+'/20221114155314348118.png'"/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="msg v12-d-flex goods-link" style="box-sizing: content-box" v-if="params" @click="sendGoods">
|
||||||
|
<view class="goods-logo">
|
||||||
|
<image class="img v12-radius-8" :src="params.cover"></image>
|
||||||
|
</view>
|
||||||
|
<view class="conent v12-ml-3 v12-justify-between v12-flex-column">
|
||||||
|
<view class="">
|
||||||
|
<view class="goodsName one-t v12-font-26">
|
||||||
|
{{ params.goodsName }}
|
||||||
|
</view>
|
||||||
|
<view class="goodsSku v12-secondary-dark-text v12-font-22 v12-font-weight-400 one-t">
|
||||||
|
{{ params.skuStr }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="price v12-primary-text v12-font-24">
|
||||||
|
¥{{ params.price }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="footer flex jc-between ai-end">
|
<view class="footer flex jc-between ai-end v12-align-center">
|
||||||
<image :src="webUrl+'/20221014095236624035.png'" @click="getUploadToken"></image>
|
<image :src="webUrl+'/20221014095236624035.png'" @click="getUploadToken"></image>
|
||||||
<view class="input-box">
|
<view class="input-box">
|
||||||
<textarea v-model="content" maxlength="150" :auto-height="true" :fixed="true" confirm-type="send"
|
<textarea
|
||||||
@input="userInput" @confirm="userSend"/>
|
v-model="content"
|
||||||
|
maxlength="150"
|
||||||
|
:auto-height="true"
|
||||||
|
:fixed="true"
|
||||||
|
:show-confirm-bar="false"
|
||||||
|
confirm-type="send"
|
||||||
|
@input="userInput"
|
||||||
|
@confirm="userSend"
|
||||||
|
cursor-spacing="15"
|
||||||
|
:adjust-position="true"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<button @click="userSend">发送</button>
|
<button @click="userSend" class="v12-primary">发送</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {userUnionId} from "@/api/public";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "room",
|
name: "room",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
token: null,
|
token: null,
|
||||||
unionId: null,
|
uid: null,
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
storeId: null,
|
storeId: null,
|
||||||
merName: null,
|
merName: null,
|
||||||
@@ -61,12 +107,17 @@ export default {
|
|||||||
|
|
||||||
roomId: null, //房间ID
|
roomId: null, //房间ID
|
||||||
content: "", //消息内容
|
content: "", //消息内容
|
||||||
list: [], //消息列表
|
list: [], //消息列表,
|
||||||
|
params: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.storeId = options.id;
|
this.storeId = options.id;
|
||||||
this.merName = options.name;
|
this.merName = options.name;
|
||||||
|
this.params = options.params && JSON.parse(options.params) || null
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.params = null
|
||||||
|
}, 10000)
|
||||||
if (this.merName!="undefined" && this.merName!="null") {
|
if (this.merName!="undefined" && this.merName!="null") {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: this.merName
|
title: this.merName
|
||||||
@@ -74,7 +125,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.token = uni.getStorageSync("login_status");
|
this.token = uni.getStorageSync("login_status");
|
||||||
this.userInfo = uni.getStorageSync("userInfo");
|
this.userInfo = uni.getStorageSync("userInfo");
|
||||||
this.getUnionId();
|
this.uid = this.userInfo.uid
|
||||||
|
this.connectSocketInit()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if (this.socketOpen) {
|
if (this.socketOpen) {
|
||||||
@@ -82,15 +134,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUnionId() {
|
wsJson(json) {
|
||||||
userUnionId().then(res => {
|
return JSON.parse(json)
|
||||||
if (res.success) {
|
|
||||||
this.unionId = res.data;
|
|
||||||
this.connectSocketInit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getUploadToken() {
|
getUploadToken() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
||||||
@@ -128,7 +174,7 @@ export default {
|
|||||||
let param = {
|
let param = {
|
||||||
type: "msg",
|
type: "msg",
|
||||||
user_type: 0,
|
user_type: 0,
|
||||||
unionid: that.unionId,
|
uid: that.uid,
|
||||||
username: that.userInfo.nickname,
|
username: that.userInfo.nickname,
|
||||||
header: that.userInfo.avatar,
|
header: that.userInfo.avatar,
|
||||||
room_id: that.roomId,
|
room_id: that.roomId,
|
||||||
@@ -146,7 +192,14 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
sendGoods() {
|
||||||
|
if(Object.values(this.params).length > 0) {
|
||||||
|
this.content = JSON.stringify(this.params)
|
||||||
|
// this.list.push(this.params)
|
||||||
|
this.userSend(2)
|
||||||
|
}
|
||||||
|
this.params = null
|
||||||
|
},
|
||||||
// 预览图片
|
// 预览图片
|
||||||
preview(url) {
|
preview(url) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
@@ -167,6 +220,7 @@ export default {
|
|||||||
console.log('WebSocket连接已打开!', res);
|
console.log('WebSocket连接已打开!', res);
|
||||||
this.socketOpen = true;
|
this.socketOpen = true;
|
||||||
this.createRoom();
|
this.createRoom();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
uni.onSocketError(err => {
|
uni.onSocketError(err => {
|
||||||
@@ -187,17 +241,17 @@ export default {
|
|||||||
this.content = event.detail.value;
|
this.content = event.detail.value;
|
||||||
},
|
},
|
||||||
|
|
||||||
userSend() {
|
userSend(msg_type) {
|
||||||
if (this.content.length === 0) return;
|
if (this.content.length === 0) return;
|
||||||
|
|
||||||
let param = {
|
let param = {
|
||||||
type: "msg",
|
type: "msg",
|
||||||
user_type: 0,
|
user_type: 0,
|
||||||
unionid: this.unionId,
|
uid: this.uid,
|
||||||
username: this.userInfo.nickname,
|
username: this.userInfo.nickname,
|
||||||
header: this.userInfo.avatar,
|
header: this.userInfo.avatar,
|
||||||
room_id: this.roomId,
|
room_id: this.roomId,
|
||||||
msg_type: 0,
|
msg_type: msg_type === 2 ? msg_type : 0,
|
||||||
content: this.content,
|
content: this.content,
|
||||||
token: this.token
|
token: this.token
|
||||||
}
|
}
|
||||||
@@ -206,10 +260,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
createRoom() {
|
createRoom() {
|
||||||
|
|
||||||
let param = {
|
let param = {
|
||||||
type: "join",
|
type: "join",
|
||||||
user_type: 0,
|
user_type: 0,
|
||||||
unionid: this.unionId,
|
uid: this.uid,
|
||||||
username: this.userInfo.nickname,
|
username: this.userInfo.nickname,
|
||||||
header: this.userInfo.avatar,
|
header: this.userInfo.avatar,
|
||||||
store_id: this.storeId
|
store_id: this.storeId
|
||||||
@@ -267,6 +322,15 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
.goods-link{
|
||||||
|
box-sizing: content-box;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 200rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
}
|
||||||
|
.goodsName,.goodsSku{
|
||||||
|
max-width: 400rpx;
|
||||||
|
}
|
||||||
.common-room {
|
.common-room {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
@@ -279,7 +343,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
padding: 0 32rpx 130rpx;
|
padding: 0 32rpx 160rpx;
|
||||||
|
|
||||||
.datetime {
|
.datetime {
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
@@ -316,8 +380,8 @@ export default {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
||||||
.img {
|
.img {
|
||||||
max-width: 214rpx;
|
max-width: 140rpx;
|
||||||
max-height: 214rpx;
|
max-height: 140rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,9 +400,9 @@ export default {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
padding: 30rpx 32rpx 28rpx;
|
padding: 30rpx 32rpx 28rpx;
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
border-radius: 40rpx 40rpx 0rpx 0rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
height: 160rpx;
|
||||||
image {
|
image {
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
@@ -361,9 +425,8 @@ export default {
|
|||||||
|
|
||||||
button {
|
button {
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
height: 64rpx;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-radius: 32rpx;
|
border-radius: 100rpx;
|
||||||
background: #FD574B;
|
background: #FD574B;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user