增加新模块

This commit is contained in:
何江明
2025-03-20 08:46:07 +08:00
parent 15014e22aa
commit 2ae62b59ed
1729 changed files with 94700 additions and 4232 deletions
+45
View File
@@ -0,0 +1,45 @@
"use strict";
const common_vendor = require("../common/vendor.js");
function copyData(val) {
common_vendor.index.setClipboardData({
data: val
});
}
function assembleAddress(addressObj) {
const resutlObj = {};
if (!addressObj || Object.keys(addressObj).length === 0) {
return resutlObj;
}
const ids = [];
if (addressObj.countryId) {
ids.push(addressObj.countryId);
}
if (addressObj.provinceId) {
ids.push(addressObj.provinceId);
}
if (addressObj.cityId) {
ids.push(addressObj.cityId);
}
if (addressObj.areaId) {
ids.push(addressObj.areaId);
}
const names = [];
if (addressObj.countryName) {
names.push(addressObj.countryName);
}
if (addressObj.provinceName) {
names.push(addressObj.provinceName);
}
if (addressObj.cityName) {
names.push(addressObj.cityName);
}
if (addressObj.areaName) {
names.push(addressObj.areaName);
}
resutlObj.ids = ids.join(",");
resutlObj.names = names.join(" ");
return resutlObj;
}
exports.assembleAddress = assembleAddress;
exports.copyData = copyData;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/index.js.map