wmc 11 months ago
parent adf9856316
commit b7690c38db
  1. 2
      .gitignore
  2. 28
      .hbuilderx/launch.json
  3. 13
      .vite/deps/_metadata.json
  4. 1
      .vite/deps/package.json
  5. 766
      .vite/deps/weixin-js-sdk.js
  6. 7
      .vite/deps/weixin-js-sdk.js.map
  7. 91
      App.vue
  8. 14
      androidPrivacy.json
  9. 53
      api/address.js
  10. 11
      api/article/category.js
  11. 17
      api/article/index.js
  12. 11
      api/balance.js
  13. 11
      api/balance/log.js
  14. 23
      api/bargain/active.js
  15. 17
      api/bargain/checkout.js
  16. 35
      api/bargain/task.js
  17. 17
      api/captcha.js
  18. 35
      api/cart.js
  19. 35
      api/cashier/index.js
  20. 11
      api/category/index.js
  21. 19
      api/checkout.js
  22. 23
      api/comment.js
  23. 16
      api/coupon.js
  24. 17
      api/dealer/apply.js
  25. 17
      api/dealer/index.js
  26. 11
      api/dealer/order.js
  27. 11
      api/dealer/poster.js
  28. 11
      api/dealer/setting.js
  29. 11
      api/dealer/team.js
  30. 17
      api/dealer/withdraw.js
  31. 11
      api/express.js
  32. 49
      api/goods/index.js
  33. 11
      api/goods/service.js
  34. 17
      api/groupon/checkout.js
  35. 23
      api/groupon/goods.js
  36. 11
      api/groupon/setting.js
  37. 23
      api/groupon/task.js
  38. 11
      api/help.js
  39. 11
      api/live/room.js
  40. 41
      api/login/index.js
  41. 22
      api/myCoupon.js
  42. 48
      api/order.js
  43. 17
      api/order/comment.js
  44. 13
      api/page.js
  45. 11
      api/points/log.js
  46. 27
      api/recharge.js
  47. 11
      api/recharge/order.js
  48. 35
      api/refund.js
  49. 17
      api/region.js
  50. 11
      api/setting.js
  51. 17
      api/sharp/checkout.js
  52. 23
      api/sharp/goods.js
  53. 11
      api/sharp/home.js
  54. 17
      api/shop.js
  55. 17
      api/shop/order.js
  56. 13
      api/store.js
  57. 18
      api/upload.js
  58. 34
      api/user.js
  59. 11
      api/user/coupon.js
  60. 25
      api/wxofficial.js
  61. 43
      app.scss
  62. 7
      common/constant/index.js
  63. 1
      common/data/region.js
  64. 13
      common/enum/Client.js
  65. 10
      common/enum/coupon/ApplyRange.js
  66. 10
      common/enum/coupon/CouponType.js
  67. 10
      common/enum/coupon/ExpireType.js
  68. 5
      common/enum/coupon/index.js
  69. 11
      common/enum/dealer/apply/ApplyStatus.js
  70. 10
      common/enum/dealer/apply/ApplyType.js
  71. 4
      common/enum/dealer/apply/index.js
  72. 12
      common/enum/dealer/withdraw/ApplyStatus.js
  73. 11
      common/enum/dealer/withdraw/PayType.js
  74. 4
      common/enum/dealer/withdraw/index.js
  75. 85
      common/enum/enum.js
  76. 10
      common/enum/goods/GoodsType.js
  77. 10
      common/enum/goods/SpecType.js
  78. 4
      common/enum/goods/index.js
  79. 11
      common/enum/groupon/ActiveStatus.js
  80. 11
      common/enum/groupon/ActiveType.js
  81. 10
      common/enum/groupon/GoodsStatus.js
  82. 11
      common/enum/groupon/TaskStatus.js
  83. 6
      common/enum/groupon/index.js
  84. 15
      common/enum/live/LiveStatus.js
  85. 3
      common/enum/live/index.js
  86. 10
      common/enum/order/DeliveryStatus.js
  87. 11
      common/enum/order/DeliveryType.js
  88. 11
      common/enum/order/OrderSource.js
  89. 12
      common/enum/order/OrderStatus.js
  90. 10
      common/enum/order/OrderType.js
  91. 10
      common/enum/order/PayStatus.js
  92. 10
      common/enum/order/ReceiptStatus.js
  93. 11
      common/enum/order/delivery/DeliveryMethod.js
  94. 3
      common/enum/order/delivery/index.js
  95. 17
      common/enum/order/index.js
  96. 11
      common/enum/order/refund/AuditStatus.js
  97. 12
      common/enum/order/refund/RefundStatus.js
  98. 10
      common/enum/order/refund/RefundType.js
  99. 9
      common/enum/order/refund/index.js
  100. 11
      common/enum/payment/Method.js
  101. Some files were not shown because too many files have changed in this diff Show More

2
.gitignore vendored

@ -0,0 +1,2 @@
/unpackage
/utils/request-1.js

@ -0,0 +1,28 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "remote"
},
"default" :
{
"launchtype" : "remote"
},
"h5" :
{
"launchtype" : "remote"
},
"mp-alipay" :
{
"launchtype" : "remote"
},
"mp-weixin" :
{
"launchtype" : "remote"
},
"type" : "uniCloud"
}
]
}

@ -0,0 +1,13 @@
{
"hash": "4ae7f80a",
"browserHash": "741dc287",
"optimized": {
"weixin-js-sdk": {
"src": "../../node_modules/weixin-js-sdk/index.js",
"file": "weixin-js-sdk.js",
"fileHash": "8d88497e",
"needsInterop": true
}
},
"chunks": {}
}

@ -0,0 +1 @@
{"type":"module"}

@ -0,0 +1,766 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// ../../../../www/@hbuilder/yoshop2-pro/node_modules/weixin-js-sdk/index.js
var require_weixin_js_sdk = __commonJS({
"../../../../www/@hbuilder/yoshop2-pro/node_modules/weixin-js-sdk/index.js"(exports, module) {
!function(e, n) {
module.exports = n(e);
}(window, function(o, e) {
if (!o.jWeixin) {
var n, c = {
config: "preVerifyJSAPI",
onMenuShareTimeline: "menu:share:timeline",
onMenuShareAppMessage: "menu:share:appmessage",
onMenuShareQQ: "menu:share:qq",
onMenuShareWeibo: "menu:share:weiboApp",
onMenuShareQZone: "menu:share:QZone",
previewImage: "imagePreview",
getLocation: "geoLocation",
openProductSpecificView: "openProductViewWithPid",
addCard: "batchAddCard",
openCard: "batchViewCard",
chooseWXPay: "getBrandWCPayRequest",
openEnterpriseRedPacket: "getRecevieBizHongBaoRequest",
startSearchBeacons: "startMonitoringBeacons",
stopSearchBeacons: "stopMonitoringBeacons",
onSearchBeacons: "onBeaconsInRange",
consumeAndShareCard: "consumedShareCard",
openAddress: "editAddress"
}, a = function() {
var e2 = {};
for (var n2 in c)
e2[c[n2]] = n2;
return e2;
}(), i = o.document, t = i.title, r = navigator.userAgent.toLowerCase(), s = navigator.platform.toLowerCase(), d = !(!s.match("mac") && !s.match("win")), u = -1 != r.indexOf("wxdebugger"), l = -1 != r.indexOf("micromessenger"), p = -1 != r.indexOf("android"), f = -1 != r.indexOf("iphone") || -1 != r.indexOf("ipad"), m = (n = r.match(/micromessenger\/(\d+\.\d+\.\d+)/) || r.match(/micromessenger\/(\d+\.\d+)/)) ? n[1] : "", g = {
initStartTime: L(),
initEndTime: 0,
preVerifyStartTime: 0,
preVerifyEndTime: 0
}, h = {
version: 1,
appId: "",
initTime: 0,
preVerifyTime: 0,
networkType: "",
isPreVerifyOk: 1,
systemType: f ? 1 : p ? 2 : -1,
clientVersion: m,
url: encodeURIComponent(location.href)
}, v = {}, S = { _completes: [] }, y = { state: 0, data: {} };
O(function() {
g.initEndTime = L();
});
var I = false, _ = [], w = {
config: function(e2) {
B("config", v = e2);
var t2 = false !== v.check;
O(function() {
if (t2)
M(
c.config,
{
verifyJsApiList: C(v.jsApiList),
verifyOpenTagList: C(v.openTagList)
},
function() {
S._complete = function(e4) {
g.preVerifyEndTime = L(), y.state = 1, y.data = e4;
}, S.success = function(e4) {
h.isPreVerifyOk = 0;
}, S.fail = function(e4) {
S._fail ? S._fail(e4) : y.state = -1;
};
var t3 = S._completes;
return t3.push(function() {
!function() {
if (!(d || u || v.debug || m < "6.0.2" || h.systemType < 0)) {
var i3 = new Image();
h.appId = v.appId, h.initTime = g.initEndTime - g.initStartTime, h.preVerifyTime = g.preVerifyEndTime - g.preVerifyStartTime, w.getNetworkType({
isInnerInvoke: true,
success: function(e4) {
h.networkType = e4.networkType;
var n3 = "https://open.weixin.qq.com/sdk/report?v=" + h.version + "&o=" + h.isPreVerifyOk + "&s=" + h.systemType + "&c=" + h.clientVersion + "&a=" + h.appId + "&n=" + h.networkType + "&i=" + h.initTime + "&p=" + h.preVerifyTime + "&u=" + h.url;
i3.src = n3;
}
});
}
}();
}), S.complete = function(e4) {
for (var n3 = 0, i3 = t3.length; n3 < i3; ++n3)
t3[n3]();
S._completes = [];
}, S;
}()
), g.preVerifyStartTime = L();
else {
y.state = 1;
for (var e3 = S._completes, n2 = 0, i2 = e3.length; n2 < i2; ++n2)
e3[n2]();
S._completes = [];
}
}), w.invoke || (w.invoke = function(e3, n2, i2) {
o.WeixinJSBridge && WeixinJSBridge.invoke(e3, x(n2), i2);
}, w.on = function(e3, n2) {
o.WeixinJSBridge && WeixinJSBridge.on(e3, n2);
});
},
ready: function(e2) {
0 != y.state ? e2() : (S._completes.push(e2), !l && v.debug && e2());
},
error: function(e2) {
m < "6.0.2" || (-1 == y.state ? e2(y.data) : S._fail = e2);
},
checkJsApi: function(e2) {
M(
"checkJsApi",
{ jsApiList: C(e2.jsApiList) },
(e2._complete = function(e3) {
if (p) {
var n2 = e3.checkResult;
n2 && (e3.checkResult = JSON.parse(n2));
}
e3 = function(e4) {
var n3 = e4.checkResult;
for (var i2 in n3) {
var t2 = a[i2];
t2 && (n3[t2] = n3[i2], delete n3[i2]);
}
return e4;
}(e3);
}, e2)
);
},
onMenuShareTimeline: function(e2) {
P(
c.onMenuShareTimeline,
{
complete: function() {
M(
"shareTimeline",
{
title: e2.title || t,
desc: e2.title || t,
img_url: e2.imgUrl || "",
link: e2.link || location.href,
type: e2.type || "link",
data_url: e2.dataUrl || ""
},
e2
);
}
},
e2
);
},
onMenuShareAppMessage: function(n2) {
P(
c.onMenuShareAppMessage,
{
complete: function(e2) {
"favorite" === e2.scene ? M("sendAppMessage", {
title: n2.title || t,
desc: n2.desc || "",
link: n2.link || location.href,
img_url: n2.imgUrl || "",
type: n2.type || "link",
data_url: n2.dataUrl || ""
}) : M(
"sendAppMessage",
{
title: n2.title || t,
desc: n2.desc || "",
link: n2.link || location.href,
img_url: n2.imgUrl || "",
type: n2.type || "link",
data_url: n2.dataUrl || ""
},
n2
);
}
},
n2
);
},
onMenuShareQQ: function(e2) {
P(
c.onMenuShareQQ,
{
complete: function() {
M(
"shareQQ",
{
title: e2.title || t,
desc: e2.desc || "",
img_url: e2.imgUrl || "",
link: e2.link || location.href
},
e2
);
}
},
e2
);
},
onMenuShareWeibo: function(e2) {
P(
c.onMenuShareWeibo,
{
complete: function() {
M(
"shareWeiboApp",
{
title: e2.title || t,
desc: e2.desc || "",
img_url: e2.imgUrl || "",
link: e2.link || location.href
},
e2
);
}
},
e2
);
},
onMenuShareQZone: function(e2) {
P(
c.onMenuShareQZone,
{
complete: function() {
M(
"shareQZone",
{
title: e2.title || t,
desc: e2.desc || "",
img_url: e2.imgUrl || "",
link: e2.link || location.href
},
e2
);
}
},
e2
);
},
updateTimelineShareData: function(e2) {
M(
"updateTimelineShareData",
{ title: e2.title, link: e2.link, imgUrl: e2.imgUrl },
e2
);
},
updateAppMessageShareData: function(e2) {
M(
"updateAppMessageShareData",
{ title: e2.title, desc: e2.desc, link: e2.link, imgUrl: e2.imgUrl },
e2
);
},
startRecord: function(e2) {
M("startRecord", {}, e2);
},
stopRecord: function(e2) {
M("stopRecord", {}, e2);
},
onVoiceRecordEnd: function(e2) {
P("onVoiceRecordEnd", e2);
},
playVoice: function(e2) {
M("playVoice", { localId: e2.localId }, e2);
},
pauseVoice: function(e2) {
M("pauseVoice", { localId: e2.localId }, e2);
},
stopVoice: function(e2) {
M("stopVoice", { localId: e2.localId }, e2);
},
onVoicePlayEnd: function(e2) {
P("onVoicePlayEnd", e2);
},
uploadVoice: function(e2) {
M(
"uploadVoice",
{
localId: e2.localId,
isShowProgressTips: 0 == e2.isShowProgressTips ? 0 : 1
},
e2
);
},
downloadVoice: function(e2) {
M(
"downloadVoice",
{
serverId: e2.serverId,
isShowProgressTips: 0 == e2.isShowProgressTips ? 0 : 1
},
e2
);
},
translateVoice: function(e2) {
M(
"translateVoice",
{
localId: e2.localId,
isShowProgressTips: 0 == e2.isShowProgressTips ? 0 : 1
},
e2
);
},
chooseImage: function(e2) {
M(
"chooseImage",
{
scene: "1|2",
count: e2.count || 9,
sizeType: e2.sizeType || ["original", "compressed"],
sourceType: e2.sourceType || ["album", "camera"]
},
(e2._complete = function(e3) {
if (p) {
var n2 = e3.localIds;
try {
n2 && (e3.localIds = JSON.parse(n2));
} catch (e4) {
}
}
}, e2)
);
},
getLocation: function(e2) {
},
previewImage: function(e2) {
M(c.previewImage, { current: e2.current, urls: e2.urls }, e2);
},
uploadImage: function(e2) {
M(
"uploadImage",
{
localId: e2.localId,
isShowProgressTips: 0 == e2.isShowProgressTips ? 0 : 1
},
e2
);
},
downloadImage: function(e2) {
M(
"downloadImage",
{
serverId: e2.serverId,
isShowProgressTips: 0 == e2.isShowProgressTips ? 0 : 1
},
e2
);
},
getLocalImgData: function(e2) {
false === I ? (I = true, M(
"getLocalImgData",
{ localId: e2.localId },
(e2._complete = function(e3) {
if (I = false, 0 < _.length) {
var n2 = _.shift();
wx.getLocalImgData(n2);
}
}, e2)
)) : _.push(e2);
},
getNetworkType: function(e2) {
M(
"getNetworkType",
{},
(e2._complete = function(e3) {
e3 = function(e4) {
var n2 = e4.errMsg;
e4.errMsg = "getNetworkType:ok";
var i2 = e4.subtype;
if (delete e4.subtype, i2)
e4.networkType = i2;
else {
var t2 = n2.indexOf(":"), o2 = n2.substring(t2 + 1);
switch (o2) {
case "wifi":
case "edge":
case "wwan":
e4.networkType = o2;
break;
default:
e4.errMsg = "getNetworkType:fail";
}
}
return e4;
}(e3);
}, e2)
);
},
openLocation: function(e2) {
M(
"openLocation",
{
latitude: e2.latitude,
longitude: e2.longitude,
name: e2.name || "",
address: e2.address || "",
scale: e2.scale || 28,
infoUrl: e2.infoUrl || ""
},
e2
);
},
getLocation: function(e2) {
M(
c.getLocation,
{ type: (e2 = e2 || {}).type || "wgs84" },
(e2._complete = function(e3) {
delete e3.type;
}, e2)
);
},
hideOptionMenu: function(e2) {
M("hideOptionMenu", {}, e2);
},
showOptionMenu: function(e2) {
M("showOptionMenu", {}, e2);
},
closeWindow: function(e2) {
M("closeWindow", {}, e2 = e2 || {});
},
hideMenuItems: function(e2) {
M("hideMenuItems", { menuList: e2.menuList }, e2);
},
showMenuItems: function(e2) {
M("showMenuItems", { menuList: e2.menuList }, e2);
},
hideAllNonBaseMenuItem: function(e2) {
M("hideAllNonBaseMenuItem", {}, e2);
},
showAllNonBaseMenuItem: function(e2) {
M("showAllNonBaseMenuItem", {}, e2);
},
scanQRCode: function(e2) {
M(
"scanQRCode",
{
needResult: (e2 = e2 || {}).needResult || 0,
scanType: e2.scanType || ["qrCode", "barCode"]
},
(e2._complete = function(e3) {
if (f) {
var n2 = e3.resultStr;
if (n2) {
var i2 = JSON.parse(n2);
e3.resultStr = i2 && i2.scan_code && i2.scan_code.scan_result;
}
}
}, e2)
);
},
openAddress: function(e2) {
M(
c.openAddress,
{},
(e2._complete = function(e3) {
e3 = function(e4) {
return e4.postalCode = e4.addressPostalCode, delete e4.addressPostalCode, e4.provinceName = e4.proviceFirstStageName, delete e4.proviceFirstStageName, e4.cityName = e4.addressCitySecondStageName, delete e4.addressCitySecondStageName, e4.countryName = e4.addressCountiesThirdStageName, delete e4.addressCountiesThirdStageName, e4.detailInfo = e4.addressDetailInfo, delete e4.addressDetailInfo, e4;
}(e3);
}, e2)
);
},
openProductSpecificView: function(e2) {
M(
c.openProductSpecificView,
{
pid: e2.productId,
view_type: e2.viewType || 0,
ext_info: e2.extInfo
},
e2
);
},
addCard: function(e2) {
for (var n2 = e2.cardList, i2 = [], t2 = 0, o2 = n2.length; t2 < o2; ++t2) {
var r2 = n2[t2], a2 = { card_id: r2.cardId, card_ext: r2.cardExt };
i2.push(a2);
}
M(
c.addCard,
{ card_list: i2 },
(e2._complete = function(e3) {
var n3 = e3.card_list;
if (n3) {
for (var i3 = 0, t3 = (n3 = JSON.parse(n3)).length; i3 < t3; ++i3) {
var o3 = n3[i3];
o3.cardId = o3.card_id, o3.cardExt = o3.card_ext, o3.isSuccess = !!o3.is_succ, delete o3.card_id, delete o3.card_ext, delete o3.is_succ;
}
e3.cardList = n3, delete e3.card_list;
}
}, e2)
);
},
chooseCard: function(e2) {
M(
"chooseCard",
{
app_id: v.appId,
location_id: e2.shopId || "",
sign_type: e2.signType || "SHA1",
card_id: e2.cardId || "",
card_type: e2.cardType || "",
card_sign: e2.cardSign,
time_stamp: e2.timestamp + "",
nonce_str: e2.nonceStr
},
(e2._complete = function(e3) {
e3.cardList = e3.choose_card_info, delete e3.choose_card_info;
}, e2)
);
},
openCard: function(e2) {
for (var n2 = e2.cardList, i2 = [], t2 = 0, o2 = n2.length; t2 < o2; ++t2) {
var r2 = n2[t2], a2 = { card_id: r2.cardId, code: r2.code };
i2.push(a2);
}
M(c.openCard, { card_list: i2 }, e2);
},
consumeAndShareCard: function(e2) {
M(
c.consumeAndShareCard,
{ consumedCardId: e2.cardId, consumedCode: e2.code },
e2
);
},
chooseWXPay: function(e2) {
M(c.chooseWXPay, V(e2), e2);
},
openEnterpriseRedPacket: function(e2) {
M(c.openEnterpriseRedPacket, V(e2), e2);
},
startSearchBeacons: function(e2) {
M(c.startSearchBeacons, { ticket: e2.ticket }, e2);
},
stopSearchBeacons: function(e2) {
M(c.stopSearchBeacons, {}, e2);
},
onSearchBeacons: function(e2) {
P(c.onSearchBeacons, e2);
},
openEnterpriseChat: function(e2) {
M(
"openEnterpriseChat",
{ useridlist: e2.userIds, chatname: e2.groupName },
e2
);
},
launchMiniProgram: function(e2) {
M(
"launchMiniProgram",
{
targetAppId: e2.targetAppId,
path: function(e3) {
if ("string" == typeof e3 && 0 < e3.length) {
var n2 = e3.split("?")[0], i2 = e3.split("?")[1];
return n2 += ".html", void 0 !== i2 ? n2 + "?" + i2 : n2;
}
}(e2.path),
envVersion: e2.envVersion
},
e2
);
},
openBusinessView: function(e2) {
M(
"openBusinessView",
{
businessType: e2.businessType,
queryString: e2.queryString || "",
envVersion: e2.envVersion
},
(e2._complete = function(n2) {
if (p) {
var e3 = n2.extraData;
if (e3)
try {
n2.extraData = JSON.parse(e3);
} catch (e4) {
n2.extraData = {};
}
}
}, e2)
);
},
miniProgram: {
navigateBack: function(e2) {
e2 = e2 || {}, O(function() {
M(
"invokeMiniProgramAPI",
{ name: "navigateBack", arg: { delta: e2.delta || 1 } },
e2
);
});
},
navigateTo: function(e2) {
O(function() {
M(
"invokeMiniProgramAPI",
{ name: "navigateTo", arg: { url: e2.url } },
e2
);
});
},
redirectTo: function(e2) {
O(function() {
M(
"invokeMiniProgramAPI",
{ name: "redirectTo", arg: { url: e2.url } },
e2
);
});
},
switchTab: function(e2) {
O(function() {
M(
"invokeMiniProgramAPI",
{ name: "switchTab", arg: { url: e2.url } },
e2
);
});
},
reLaunch: function(e2) {
O(function() {
M(
"invokeMiniProgramAPI",
{ name: "reLaunch", arg: { url: e2.url } },
e2
);
});
},
postMessage: function(e2) {
O(function() {
M(
"invokeMiniProgramAPI",
{ name: "postMessage", arg: e2.data || {} },
e2
);
});
},
getEnv: function(e2) {
O(function() {
e2({ miniprogram: "miniprogram" === o.__wxjs_environment });
});
}
}
}, T = 1, k = {};
return i.addEventListener(
"error",
function(e2) {
if (!p) {
var n2 = e2.target, i2 = n2.tagName, t2 = n2.src;
if ("IMG" == i2 || "VIDEO" == i2 || "AUDIO" == i2 || "SOURCE" == i2) {
if (-1 != t2.indexOf("wxlocalresource://")) {
e2.preventDefault(), e2.stopPropagation();
var o2 = n2["wx-id"];
if (o2 || (o2 = T++, n2["wx-id"] = o2), k[o2])
return;
k[o2] = true, wx.ready(function() {
wx.getLocalImgData({
localId: t2,
success: function(e3) {
n2.src = e3.localData;
}
});
});
}
}
}
},
true
), i.addEventListener(
"load",
function(e2) {
if (!p) {
var n2 = e2.target, i2 = n2.tagName;
n2.src;
if ("IMG" == i2 || "VIDEO" == i2 || "AUDIO" == i2 || "SOURCE" == i2) {
var t2 = n2["wx-id"];
t2 && (k[t2] = false);
}
}
},
true
), e && (o.wx = o.jWeixin = w), w;
}
function M(n2, e2, i2) {
o.WeixinJSBridge ? WeixinJSBridge.invoke(n2, x(e2), function(e3) {
A(n2, e3, i2);
}) : B(n2, i2);
}
function P(n2, i2, t2) {
o.WeixinJSBridge ? WeixinJSBridge.on(n2, function(e2) {
t2 && t2.trigger && t2.trigger(e2), A(n2, e2, i2);
}) : B(n2, t2 || i2);
}
function x(e2) {
return (e2 = e2 || {}).appId = v.appId, e2.verifyAppId = v.appId, e2.verifySignType = "sha1", e2.verifyTimestamp = v.timestamp + "", e2.verifyNonceStr = v.nonceStr, e2.verifySignature = v.signature, e2;
}
function V(e2) {
return {
timeStamp: e2.timestamp + "",
nonceStr: e2.nonceStr,
package: e2.package,
paySign: e2.paySign,
signType: e2.signType || "SHA1"
};
}
function A(e2, n2, i2) {
"openEnterpriseChat" != e2 && "openBusinessView" !== e2 || (n2.errCode = n2.err_code), delete n2.err_code, delete n2.err_desc, delete n2.err_detail;
var t2 = n2.errMsg;
t2 || (t2 = n2.err_msg, delete n2.err_msg, t2 = function(e3, n3) {
var i3 = e3, t3 = a[i3];
t3 && (i3 = t3);
var o3 = "ok";
if (n3) {
var r2 = n3.indexOf(":");
"confirm" == (o3 = n3.substring(r2 + 1)) && (o3 = "ok"), "failed" == o3 && (o3 = "fail"), -1 != o3.indexOf("failed_") && (o3 = o3.substring(7)), -1 != o3.indexOf("fail_") && (o3 = o3.substring(5)), "access denied" != (o3 = (o3 = o3.replace(/_/g, " ")).toLowerCase()) && "no permission to execute" != o3 || (o3 = "permission denied"), "config" == i3 && "function not exist" == o3 && (o3 = "ok"), "" == o3 && (o3 = "fail");
}
return n3 = i3 + ":" + o3;
}(e2, t2), n2.errMsg = t2), (i2 = i2 || {})._complete && (i2._complete(n2), delete i2._complete), t2 = n2.errMsg || "", v.debug && !i2.isInnerInvoke && alert(JSON.stringify(n2));
var o2 = t2.indexOf(":");
switch (t2.substring(o2 + 1)) {
case "ok":
i2.success && i2.success(n2);
break;
case "cancel":
i2.cancel && i2.cancel(n2);
break;
default:
i2.fail && i2.fail(n2);
}
i2.complete && i2.complete(n2);
}
function C(e2) {
if (e2) {
for (var n2 = 0, i2 = e2.length; n2 < i2; ++n2) {
var t2 = e2[n2], o2 = c[t2];
o2 && (e2[n2] = o2);
}
return e2;
}
}
function B(e2, n2) {
if (!(!v.debug || n2 && n2.isInnerInvoke)) {
var i2 = a[e2];
i2 && (e2 = i2), n2 && n2._complete && delete n2._complete, console.log('"' + e2 + '",', n2 || "");
}
}
function L() {
return new Date().getTime();
}
function O(e2) {
l && (o.WeixinJSBridge ? e2() : i.addEventListener && i.addEventListener("WeixinJSBridgeReady", e2, false));
}
});
}
});
export default require_weixin_js_sdk();
//# sourceMappingURL=weixin-js-sdk.js.map

File diff suppressed because one or more lines are too long

@ -0,0 +1,91 @@
<script>
import store from '@/store'
import StoreModel from '@/common/model/Store'
import { getSceneData } from './core/app'
import { isObject } from './utils/util'
export default {
/**
* 全局变量
*/
globalData: {},
/**
* 初始化完成时触发
*/
onLaunch({ path, query, scene }) {
// #ifdef MP
//
this.updateManager()
// #endif
// app
this.onStartupQuery(isObject(query) ? query : {})
//
this.getStoreInfo()
},
methods: {
// app
onStartupQuery(query) {
//
const scene = getSceneData(query)
// ID
const refereeId = query.refereeId ? query.refereeId : scene.uid
refereeId > 0 && (this.setRefereeId(refereeId))
},
// ID
setRefereeId(refereeId) {
store.dispatch('setRefereeId', refereeId)
},
//
getStoreInfo() {
StoreModel.data(false)
},
//
updateManager() {
const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(res => {
//
// console.log(res.hasUpdate)
})
updateManager.onUpdateReady(() => {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,即将重启应用',
showCancel: false,
success(res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(() => {
//
uni.showModal({
title: '更新提示',
content: '新版本下载失败',
showCancel: false
})
})
}
}
}
</script>
<style lang="scss">
/* uView库样式 */
@import "./uni_modules/vk-uview-ui/index.scss";
/* 项目基础样式 */
@import "./app.scss";
/* iconfont图标库 */
@import "./utils/iconfont.scss";
</style>

@ -0,0 +1,14 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"static/protocol.html\">《服务协议》</a>和<a href=\"static/privacy.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"static/protocol.html\">《服务协议》</a>和<a href=\"static/privacy.html\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
}
}

@ -0,0 +1,53 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'address/list',
defaultId: 'address/defaultId',
detail: 'address/detail',
add: 'address/add',
edit: 'address/edit',
setDefault: 'address/setDefault',
remove: 'address/remove',
analysis: 'address/analysis'
}
// 收货地址列表
export const list = (param) => {
return request.get(api.list, param)
}
// 默认收货地址ID
export const defaultId = (param) => {
return request.get(api.defaultId, param)
}
// 收货地址详情
export const detail = (addressId) => {
return request.get(api.detail, { addressId })
}
// 新增收货地址
export const add = (data) => {
return request.post(api.add, { form: data })
}
// 编辑收货地址
export const edit = (addressId, data) => {
return request.post(api.edit, { addressId, form: data })
}
// 设置默认收货地址
export const setDefault = (addressId) => {
return request.post(api.setDefault, { addressId })
}
// 删除收货地址
export const remove = (addressId) => {
return request.post(api.remove, { addressId })
}
// 收货地址智能解析
export const analysis = (content) => {
return request.get(api.analysis, { content })
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'article.category/list'
}
// 页面数据
export function list() {
return request.get(api.list)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'article/list',
detail: 'article/detail'
}
// 文章列表
export function list(param, option) {
return request.get(api.list, param, option)
}
// 文章详情
export function detail(articleId) {
return request.get(api.detail, { articleId })
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'balance.log/list'
}
// 余额账单明细列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'balance.log/list'
}
// 余额账单明细
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,23 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'bargain.active/list',
detail: 'bargain.active/detail',
poster: 'bargain.active/poster'
}
// 砍价活动会场列表
export const list = (param) => {
return request.get(api.list, param)
}
// 砍价活动详情
export const detail = (activeId, param) => {
return request.get(api.detail, { activeId, ...param })
}
// 生成商品海报
export const poster = param => {
return request.get(api.poster, param)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
order: 'bargain.checkout/order',
submit: 'bargain.checkout/submit'
}
// 结算台订单信息
export const order = (mode, param) => {
return request.get(api.order, { mode, ...param })
}
// 结算台订单提交
export const submit = (mode, data) => {
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
}

@ -0,0 +1,35 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'bargain.task/list',
partake: 'bargain.task/partake',
detail: 'bargain.task/detail',
helpList: 'bargain.task/helpList',
helpCut: 'bargain.task/helpCut'
}
// 我的砍价列表
export const list = (param) => {
return request.get(api.list, param)
}
// 创建砍价任务
export const partake = (data) => {
return request.post(api.partake, data)
}
// 获取砍价任务详情
export const detail = (taskId, param) => {
return request.get(api.detail, { taskId, ...param })
}
// 获取砍价任务好友助力榜
export const helpList = (taskId, param) => {
return request.get(api.helpList, { taskId, ...param })
}
// 帮砍一刀
export const helpCut = (taskId, data) => {
return request.post(api.helpCut, { taskId, ...data })
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
image: 'captcha/image',
sendSmsCaptcha: 'captcha/sendSmsCaptcha'
}
// 图形验证码
export function image() {
return request.get(api.image, {}, { load: false })
}
// 发送短信验证码
export function sendSmsCaptcha(data) {
return request.post(api.sendSmsCaptcha, data, { load: false })
}

@ -0,0 +1,35 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'cart/list',
total: 'cart/total',
add: 'cart/add',
update: 'cart/update',
clear: 'cart/clear'
}
// 购物车列表
export const list = () => {
return request.get(api.list, {}, { load: false })
}
// 购物车商品总数量
export const total = () => {
return request.get(api.total, {}, { load: false })
}
// 加入购物车
export const add = (goodsId, goodsSkuId, goodsNum) => {
return request.post(api.add, { goodsId, goodsSkuId, goodsNum })
}
// 更新购物车商品数量
export const update = (goodsId, goodsSkuId, goodsNum) => {
return request.post(api.update, { goodsId, goodsSkuId, goodsNum }, { isPrompt: false })
}
// 删除购物车中指定记录
export const clear = (cartIds = []) => {
return request.post(api.clear, { cartIds })
}

@ -0,0 +1,35 @@
import request from '@/utils/request'
// api地址
const api = {
orderInfo: 'cashier/orderInfo',
orderPay: 'cashier/orderPay',
tradeQuery: 'cashier/tradeQuery',
}
/**
* 获取支付订单的信息
* @param {Number} orderId
* @param {Object} param
*/
export function orderInfo(orderId, param) {
return request.get(api.orderInfo, { orderId, ...param })
}
/**
* 确认支付
* @param {Number} orderId
* @param {Object} data
*/
export function orderPay(orderId, data) {
return request.post(api.orderPay, { orderId, ...data })
}
/**
* 交易查询
* 查询第三方支付订单是否付款成功
* @param {Object} param
*/
export function tradeQuery(param) {
return request.get(api.tradeQuery, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'category/list'
}
// 页面数据
export function list() {
return request.get(api.list)
}

@ -0,0 +1,19 @@
import request from '@/utils/request'
// api地址
const api = {
order: 'checkout/order',
submit: 'checkout/submit',
}
// mode: 结算模式 (buyNow立即购买 cart购物车)
// 结算台订单信息
export const order = (mode, param) => {
return request.get(api.order, { mode, ...param })
}
// 结算台订单提交
export const submit = (mode, data) => {
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
}

@ -0,0 +1,23 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'comment/list',
listRows: 'comment/listRows',
total: 'comment/total'
}
// 商品评价列表
export const list = (goodsId, param, option) => {
return request.get(api.list, { ...param, goodsId }, option)
}
// 商品评价列表 (限制数量, 用于商品详情页展示)
export const listRows = (goodsId, limit = 5) => {
return request.get(api.listRows, { goodsId, limit })
}
// 商品评分总数
export const total = (goodsId) => {
return request.get(api.total, { goodsId })
}

@ -0,0 +1,16 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'coupon/list'
}
// 优惠券列表
export const list = (param, option) => {
const options = {
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
load: true, //(默认 true 说明:本接口是否提示加载动画)
...option
}
return request.get(api.list, param, options)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
status: 'dealer.apply/status',
submit: 'dealer.apply/submit'
}
// 分销商申请状态
export const status = (param) => {
return request.get(api.status, param)
}
// 提交分销商申请
export const submit = (data) => {
return request.post(api.submit, data)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
user: 'dealer/user',
center: 'dealer/center'
}
// 分销商用户详情
export const user = (param) => {
return request.get(api.user, param)
}
// 分销商提现明细
export const center = (param) => {
return request.get(api.center, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'dealer.order/list'
}
// 分销商订单列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
qrcode: 'dealer.poster/qrcode'
}
// 获取推广二维码
export const qrcode = (param) => {
return request.get(api.qrcode, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
data: 'dealer.setting/data'
}
// 获取分销设置 (全部)
export const data = () => {
return request.get(api.data)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'dealer.team/list'
}
// 我的团队列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'dealer.withdraw/list',
submit: 'dealer.withdraw/submit'
}
// 分销商提现明细
export const list = (param) => {
return request.get(api.list, param)
}
// 提交提现申请
export const submit = (data) => {
return request.post(api.submit, data)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'express/list'
}
// 物流公司列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,49 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'goods/list',
detail: 'goods/detail',
basic: 'goods/basic',
specData: 'goods/specData',
skuInfo: 'goods/skuInfo',
recommended: 'goods/recommended',
poster: 'goods/poster'
}
// 商品列表
export const list = (param, option) => {
return request.get(api.list, param, option)
}
// 商品详情(详细数据)
export const detail = (goodsId, verifyStatus = true, param = {}) => {
verifyStatus = Number(verifyStatus)
return request.get(api.detail, { goodsId, verifyStatus, ...param })
}
// 商品详情(基本数据)
export const basic = (goodsId, verifyStatus = true, param = {}) => {
verifyStatus = Number(verifyStatus)
return request.get(api.basic, { goodsId, verifyStatus, ...param })
}
// 获取商品规格数据
export const specData = (goodsId) => {
return request.get(api.specData, { goodsId })
}
// 获取推荐的商品列表
export const recommended = () => {
return request.get(api.recommended)
}
// 获取商品的指定SKU信息
export const skuInfo = (goodsId, goodsSkuId, param) => {
return request.get(api.skuInfo, { goodsId, goodsSkuId, ...param })
}
// 生成商品海报
export const poster = param => {
return request.get(api.poster, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'goods.service/list'
}
// 商品评价列表
export function list(goodsId) {
return request.get(api.list, { goodsId })
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
order: 'groupon.checkout/order',
submit: 'groupon.checkout/submit'
}
// 结算台订单信息
export const order = (mode, param) => {
return request.get(api.order, { mode, ...param })
}
// 结算台订单提交
export const submit = (mode, data) => {
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
}

@ -0,0 +1,23 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'groupon.goods/list',
detail: 'groupon.goods/detail',
poster: 'groupon.goods/poster'
}
// 拼团商品列表
export const list = (param) => {
return request.get(api.list, param)
}
// 拼团商品详情
export const detail = (grouponGoodsId, param) => {
return request.get(api.detail, { grouponGoodsId, ...param })
}
// 生成商品海报
export const poster = param => {
return request.get(api.poster, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
data: 'groupon.setting/data'
}
// 获取拼团设置
export const data = () => {
return request.get(api.data)
}

@ -0,0 +1,23 @@
import request from '@/utils/request'
// api地址
const api = {
myList: 'groupon.task/myList',
listByGoods: 'groupon.task/listByGoods',
detail: 'groupon.task/detail'
}
// 我的拼团列表
export const myList = param => {
return request.get(api.myList, param)
}
// 获取拼单任务详情
export const detail = (taskId, param) => {
return request.get(api.detail, { taskId, ...param })
}
// 我的拼团列表
export const listByGoods = (grouponGoodsId, param) => {
return request.get(api.listByGoods, { grouponGoodsId, ...param })
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'help/list'
}
// 帮助中心列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'live.room/list'
}
// 获取直播间列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,41 @@
import request from '@/utils/request'
// api地址
const api = {
login: 'passport/login',
loginMpWx: 'passport/loginMpWx',
loginWxOfficial: 'passport/loginWxOfficial',
loginMpWxMobile: 'passport/loginMpWxMobile',
loginMpAlipay: 'passport/loginMpAlipay',
isPersonalMpweixin: 'passport/isPersonalMpweixin',
}
// 用户登录 (手机号+验证码)
export function login(data) {
return request.post(api.login, data)
}
// 微信小程序快捷登录 (获取微信用户基本信息)
export function loginMpWx(data, option) {
return request.post(api.loginMpWx, data, option)
}
// 是否需要填写昵称头像 (微信小程序端)
export function isPersonalMpweixin(data, option) {
return request.post(api.isPersonalMpweixin, data, option)
}
// 微信公众号一键授权登录 (获取微信用户基本信息)
export function loginWxOfficial(data, option) {
return request.post(api.loginWxOfficial, data, option)
}
// 微信小程序快捷登录 (授权手机号)
export function loginMpWxMobile(data, option) {
return request.post(api.loginMpWxMobile, data, option)
}
// 支付宝小程序快捷登录 (获取微信用户基本信息)
export function loginMpAlipay(data, option) {
return request.post(api.loginMpAlipay, data, option)
}

@ -0,0 +1,22 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'myCoupon/list',
receive: 'myCoupon/receive'
}
// 我的优惠券列表
export const list = (param, option) => {
const options = {
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
load: true, //(默认 true 说明:本接口是否提示加载动画)
...option
}
return request.get(api.list, param, options)
}
// 领取优惠券
export const receive = (couponId, data, option) => {
return request.post(api.receive, { couponId, ...data }, option)
}

@ -0,0 +1,48 @@
import request from '@/utils/request'
// api地址
const api = {
todoCounts: 'order/todoCounts',
list: 'order/list',
detail: 'order/detail',
express: 'order/express',
cancel: 'order/cancel',
extractQrcode: 'order/extractQrcode',
receipt: 'order/receipt',
pay: 'order/pay'
}
// 当前用户待处理的订单数量
export function todoCounts(param, option) {
return request.get(api.todoCounts, param, option)
}
// 我的订单列表
export function list(param, option) {
return request.get(api.list, param, option)
}
// 订单详情
export function detail(orderId, param) {
return request.get(api.detail, { orderId, ...param })
}
// 获取物流信息
export function express(orderId, param) {
return request.get(api.express, { orderId, ...param })
}
// 取消订单
export function cancel(orderId, data) {
return request.post(api.cancel, { orderId, ...data })
}
// 确认收货
export function receipt(orderId, data) {
return request.post(api.receipt, { orderId, ...data })
}
// 核销二维码
export function extractQrcode(orderId, param) {
return request.get(api.extractQrcode, { orderId, ...param })
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'order.comment/list',
submit: 'order.comment/submit'
}
// 待评价订单商品列表
export const list = (orderId, param) => {
return request.get(api.list, { orderId, ...param })
}
// 创建商品评价
export const submit = (orderId, data) => {
return request.post(api.submit, { orderId, form: data })
}

@ -0,0 +1,13 @@
import request from '@/utils/request'
// api地址
const apiUri = {
detail: 'page/detail'
}
// 页面数据
export function detail(pageId) {
return request.get(apiUri.detail, {
pageId
})
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'points.log/list'
}
// 积分明细列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,27 @@
import request from '@/utils/request'
// api地址
const api = {
center: 'recharge/center',
submit: 'recharge/submit',
tradeQuery: 'recharge/tradeQuery'
}
// 充值中心页面数据
export const center = (param) => {
return request.get(api.center, param)
}
// 确认充值订单
export const submit = (data) => {
return request.post(api.submit, { form: data })
}
/**
* 交易查询
* 查询第三方支付订单是否付款成功
* @param {Object} param
*/
export function tradeQuery(param) {
return request.get(api.tradeQuery, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'recharge.order/list'
}
// 我的充值记录列表
export const list = (param) => {
return request.get(api.list, param)
}

@ -0,0 +1,35 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'refund/list',
goods: 'refund/goods',
apply: 'refund/apply',
detail: 'refund/detail',
delivery: 'refund/delivery'
}
// 售后单列表
export const list = (param, option) => {
return request.get(api.list, param, option)
}
// 订单商品详情
export const goods = (orderGoodsId, param) => {
return request.get(api.goods, { orderGoodsId, ...param })
}
// 申请售后
export const apply = (orderGoodsId, data) => {
return request.post(api.apply, { orderGoodsId, form: data })
}
// 售后单详情
export const detail = (orderRefundId, param) => {
return request.get(api.detail, { orderRefundId, ...param })
}
// 用户发货
export const delivery = (orderRefundId, data) => {
return request.post(api.delivery, { orderRefundId, form: data })
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
all: 'region/all',
tree: 'region/tree'
}
// 获取所有地区
export const all = (param) => {
return request.get(api.all, param)
}
// 获取所有地区(树状)
export const tree = (param) => {
return request.get(api.tree, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
data: 'setting/data'
}
// 设置项详情
export function data() {
return request.get(api.data)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
order: 'sharp.checkout/order',
submit: 'sharp.checkout/submit'
}
// 结算台订单信息
export const order = (mode, param) => {
return request.get(api.order, { mode, ...param })
}
// 结算台订单提交
export const submit = (mode, data) => {
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
}

@ -0,0 +1,23 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'sharp.goods/list',
detail: 'sharp.goods/detail',
poster: 'sharp.goods/poster'
}
// 秒杀活动商品列表
export const list = (activeTimeId, param, option) => {
return request.get(api.list, { activeTimeId, ...param }, option)
}
// 获取活动商品详情
export const detail = (activeTimeId, sharpGoodsId, param) => {
return request.get(api.detail, { activeTimeId, sharpGoodsId, ...param })
}
// 生成商品海报
export const poster = param => {
return request.get(api.poster, param)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
data: 'sharp.home/data'
}
// 秒杀活动首页
export const data = (param) => {
return request.get(api.data, param)
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'shop/list',
detail: 'shop/detail'
}
// 自提门店列表
export const list = (param) => {
return request.get(api.list, param)
}
// 门店详情
export const detail = (shopId) => {
return request.get(api.detail, { shopId })
}

@ -0,0 +1,17 @@
import request from '@/utils/request'
// api地址
const api = {
detail: 'shop.order/detail',
extract: 'shop.order/extract'
}
// 核销订单详情 [只有店员才能查看]
export function detail(orderId, param) {
return request.get(api.detail, { orderId, ...param })
}
// 确认核销 [已取货]
export function extract(orderId, param) {
return request.post(api.extract, { orderId, ...param })
}

@ -0,0 +1,13 @@
import request from '@/utils/request'
// api地址
const api = {
data: 'store/data'
}
// 获取商城基础信息
const data = () => {
return request.get(api.data)
}
export default { data }

@ -0,0 +1,18 @@
import request from '@/utils/request'
// api地址
const api = {
image: 'upload/image'
}
// 图片上传
export const image = (files, checkLogin = true) => {
// 文件上传大小, 2M
const maxSize = 1024 * 1024 * 2
// 执行上传
return new Promise((resolve, reject) => {
request.urlFileUpload({ name: 'file', files, maxSize, data: { test: 123, checkLogin: Number(checkLogin) } })
.then(result => resolve(result.map(item => item.data.fileInfo.file_id), result))
.catch(reject)
})
}

@ -0,0 +1,34 @@
import request from '@/utils/request'
// api地址
const api = {
userInfo: 'user/info',
assets: 'user/assets',
bindMobile: 'user/bindMobile',
personal: 'user/personal'
}
// 当前登录的用户信息
export const info = (param, option) => {
const options = {
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
load: true, //(默认 true 说明:本接口是否提示加载动画)
...option
}
return request.get(api.userInfo, param, options)
}
// 账户资产
export const assets = (param, option) => {
return request.get(api.assets, param, option)
}
// 绑定手机号
export const bindMobile = (data, option) => {
return request.post(api.bindMobile, data, option)
}
// 修改个人信息(头像昵称)
export const personal = (data, option) => {
return request.post(api.personal, data, option)
}

@ -0,0 +1,11 @@
import request from '@/utils/request'
// api地址
const api = {
receive: 'user.coupon/receive'
}
// 优惠券列表
export const receive = (data) => {
return request.post(api.receive, data)
}

@ -0,0 +1,25 @@
import request from '@/utils/request'
// api地址
const api = {
jssdkConfig: 'wxofficial/jssdkConfig',
oauthUrl: 'wxofficial/oauthUrl',
oauthUserInfo: 'wxofficial/oauthUserInfo'
}
// 获取微信公众号jssdk配置参数
const jssdkConfig = url => {
return request.get(api.jssdkConfig, { url })
}
// 获取授权登录地址
const oauthUrl = callbackUrl => {
return request.get(api.oauthUrl, { callbackUrl })
}
// 获取微信用户信息
const oauthUserInfo = code => {
return request.get(api.oauthUserInfo, { code })
}
export default { jssdkConfig, oauthUrl, oauthUserInfo }

@ -0,0 +1,43 @@
/* utils.scss */
@import "/utils/utils.scss";
page {
background: #fafafa;
}
@keyframes rotate {
0% {
transform: rotate(0deg) scale(1);
}
100% {
transform: rotate(360deg) scale(1);
}
}
/* #ifdef H5*/
uni-page {
box-shadow: 0 1rpx 44rpx rgba(169, 169, 169, .3);
}
.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom,
.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom .uni-tabbar,
.uni-app--showlayout+uni-tabbar.uni-tabbar-top,
.uni-app--showlayout+uni-tabbar.uni-tabbar-top .uni-tabbar {
left: var(--window-left);
right: var(--window-right);
}
.footer-fixed {
left: var(--window-left) !important;
right: var(--window-right) !important;
}
.u-mask,.u-drawer {
left: var(--window-left) !important;
right: var(--window-right) !important;
}
/* #endif */

@ -0,0 +1,7 @@
export const paginate = {
data: [], // 列表数据
current_page: 1, // 当前页码
last_page: 1, // 最大页码
per_page: 15, // 每页记录数
total: 0, // 总记录数
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,13 @@
import Enum from './enum'
/**
* 枚举类客户端类型
* ClientEnum
*/
export default new Enum([
{ key: 'APP', name: 'APP端', value: 'APP' },
{ key: 'H5', name: 'H5端', value: 'H5' },
{ key: 'WXOFFICIAL', name: '微信公众号端', value: 'WXOFFICIAL' },
{ key: 'MP_WEIXIN', name: '微信小程序端', value: 'MP-WEIXIN' },
{ key: 'MP_ALIPAY', name: '支付宝小程序端', value: 'MP-ALIPAY' },
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类优惠券适用范围
* ApplyRangeEnum
*/
export default new Enum([
{ key: 'ALL', name: '全部商品', value: 10 },
{ key: 'SOME_GOODS', name: '指定商品', value: 20 }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类优惠券类型
* CouponTypeEnum
*/
export default new Enum([
{ key: 'FULL_DISCOUNT', name: '满减券', value: 10 },
{ key: 'DISCOUNT', name: '折扣券', value: 20 }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类优惠券到期类型
* ExpireTypeEnum
*/
export default new Enum([
{ key: 'RECEIVE', name: '领取后', value: 10 },
{ key: 'FIXED_TIME', name: '固定时间', value: 20 }
])

@ -0,0 +1,5 @@
import ApplyRangeEnum from './ApplyRange'
import ExpireTypeEnum from './ExpireType'
import CouponTypeEnum from './CouponType'
export { ApplyRangeEnum, CouponTypeEnum, ExpireTypeEnum }

@ -0,0 +1,11 @@
import Enum from '../../enum'
/**
* 枚举类分销商审核状态
* ApplyStatusEnum
*/
export default new Enum([
{ key: 'WAIT', name: '待审核', value: 10 },
{ key: 'PASSED', name: '审核通过', value: 20 },
{ key: 'REJECT', name: '驳回', value: 30 }
])

@ -0,0 +1,10 @@
import Enum from '../../enum'
/**
* 枚举类分销商申请方式
* ApplyTypeEnum
*/
export default new Enum([
{ key: 'AUDIT', name: '需后台审核', value: 10 },
{ key: 'PASS', name: '无需审核', value: 20 }
])

@ -0,0 +1,4 @@
import ApplyStatusEnum from './ApplyStatus'
import ApplyTypeEnum from './ApplyType'
export { ApplyStatusEnum, ApplyTypeEnum }

@ -0,0 +1,12 @@
import Enum from '../../enum'
/**
* 枚举类分销商提现申请状态
* ApplyStatusEnum
*/
export default new Enum([
{ key: 'WAIT', name: '待审核', value: 10 },
{ key: 'PASSED', name: '审核通过', value: 20 },
{ key: 'REJECT', name: '驳回', value: 30 },
{ key: 'PAYMENT', name: '已打款', value: 40 }
])

@ -0,0 +1,11 @@
import Enum from '../../enum'
/**
* 枚举类分销商体现打款方式
* PayTypeEnum
*/
export default new Enum([
{ key: 'WECHAT', name: '微信零钱', value: 10 },
{ key: 'ALIPAY', name: '支付宝', value: 20 },
{ key: 'BANK_CARD', name: '银行卡', value: 30 }
])

@ -0,0 +1,4 @@
import PayTypeEnum from './PayType'
import ApplyStatusEnum from './ApplyStatus'
export { PayTypeEnum, ApplyStatusEnum }

@ -0,0 +1,85 @@
/**
* 枚举类
* Enum.IMAGE.name => "图片"
* Enum.getNameByKey('IMAGE') => "图片"
* Enum.getValueByKey('IMAGE') => 10
* Enum.getNameByValue(10) => "图片"
* Enum.getData() => [{key: "IMAGE", name: "图片", value: 10}]
*/
class Enum {
constructor (param) {
const keyArr = []
const valueArr = []
if (!Array.isArray(param)) {
throw new Error('param is not an array!')
}
param.map(element => {
if (!element.key || !element.name) {
return
}
// 保存key值组成的数组,方便A.getName(name)类型的调用
keyArr.push(element.key)
valueArr.push(element.value)
// 根据key生成不同属性值,以便A.B.name类型的调用
this[element.key] = element
if (element.key !== element.value) {
this[element.value] = element
}
})
// 保存源数组
this.data = param
this.keyArr = keyArr
this.valueArr = valueArr
// 防止被修改
// Object.freeze(this)
}
// 根据key得到对象
keyOf (key) {
return this.data[this.keyArr.indexOf(key)]
}
// 根据key得到对象
valueOf (key) {
return this.data[this.valueArr.indexOf(key)]
}
// 根据key获取name值
getNameByKey (key) {
const prop = this.keyOf(key)
if (!prop) {
throw new Error('No enum constant' + key)
}
return prop.name
}
// 根据value获取name值
getNameByValue (value) {
const prop = this.valueOf(value)
if (!prop) {
throw new Error('No enum constant' + value)
}
return prop.name
}
// 根据key获取value值
getValueByKey (key) {
const prop = this.keyOf(key)
if (!prop) {
throw new Error('No enum constant' + key)
}
return prop.key
}
// 返回源数组
getData () {
return this.data
}
}
export default Enum

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类商品类型
* GoodsTypeEnum
*/
export default new Enum([
{ key: 'PHYSICAL', name: '实物商品', value: 10 },
{ key: 'VIRTUAL', name: '虚拟商品', value: 20 }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类商品规格类型
* SpecTypeEnum
*/
export default new Enum([
{ key: 'SINGLE', name: '单规格', value: 10 },
{ key: 'MULTI', name: '多规格', value: 20 }
])

@ -0,0 +1,4 @@
import GoodsTypeEnum from './GoodsType'
import SpecTypeEnum from './SpecType'
export { GoodsTypeEnum, SpecTypeEnum }

@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类拼团活动状态
* GoodsStatusEnum
*/
export default new Enum([
{ key: 'STATE_BEGIN', name: '已开始', value: 10 },
{ key: 'STATE_SOON', name: '未开始', value: 20 },
{ key: 'STATE_END', name: '已结束', value: 30 }
])

@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类拼团类型
* ActiveTypeEnum
*/
export default new Enum([
{ key: 'NORMAL', name: '普通拼团', value: 10, name2: '多人拼团' },
{ key: 'PULL_NEW', name: '老带新拼团', value: 20, name2: '新人团' },
{ key: 'STEPS', name: '阶梯拼团', value: 30, name2: '阶梯团' }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类拼团商品状态
* GoodsStatusEnum
*/
export default new Enum([
{ key: 'NORMAL', name: '进行中', value: 10 },
{ key: 'FINISH', name: '已结束', value: 20 }
])

@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类拼单状态
* TaskStatusEnum
*/
export default new Enum([
{ key: 'NORMAL', name: '进行中', value: 10 },
{ key: 'SUCCESS', name: '拼单成功', value: 20 },
{ key: 'FAIL', name: '拼单失败', value: 30 }
])

@ -0,0 +1,6 @@
import GoodsStatusEnum from './GoodsStatus'
import TaskStatusEnum from './TaskStatus'
import ActiveTypeEnum from './ActiveType'
import ActiveStatusEnum from './ActiveStatus'
export { GoodsStatusEnum, TaskStatusEnum, ActiveTypeEnum, ActiveStatusEnum }

@ -0,0 +1,15 @@
import Enum from '../enum'
/**
* 枚举类微信小程序直播间状态
* LiveStatusEnum
*/
export default new Enum([
{ key: 101, name: '直播中', value: 101 },
{ key: 102, name: '未开始', value: 102 },
{ key: 103, name: '已结束', value: 103 },
{ key: 104, name: '禁播', value: 104 },
{ key: 105, name: '暂停中', value: 105 },
{ key: 106, name: '异常', value: 106 },
{ key: 107, name: '已过期', value: 107 }
])

@ -0,0 +1,3 @@
import LiveStatusEnum from './LiveStatus'
export { LiveStatusEnum }

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类订单发货状态
* DeliveryStatusEnum
*/
export default new Enum([
{ key: 'NOT_DELIVERED', name: '未发货', value: 10 },
{ key: 'DELIVERED', name: '已发货', value: 20 }
])

@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类配送方式
* DeliveryTypeEnum
*/
export default new Enum([
{ key: 'EXPRESS', name: '快递配送', value: 10 },
{ key: 'EXTRACT', name: '上门自提', value: 20 },
{ key: 'NOTHING', name: '无需配送', value: 30 }
])

@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类订单来源
* OrderSourceEnum
*/
export default new Enum([
{ key: 'MASTER', name: '普通订单', value: 10 },
{ key: 'BARGAIN', name: '砍价订单', value: 20 },
{ key: 'SHARP', name: '秒杀订单', value: 30 }
])

@ -0,0 +1,12 @@
import Enum from '../enum'
/**
* 枚举类订单状态
* OrderStatusEnum
*/
export default new Enum([
{ key: 'NORMAL', name: '进行中', value: 10 },
{ key: 'CANCELLED', name: '已取消', value: 20 },
{ key: 'APPLY_CANCEL', name: '待取消', value: 21 },
{ key: 'COMPLETED', name: '已完成', value: 30 }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类订单类型
* OrderTypeEnum
*/
export default new Enum([
{ key: 'PHYSICAL', name: '实物订单', value: 10 },
{ key: 'VIRTUAL', name: '虚拟订单', value: 20 }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类订单支付状态
* PayStatusEnum
*/
export default new Enum([
{ key: 'PENDING', name: '待支付', value: 10 },
{ key: 'SUCCESS', name: '已支付', value: 20 }
])

@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类订单收货状态
* ReceiptStatusEnum
*/
export default new Enum([
{ key: 'NOT_RECEIVED', name: '未收货', value: 10 },
{ key: 'RECEIVED', name: '已收货', value: 20 }
])

@ -0,0 +1,11 @@
import Enum from '../../enum'
/**
* 枚举类发货方式
* DeliveryMethodEnum
*/
export default new Enum([
{ key: 'MANUAL', name: '手动发货', value: 10 },
{ key: 'UNWANTED', name: '无需物流', value: 20 },
{ key: 'EORDER', name: '电子面单', value: 30 }
])

@ -0,0 +1,3 @@
import DeliveryMethodEnum from './DeliveryMethod'
export { DeliveryMethodEnum }

@ -0,0 +1,17 @@
import DeliveryStatusEnum from './DeliveryStatus'
import DeliveryTypeEnum from './DeliveryType'
import OrderSourceEnum from './OrderSource'
import OrderStatusEnum from './OrderStatus'
import PayStatusEnum from './PayStatus'
import ReceiptStatusEnum from './ReceiptStatus'
import OrderTypeEnum from './OrderType'
export {
DeliveryStatusEnum,
DeliveryTypeEnum,
OrderSourceEnum,
OrderStatusEnum,
PayStatusEnum,
ReceiptStatusEnum,
OrderTypeEnum
}

@ -0,0 +1,11 @@
import Enum from '../../enum'
/**
* 枚举类商家审核状态
* AuditStatusEnum
*/
export default new Enum([
{ key: 'WAIT', name: '待审核', value: 0 },
{ key: 'REVIEWED', name: '已同意', value: 10 },
{ key: 'REJECTED', name: '已拒绝', value: 20 }
])

@ -0,0 +1,12 @@
import Enum from '../../enum'
/**
* 枚举类售后单状态
* RefundStatusEnum
*/
export default new Enum([
{ key: 'NORMAL', name: '进行中', value: 0 },
{ key: 'REJECTED', name: '已拒绝', value: 10 },
{ key: 'COMPLETED', name: '已完成', value: 20 },
{ key: 'CANCELLED', name: '已取消', value: 30 }
])

@ -0,0 +1,10 @@
import Enum from '../../enum'
/**
* 枚举类售后类型
* RefundTypeEnum
*/
export default new Enum([
{ key: 'RETURN', name: '退货退款', value: 10 },
{ key: 'EXCHANGE', name: '换货', value: 20 }
])

@ -0,0 +1,9 @@
import AuditStatusEnum from './AuditStatus'
import RefundStatusEnum from './RefundStatus'
import RefundTypeEnum from './RefundType'
export {
AuditStatusEnum,
RefundStatusEnum,
RefundTypeEnum
}

@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类支付方式类型
* PayMethodEnum
*/
export default new Enum([
{ key: 'WECHAT', name: '微信支付', value: 'wechat' },
{ key: 'ALIPAY', name: '支付宝支付', value: 'alipay' },
{ key: 'BALANCE', name: '余额支付', value: 'balance' }
])

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save