|
|
@@ -0,0 +1,55 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
+Component({
|
|
|
+ properties: {
|
|
|
+
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ content: {
|
|
|
+ total: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList(id) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221021103902,
|
|
|
+ "content": {
|
|
|
+ "sa_projectid": id
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log("项目商机", this.data.list)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ list: [res.data],
|
|
|
+ "content.total": 1
|
|
|
+ })
|
|
|
+ this.getTags();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 获取列表标签 */
|
|
|
+ getTags() {
|
|
|
+ let list = this.data.list,
|
|
|
+ ownerids = list.map(v => v.sa_projectid);
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221018102001,
|
|
|
+ "content": {
|
|
|
+ nocache: true,
|
|
|
+ "ownertable": "sa_project",
|
|
|
+ ownerids
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("标签", res)
|
|
|
+ for (let key in res.data) {
|
|
|
+ let index = list.findIndex(v => v.sa_projectid == key);
|
|
|
+ list[index].tags = res.data[key]
|
|
|
+ };
|
|
|
+ console.log(list)
|
|
|
+ this.setData({
|
|
|
+ list
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+})
|