xiaohaizhao há 3 anos atrás
pai
commit
2daa7c0b9a

+ 10 - 20
packageA/activity/index.js

@@ -25,25 +25,6 @@ Page({
             id: "2"
         }],
         classShow: false,
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            }, {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         content: {
             "isAll": 0,
             "nocache": true,
@@ -70,9 +51,18 @@ Page({
         }
     },
     onLoad(options) {
+
         this.setData({
             insert: wx.getStorageSync('auth').wmarketing_activity.options.some(v => v == 'insert'), //查询新增权限
-        })
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
+        });
         this.getList();
         this.getTypeList()
     },

+ 9 - 20
packageA/contract/index.js

@@ -41,25 +41,6 @@ Page({
             id: "2"
         }],
         classShow: false,
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            }, {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         content: {
             "nocache": true,
             deleted: 0,
@@ -88,7 +69,15 @@ Page({
     onLoad(options) {
         this.setData({
             insert: wx.getStorageSync('auth').wcontract.options.some(v => v == 'insert'), //查询新增权限
-        })
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
+        });
         this.getList();
     },
     /* 获取列表 */

+ 9 - 20
packageA/offers/index.js

@@ -33,25 +33,6 @@ Page({
             id: "2"
         }],
         classShow: false,
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            }, {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         content: {
             "nocache": true,
             deleted: 0,
@@ -80,7 +61,15 @@ Page({
     onLoad(options) {
         this.setData({
             insert: wx.getStorageSync('auth').woffer.options.some(v => v == 'insert'), //查询新增权限
-        })
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
+        });
         this.getList();
     },
     /* 获取列表 */

+ 1 - 1
packageA/project/addAndEdit.js

@@ -164,7 +164,7 @@ Page({
                 placeholder: "选择品牌",
                 valueName: "sa_brandid",
                 checking: "base",
-                required: true
+                required: false
             }
         ],
         disabled: true,

+ 9 - 20
packageA/project/index.js

@@ -22,25 +22,6 @@ Page({
             id: "2"
         }],
         classShow: false,
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            }, {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         content: {
             nocache: true,
             deleted: 0,
@@ -74,8 +55,16 @@ Page({
     },
     onLoad(options) {
         this.setData({
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
             insert: wx.getStorageSync('auth').wproject.options.some(v => v == 'insert'), //查询新增权限
-        })
+        });
         this.getList();
         //获取所有阶段
         this.getStage();

+ 9 - 33
packageA/publicClue/index.js

@@ -46,11 +46,18 @@ Page({
     },
     onLoad(options) {
         this.setData({
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
             insert: wx.getStorageSync('auth').worderclue_public.options.some(v => v == 'insert'), //查询新增权限
             allot: wx.getStorageSync('auth').worderclue_public.options.some(v => v == 'allot')
-        })
+        });
         this.getList();
-        // this.getTypeList()
     },
     /* 获取列表 */
     getList(init = false, data) {
@@ -89,37 +96,6 @@ Page({
             this.getTags();
         })
     },
-    /* 获取线索状态 */
-    getTypeList() {
-        _Http.basic({
-            "classname": "sysmanage.develop.optiontype.optiontype",
-            "method": "optiontypeselect",
-            "content": {
-                "typename": 'cluepublic'
-            }
-        }).then(res => {
-            console.log("状态列表", res)
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            })
-            let classActions = res.data.map(item => {
-                return {
-                    name: item.value,
-                    index: item.remarks
-                }
-            })
-            classActions.unshift({
-                name: '全部',
-                index: ''
-            })
-            this.setData({
-                classActions: classActions
-            });
-            console.log(this.data.classActions);
-            this.setListHeight();
-        })
-    },
     /* 处理搜索 */
     onSearch({
         detail

+ 9 - 48
packageA/saleClue/index.js

@@ -25,25 +25,6 @@ Page({
             id: "2"
         }],
         classShow: false,
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            }, {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         content: {
             "isAll": 0,
             "nocache": true,
@@ -68,9 +49,16 @@ Page({
     onLoad(options) {
         this.setData({
             insert: wx.getStorageSync('auth').worderclue.options.some(v => v == 'insert'), //查询新增权限
-        })
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
+        });
         this.getList()
-        // this.getTypeList()
         this.getClueArea()
     },
     /* 获取列表 */
@@ -107,33 +95,6 @@ Page({
             this.getTags();
         })
     },
-    /* 获取线索范围 */
-    getTypeList() {
-        _Http.basic({
-            "classname": "sysmanage.develop.optiontype.optiontype",
-            "method": "optiontypeselect",
-            "content": {
-                "typename": 'dataarea'
-            }
-        }).then(res => {
-            console.log("状态列表", res)
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            })
-            let classActions = res.data.map(item => {
-                return {
-                    name: item.value,
-                    index: item.remarks
-                }
-            })
-            this.setData({
-                classActions: classActions
-            });
-            console.log(this.data.classActions);
-            this.setListHeight();
-        })
-    },
     /* 获取线索状态 */
     getClueArea() {
         _Http.basic({

+ 9 - 20
packageA/setclient/index.js

@@ -43,25 +43,6 @@ Page({
         },
         list: [],
         classShow: false, //type类型
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            }, {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         filter: {
             show: false,
             status: ['潜在', '合作中', '已终止'],
@@ -79,7 +60,15 @@ Page({
     onLoad(options) {
         this.setData({
             insert: wx.getStorageSync('auth').wCustomer.options.some(v => v == 'insert'), //查询新增权限
-        })
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
+        });
         this.getList()
     },
     /* 筛选状态选择 */

+ 14 - 23
packageA/work/index.js

@@ -22,26 +22,6 @@ Page({
             width: "",
             id: "2"
         }],
-        classActions: [{
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            },
-            {
-                name: '我创建的',
-                index: 5
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
         content: {
             nocache: true,
             "pageNumber": 1,
@@ -72,6 +52,19 @@ Page({
             }]
         }]
     },
+    onLoad(options) {
+        this.setData({
+            classActions: wx.getStorageSync('templetList').map(v => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid
+                }
+            }),
+            'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
+            "content.type": wx.getStorageSync('templetList')[0].templetid,
+        });
+        this.getList()
+    },
     /* 导航点击功能 */
     navOnClick({
         detail
@@ -97,9 +90,7 @@ Page({
             url: './add'
         })
     },
-    onLoad(options) {
-        this.getList()
-    },
+
     /* 筛选状态选择 */
     selectStatus(e) {
         const {

+ 10 - 1
pages/tabbar/home/index.js

@@ -14,6 +14,16 @@ Page({
             capsule: wx.getMenuButtonBoundingClientRect()
         })
         this.refreshData() //更新权限等信息
+
+        _Http.basic({
+            "classname": "sysmanage.develop.querytemplet.querytemplet",
+            "method": "query",
+            "content": {}
+        }).then(res => {
+            console.log("获取列表查询条件", res)
+            if (res.msg != '成功') return;
+            wx.setStorageSync('templetList', res.data)
+        })
     },
     /* 更新站点信息 */
     refreshData() {
@@ -375,7 +385,6 @@ Page({
             setTimeout(this.refreshData, 10);
             return;
         }
-
     },
     /* 获取最新信息 */
     queryMessage(i = 0) {

+ 1 - 1
project.private.config.json

@@ -2,7 +2,7 @@
     "projectname": "YOS_wechat",
     "setting": {
         "compileHotReLoad": true,
-        "urlCheck": false
+        "urlCheck": true
     },
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
     "condition": {

+ 2 - 2
utils/Http.js

@@ -1,7 +1,7 @@
 // const baseUrl = "https://meida.cnyunl.com/yos/rest/index";
 // const baseUrl = "http://61.164.207.46:8000/yos/rest/index";
-const baseUrl = "http://122.226.136.204:8082/yos/rest/index";
-// const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index";
+// const baseUrl = "http://122.226.136.204:8082/yos/rest/index";
+const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index";
 
 let count = null;
 class HTTP {