create-weapp-vite 2.0.32 → 2.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/{chunk-IT75MAH3.js → chunk-6CRKNZN2.js} +2 -3
- package/dist/cli.js +1 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/templates/tailwindcss/package.json +1 -1
- package/templates/tdesign/package.json +1 -1
- package/templates/vant/package.json +1 -1
- package/templates/wevu/package.json +1 -1
- package/templates/wevu-tdesign/package.json +2 -2
- package/templates/wevu-retail/.editorconfig +0 -9
- package/templates/wevu-retail/.vscode/settings.json +0 -10
- package/templates/wevu-retail/AGENTS.md +0 -35
- package/templates/wevu-retail/README.md +0 -26
- package/templates/wevu-retail/auto-import-components.json +0 -1
- package/templates/wevu-retail/gitignore +0 -35
- package/templates/wevu-retail/package.json +0 -42
- package/templates/wevu-retail/postcss.config.js +0 -6
- package/templates/wevu-retail/project.config.json +0 -44
- package/templates/wevu-retail/project.private.config.json +0 -8
- package/templates/wevu-retail/src/app.vue +0 -104
- package/templates/wevu-retail/src/common/updateManager.ts +0 -29
- package/templates/wevu-retail/src/components/filter/index.vue +0 -134
- package/templates/wevu-retail/src/components/filter-popup/index.vue +0 -67
- package/templates/wevu-retail/src/components/goods-card/index.vue +0 -219
- package/templates/wevu-retail/src/components/goods-list/index.vue +0 -91
- package/templates/wevu-retail/src/components/load-more/index.vue +0 -99
- package/templates/wevu-retail/src/components/loading-content/index.vue +0 -48
- package/templates/wevu-retail/src/components/price/index.vue +0 -104
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/index.vue +0 -143
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/tools.wxs +0 -18
- package/templates/wevu-retail/src/components/swipeout/index.vue +0 -118
- package/templates/wevu-retail/src/components/swipeout/swipe.wxs +0 -151
- package/templates/wevu-retail/src/components/webp-image/index.vue +0 -105
- package/templates/wevu-retail/src/components/webp-image/utils.wxs +0 -140
- package/templates/wevu-retail/src/config/index.ts +0 -20437
- package/templates/wevu-retail/src/custom-tab-bar/data.ts +0 -22
- package/templates/wevu-retail/src/custom-tab-bar/index.vue +0 -62
- package/templates/wevu-retail/src/model/activities.ts +0 -7
- package/templates/wevu-retail/src/model/activity.ts +0 -18
- package/templates/wevu-retail/src/model/address.ts +0 -31
- package/templates/wevu-retail/src/model/cart.ts +0 -306
- package/templates/wevu-retail/src/model/category.ts +0 -175
- package/templates/wevu-retail/src/model/comments/queryDetail.ts +0 -50
- package/templates/wevu-retail/src/model/comments.ts +0 -298
- package/templates/wevu-retail/src/model/coupon.ts +0 -39
- package/templates/wevu-retail/src/model/detailsComments.ts +0 -30
- package/templates/wevu-retail/src/model/good.ts +0 -1904
- package/templates/wevu-retail/src/model/goods.ts +0 -7
- package/templates/wevu-retail/src/model/order/applyService.ts +0 -329
- package/templates/wevu-retail/src/model/order/orderConfirm.ts +0 -147
- package/templates/wevu-retail/src/model/order/orderDetail.ts +0 -1191
- package/templates/wevu-retail/src/model/order/orderList.ts +0 -1033
- package/templates/wevu-retail/src/model/promotion.ts +0 -20
- package/templates/wevu-retail/src/model/search.ts +0 -60
- package/templates/wevu-retail/src/model/submitComment.ts +0 -58
- package/templates/wevu-retail/src/model/swiper.ts +0 -39
- package/templates/wevu-retail/src/model/usercenter.ts +0 -52
- package/templates/wevu-retail/src/pages/cart/components/cart-bar/index.vue +0 -104
- package/templates/wevu-retail/src/pages/cart/components/cart-empty/index.vue +0 -41
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.vue +0 -333
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.wxs +0 -5
- package/templates/wevu-retail/src/pages/cart/components/cart-group/utils.wxs +0 -20
- package/templates/wevu-retail/src/pages/cart/components/goods-card/index.vue +0 -334
- package/templates/wevu-retail/src/pages/cart/components/specs-popup/index.vue +0 -100
- package/templates/wevu-retail/src/pages/cart/index.vue +0 -342
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/README.md +0 -95
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.vue +0 -73
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/index.vue +0 -121
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.vue +0 -74
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/index.vue +0 -102
- package/templates/wevu-retail/src/pages/category/components/goods-category/index.vue +0 -137
- package/templates/wevu-retail/src/pages/category/index.vue +0 -50
- package/templates/wevu-retail/src/pages/coupon/components/coupon-card/index.vue +0 -95
- package/templates/wevu-retail/src/pages/coupon/components/floating-button/index.vue +0 -44
- package/templates/wevu-retail/src/pages/coupon/coupon-activity-goods/index.vue +0 -135
- package/templates/wevu-retail/src/pages/coupon/coupon-detail/index.vue +0 -94
- package/templates/wevu-retail/src/pages/coupon/coupon-list/index.vue +0 -136
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png +0 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/index.vue +0 -65
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/my-video/index.vue +0 -92
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/index.vue +0 -93
- package/templates/wevu-retail/src/pages/goods/comments/create/index.vue +0 -196
- package/templates/wevu-retail/src/pages/goods/comments/index.vue +0 -293
- package/templates/wevu-retail/src/pages/goods/details/components/buy-bar/index.vue +0 -117
- package/templates/wevu-retail/src/pages/goods/details/components/goods-specs-popup/index.vue +0 -440
- package/templates/wevu-retail/src/pages/goods/details/components/promotion-popup/index.vue +0 -83
- package/templates/wevu-retail/src/pages/goods/details/index.vue +0 -598
- package/templates/wevu-retail/src/pages/goods/list/index.vue +0 -299
- package/templates/wevu-retail/src/pages/goods/result/index.vue +0 -350
- package/templates/wevu-retail/src/pages/goods/search/index.vue +0 -196
- package/templates/wevu-retail/src/pages/home/home.vue +0 -215
- package/templates/wevu-retail/src/pages/home/readme +0 -8
- package/templates/wevu-retail/src/pages/order/after-service-detail/api.ts +0 -34
- package/templates/wevu-retail/src/pages/order/after-service-detail/index.vue +0 -430
- package/templates/wevu-retail/src/pages/order/after-service-list/api.ts +0 -1262
- package/templates/wevu-retail/src/pages/order/after-service-list/index.vue +0 -299
- package/templates/wevu-retail/src/pages/order/apply-service/index.vue +0 -665
- package/templates/wevu-retail/src/pages/order/components/after-service-button-bar/index.vue +0 -142
- package/templates/wevu-retail/src/pages/order/components/customer-service/index.vue +0 -75
- package/templates/wevu-retail/src/pages/order/components/goods-card/index.vue +0 -356
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGood.wxs +0 -17
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGoods.vue +0 -125
- package/templates/wevu-retail/src/pages/order/components/order-button-bar/index.vue +0 -262
- package/templates/wevu-retail/src/pages/order/components/order-card/index.vue +0 -126
- package/templates/wevu-retail/src/pages/order/components/order-goods-card/index.vue +0 -86
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/index.vue +0 -161
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/reasonSheet.ts +0 -25
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/mock.ts +0 -22
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupon.wxs +0 -16
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupons.vue +0 -207
- package/templates/wevu-retail/src/pages/order/components/specs-goods-card/index.vue +0 -185
- package/templates/wevu-retail/src/pages/order/config.ts +0 -94
- package/templates/wevu-retail/src/pages/order/delivery-detail/index.vue +0 -145
- package/templates/wevu-retail/src/pages/order/delivery-detail/isUrl.wxs +0 -7
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/api.ts +0 -71
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/index.vue +0 -267
- package/templates/wevu-retail/src/pages/order/invoice/index.vue +0 -94
- package/templates/wevu-retail/src/pages/order/order-confirm/components/address-card/index.vue +0 -78
- package/templates/wevu-retail/src/pages/order/order-confirm/getNotes.wxs +0 -11
- package/templates/wevu-retail/src/pages/order/order-confirm/handleInvoice.wxs +0 -11
- package/templates/wevu-retail/src/pages/order/order-confirm/index.vue +0 -707
- package/templates/wevu-retail/src/pages/order/order-confirm/order.wxs +0 -8
- package/templates/wevu-retail/src/pages/order/order-confirm/pay.ts +0 -115
- package/templates/wevu-retail/src/pages/order/order-detail/index.vue +0 -456
- package/templates/wevu-retail/src/pages/order/order-list/index.vue +0 -288
- package/templates/wevu-retail/src/pages/order/pay-result/index.vue +0 -77
- package/templates/wevu-retail/src/pages/order/receipt/index.vue +0 -336
- package/templates/wevu-retail/src/pages/promotion/promotion-detail/index.vue +0 -145
- package/templates/wevu-retail/src/pages/user/address/edit/index.vue +0 -514
- package/templates/wevu-retail/src/pages/user/address/list/index.vue +0 -249
- package/templates/wevu-retail/src/pages/user/components/t-location/index.vue +0 -156
- package/templates/wevu-retail/src/pages/user/components/ui-address-item/index.vue +0 -92
- package/templates/wevu-retail/src/pages/user/name-edit/index.vue +0 -49
- package/templates/wevu-retail/src/pages/user/person-info/index.vue +0 -198
- package/templates/wevu-retail/src/pages/usercenter/address/edit/util.ts +0 -33
- package/templates/wevu-retail/src/pages/usercenter/components/order-group/index.vue +0 -90
- package/templates/wevu-retail/src/pages/usercenter/components/ui-select-picker/index.vue +0 -108
- package/templates/wevu-retail/src/pages/usercenter/components/user-center-card/index.vue +0 -82
- package/templates/wevu-retail/src/pages/usercenter/index.vue +0 -301
- package/templates/wevu-retail/src/services/_utils/delay.ts +0 -3
- package/templates/wevu-retail/src/services/_utils/timeout.ts +0 -3
- package/templates/wevu-retail/src/services/activity/fetchActivity.ts +0 -20
- package/templates/wevu-retail/src/services/activity/fetchActivityList.ts +0 -20
- package/templates/wevu-retail/src/services/address/edit.ts +0 -33
- package/templates/wevu-retail/src/services/address/fetchAddress.ts +0 -48
- package/templates/wevu-retail/src/services/address/list.ts +0 -31
- package/templates/wevu-retail/src/services/cart/cart.ts +0 -20
- package/templates/wevu-retail/src/services/comments/fetchComments.ts +0 -18
- package/templates/wevu-retail/src/services/comments/fetchCommentsCount.ts +0 -18
- package/templates/wevu-retail/src/services/coupon/index.ts +0 -65
- package/templates/wevu-retail/src/services/good/comments/fetchCommentDetail.ts +0 -20
- package/templates/wevu-retail/src/services/good/fetchCategoryList.ts +0 -18
- package/templates/wevu-retail/src/services/good/fetchGood.ts +0 -18
- package/templates/wevu-retail/src/services/good/fetchGoods.ts +0 -29
- package/templates/wevu-retail/src/services/good/fetchGoodsDetailsComments.ts +0 -37
- package/templates/wevu-retail/src/services/good/fetchGoodsList.ts +0 -39
- package/templates/wevu-retail/src/services/good/fetchSearchHistory.ts +0 -35
- package/templates/wevu-retail/src/services/good/fetchSearchResult.ts +0 -38
- package/templates/wevu-retail/src/services/home/home.ts +0 -53
- package/templates/wevu-retail/src/services/order/applyService.ts +0 -70
- package/templates/wevu-retail/src/services/order/orderConfirm.ts +0 -69
- package/templates/wevu-retail/src/services/order/orderDetail.ts +0 -39
- package/templates/wevu-retail/src/services/order/orderList.ts +0 -39
- package/templates/wevu-retail/src/services/order/orderSubmitComment.ts +0 -22
- package/templates/wevu-retail/src/services/promotion/detail.ts +0 -18
- package/templates/wevu-retail/src/services/usercenter/fetchPerson.ts +0 -28
- package/templates/wevu-retail/src/services/usercenter/fetchUsercenter.ts +0 -18
- package/templates/wevu-retail/src/sitemap.json +0 -7
- package/templates/wevu-retail/src/utils/addressParse.ts +0 -25
- package/templates/wevu-retail/src/utils/getPermission.ts +0 -45
- package/templates/wevu-retail/src/utils/mock.ts +0 -51
- package/templates/wevu-retail/src/utils/util.ts +0 -134
- package/templates/wevu-retail/src/vite-env.d.ts +0 -1
- package/templates/wevu-retail/tailwind.config.ts +0 -15
- package/templates/wevu-retail/tsconfig.app.json +0 -58
- package/templates/wevu-retail/tsconfig.json +0 -11
- package/templates/wevu-retail/tsconfig.node.json +0 -33
- package/templates/wevu-retail/vite.config.ts +0 -14
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { fetchComments } from '../../../services/comments/fetchComments';
|
|
3
|
-
import { fetchCommentsCount } from '../../../services/comments/fetchCommentsCount';
|
|
4
|
-
import dayjs from 'dayjs';
|
|
5
|
-
const layoutMap = {
|
|
6
|
-
0: 'vertical',
|
|
7
|
-
};
|
|
8
|
-
Page({
|
|
9
|
-
data: {
|
|
10
|
-
pageLoading: false,
|
|
11
|
-
commentList: [],
|
|
12
|
-
pageNum: 1,
|
|
13
|
-
myPageNum: 1,
|
|
14
|
-
pageSize: 10,
|
|
15
|
-
total: 0,
|
|
16
|
-
myTotal: 0,
|
|
17
|
-
hasLoaded: false,
|
|
18
|
-
layoutText: layoutMap[0],
|
|
19
|
-
loadMoreStatus: 0,
|
|
20
|
-
myLoadStatus: 0,
|
|
21
|
-
spuId: '1060004',
|
|
22
|
-
commentLevel: '',
|
|
23
|
-
hasImage: '',
|
|
24
|
-
commentType: '',
|
|
25
|
-
totalCount: 0,
|
|
26
|
-
countObj: {
|
|
27
|
-
badCount: '0',
|
|
28
|
-
commentCount: '0',
|
|
29
|
-
goodCount: '0',
|
|
30
|
-
middleCount: '0',
|
|
31
|
-
hasImageCount: '0',
|
|
32
|
-
uidCount: '0',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
onLoad(options) {
|
|
36
|
-
this.getCount(options);
|
|
37
|
-
this.getComments(options);
|
|
38
|
-
},
|
|
39
|
-
async getCount(options) {
|
|
40
|
-
try {
|
|
41
|
-
const result = await fetchCommentsCount(
|
|
42
|
-
{
|
|
43
|
-
spuId: options.spuId,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
method: 'POST',
|
|
47
|
-
},
|
|
48
|
-
);
|
|
49
|
-
this.setData({
|
|
50
|
-
countObj: result,
|
|
51
|
-
});
|
|
52
|
-
// const { data, code = '' } = result;
|
|
53
|
-
// if (code.toUpperCase() === 'SUCCESS') {
|
|
54
|
-
// wx.setNavigationBarTitle({
|
|
55
|
-
// title: `全部评价(${data.commentCount})`,
|
|
56
|
-
// });
|
|
57
|
-
// this.setData({
|
|
58
|
-
// countObj: data,
|
|
59
|
-
// });
|
|
60
|
-
// } else {
|
|
61
|
-
// wx.showToast({
|
|
62
|
-
// title: '查询失败,请稍候重试',
|
|
63
|
-
// });
|
|
64
|
-
// }
|
|
65
|
-
} catch (error) {}
|
|
66
|
-
},
|
|
67
|
-
generalQueryData(reset) {
|
|
68
|
-
const { hasImage, pageNum, pageSize, spuId, commentLevel } = this.data;
|
|
69
|
-
const params = {
|
|
70
|
-
pageNum: 1,
|
|
71
|
-
pageSize: 30,
|
|
72
|
-
queryParameter: {
|
|
73
|
-
spuId,
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
if (
|
|
77
|
-
Number(commentLevel) === 3 ||
|
|
78
|
-
Number(commentLevel) === 2 ||
|
|
79
|
-
Number(commentLevel) === 1
|
|
80
|
-
) {
|
|
81
|
-
params.queryParameter.commentLevel = Number(commentLevel);
|
|
82
|
-
}
|
|
83
|
-
if (hasImage && hasImage === '1') {
|
|
84
|
-
params.queryParameter.hasImage = true;
|
|
85
|
-
} else {
|
|
86
|
-
delete params.queryParameter.hasImage;
|
|
87
|
-
}
|
|
88
|
-
// 重置请求
|
|
89
|
-
if (reset) return params;
|
|
90
|
-
|
|
91
|
-
return {
|
|
92
|
-
...params,
|
|
93
|
-
pageNum: pageNum + 1,
|
|
94
|
-
pageSize,
|
|
95
|
-
};
|
|
96
|
-
},
|
|
97
|
-
async init(reset = true) {
|
|
98
|
-
const { loadMoreStatus, commentList = [] } = this.data;
|
|
99
|
-
const params = this.generalQueryData(reset);
|
|
100
|
-
|
|
101
|
-
// 在加载中或者无更多数据,直接返回
|
|
102
|
-
if (loadMoreStatus !== 0) return;
|
|
103
|
-
|
|
104
|
-
this.setData({
|
|
105
|
-
loadMoreStatus: 1,
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
try {
|
|
109
|
-
const data = await fetchComments(params, {
|
|
110
|
-
method: 'POST',
|
|
111
|
-
});
|
|
112
|
-
const code = 'SUCCESS';
|
|
113
|
-
if (code.toUpperCase() === 'SUCCESS') {
|
|
114
|
-
const { pageList, totalCount = 0 } = data;
|
|
115
|
-
pageList.forEach((item) => {
|
|
116
|
-
// eslint-disable-next-line no-param-reassign
|
|
117
|
-
item.commentTime = dayjs(Number(item.commentTime)).format(
|
|
118
|
-
'YYYY/MM/DD HH:mm',
|
|
119
|
-
);
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
if (Number(totalCount) === 0 && reset) {
|
|
123
|
-
this.setData({
|
|
124
|
-
commentList: [],
|
|
125
|
-
hasLoaded: true,
|
|
126
|
-
total: totalCount,
|
|
127
|
-
loadMoreStatus: 2,
|
|
128
|
-
});
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const _commentList = reset ? pageList : commentList.concat(pageList);
|
|
132
|
-
const _loadMoreStatus =
|
|
133
|
-
_commentList.length === Number(totalCount) ? 2 : 0;
|
|
134
|
-
this.setData({
|
|
135
|
-
commentList: _commentList,
|
|
136
|
-
pageNum: params.pageNum || 1,
|
|
137
|
-
totalCount: Number(totalCount),
|
|
138
|
-
loadMoreStatus: _loadMoreStatus,
|
|
139
|
-
});
|
|
140
|
-
} else {
|
|
141
|
-
wx.showToast({
|
|
142
|
-
title: '查询失败,请稍候重试',
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
} catch (error) {}
|
|
146
|
-
this.setData({
|
|
147
|
-
hasLoaded: true,
|
|
148
|
-
});
|
|
149
|
-
},
|
|
150
|
-
getScoreArray(score) {
|
|
151
|
-
var array = [];
|
|
152
|
-
for (let i = 0; i < 5; i++) {
|
|
153
|
-
if (i < score) {
|
|
154
|
-
array.push(2);
|
|
155
|
-
} else {
|
|
156
|
-
array.push(0);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return array;
|
|
160
|
-
},
|
|
161
|
-
getComments(options) {
|
|
162
|
-
const { commentLevel = -1, spuId, hasImage = '' } = options;
|
|
163
|
-
if (commentLevel !== -1) {
|
|
164
|
-
this.setData({
|
|
165
|
-
commentLevel: commentLevel,
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
this.setData({
|
|
169
|
-
hasImage: hasImage,
|
|
170
|
-
commentType: hasImage ? '4' : '',
|
|
171
|
-
spuId: spuId,
|
|
172
|
-
});
|
|
173
|
-
this.init(true);
|
|
174
|
-
},
|
|
175
|
-
changeTag(e) {
|
|
176
|
-
var { commenttype } = e.currentTarget.dataset;
|
|
177
|
-
var { commentType } = this.data;
|
|
178
|
-
if (commentType === commenttype) return;
|
|
179
|
-
this.setData({
|
|
180
|
-
loadMoreStatus: 0,
|
|
181
|
-
commentList: [],
|
|
182
|
-
total: 0,
|
|
183
|
-
myTotal: 0,
|
|
184
|
-
myPageNum: 1,
|
|
185
|
-
pageNum: 1,
|
|
186
|
-
});
|
|
187
|
-
if (commenttype === '' || commenttype === '5') {
|
|
188
|
-
this.setData({
|
|
189
|
-
hasImage: '',
|
|
190
|
-
commentLevel: '',
|
|
191
|
-
});
|
|
192
|
-
} else if (commenttype === '4') {
|
|
193
|
-
this.setData({
|
|
194
|
-
hasImage: '1',
|
|
195
|
-
commentLevel: '',
|
|
196
|
-
});
|
|
197
|
-
} else {
|
|
198
|
-
this.setData({
|
|
199
|
-
hasImage: '',
|
|
200
|
-
commentLevel: commenttype,
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
if (commenttype === '5') {
|
|
204
|
-
this.setData({
|
|
205
|
-
myLoadStatus: 1,
|
|
206
|
-
commentType: commenttype,
|
|
207
|
-
});
|
|
208
|
-
this.getMyCommentsList();
|
|
209
|
-
} else {
|
|
210
|
-
this.setData({
|
|
211
|
-
myLoadStatus: 0,
|
|
212
|
-
commentType: commenttype,
|
|
213
|
-
});
|
|
214
|
-
this.init(true);
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
onReachBottom() {
|
|
218
|
-
const { total = 0, commentList } = this.data;
|
|
219
|
-
if (commentList.length === total) {
|
|
220
|
-
this.setData({
|
|
221
|
-
loadMoreStatus: 2,
|
|
222
|
-
});
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
this.init(false);
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
</script>
|
|
230
|
-
|
|
231
|
-
<template>
|
|
232
|
-
<view class="comments-header [display:flex] [flex-wrap:wrap] [padding:32rpx_32rpx_0rpx] [background-color:#fff] [margin-top:-24rpx] [margin-left:-24rpx]">
|
|
233
|
-
<t-tag t-class="comments-header-tag {{commentType === '' ? 'comments-header-active' : ''}} [margin-top:24rpx] [margin-left:24rpx] ![height:56rpx] ![font-size:24rpx] [justify-content:center] ![background-color:#F5F5F5] ![border-radius:8rpx] ![border:1px_solid_#F5F5F5] [background-color:#FFECE9] [color:#FA4126] [border:1px_solid_#FA4126]" data-commentType="" bindtap="changeTag">
|
|
234
|
-
全部({{countObj.commentCount}})
|
|
235
|
-
</t-tag>
|
|
236
|
-
<t-tag
|
|
237
|
-
t-class="comments-header-tag {{commentType === '5' ? 'comments-header-active' : ''}} [margin-top:24rpx] [margin-left:24rpx] ![height:56rpx] ![font-size:24rpx] [justify-content:center] ![background-color:#F5F5F5] ![border-radius:8rpx] ![border:1px_solid_#F5F5F5] [background-color:#FFECE9] [color:#FA4126] [border:1px_solid_#FA4126]"
|
|
238
|
-
wx:if="{{countObj.uidCount !== '0'}}"
|
|
239
|
-
data-commentType="5"
|
|
240
|
-
bindtap="changeTag"
|
|
241
|
-
>
|
|
242
|
-
自己({{countObj.uidCount}})
|
|
243
|
-
</t-tag>
|
|
244
|
-
<t-tag t-class="comments-header-tag {{commentType === '4' ? 'comments-header-active' : ''}} [margin-top:24rpx] [margin-left:24rpx] ![height:56rpx] ![font-size:24rpx] [justify-content:center] ![background-color:#F5F5F5] ![border-radius:8rpx] ![border:1px_solid_#F5F5F5] [background-color:#FFECE9] [color:#FA4126] [border:1px_solid_#FA4126]" data-commentType="4" bindtap="changeTag">
|
|
245
|
-
带图({{countObj.hasImageCount}})
|
|
246
|
-
</t-tag>
|
|
247
|
-
<t-tag t-class="comments-header-tag {{commentType === '3' ? 'comments-header-active' : ''}} [margin-top:24rpx] [margin-left:24rpx] ![height:56rpx] ![font-size:24rpx] [justify-content:center] ![background-color:#F5F5F5] ![border-radius:8rpx] ![border:1px_solid_#F5F5F5] [background-color:#FFECE9] [color:#FA4126] [border:1px_solid_#FA4126]" data-commentType="3" bindtap="changeTag">
|
|
248
|
-
好评({{countObj.goodCount}})
|
|
249
|
-
</t-tag>
|
|
250
|
-
<t-tag t-class="comments-header-tag {{commentType === '2' ? 'comments-header-active' : ''}} [margin-top:24rpx] [margin-left:24rpx] ![height:56rpx] ![font-size:24rpx] [justify-content:center] ![background-color:#F5F5F5] ![border-radius:8rpx] ![border:1px_solid_#F5F5F5] [background-color:#FFECE9] [color:#FA4126] [border:1px_solid_#FA4126]" data-commentType="2" bindtap="changeTag">
|
|
251
|
-
中评({{countObj.middleCount}})
|
|
252
|
-
</t-tag>
|
|
253
|
-
<t-tag t-class="comments-header-tag {{commentType === '1' ? 'comments-header-active' : ''}} [margin-top:24rpx] [margin-left:24rpx] ![height:56rpx] ![font-size:24rpx] [justify-content:center] ![background-color:#F5F5F5] ![border-radius:8rpx] ![border:1px_solid_#F5F5F5] [background-color:#FFECE9] [color:#FA4126] [border:1px_solid_#FA4126]" data-commentType="1" bindtap="changeTag">
|
|
254
|
-
差评({{countObj.badCount}})
|
|
255
|
-
</t-tag>
|
|
256
|
-
</view>
|
|
257
|
-
<view class="comments-card-list">
|
|
258
|
-
<block wx:for="{{commentList}}" wx:key="index">
|
|
259
|
-
<comments-card
|
|
260
|
-
commentScore="{{item.commentScore}}"
|
|
261
|
-
userName="{{item.userName}}"
|
|
262
|
-
commentResources="{{item.commentResources || []}}"
|
|
263
|
-
commentContent="{{item.commentContent}}"
|
|
264
|
-
isAnonymity="{{item.isAnonymity}}"
|
|
265
|
-
commentTime="{{item.commentTime}}"
|
|
266
|
-
isAutoComment="{{item.isAutoComment}}"
|
|
267
|
-
userHeadUrl="{{item.userHeadUrl}}"
|
|
268
|
-
specInfo="{{item.specInfo}}"
|
|
269
|
-
sellerReply="{{item.sellerReply || ''}}"
|
|
270
|
-
goodsDetailInfo="{{item.goodsDetailInfo || ''}}"
|
|
271
|
-
/>
|
|
272
|
-
</block>
|
|
273
|
-
<t-load-more
|
|
274
|
-
t-class="no-more [padding-left:20rpx] [padding-right:20rpx]"
|
|
275
|
-
status="{{loadMoreStatus}}"
|
|
276
|
-
no-more-text="没有更多了"
|
|
277
|
-
color="#BBBBBB"
|
|
278
|
-
failedColor="#FA550F"
|
|
279
|
-
/>
|
|
280
|
-
</view>
|
|
281
|
-
|
|
282
|
-
</template>
|
|
283
|
-
|
|
284
|
-
<json>
|
|
285
|
-
{
|
|
286
|
-
"navigationBarTitleText": "全部评价",
|
|
287
|
-
"usingComponents": {
|
|
288
|
-
"t-tag": "tdesign-miniprogram/tag/tag",
|
|
289
|
-
"comments-card": "./components/comments-card/index",
|
|
290
|
-
"t-load-more": "/components/load-more/index"
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
</json>
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
Component({
|
|
3
|
-
externalClasses: ['wr-sold-out', 'wr-class'],
|
|
4
|
-
|
|
5
|
-
options: { multipleSlots: true },
|
|
6
|
-
|
|
7
|
-
properties: {
|
|
8
|
-
soldout: {
|
|
9
|
-
// 商品是否下架
|
|
10
|
-
type: Boolean,
|
|
11
|
-
value: false,
|
|
12
|
-
},
|
|
13
|
-
jumpArray: {
|
|
14
|
-
type: Array,
|
|
15
|
-
value: [],
|
|
16
|
-
},
|
|
17
|
-
isStock: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
value: true,
|
|
20
|
-
}, // 是否有库存
|
|
21
|
-
isSlotButton: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
value: false,
|
|
24
|
-
}, // 是否开启按钮插槽
|
|
25
|
-
shopCartNum: {
|
|
26
|
-
type: Number, // 购物车气泡数量
|
|
27
|
-
},
|
|
28
|
-
buttonType: {
|
|
29
|
-
type: Number,
|
|
30
|
-
value: 0,
|
|
31
|
-
},
|
|
32
|
-
minDiscountPrice: {
|
|
33
|
-
type: String,
|
|
34
|
-
value: '',
|
|
35
|
-
},
|
|
36
|
-
minSalePrice: {
|
|
37
|
-
type: String,
|
|
38
|
-
value: '',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
data: {
|
|
43
|
-
fillPrice: false,
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
methods: {
|
|
47
|
-
toAddCart() {
|
|
48
|
-
const { isStock } = this.properties;
|
|
49
|
-
if (!isStock) return;
|
|
50
|
-
this.triggerEvent('toAddCart');
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
toBuyNow(e) {
|
|
54
|
-
const { isStock } = this.properties;
|
|
55
|
-
if (!isStock) return;
|
|
56
|
-
this.triggerEvent('toBuyNow', e);
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
toNav(e) {
|
|
60
|
-
const { url } = e.currentTarget.dataset;
|
|
61
|
-
return this.triggerEvent('toNav', {
|
|
62
|
-
e,
|
|
63
|
-
url,
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<template>
|
|
71
|
-
<view class="flex soldout flex-center wr-sold-out [height:80rpx] [background:rgba(170,_170,_170,_1)] [width:100%] [color:#fff] [display:flex] [display:-webkit-flex] [justify-content:center] [-webkit-justify-content:center] [align-items:center] [-webkit-align-items:center]" wx:if="{{soldout || !isStock}}">
|
|
72
|
-
{{soldout ? '商品已下架' : '商品已售馨'}}
|
|
73
|
-
</view>
|
|
74
|
-
<view class="footer-cont flex flex-between wr-class [background-color:#fff] [padding:16rpx] [display:flex] [display:-webkit-flex] [justify-content:space-between] [-webkit-justify-content:space-between]">
|
|
75
|
-
<view class="flex flex-between bottom-operate-left [width:100%] [display:flex] [display:-webkit-flex] [justify-content:space-between] [-webkit-justify-content:space-between] [&_.icon-warp]:[width:50%]" wx:if="{{jumpArray.length > 0}}">
|
|
76
|
-
<view
|
|
77
|
-
wx:for="{{jumpArray}}"
|
|
78
|
-
wx:key="index"
|
|
79
|
-
class="icon-warp operate-wrap [width:110rpx] [display:flex] [justify-content:center] [align-items:center] [text-align:center] [position:relative] [display:-webkit-flex]"
|
|
80
|
-
bindtap="toNav"
|
|
81
|
-
data-ele="foot_navigation"
|
|
82
|
-
data-index="{{index}}"
|
|
83
|
-
data-url="{{item.url}}"
|
|
84
|
-
>
|
|
85
|
-
<view>
|
|
86
|
-
<text wx:if="{{shopCartNum > 0 && item.showCartNum}}" class="tag-cart-num [display:inline-block] [position:absolute] [left:50rpx] [right:auto] [top:6rpx] [color:#fff] [line-height:24rpx] [text-align:center] [z-index:99] [white-space:nowrap] [min-width:28rpx] [border-radius:14rpx] ![background-color:#fa550f] [font-size:20rpx] [font-weight:400] [padding:2rpx_6rpx]">
|
|
87
|
-
{{shopCartNum > 99 ? '99+' : shopCartNum}}
|
|
88
|
-
</text>
|
|
89
|
-
<t-icon prefix="wr" name="{{item.iconName}}" size="40rpx" />
|
|
90
|
-
<view class="operate-text [color:#666] [font-size:20rpx]">{{item.title}}</view>
|
|
91
|
-
</view>
|
|
92
|
-
</view>
|
|
93
|
-
</view>
|
|
94
|
-
<block wx:if="{{buttonType === 1}}">
|
|
95
|
-
<view class="flex buy-buttons [display:flex] [display:-webkit-flex]">
|
|
96
|
-
<view class="bar-separately {{soldout || !isStock ? 'bar-addCart-disabled' : ''}} [width:254rpx] [height:80rpx] [color:#fff] [display:flex] [align-items:center] [justify-content:center] [background:#ffece9] [color:#fa4126] [border-radius:40rpx_0_0_40rpx] [background:rgba(170,_170,_170,_1)] [width:100%] [background:rgba(221,_221,_221,_1)] [font-size:28rpx] [display:-webkit-flex]" bindtap="toAddCart">
|
|
97
|
-
加入购物车
|
|
98
|
-
</view>
|
|
99
|
-
<view class="bar-buy {{soldout || !isStock ? 'bar-buyNow-disabled' : ''}} [width:254rpx] [height:80rpx] [color:#fff] [display:flex] [align-items:center] [justify-content:center] [background-color:#fa4126] [border-radius:0rpx_40rpx_40rpx_0rpx] [background:rgba(170,_170,_170,_1)] [width:100%] [background:rgba(198,_198,_198,_1)] [font-size:28rpx] [display:-webkit-flex]" bindtap="toBuyNow">
|
|
100
|
-
立即购买
|
|
101
|
-
</view>
|
|
102
|
-
</view>
|
|
103
|
-
</block>
|
|
104
|
-
<block wx:if="{{isSlotButton}}">
|
|
105
|
-
<slot name="buyButton" />
|
|
106
|
-
</block>
|
|
107
|
-
</view>
|
|
108
|
-
|
|
109
|
-
</template>
|
|
110
|
-
|
|
111
|
-
<json>
|
|
112
|
-
{
|
|
113
|
-
"component": true,
|
|
114
|
-
"usingComponents": {
|
|
115
|
-
"t-icon": "tdesign-miniprogram/icon/icon"
|
|
116
|
-
}
|
|
117
|
-
}</json>
|