@alu008/test_yuanqikaixiang 1.0.0

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.
Files changed (110) hide show
  1. package/App.vue +294 -0
  2. package/Local/en.json +3 -0
  3. package/Local/indian.json +3 -0
  4. package/Local/zh-Hans.json +3 -0
  5. package/Local/zh-Hant.json +3 -0
  6. package/README.md +1 -0
  7. package/androidPrivacy.json +28 -0
  8. package/components/ball/ball.vue +230 -0
  9. package/components/cardDetails/cardDetails.vue +273 -0
  10. package/components/confirmModal/confirmModal.vue +125 -0
  11. package/components/fillInfo/fillInfo.vue +255 -0
  12. package/components/header/header.vue +92 -0
  13. package/components/selectAddress/selectAddress.vue +156 -0
  14. package/components/signDetail/signDetail.vue +33 -0
  15. package/components/skeleton/skeleton.vue +62 -0
  16. package/index.html +20 -0
  17. package/index.template.html +35 -0
  18. package/jsconfig.json +9 -0
  19. package/main.js +48 -0
  20. package/manifest.json +159 -0
  21. package/package.json +14 -0
  22. package/pages/index/index.vue +5421 -0
  23. package/pages.json +173 -0
  24. package/project.config.json +25 -0
  25. package/project.private.config.json +14 -0
  26. package/static/fonts/Alibaba-PuHuiTi-Bold.ttf +0 -0
  27. package/static/fonts/Alibaba-PuHuiTi-Medium.ttf +0 -0
  28. package/static/fonts/Alibaba-PuHuiTi-Regular.ttf +0 -0
  29. package/static/fonts/fxlh.ttf +0 -0
  30. package/static/img/R.png +0 -0
  31. package/static/img/SR.png +0 -0
  32. package/static/img/SSR.png +0 -0
  33. package/static/img/bottomBgc1.png +0 -0
  34. package/static/img/centerBgc.png +0 -0
  35. package/static/img/goldBgc.png +0 -0
  36. package/static/img/goldText.png +0 -0
  37. package/static/img/home/calendar/bgc0.png +0 -0
  38. package/static/img/home/calendar/bgc1.png +0 -0
  39. package/static/img/home/calendar/bgc2.png +0 -0
  40. package/static/img/home/calendar/bgc3.png +0 -0
  41. package/static/img/home/calendar/progress0.png +0 -0
  42. package/static/img/home/calendar/progress1.png +0 -0
  43. package/static/img/home/calendar/progress2.png +0 -0
  44. package/static/img/home/calendar/progress3.png +0 -0
  45. package/static/img/kuang.gif +0 -0
  46. package/static/img/luckyBgc.png +0 -0
  47. package/static/img/lucyText.png +0 -0
  48. package/static/img/top_Bgc.png +0 -0
  49. package/subpackages/article/article.vue +64 -0
  50. package/subpackages/confirmSendLogistics/confirmSendLogistics.vue +1035 -0
  51. package/subpackages/coupon/coupon.vue +276 -0
  52. package/subpackages/fragment/fragment.vue +1592 -0
  53. package/subpackages/myAddress/myAddress.vue +656 -0
  54. package/subpackages/myCards/myCards.vue +1250 -0
  55. package/subpackages/myOrder/myOrder.vue +779 -0
  56. package/subpackages/myOrderDetail/myOrderDetail.vue +659 -0
  57. package/subpackages/poster/poster.vue +130 -0
  58. package/subpackages/selectCoupon/selectCoupon.vue +251 -0
  59. package/subpackages/sendLogistics/sendLogistics.vue +1097 -0
  60. package/subpackages/vote/vote.vue +877 -0
  61. package/uni.promisify.adaptor.js +10 -0
  62. package/uni.scss +114 -0
  63. package/uni_modules/qf-image-cropper/changelog.md +72 -0
  64. package/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.render.js +855 -0
  65. package/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue +749 -0
  66. package/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxs +727 -0
  67. package/uni_modules/qf-image-cropper/package.json +81 -0
  68. package/uni_modules/qf-image-cropper/readme.md +97 -0
  69. package/uni_modules/uni-data-select/changelog.md +51 -0
  70. package/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue +837 -0
  71. package/uni_modules/uni-data-select/package.json +106 -0
  72. package/uni_modules/uni-data-select/readme.md +8 -0
  73. package/uni_modules/uni-icons/changelog.md +44 -0
  74. package/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue +91 -0
  75. package/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +110 -0
  76. package/uni_modules/uni-icons/components/uni-icons/uniicons.css +664 -0
  77. package/uni_modules/uni-icons/components/uni-icons/uniicons.ttf +0 -0
  78. package/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts +664 -0
  79. package/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js +649 -0
  80. package/uni_modules/uni-icons/package.json +111 -0
  81. package/uni_modules/uni-icons/readme.md +8 -0
  82. package/uni_modules/uni-load-more/changelog.md +23 -0
  83. package/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json +5 -0
  84. package/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js +8 -0
  85. package/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json +5 -0
  86. package/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json +5 -0
  87. package/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue +404 -0
  88. package/uni_modules/uni-load-more/package.json +105 -0
  89. package/uni_modules/uni-load-more/readme.md +14 -0
  90. package/uni_modules/uni-scss/changelog.md +8 -0
  91. package/uni_modules/uni-scss/index.scss +1 -0
  92. package/uni_modules/uni-scss/package.json +82 -0
  93. package/uni_modules/uni-scss/readme.md +4 -0
  94. package/uni_modules/uni-scss/styles/index.scss +7 -0
  95. package/uni_modules/uni-scss/styles/setting/_border.scss +3 -0
  96. package/uni_modules/uni-scss/styles/setting/_color.scss +66 -0
  97. package/uni_modules/uni-scss/styles/setting/_radius.scss +55 -0
  98. package/uni_modules/uni-scss/styles/setting/_space.scss +56 -0
  99. package/uni_modules/uni-scss/styles/setting/_styles.scss +167 -0
  100. package/uni_modules/uni-scss/styles/setting/_text.scss +24 -0
  101. package/uni_modules/uni-scss/styles/setting/_variables.scss +146 -0
  102. package/uni_modules/uni-scss/styles/tools/functions.scss +19 -0
  103. package/uni_modules/uni-scss/theme.scss +31 -0
  104. package/uni_modules/uni-scss/variables.scss +62 -0
  105. package/utils/addressData.js +6042 -0
  106. package/utils/api.js +160 -0
  107. package/utils/fetch.js +548 -0
  108. package/utils/index.js +994 -0
  109. package/utils/navigator.js +17 -0
  110. package/utils/request.js +162 -0
@@ -0,0 +1,17 @@
1
+ // utils/navigator.js
2
+ let isNavigating = false;
3
+
4
+ export function safeSwitchTab(options) {
5
+ if (isNavigating) return;
6
+ isNavigating = true;
7
+
8
+ uni.switchTab({
9
+ ...options,
10
+ complete() {
11
+ // 不论成功或失败,都要释放锁
12
+ setTimeout(() => {
13
+ isNavigating = false;
14
+ }, 1000);
15
+ },
16
+ });
17
+ }
@@ -0,0 +1,162 @@
1
+ import { refreshTokenUrl, getBoxDetailUrl, getShopDetailUrl } from "./api";
2
+ import { safeSwitchTab } from "./navigator";
3
+
4
+ export const post = (url, datas, successcallback, errorcallback) => {
5
+ const access_token = uni.getStorageSync("userInfo")
6
+ ? uni.getStorageSync("userInfo").accessToken
7
+ : "";
8
+
9
+ const ticket = uni.getStorageSync('ticket')
10
+ uni.request({
11
+ url: url,
12
+ data: datas,
13
+ method: "POST",
14
+ header: {
15
+ Authorization: "Bearer " + access_token,
16
+ Mgtv_ticket:ticket || ''
17
+ },
18
+ success: function (res) {
19
+
20
+ if (res.statusCode == 200) {
21
+ if (res.data.code && res.data.message) {
22
+ uni.hideLoading();
23
+ uni.showToast({
24
+ title: res.data.message || "请求错误",
25
+ mask: false,
26
+ icon: "none",
27
+ });
28
+ } else {
29
+ uni.hideLoading();
30
+ successcallback(res.data);
31
+ }
32
+ } else {
33
+ uni.hideLoading();
34
+ if (res.statusCode == 401) {
35
+ uni.removeStorageSync("userInfo");
36
+ const page = getCurrentPages()[getCurrentPages().length - 1];
37
+ if (page.route == "pages/index/index") {
38
+ window.location.reload();
39
+ } else {
40
+ uni.reLaunch({ url: "/pages/index/index" });
41
+ }
42
+ uni.showToast({
43
+ title: res.data?.message,
44
+ mask: false,
45
+ icon: "none",
46
+ });
47
+ return;
48
+ } else if(res.statusCode == 503){
49
+ const page = getCurrentPages()[getCurrentPages().length - 1];
50
+ if (page.route == "pages/index/index") {
51
+
52
+ } else {
53
+ uni.reLaunch({ url: "/pages/index/index" });
54
+ }
55
+ if(res.data.reason == 'SERVICE_UNAVAILABLE_ERROR'){
56
+
57
+ }else{
58
+ res.data.message = '服务器维护升级中'
59
+ }
60
+ errorcallback&&errorcallback(res);
61
+ }else {
62
+ errorcallback&&errorcallback(res);
63
+ uni.showToast({
64
+ title: res.data?.message || "请求错误",
65
+ mask: false,
66
+ icon: "none",
67
+ });
68
+ }
69
+ }
70
+ },
71
+
72
+ /**
73
+ * 请求失败
74
+ * @param {Object} err - 错误信息
75
+ */
76
+ fail: function (err) {
77
+ uni.hideLoading();
78
+ errorcallback && errorcallback(err);
79
+ console.log("请求失败", err);
80
+ // errorcallback("request error");
81
+ },
82
+ complete: function () {
83
+ // complete
84
+ },
85
+ });
86
+ };
87
+
88
+ export const get = (url, datas, successcallback, errorcallback) => {
89
+ uni.request({
90
+ url: url,
91
+ data: datas,
92
+ method: "GET",
93
+ // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
94
+ success: function (res) {
95
+ if (res.statusCode == 200) {
96
+ successcallback(res.data);
97
+ } else {
98
+ }
99
+ },
100
+
101
+ /**
102
+ * 请求失败
103
+ * @param {Object} err - 错误信息
104
+ */
105
+ fail: function (err) {
106
+ console.log("请求失败", err);
107
+ errorcallback("request error");
108
+ },
109
+ complete: function () {
110
+ // complete
111
+ },
112
+ });
113
+ };
114
+ export const upLoadImage = (
115
+ url,
116
+ filePath,
117
+ arrayBuffer,
118
+ successcallback,
119
+ errorcallback
120
+ ) => {
121
+ const access_token = uni.getStorageSync("userInfo")
122
+ ? uni.getStorageSync("userInfo").accessToken
123
+ : "";
124
+
125
+ uni.uploadFile({
126
+ url: url, //仅为示例,非真实的接口地址
127
+ filePath: filePath,
128
+ name: "file",
129
+ header: {
130
+ Authorization: "Bearer " + access_token,
131
+ },
132
+ formData: {
133
+ name: "",
134
+ file: arrayBuffer,
135
+ },
136
+ success: (res) => {
137
+ if (res.statusCode == 200) {
138
+ let text = decodeURIComponent(escape(res.data));
139
+ successcallback(res.data);
140
+ } else {
141
+ if (res.statusCode == 401) {
142
+ uni.showToast({
143
+ title: "登录已过期,请重新登录",
144
+ mask: false,
145
+ icon: "none",
146
+ });
147
+ uni.clearStorageSync();
148
+ uni.reLaunch({ url: "/pages/index/index" });
149
+ } else {
150
+ const text = JSON.parse(res.data)?.message;
151
+ if (text) {
152
+ uni.showToast({
153
+ title: text,
154
+ mask: false,
155
+ icon: "none",
156
+ });
157
+ }
158
+ }
159
+ }
160
+ },
161
+ });
162
+ };