diff --git a/app.json b/app.json index 71aa816..8e8b4f0 100644 --- a/app.json +++ b/app.json @@ -100,8 +100,7 @@ "userProtocol/userProtocol", "exchangeCard/exchangeCard", "exchange/exchange", - "complaint/complaint", - "userPrivacyPro/userPrivacyPro" + "complaint/complaint" ] } ], diff --git a/assets/images/avatar2.png b/assets/images/avatar2.png deleted file mode 100644 index aee99aa..0000000 Binary files a/assets/images/avatar2.png and /dev/null differ diff --git a/assets/images/avatar3.png b/assets/images/avatar3.png deleted file mode 100644 index 1c7b19a..0000000 Binary files a/assets/images/avatar3.png and /dev/null differ diff --git a/assets/images/scanSvg.txt b/assets/images/scanSvg.txt deleted file mode 100644 index 468883f..0000000 --- a/assets/images/scanSvg.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/ext.json b/ext.json index af9aa49..34dfe10 100644 --- a/ext.json +++ b/ext.json @@ -2,45 +2,35 @@ "ext": { "attr": { "car": { - "tjd": { - "payPath": "", - "tjdAppId": "wx6945d1bda68d7993" - }, "etcp": { - "payPath": "pages/pay/order-pay-open/main", - "etcpAppId": "wxc07f9d67923d676d", - "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" - }, - "bolink": { - "payPath": "pages/park/park", - "bolinkAppId": "wxbd08b4baa10fcc1d" - }, - "version": "release" + "etcpAppId": "wx192b7d2e8dcbefd0", + "etcpVersion": "release", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" + } }, "mchId": "1604439800", "imgProxy": [ { - "newUrl": "https://c.malls.iformall.com/img", + "newUrl": "https://ctest.malls.iformall.com/img", "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" }, { - "newUrl": "https://c.malls.iformall.com/img1", + "newUrl": "https://ctest.malls.iformall.com/img1", "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" }, { - "newUrl": "https://c.malls.iformall.com/img2", + "newUrl": "https://ctest.malls.iformall.com/img2", "orgUrl": "https://wx.qlogo.cn" } ], - "configUrl": "https://c.malls.iformall.com/C/api", - "ifStoreApp": "0", + "configUrl": "https://ctest.malls.iformall.com/C/api", "businessSwitch": "1", "ifHaveWebSocket": "0", - "ifHaveCarModular": "0" + "ifHaveCarModular": "1" }, - "name": "富茂链客生产版", - "weappId": "wx6a2524a8286d687f", - "appVersion": "C.5.1.1" + "name": "金泸商务", + "weappId": "wx649b3be73c1afe47", + "appVersion": "C.test.5.2.0" }, "debug": false, "tabBar": { @@ -76,7 +66,8 @@ "selectedIconPath": "assets/images/user-a.png" } ], - "custom": true + "color": "#abb1be", + "selectedColor": "#b2743d" }, "window": { "backgroundTextStyle": "dark", @@ -90,11 +81,11 @@ "provider": "wxfab2bf944bfc4da6" }, "live-player-plugin": { - "version": "1.3.5", + "version": "1.3.4", "provider": "wx2b03c6e691cd7370" } }, - "extAppid": "wx6a2524a8286d687f", + "extAppid": "wx649b3be73c1afe47", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/index/index.js b/index/index.js index f1d87b2..fc7825c 100644 --- a/index/index.js +++ b/index/index.js @@ -14,6 +14,7 @@ Page({ data: { aa: (app.statusBarHeight + 34) + "rpx", noDataFlag: false, + showPrivacy: false, busineKye: 0, businePageNum: 1, credit: 0, @@ -824,6 +825,7 @@ Page({ // that.getGameOne(app.globalData.token) that.getStaticGame(app.globalData.token) that.getGg(app.globalData.token) + that.getPrivacySetting() let weapNote = JSON.parse(res.data.weapNote); that.setData({ // desc: weapNote.firstpage.desc?weapNote.firstpage.desc:"", @@ -889,6 +891,7 @@ Page({ that.getStaticGame(app.globalData.token) that.getGg(app.globalData.token) let weapNote = JSON.parse(res.data.weapNote); + that.getPrivacySetting() that.setData({ // desc: weapNote.firstpage.desc?weapNote.firstpage.desc:"", // title: weapNote.firstpage.title?weapNote.firstpage.title:'', @@ -1166,6 +1169,76 @@ Page({ url: `/pages/topicDetail/index?id=${this.data.id}` }) }, + + clickPrivacy(e) { + + }, + + closePrivacy() { + this.setData({ + showPrivacy: false + }) + }, + + getPrivacySetting() { + const canIUsePrivacy = wx.canIUse('getPrivacySetting') + console.log(canIUsePrivacy, 'canIUse getPrivacySetting') + if (canIUsePrivacy) { + wx.getPrivacySetting({ + success: res => { + console.log(res, 'getPrivacySetting') // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' } + if (res.needAuthorization) { + // 需要弹出隐私协议 + this.setData({ + showPrivacy: true + }) + } else { + // this.setData({ + // showPrivacy: true + // }) + // 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用已声明过的隐私接口 + // wx.getUserProfile() + // wx.chooseMedia() + // wx.getClipboardData() + // wx.startRecord() + // this.setData({ + // showPrivacy: true + // }) + } + }, + fail: () => { }, + complete: () => { } + }) + } + }, + + handleAgreePrivacyAuthorization() { + console.log('Privacy Agreed!'); + this.setData({ + showPrivacy: false + }) + // 用户同意隐私协议事件回调 + // 用户点击了同意,之后所有已声明过的隐私接口和组件都可以调用了 + // wx.getUserProfile() + // wx.chooseMedia() + // wx.getClipboardData() + // wx.startRecord() + }, + + handleOpenPrivacyContract() { + // 打开隐私协议页面 + wx.openPrivacyContract({ + success: () => { + // this.setData({ + // showPrivacy: false + // }) + }, // 打开成功 + fail: () => { }, // 打开失败 + complete: () => { } + }) + }, + + /** * 检查用户是否有车 */ diff --git a/index/index.wxml b/index/index.wxml index fd15e57..a749943 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -96,6 +96,18 @@