|
|
@@ -3,6 +3,7 @@ Page({
|
|
|
data: {
|
|
|
selectMode: false,
|
|
|
createuserid: "",
|
|
|
+ apiId: "20221022165503",
|
|
|
"content": {
|
|
|
nocache: true,
|
|
|
pageNumber: 1,
|
|
|
@@ -15,14 +16,37 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- // userid 参数(与 Web 一致使用 createuserid 查询地址列表)
|
|
|
let createuserid = options.userid || "";
|
|
|
- this.setData({
|
|
|
- "content.where.createuserid": createuserid,
|
|
|
- createuserid,
|
|
|
- enterpriseid: options.enterpriseid || "",
|
|
|
- selectMode: options.select === '1'
|
|
|
- })
|
|
|
+ let selectMode = options.select === '1';
|
|
|
+ console.log("createuserid", createuserid);
|
|
|
+
|
|
|
+ if (selectMode) {
|
|
|
+ // 从订单页进入(select模式):使用 createuserid 查询
|
|
|
+ this.setData({
|
|
|
+ "content.where.createuserid": createuserid,
|
|
|
+ createuserid,
|
|
|
+ enterpriseid: options.enterpriseid || "",
|
|
|
+ selectMode: true
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 从"我的"tab进入:使用 workaddress 查询地址列表
|
|
|
+ this.setData({
|
|
|
+ apiId: "20221009155803",
|
|
|
+ content: {
|
|
|
+ nocache: true,
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ pageTotal: 1,
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ workaddress: 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ createuserid,
|
|
|
+ enterpriseid: options.enterpriseid || "",
|
|
|
+ selectMode: false
|
|
|
+ });
|
|
|
+ }
|
|
|
this.getList(true);
|
|
|
getApp().globalData.Language.getLanguagePackage(this, '我的地址');
|
|
|
},
|
|
|
@@ -33,7 +57,7 @@ Page({
|
|
|
if (init) content.pageNumber = 1;
|
|
|
if (content.pageNumber > content.pageTotal) return;
|
|
|
_Http.basic({
|
|
|
- "id": "20221022165503",
|
|
|
+ "id": this.data.apiId,
|
|
|
content
|
|
|
}).then(res => {
|
|
|
console.log("我的地址列表", res)
|