| @@ -78,7 +78,8 @@ | |||||
| "pages/siteAdd/siteAdd", | "pages/siteAdd/siteAdd", | ||||
| "pages/fillIndent/fillIndent", | "pages/fillIndent/fillIndent", | ||||
| "pages/coupon/childDetail/childDetail", | "pages/coupon/childDetail/childDetail", | ||||
| "pages/theme/index1/index" | |||||
| "pages/theme/index1/index", | |||||
| "pages/setUserInfo/index" | |||||
| ], | ], | ||||
| "subpackages": [ | "subpackages": [ | ||||
| { | { | ||||
| @@ -135,7 +135,7 @@ Component({ | |||||
| const that = this | const that = this | ||||
| console.log(app.globalData.mouldType, "mouldType") | console.log(app.globalData.mouldType, "mouldType") | ||||
| if (app.globalData.mouldType == 0) { | if (app.globalData.mouldType == 0) { | ||||
| that.getTabBar().setData({ | |||||
| that.setData({ | |||||
| selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | ||||
| list: [{ | list: [{ | ||||
| "pagePath": "/index/index", | "pagePath": "/index/index", | ||||
| @@ -164,7 +164,7 @@ Component({ | |||||
| ], | ], | ||||
| }) | }) | ||||
| } else if (app.globalData.mouldType == 1) { | } else if (app.globalData.mouldType == 1) { | ||||
| that.getTabBar().setData({ | |||||
| that.setData({ //getTabBar(). | |||||
| selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | ||||
| list: [{ | list: [{ | ||||
| "pagePath": "/pages/theme/index1/index", | "pagePath": "/pages/theme/index1/index", | ||||
| @@ -1,45 +1,33 @@ | |||||
| { | { | ||||
| "ext": { | "ext": { | ||||
| "attr": { | "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" | |||||
| }, | |||||
| "mchId": "1539496451", | |||||
| "mchId": "1602801645", | |||||
| "imgProxy": [ | "imgProxy": [ | ||||
| { | { | ||||
| "newUrl": "https://c.malls.iformall.com/img", | |||||
| "newUrl": "https://ctest.malls.iformall.com/img", | |||||
| "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | "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" | "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" | "orgUrl": "https://wx.qlogo.cn" | ||||
| } | } | ||||
| ], | ], | ||||
| "configUrl": "https://c.malls.iformall.com/C/api", | |||||
| "ifStoreApp": "0", | |||||
| "configUrl": "https://ctest.malls.iformall.com/C/api", | |||||
| "etcpAppId": "wx219a81b9c87aa4f7", | |||||
| "etcpVersion": "release", | |||||
| "businessSwitch": "1", | |||||
| "businessVersion": "1", | |||||
| "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", | |||||
| "ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
| "ifHaveCarModular": "0" | |||||
| "ifHaveCarModular": "1" | |||||
| }, | }, | ||||
| "name": "宁乡翡翠湖国际广场", | |||||
| "weappId": "wxbe89097584fbbf03", | |||||
| "appVersion": "C.5.1.1" | |||||
| "name": "富茂光谷测试版", | |||||
| "weappId": "wx219a81b9c87aa4f7", | |||||
| "appVersion": "C.test.5.2.0" | |||||
| }, | }, | ||||
| "debug": false, | "debug": false, | ||||
| "tabBar": { | "tabBar": { | ||||
| @@ -75,7 +63,8 @@ | |||||
| "selectedIconPath": "assets/images/user-a.png" | "selectedIconPath": "assets/images/user-a.png" | ||||
| } | } | ||||
| ], | ], | ||||
| "custom": true | |||||
| "color": "#abb1be", | |||||
| "selectedColor": "#b2743d" | |||||
| }, | }, | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "dark", | "backgroundTextStyle": "dark", | ||||
| @@ -83,7 +72,17 @@ | |||||
| "navigationBarTitleText": "", | "navigationBarTitleText": "", | ||||
| "navigationBarBackgroundColor": "#FFFFFF" | "navigationBarBackgroundColor": "#FFFFFF" | ||||
| }, | }, | ||||
| "extAppid": "wxbe89097584fbbf03", | |||||
| "plugins": { | |||||
| "auto-points-plugin": { | |||||
| "version": "2.4.0", | |||||
| "provider": "wxfab2bf944bfc4da6" | |||||
| }, | |||||
| "live-player-plugin": { | |||||
| "version": "1.2.5", | |||||
| "provider": "wx2b03c6e691cd7370" | |||||
| } | |||||
| }, | |||||
| "extAppid": "wx219a81b9c87aa4f7", | |||||
| "extEnable": true, | "extEnable": true, | ||||
| "permission": { | "permission": { | ||||
| "scope.userLocation": { | "scope.userLocation": { | ||||
| @@ -120,7 +120,25 @@ Page({ | |||||
| }) | }) | ||||
| this.getCouponChannelList(e.detail) | this.getCouponChannelList(e.detail) | ||||
| }, | }, | ||||
| getBusinessList() { //获取优选导航 | |||||
| // 2022年11月8日微信收回接口“wx.getUserProfile”、“wx.getUserInfo”之后,需要手动设置用户头像与昵称 | |||||
| goSetAvatar() { | |||||
| const accreditFlag = this.data.accreditFlag | |||||
| // 没授权手机号 | |||||
| if (accreditFlag == 2) { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/getphoneInfo/index?go="setUserInfo"' | |||||
| }) | |||||
| // 手机号已授权 | |||||
| } else { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/setUserInfo/index', | |||||
| }) | |||||
| } | |||||
| }, | |||||
| //获取优选导航 | |||||
| getBusinessList() { | |||||
| Http.get({ | Http.get({ | ||||
| url: config.api.businessList, | url: config.api.businessList, | ||||
| data: { | data: { | ||||
| @@ -170,8 +188,8 @@ Page({ | |||||
| url: config.api.couponChannelList, | url: config.api.couponChannelList, | ||||
| data: param | data: param | ||||
| }).then(res => { | }).then(res => { | ||||
| if (res.data.list&&res.data.list.length != 0) { | |||||
| if (res.data.list && res.data.list.length != 0) { | |||||
| let tempLsit = this.data.businessData | let tempLsit = this.data.businessData | ||||
| let data = res.data.list | let data = res.data.list | ||||
| data.map(item => { | data.map(item => { | ||||
| @@ -192,7 +210,7 @@ Page({ | |||||
| businessData: data | businessData: data | ||||
| }) | }) | ||||
| } | } | ||||
| }else{ | |||||
| } else { | |||||
| this.setData({ | this.setData({ | ||||
| noDataFlag: true | noDataFlag: true | ||||
| }) | }) | ||||
| @@ -325,7 +343,7 @@ Page({ | |||||
| url: '/pages2/live/livelist/index', | url: '/pages2/live/livelist/index', | ||||
| }) | }) | ||||
| }, | }, | ||||
| alphaClick1: function(even) { | |||||
| alphaClick1: function (even) { | |||||
| var animation = wx.createAnimation({}) | var animation = wx.createAnimation({}) | ||||
| animation.opacity(0).step({ | animation.opacity(0).step({ | ||||
| duration: 2000 | duration: 2000 | ||||
| @@ -334,7 +352,7 @@ Page({ | |||||
| alphaData: animation.export() | alphaData: animation.export() | ||||
| }) | }) | ||||
| }, | }, | ||||
| alphaClick: function(even) { | |||||
| alphaClick: function (even) { | |||||
| var animation = wx.createAnimation({}) | var animation = wx.createAnimation({}) | ||||
| animation.opacity(0).step({ | animation.opacity(0).step({ | ||||
| duration: 2000 | duration: 2000 | ||||
| @@ -344,23 +362,23 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| // 我的卡包 | // 我的卡包 | ||||
| mycard: function() { | |||||
| mycard: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/cardorder/index/index', | url: '/pages/cardorder/index/index', | ||||
| }) | }) | ||||
| }, | }, | ||||
| //我的券包 | //我的券包 | ||||
| mycoupon: function() { | |||||
| mycoupon: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/couponorder/index/index', | url: '/pages/couponorder/index/index', | ||||
| }) | }) | ||||
| }, | }, | ||||
| gotoSpellGroup: function() { | |||||
| gotoSpellGroup: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/spellGroup/spellGroup', | url: '/pages/spellGroup/spellGroup', | ||||
| }) | }) | ||||
| }, | }, | ||||
| qrcode: function() { | |||||
| qrcode: function () { | |||||
| var that = this; | var that = this; | ||||
| let memberId = that.data.memberId; | let memberId = that.data.memberId; | ||||
| if (memberId) { | if (memberId) { | ||||
| @@ -370,17 +388,17 @@ Page({ | |||||
| } | } | ||||
| }, | }, | ||||
| //跳往限时秒杀 | //跳往限时秒杀 | ||||
| gotoRushBuy: function() { | |||||
| gotoRushBuy: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/rushToBuy/index', | url: '/pages/rushToBuy/index', | ||||
| }) | }) | ||||
| }, | }, | ||||
| swiperChange: function(e) { | |||||
| swiperChange: function (e) { | |||||
| this.setData({ | this.setData({ | ||||
| swiperCurrent: e.detail.current | swiperCurrent: e.detail.current | ||||
| }); | }); | ||||
| }, | }, | ||||
| gotogame: function() { | |||||
| gotogame: function () { | |||||
| let that = this; | let that = this; | ||||
| if (!that.data.showIf) { | if (!that.data.showIf) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| @@ -420,7 +438,7 @@ Page({ | |||||
| * | * | ||||
| */ | */ | ||||
| app.globalData.skipUrl = '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | app.globalData.skipUrl = '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | ||||
| app.globalData.skip = 'redirectTo' | |||||
| app.globalData.skip = 'redirectTo' | |||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | ||||
| }); | }); | ||||
| @@ -457,7 +475,7 @@ Page({ | |||||
| } | } | ||||
| }, | }, | ||||
| mySpecial: function() { | |||||
| mySpecial: function () { | |||||
| console.log("special"); | console.log("special"); | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/specialcourtesy/specialcourtesy', | url: '/pages/specialcourtesy/specialcourtesy', | ||||
| @@ -500,7 +518,7 @@ Page({ | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onLoad: function(options) { | |||||
| onLoad: function (options) { | |||||
| console.log("onLoad--") | console.log("onLoad--") | ||||
| this.setData({ | this.setData({ | ||||
| mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
| @@ -564,38 +582,38 @@ Page({ | |||||
| }, | }, | ||||
| // 初始换底部导航栏 | // 初始换底部导航栏 | ||||
| setTabStyle: function() { | |||||
| setTabStyle: function () { | |||||
| this.getTabBar().setData({ | this.getTabBar().setData({ | ||||
| selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | ||||
| list: [{ | list: [{ | ||||
| "pagePath": "/index/index", | |||||
| "iconPath": `${app.globalData.styleLsit.t_in.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, | |||||
| "text": "首页" | |||||
| }, | |||||
| { | |||||
| "pagePath": "/index/searchbar", | |||||
| "iconPath": `${app.globalData.styleLsit.t_md.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, | |||||
| "text": "门店" | |||||
| }, | |||||
| { | |||||
| "pagePath": "/index/passCar", | |||||
| "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, | |||||
| "text": "停车" | |||||
| }, | |||||
| { | |||||
| "pagePath": "/index/user", | |||||
| "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, | |||||
| "text": "我的" | |||||
| } | |||||
| "pagePath": "/index/index", | |||||
| "iconPath": `${app.globalData.styleLsit.t_in.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, | |||||
| "text": "首页" | |||||
| }, | |||||
| { | |||||
| "pagePath": "/index/searchbar", | |||||
| "iconPath": `${app.globalData.styleLsit.t_md.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, | |||||
| "text": "门店" | |||||
| }, | |||||
| { | |||||
| "pagePath": "/index/passCar", | |||||
| "iconPath": `${app.globalData.styleLsit.t_tc.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, | |||||
| "text": "停车" | |||||
| }, | |||||
| { | |||||
| "pagePath": "/index/user", | |||||
| "iconPath": `${app.globalData.styleLsit.t_uc.icon}`, | |||||
| "selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, | |||||
| "text": "我的" | |||||
| } | |||||
| ], | ], | ||||
| }) | }) | ||||
| }, | }, | ||||
| onShow: function() { | |||||
| onShow: function () { | |||||
| console.log("onShow--") | console.log("onShow--") | ||||
| console.log(app.globalData.mouldType, "mouldType") | console.log(app.globalData.mouldType, "mouldType") | ||||
| if (app.globalData.token) { | if (app.globalData.token) { | ||||
| @@ -665,38 +683,38 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| // 如果有游戏 | // 如果有游戏 | ||||
| setTimeout(function() { | |||||
| setTimeout(function () { | |||||
| that.alphaClick(); | that.alphaClick(); | ||||
| }, 8000) | }, 8000) | ||||
| // 如果有广告 | // 如果有广告 | ||||
| setTimeout(function() { | |||||
| setTimeout(function () { | |||||
| that.alphaClick1(); | that.alphaClick1(); | ||||
| }, 8000) | }, 8000) | ||||
| }, | }, | ||||
| getmemberId: function(token) { | |||||
| getmemberId: function (token) { | |||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getScore, | |||||
| data: { | |||||
| token: token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.avatarUrl && res.data.nickName){ | |||||
| app.globalData.userAvatarUrl = res.data.avatarUrl, | |||||
| app.globalData.userName = res.data.nickName | |||||
| } | |||||
| that.setData({ | |||||
| levelName: res.data.levelName, | |||||
| upgradePercent: res.data.upgradePercent, | |||||
| upgradeScore: res.data.upgradeScore, | |||||
| memberId: res.data.id, | |||||
| credit: res.data.credit, | |||||
| userAvatarUrl: res.data.avatarUrl, | |||||
| userName: res.data.nickName, | |||||
| }) | |||||
| url: config.api.getScore, | |||||
| data: { | |||||
| token: token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.avatarUrl && res.data.nickName) { | |||||
| app.globalData.userAvatarUrl = res.data.avatarUrl, | |||||
| app.globalData.userName = res.data.nickName | |||||
| } | |||||
| that.setData({ | |||||
| levelName: res.data.levelName, | |||||
| upgradePercent: res.data.upgradePercent, | |||||
| upgradeScore: res.data.upgradeScore, | |||||
| memberId: res.data.id, | |||||
| credit: res.data.credit, | |||||
| userAvatarUrl: res.data.avatarUrl, | |||||
| userName: res.data.nickName, | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| wx.showModal({ | wx.showModal({ | ||||
| title: '提示', | title: '提示', | ||||
| @@ -705,7 +723,7 @@ Page({ | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| gotoChengzhangzhi: function() { | |||||
| gotoChengzhangzhi: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/czdetail/czdetail', | url: '/pages/czdetail/czdetail', | ||||
| }) | }) | ||||
| @@ -715,17 +733,17 @@ Page({ | |||||
| url: '/pages/integralmall/index', | url: '/pages/integralmall/index', | ||||
| }) | }) | ||||
| }, | }, | ||||
| gotoBargain: function() { | |||||
| gotoBargain: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/bargain/bargain', | url: '/pages/bargain/bargain', | ||||
| }) | }) | ||||
| }, | }, | ||||
| gotoSpellGroup: function() { | |||||
| gotoSpellGroup: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/spellGroup/spellGroup', | url: '/pages/spellGroup/spellGroup', | ||||
| }) | }) | ||||
| }, | }, | ||||
| gotoCard: function() { | |||||
| gotoCard: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/discountCardList/discountCardList', | url: '/pages/discountCardList/discountCardList', | ||||
| }) | }) | ||||
| @@ -735,7 +753,7 @@ Page({ | |||||
| // url: '/pages/game/index', | // url: '/pages/game/index', | ||||
| // }) | // }) | ||||
| // }, | // }, | ||||
| gotoJfsc: function() { | |||||
| gotoJfsc: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/integralmall/index', | url: '/pages/integralmall/index', | ||||
| }) | }) | ||||
| @@ -746,7 +764,7 @@ Page({ | |||||
| * @param {code,page} | * @param {code,page} | ||||
| * 子组件向父组件传值 | * 子组件向父组件传值 | ||||
| */ | */ | ||||
| onGetCode: function(e) { | |||||
| onGetCode: function (e) { | |||||
| this.setData({ | this.setData({ | ||||
| code: e.detail.val, | code: e.detail.val, | ||||
| page: e.detail.pageNum, | page: e.detail.pageNum, | ||||
| @@ -754,10 +772,10 @@ Page({ | |||||
| console.log(e.detail.val) | console.log(e.detail.val) | ||||
| console.log(e.detail.pageNum) | console.log(e.detail.pageNum) | ||||
| }, | }, | ||||
| getWeapNote: function(couponChannelId, couponId, orderId) { | |||||
| getWeapNote: function (couponChannelId, couponId, orderId) { | |||||
| var that = this; | var that = this; | ||||
| if (app.globalData.token) { | |||||
| if (app.globalData.token) { | |||||
| // 登录 | // 登录 | ||||
| console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
| that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
| @@ -792,11 +810,11 @@ Page({ | |||||
| app.businessListCallback(app.globalData.token); | app.businessListCallback(app.globalData.token); | ||||
| } | } | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getWeapNote, | |||||
| data: { | |||||
| appId: config.weapp.AppId, | |||||
| } | |||||
| }) | |||||
| url: config.api.getWeapNote, | |||||
| data: { | |||||
| appId: config.weapp.AppId, | |||||
| } | |||||
| }) | |||||
| .then(res => { | .then(res => { | ||||
| console.log(33333333333) | console.log(33333333333) | ||||
| console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
| @@ -856,11 +874,11 @@ Page({ | |||||
| app.businessListCallback(app.globalData.token); | app.businessListCallback(app.globalData.token); | ||||
| } | } | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getWeapNote, | |||||
| data: { | |||||
| appId: config.weapp.AppId, | |||||
| } | |||||
| }) | |||||
| url: config.api.getWeapNote, | |||||
| data: { | |||||
| appId: config.weapp.AppId, | |||||
| } | |||||
| }) | |||||
| .then(res => { | .then(res => { | ||||
| console.log(33333333333) | console.log(33333333333) | ||||
| console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
| @@ -893,26 +911,26 @@ Page({ | |||||
| getStaticGame(token) { | getStaticGame(token) { | ||||
| let _this = this; | let _this = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getGame, | |||||
| data: { | |||||
| triggleAction: 2, // 固定入口 | |||||
| token: token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.id) { | |||||
| _this.setData({ | |||||
| showIf: true, | |||||
| newUrl: res.data.imgUrl | |||||
| }) | |||||
| } else { | |||||
| _this.setData({ | |||||
| showIf: false | |||||
| }) | |||||
| } | |||||
| url: config.api.getGame, | |||||
| data: { | |||||
| triggleAction: 2, // 固定入口 | |||||
| token: token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.id) { | |||||
| _this.setData({ | _this.setData({ | ||||
| staticGamedata: res.data | |||||
| showIf: true, | |||||
| newUrl: res.data.imgUrl | |||||
| }) | }) | ||||
| } else { | |||||
| _this.setData({ | |||||
| showIf: false | |||||
| }) | |||||
| } | |||||
| _this.setData({ | |||||
| staticGamedata: res.data | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| _this.setData({ | _this.setData({ | ||||
| showIf: false | showIf: false | ||||
| @@ -920,28 +938,28 @@ Page({ | |||||
| console.log(err) | console.log(err) | ||||
| }) | }) | ||||
| }, | }, | ||||
| getGameOne: function(token) { | |||||
| getGameOne: function (token) { | |||||
| let _this = this; | let _this = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getGame, | |||||
| data: { | |||||
| triggleAction: 1, // 登录触发 | |||||
| token: token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.id) { | |||||
| _this.setData({ | |||||
| showGame: true, | |||||
| }) | |||||
| } else { | |||||
| _this.setData({ | |||||
| showGame: false | |||||
| }) | |||||
| } | |||||
| url: config.api.getGame, | |||||
| data: { | |||||
| triggleAction: 1, // 登录触发 | |||||
| token: token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res.data.id) { | |||||
| _this.setData({ | _this.setData({ | ||||
| gamedata: res.data | |||||
| showGame: true, | |||||
| }) | }) | ||||
| } else { | |||||
| _this.setData({ | |||||
| showGame: false | |||||
| }) | |||||
| } | |||||
| _this.setData({ | |||||
| gamedata: res.data | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| _this.setData({ | _this.setData({ | ||||
| showGame: false | showGame: false | ||||
| @@ -952,21 +970,21 @@ Page({ | |||||
| /** | /** | ||||
| * mallinfo | * mallinfo | ||||
| */ | */ | ||||
| getMallInfo: function(token) { | |||||
| getMallInfo: function (token) { | |||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getMallInfo, | |||||
| data: { | |||||
| token: token, | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| liveFlag: res.data.liveSupport, | |||||
| weappShareTitle: res.data.weappShareTitle ? res.data.weappShareTitle : null, | |||||
| weappShareCoverImg: res.data.weappShareCoverImg ? res.data.weappShareCoverImg : null, | |||||
| }); | |||||
| console.log(that.data.liveFlag, "||||") | |||||
| }) | |||||
| url: config.api.getMallInfo, | |||||
| data: { | |||||
| token: token, | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| liveFlag: res.data.liveSupport, | |||||
| weappShareTitle: res.data.weappShareTitle ? res.data.weappShareTitle : null, | |||||
| weappShareCoverImg: res.data.weappShareCoverImg ? res.data.weappShareCoverImg : null, | |||||
| }); | |||||
| console.log(that.data.liveFlag, "||||") | |||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| // 不需要错误提示 | // 不需要错误提示 | ||||
| }); | }); | ||||
| @@ -975,24 +993,24 @@ Page({ | |||||
| getxsList() { | getxsList() { | ||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.couponChannelList, | |||||
| data: { | |||||
| pageNum: 1, | |||||
| pageSize: 3, | |||||
| targetAd: 2 | |||||
| } | |||||
| }).then(res => { | |||||
| if (res && res.data.total > 0) { | |||||
| that.setData({ | |||||
| xslist: res.data.list, | |||||
| showQg: true | |||||
| }); | |||||
| } else { | |||||
| that.setData({ | |||||
| showQg: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| url: config.api.couponChannelList, | |||||
| data: { | |||||
| pageNum: 1, | |||||
| pageSize: 3, | |||||
| targetAd: 2 | |||||
| } | |||||
| }).then(res => { | |||||
| if (res && res.data.total > 0) { | |||||
| that.setData({ | |||||
| xslist: res.data.list, | |||||
| showQg: true | |||||
| }); | |||||
| } else { | |||||
| that.setData({ | |||||
| showQg: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| console.log(err) | console.log(err) | ||||
| wx.showToast({ | wx.showToast({ | ||||
| @@ -1006,21 +1024,21 @@ Page({ | |||||
| /** | /** | ||||
| * banner | * banner | ||||
| */ | */ | ||||
| getBannerlist: function() { | |||||
| getBannerlist: function () { | |||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.bannerlist, | |||||
| data: { | |||||
| pageNum: 1, | |||||
| pageSize: 7 | |||||
| } | |||||
| }).then(res => { | |||||
| that.getmemberId(app.globalData.token); | |||||
| // that.checkUserCarStatus(); | |||||
| that.setData({ | |||||
| list: res.data.list | |||||
| }); | |||||
| }) | |||||
| url: config.api.bannerlist, | |||||
| data: { | |||||
| pageNum: 1, | |||||
| pageSize: 7 | |||||
| } | |||||
| }).then(res => { | |||||
| that.getmemberId(app.globalData.token); | |||||
| // that.checkUserCarStatus(); | |||||
| that.setData({ | |||||
| list: res.data.list | |||||
| }); | |||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
| // that.checkUserCarStatus(); | // that.checkUserCarStatus(); | ||||
| @@ -1117,27 +1135,27 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| // 专题显示 | // 专题显示 | ||||
| topicShow: function() { | |||||
| topicShow: function () { | |||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.topicShow, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res && res.data) { | |||||
| that.setData({ | |||||
| name: res.data.name, | |||||
| cover: res.data.cover, | |||||
| id: res.data.id, | |||||
| showTopic: true | |||||
| }) | |||||
| } else { | |||||
| that.setData({ | |||||
| showTopic: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| url: config.api.topicShow, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| if (res && res.data) { | |||||
| that.setData({ | |||||
| name: res.data.name, | |||||
| cover: res.data.cover, | |||||
| id: res.data.id, | |||||
| showTopic: true | |||||
| }) | |||||
| } else { | |||||
| that.setData({ | |||||
| showTopic: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| console.log(err); | console.log(err); | ||||
| }) | }) | ||||
| @@ -1204,48 +1222,47 @@ Page({ | |||||
| // } | // } | ||||
| // }); | // }); | ||||
| // }, | // }, | ||||
| gotoBargain: function() { | |||||
| gotoBargain: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/bargain/bargain' | url: '/pages/bargain/bargain' | ||||
| }) | }) | ||||
| }, | }, | ||||
| //限时抢购的详情页面 | //限时抢购的详情页面 | ||||
| gotodetail: function(e) { | |||||
| gotodetail: function (e) { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/coupon/detail/index?couponChannelId=${ | |||||
| e.currentTarget.dataset.couponchannelid | |||||
| url: `/pages/coupon/detail/index?couponChannelId=${e.currentTarget.dataset.couponchannelid | |||||
| }&couponId=${e.currentTarget.dataset.couponid}` | }&couponId=${e.currentTarget.dataset.couponid}` | ||||
| }); | }); | ||||
| }, | }, | ||||
| //浮层广告 | //浮层广告 | ||||
| getGg: function(token) { | |||||
| getGg: function (token) { | |||||
| let that = this | let that = this | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getGg, | |||||
| data: { | |||||
| token: token, | |||||
| appId: config.weapp.AppId, | |||||
| openId: "" // wx.getStorageSync('openId') | |||||
| } | |||||
| }).then(res => { | |||||
| console.log(res) | |||||
| if (res.data.id) { | |||||
| that.setData({ | |||||
| showGg: true, | |||||
| }) | |||||
| console.log(that.data.showGg, 1111111111111) | |||||
| } else { | |||||
| that.setData({ | |||||
| showGg: false | |||||
| }) | |||||
| that.getGameOne(app.globalData.token) | |||||
| console.log(that.data.showGg, 222222222222222222) | |||||
| } | |||||
| url: config.api.getGg, | |||||
| data: { | |||||
| token: token, | |||||
| appId: config.weapp.AppId, | |||||
| openId: "" // wx.getStorageSync('openId') | |||||
| } | |||||
| }).then(res => { | |||||
| console.log(res) | |||||
| if (res.data.id) { | |||||
| that.setData({ | that.setData({ | ||||
| ggdata: res.data | |||||
| showGg: true, | |||||
| }) | }) | ||||
| console.log(that.data.showGg, 1111111111111) | |||||
| } else { | |||||
| that.setData({ | |||||
| showGg: false | |||||
| }) | |||||
| that.getGameOne(app.globalData.token) | |||||
| console.log(that.data.showGg, 222222222222222222) | |||||
| } | |||||
| that.setData({ | |||||
| ggdata: res.data | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| this.setData({ | this.setData({ | ||||
| showGg: false | showGg: false | ||||
| @@ -1257,7 +1274,7 @@ Page({ | |||||
| /** | /** | ||||
| * 刷新 | * 刷新 | ||||
| */ | */ | ||||
| onPullDownRefresh: function(e) { | |||||
| onPullDownRefresh: function (e) { | |||||
| this.setData({ | this.setData({ | ||||
| topicObj2: null, //欢乐城首页限时抢购 | topicObj2: null, //欢乐城首页限时抢购 | ||||
| topicObj3: null, //欢乐城首页砍价 | topicObj3: null, //欢乐城首页砍价 | ||||
| @@ -1297,7 +1314,7 @@ Page({ | |||||
| that.topicShow(); | that.topicShow(); | ||||
| }, | }, | ||||
| //加载更多 | //加载更多 | ||||
| onReachBottom: function() { | |||||
| onReachBottom: function () { | |||||
| console.log("我到底了") | console.log("我到底了") | ||||
| let that = this; | let that = this; | ||||
| that.data.page++; | that.data.page++; | ||||
| @@ -1305,7 +1322,7 @@ Page({ | |||||
| page: that.data.page, | page: that.data.page, | ||||
| businePageNum: that.data.businePageNum + 1 | businePageNum: that.data.businePageNum + 1 | ||||
| }); | }); | ||||
| console.log("加载更多页数" + that.data.page, ); | |||||
| console.log("加载更多页数" + that.data.page,); | |||||
| console.log("加载更多key" + that.data.code); | console.log("加载更多key" + that.data.code); | ||||
| if (that.data.mouldType == 0) { //富茂源模板 | if (that.data.mouldType == 0) { //富茂源模板 | ||||
| //父组件获得子组件的方法 | //父组件获得子组件的方法 | ||||
| @@ -1320,15 +1337,15 @@ Page({ | |||||
| } | } | ||||
| }, | }, | ||||
| // 用户点击右上角分享 | // 用户点击右上角分享 | ||||
| onShareAppMessage: function() { | |||||
| onShareAppMessage: function () { | |||||
| app.globalData.previewFlag = true | app.globalData.previewFlag = true | ||||
| return { | return { | ||||
| path: "/pages/index/index", | path: "/pages/index/index", | ||||
| title: this.data.weappShareTitle, | title: this.data.weappShareTitle, | ||||
| imageUrl: this.data.weappShareCoverImg, | imageUrl: this.data.weappShareCoverImg, | ||||
| success: function(res) { | |||||
| success: function (res) { | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "分享成功", | title: "分享成功", | ||||
| duration: 1000, | duration: 1000, | ||||
| @@ -16,7 +16,7 @@ | |||||
| <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
| <view class="user-avatar"> | <view class="user-avatar"> | ||||
| <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | ||||
| <image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||||
| <image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image> | |||||
| <image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../assets/images/default.png"></image> | <image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../assets/images/default.png"></image> | ||||
| </view> | </view> | ||||
| <!-- 成长值 --> | <!-- 成长值 --> | ||||
| @@ -15,7 +15,7 @@ Page({ | |||||
| data: { | data: { | ||||
| mch_id: mch_id, | mch_id: mch_id, | ||||
| businessSwitch:businessSwitch, | |||||
| businessSwitch: businessSwitch, | |||||
| goUrl: "", | goUrl: "", | ||||
| templateId: [], | templateId: [], | ||||
| aboutShow: false, | aboutShow: false, | ||||
| @@ -46,10 +46,10 @@ Page({ | |||||
| mineFlag: "", | mineFlag: "", | ||||
| flag: 'hidden', | flag: 'hidden', | ||||
| score: '0', | score: '0', | ||||
| credit:'0', | |||||
| userId:"", | |||||
| memberName:"", | |||||
| memberLogo:"", | |||||
| credit: '0', | |||||
| userId: "", | |||||
| memberName: "", | |||||
| memberLogo: "", | |||||
| curPhone: '', | curPhone: '', | ||||
| name: "", | name: "", | ||||
| birthdate: "", | birthdate: "", | ||||
| @@ -100,7 +100,7 @@ Page({ | |||||
| url: `/pages/getphoneInfo/index?path=main` | url: `/pages/getphoneInfo/index?path=main` | ||||
| }); | }); | ||||
| }, | }, | ||||
| //是否授权手机号 | |||||
| //是否授权手机号 | |||||
| ifPhoneInfo() { | ifPhoneInfo() { | ||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| @@ -136,7 +136,7 @@ Page({ | |||||
| /** | /** | ||||
| * 跳转到成长值的页面 | * 跳转到成长值的页面 | ||||
| */ | */ | ||||
| gotograde: function() { | |||||
| gotograde: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/czdetail/czdetail', | url: '/pages/czdetail/czdetail', | ||||
| }) | }) | ||||
| @@ -144,12 +144,12 @@ Page({ | |||||
| /** | /** | ||||
| * 跳转到商场信息的页面 | * 跳转到商场信息的页面 | ||||
| */ | */ | ||||
| gomallInfo: function() { | |||||
| gomallInfo: function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/mallInfo/mallInfo', | url: '/pages/mallInfo/mallInfo', | ||||
| }) | }) | ||||
| }, | }, | ||||
| showVersion: function() { | |||||
| showVersion: function () { | |||||
| /** | /** | ||||
| * 长按显示版本号 | * 长按显示版本号 | ||||
| */ | */ | ||||
| @@ -160,8 +160,12 @@ Page({ | |||||
| }); | }); | ||||
| } | } | ||||
| }, | }, | ||||
| gotoedit: function() { | |||||
| this.checkUserStatus(); | |||||
| gotoedit: function () { | |||||
| // this.checkUserStatus(); | |||||
| console.log('goSetAvatar'); | |||||
| wx.navigateTo({ | |||||
| url: '/pages/setUserInfo/index' | |||||
| }) | |||||
| }, | }, | ||||
| onLoad() { | onLoad() { | ||||
| // this.getLocation(); | // this.getLocation(); | ||||
| @@ -236,9 +240,9 @@ Page({ | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function() { | |||||
| if (businessSwitch){ | |||||
| onShow: function () { | |||||
| if (businessSwitch) { | |||||
| let openId = wx.getStorageSync("openId") | let openId = wx.getStorageSync("openId") | ||||
| this.setData({ | this.setData({ | ||||
| goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` | goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` | ||||
| @@ -304,46 +308,46 @@ Page({ | |||||
| }; | }; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getScore, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| if (res.data.address && res.data.name && res.data.sex && res.data.birthdate) { | |||||
| that.setData({ | |||||
| showEdit: true | |||||
| }) | |||||
| } | |||||
| let curPhone = res.data.phone ? res.data.phone : ''; | |||||
| if (curPhone) { | |||||
| let curPhoneList = curPhone.split(''); | |||||
| let curPhoneList01 = []; | |||||
| curPhoneList.forEach((item, index) => { | |||||
| if (index >= 3 && index <= 6) { | |||||
| item = '*'; | |||||
| } | |||||
| curPhoneList01.push(item); | |||||
| }) | |||||
| curPhone = curPhoneList01.join(''); | |||||
| } | |||||
| url: config.api.getScore, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| if (res.data.address && res.data.name && res.data.sex && res.data.birthdate) { | |||||
| that.setData({ | that.setData({ | ||||
| score: res.data.score, | |||||
| credit: res.data.credit, | |||||
| curPhone: curPhone, | |||||
| levelName: res.data.levelName, | |||||
| userId: res.data.userId, | |||||
| userAvatarUrl: res.data.avatarUrl, | |||||
| userName: res.data.nickName | |||||
| showEdit: true | |||||
| }) | |||||
| } | |||||
| let curPhone = res.data.phone ? res.data.phone : ''; | |||||
| if (curPhone) { | |||||
| let curPhoneList = curPhone.split(''); | |||||
| let curPhoneList01 = []; | |||||
| curPhoneList.forEach((item, index) => { | |||||
| if (index >= 3 && index <= 6) { | |||||
| item = '*'; | |||||
| } | |||||
| curPhoneList01.push(item); | |||||
| }) | }) | ||||
| if (res.data.nickName) { | |||||
| that.setData({ | |||||
| ismember: true, | |||||
| memberId: res.data.id | |||||
| }) | |||||
| var size = this.setCanvasSize(); | |||||
| var initUrl = JSON.stringify({ | |||||
| flagid: res.data.id | |||||
| }); | |||||
| } | |||||
| curPhone = curPhoneList01.join(''); | |||||
| } | |||||
| that.setData({ | |||||
| score: res.data.score, | |||||
| credit: res.data.credit, | |||||
| curPhone: curPhone, | |||||
| levelName: res.data.levelName, | |||||
| userId: res.data.userId, | |||||
| userAvatarUrl: res.data.avatarUrl, | |||||
| userName: res.data.nickName | |||||
| }) | }) | ||||
| if (res.data.nickName) { | |||||
| that.setData({ | |||||
| ismember: true, | |||||
| memberId: res.data.id | |||||
| }) | |||||
| var size = this.setCanvasSize(); | |||||
| var initUrl = JSON.stringify({ | |||||
| flagid: res.data.id | |||||
| }); | |||||
| } | |||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| wx.showModal({ | wx.showModal({ | ||||
| title: '提示', | title: '提示', | ||||
| @@ -357,29 +361,29 @@ Page({ | |||||
| //查询关于我们 | //查询关于我们 | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getMallInfo, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| if(res.code==200){ | |||||
| this.setData({ | |||||
| memberName:res.data.name, | |||||
| memberLogo:res.data.imgUrlH | |||||
| }) | |||||
| } | |||||
| if (res.data.businessHours !== '[]') { | |||||
| that.setData({ | |||||
| aboutShow: true | |||||
| }) | |||||
| } else { | |||||
| that.setData({ | |||||
| aboutShow: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => {}) | |||||
| url: config.api.getMallInfo, | |||||
| data: {} | |||||
| }).then(res => { | |||||
| if (res.code == 200) { | |||||
| this.setData({ | |||||
| memberName: res.data.name, | |||||
| memberLogo: res.data.imgUrlH | |||||
| }) | |||||
| } | |||||
| if (res.data.businessHours !== '[]') { | |||||
| that.setData({ | |||||
| aboutShow: true | |||||
| }) | |||||
| } else { | |||||
| that.setData({ | |||||
| aboutShow: false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { }) | |||||
| }, | }, | ||||
| //适配不同屏幕大小的canvas | //适配不同屏幕大小的canvas | ||||
| setCanvasSize: function() { | |||||
| setCanvasSize: function () { | |||||
| var size = {}; | var size = {}; | ||||
| try { | try { | ||||
| var res = wx.getSystemInfoSync(); | var res = wx.getSystemInfoSync(); | ||||
| @@ -20,7 +20,7 @@ | |||||
| </view> | </view> | ||||
| <view class="user-name" bindtap='gotoedit'> | <view class="user-name" bindtap='gotoedit'> | ||||
| <!-- <open-data class="name" type="userNickName"></open-data> --> | <!-- <open-data class="name" type="userNickName"></open-data> --> | ||||
| <p class="name" >{{userName}}</p> | |||||
| <p class="name">{{userName}}</p> | |||||
| <!-- 会员等级 --> | <!-- 会员等级 --> | ||||
| <!-- <view class=' usre_level'style='background:{{levelBg}}'> | <!-- <view class=' usre_level'style='background:{{levelBg}}'> | ||||
| <text class='chengzhang '>{{levelName}}</text> | <text class='chengzhang '>{{levelName}}</text> | ||||
| @@ -39,9 +39,9 @@ | |||||
| <view class="marketTitleBox"> | <view class="marketTitleBox"> | ||||
| <view class="marketName">{{memberName}}</view> | <view class="marketName">{{memberName}}</view> | ||||
| <view class="levelName">{{levelName}}</view> | <view class="levelName">{{levelName}}</view> | ||||
| <navigator url="/pages/shareFriend/shareFriend" open-type="navigate"> | |||||
| <navigator url="/pages/shareFriend/shareFriend" open-type="navigate"> | |||||
| <view class="share">分享好友</view> | <view class="share">分享好友</view> | ||||
| </navigator> | |||||
| </navigator> | |||||
| </view> | </view> | ||||
| <view class="user_growth_box"> | <view class="user_growth_box"> | ||||
| <navigator url="/pages/specialcourtesy/specialcourtesy"> | <navigator url="/pages/specialcourtesy/specialcourtesy"> | ||||
| @@ -61,161 +61,165 @@ | |||||
| <!-- <image src="{{memberLogo}}" class="memberLogo"></image> --> | <!-- <image src="{{memberLogo}}" class="memberLogo"></image> --> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="user-btns"> | |||||
| <!-- 我的订单 --> | |||||
| <navigator url="/pages/order/index/index?id=all"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{dingUrl}}" mode='widthFix'></image>我的订单</view> | |||||
| <view class="user-btns"> | |||||
| <!-- 我的订单 --> | |||||
| <navigator url="/pages/order/index/index?id=all"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{dingUrl}}" mode='widthFix'></image>我的订单 | |||||
| </view> | </view> | ||||
| </navigator> | |||||
| <!-- 我的券包 --> | |||||
| <navigator url="/pages/couponorder/index/index"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | |||||
| <view> | |||||
| </view> | |||||
| </view> | |||||
| </navigator> | |||||
| <!-- 我的券包 --> | |||||
| <navigator url="/pages/couponorder/index/index"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包 | |||||
| </view> | </view> | ||||
| </navigator> | |||||
| <navigator url="/pages/cardorder/index/index"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view> | |||||
| <view> | |||||
| </view> | |||||
| <view> | |||||
| </view> | </view> | ||||
| </navigator> | |||||
| <!-- 积分商城 --> | |||||
| <navigator url="/pages/integralmall/index"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{wmintegral}}" mode='widthFix'></image>积分商城</view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/cardorder/index/index"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包 | |||||
| </view> | </view> | ||||
| </navigator> | |||||
| </view> | |||||
| <view> | |||||
| </view> | |||||
| </view> | |||||
| </navigator> | |||||
| <!-- 积分商城 --> | |||||
| <navigator url="/pages/integralmall/index"> | |||||
| <view class="user-btn app-border-bottom"> | |||||
| <view> | |||||
| <image class='icons' src="{{wmintegral}}" mode='widthFix'></image>积分商城 | |||||
| </view> | |||||
| </view> | |||||
| </navigator> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <view class='btns_bg' > | |||||
| <view class='btns_bg'> | |||||
| <navigator url="/pages/bargain/bargain?from=myhtml" open-type="navigate"> | <navigator url="/pages/bargain/bargain?from=myhtml" open-type="navigate"> | ||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">我的砍价</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">我的砍价</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | </navigator> | ||||
| <navigator url="/pages/spellGroup/spellGroup?from=myhtml" open-type="navigate"> | <navigator url="/pages/spellGroup/spellGroup?from=myhtml" open-type="navigate"> | ||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">我的拼团</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">我的拼团</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | </navigator> | ||||
| <navigator url="/pages/user/myactivity/index" open-type="navigate"> | <navigator url="/pages/user/myactivity/index" open-type="navigate"> | ||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">我的活动</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">我的活动</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/site/site" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">完善个人信息</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/specialcourtesy/specialcourtesy"> | <navigator url="/pages/specialcourtesy/specialcourtesy"> | ||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">特享礼遇</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">特享礼遇</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | </navigator> | ||||
| <navigator url="/pages/exchange/exchange" open-type="navigate"> | <navigator url="/pages/exchange/exchange" open-type="navigate"> | ||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">兑换</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/questionnaire/questionnaireLsit/questionnaireLsit" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">问券调查</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/site/site" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">个人信息</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <!-- <view bindtap="suerService"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">兑换</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/questionnaire/questionnaireLsit/questionnaireLsit" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">问券调查</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <!-- <view bindtap="suerService"> | |||||
| <view class="particulars_list"> | <view class="particulars_list"> | ||||
| <view class="particulars_name">联系客服</view> | <view class="particulars_name">联系客服</view> | ||||
| <view class="particulars_go">></view> | <view class="particulars_go">></view> | ||||
| </view> | </view> | ||||
| </view> --> | </view> --> | ||||
| <navigator url="/pages/complaint/complaint" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">投诉建议</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator wx:if="{{businessSwitch}}" url="{{goUrl}}"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">自助积分</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/mallInfo/mallInfo" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">关于我们</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/complaint/complaint" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">投诉建议</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator wx:if="{{businessSwitch}}" url="{{goUrl}}"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">自助积分</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| <navigator url="/pages/mallInfo/mallInfo" open-type="navigate"> | |||||
| <view class="particulars_list"> | |||||
| <view class="particulars_name">关于我们</view> | |||||
| <view class="particulars_go">></view> | |||||
| </view> | |||||
| </navigator> | |||||
| </view> | </view> | ||||
| <!-- <view class='btns_bg' wx:if="{{ifStoreApp!=1}}"> | <!-- <view class='btns_bg' wx:if="{{ifStoreApp!=1}}"> | ||||
| <view class="user-btns"> --> | <view class="user-btns"> --> | ||||
| <!-- 我的砍价 --> | |||||
| <!-- <navigator url="/pages/bargain/bargain?from=myhtml" open-type="navigate"> | |||||
| <!-- 我的砍价 --> | |||||
| <!-- <navigator url="/pages/bargain/bargain?from=myhtml" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{wmbarginicon}}" mode='widthFix'></image>我的砍价</view> | <image class='icons' src="{{wmbarginicon}}" mode='widthFix'></image>我的砍价</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 我的拼团 --> | |||||
| <!-- <navigator url="/pages/spellGroup/spellGroup?from=myhtml" open-type="navigate"> | |||||
| <!-- 我的拼团 --> | |||||
| <!-- <navigator url="/pages/spellGroup/spellGroup?from=myhtml" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{wmspellgroup}}" mode='widthFix'></image>我的拼团</view> | <image class='icons' src="{{wmspellgroup}}" mode='widthFix'></image>我的拼团</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 积分商城 --> | |||||
| <!-- <navigator url="/pages/integralmall/index"> | |||||
| <!-- 积分商城 --> | |||||
| <!-- <navigator url="/pages/integralmall/index"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{wmintegral}}" mode='widthFix'></image>积分商城</view> | <image class='icons' src="{{wmintegral}}" mode='widthFix'></image>积分商城</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 当商场开启使用折扣按钮的时候, --> | |||||
| <!-- <navigator url="/pages/specialcourtesy/specialcourtesy"> | |||||
| <!-- 当商场开启使用折扣按钮的时候, --> | |||||
| <!-- <navigator url="/pages/specialcourtesy/specialcourtesy"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{giftUrl}}" mode='widthFix'></image>特享礼遇</view> | <image class='icons' src="{{giftUrl}}" mode='widthFix'></image>特享礼遇</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- <navigator url="/pages/user/myactivity/index" open-type="navigate"> | |||||
| <!-- <navigator url="/pages/user/myactivity/index" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{myactivity}}" mode='widthFix'></image>我的活动</view> | <image class='icons' src="{{myactivity}}" mode='widthFix'></image>我的活动</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 兑换 --> | |||||
| <!-- <navigator url="/pages/exchange/exchange" open-type="navigate"> | |||||
| <!-- 兑换 --> | |||||
| <!-- <navigator url="/pages/exchange/exchange" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{duihuan}}" mode='widthFix'></image>兑换</view> | <image class='icons' src="{{duihuan}}" mode='widthFix'></image>兑换</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 地图 --> | |||||
| <!-- <navigator url="/pages/marketAtlas/marketAtlas" open-type="navigate"> | |||||
| <!-- 地图 --> | |||||
| <!-- <navigator url="/pages/marketAtlas/marketAtlas" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{shoppingAtlas}}" mode='widthFix'></image>商场地图</view> | <image class='icons' src="{{shoppingAtlas}}" mode='widthFix'></image>商场地图</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 分享好友 --> | |||||
| <!-- <navigator url="/pages/shareFriend/shareFriend" open-type="navigate"> | |||||
| <!-- 分享好友 --> | |||||
| <!-- <navigator url="/pages/shareFriend/shareFriend" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{fenxiang}}" mode='widthFix'></image>分享好友</view> | <image class='icons' src="{{fenxiang}}" mode='widthFix'></image>分享好友</view> | ||||
| @@ -232,16 +236,16 @@ | |||||
| <view class="user-name" bindtap='gotoedit'> | <view class="user-name" bindtap='gotoedit'> | ||||
| <open-data class="name" type="userNickName"></open-data> | <open-data class="name" type="userNickName"></open-data> | ||||
| </view> --> | </view> --> | ||||
| <!-- <view class="user-btns"> --> | |||||
| <!-- 我的订单 --> | |||||
| <!-- <navigator url="/pages/order/index/index?id=all"> | |||||
| <!-- <view class="user-btns"> --> | |||||
| <!-- 我的订单 --> | |||||
| <!-- <navigator url="/pages/order/index/index?id=all"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{dingUrl}}" mode='widthFix'></image>我的订单</view> | <image class='icons' src="{{dingUrl}}" mode='widthFix'></image>我的订单</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 我的券包 --> | |||||
| <!-- <navigator url="/pages/couponorder/index/index"> | |||||
| <!-- 我的券包 --> | |||||
| <!-- <navigator url="/pages/couponorder/index/index"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | <image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | ||||
| @@ -250,15 +254,15 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 我的砍价 --> | |||||
| <!-- <navigator url="/pages/bargain/bargain?from=myhtml" open-type="navigate"> | |||||
| <!-- 我的砍价 --> | |||||
| <!-- <navigator url="/pages/bargain/bargain?from=myhtml" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{wmbarginicon}}" mode='widthFix'></image>我的砍价</view> | <image class='icons' src="{{wmbarginicon}}" mode='widthFix'></image>我的砍价</view> | ||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <!-- 我的拼团 --> | |||||
| <!-- <navigator url="/pages/spellGroup/spellGroup?from=myhtml" open-type="navigate"> | |||||
| <!-- 我的拼团 --> | |||||
| <!-- <navigator url="/pages/spellGroup/spellGroup?from=myhtml" open-type="navigate"> | |||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view> | <view> | ||||
| <image class='icons' src="{{wmspellgroup}}" mode='widthFix'></image>我的拼团</view> | <image class='icons' src="{{wmspellgroup}}" mode='widthFix'></image>我的拼团</view> | ||||
| @@ -267,7 +271,7 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> --> | </view> --> | ||||
| <view class="margin"></view> | <view class="margin"></view> | ||||
| <view class='of' wx:if="{{canIUse}}"> | <view class='of' wx:if="{{canIUse}}"> | ||||
| <official-account class="gzh"></official-account> | <official-account class="gzh"></official-account> | ||||
| @@ -9,15 +9,15 @@ Page({ | |||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| */ | */ | ||||
| data: { | data: { | ||||
| childArr:[], | |||||
| childArr: [], | |||||
| navigationBarHeight, | navigationBarHeight, | ||||
| chevronUrl: imgurl.chevron.url, | chevronUrl: imgurl.chevron.url, | ||||
| date: '1988-03-12', | date: '1988-03-12', | ||||
| dateEnd:'', | |||||
| dateEnd: '', | |||||
| flag: 1, | flag: 1, | ||||
| flagsex: 0, | flagsex: 0, | ||||
| height:"", | |||||
| weight:"", | |||||
| height: "", | |||||
| weight: "", | |||||
| items: [ | items: [ | ||||
| { name: 1, value: '男', checked: false }, | { name: 1, value: '男', checked: false }, | ||||
| { name: 2, value: '女', checked: false }, | { name: 2, value: '女', checked: false }, | ||||
| @@ -27,7 +27,8 @@ Page({ | |||||
| array1: ['附近住户', '距离2km', '距离3km', '更远'], | array1: ['附近住户', '距离2km', '距离3km', '更远'], | ||||
| index: 0, | index: 0, | ||||
| index1: 0, | index1: 0, | ||||
| showPage:false | |||||
| showPage: false, | |||||
| type: true | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 获得生日 | * 获得生日 | ||||
| @@ -65,13 +66,13 @@ Page({ | |||||
| }, | }, | ||||
| fail: function (error) { | fail: function (error) { | ||||
| console.log(error) | console.log(error) | ||||
| }, | |||||
| }, | |||||
| complete: function (data) { | complete: function (data) { | ||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| formSubmit: function (e) { | formSubmit: function (e) { | ||||
| console.log(e.detail,"formSubmit") | |||||
| console.log(e.detail, "formSubmit") | |||||
| let that = this; | let that = this; | ||||
| // console.log(that.data.childArr) | // console.log(that.data.childArr) | ||||
| /** | /** | ||||
| @@ -105,38 +106,41 @@ Page({ | |||||
| } else { | } else { | ||||
| var birthdate = null; | var birthdate = null; | ||||
| } | } | ||||
| if (username == null || address == null || sex == 0 || birthdate == null) { | |||||
| wx.showToast({ | |||||
| title: '请输入完整的用户信息', | |||||
| icon:"none" | |||||
| }) | |||||
| } else { | |||||
| let tmeparr = [] | |||||
| tmeparr = JSON.parse(JSON.stringify(that.data.childArr)) | |||||
| console.log(that.data.childArr) | |||||
| tmeparr.map(item=>{ | |||||
| item.birthdate = new Date(item.birthdate).getTime() | |||||
| }) | |||||
| console.log(that.data.childArr) | |||||
| Http.post({ | |||||
| url: config.api.updateInfo, | |||||
| data: { | |||||
| sex: sex, | |||||
| address: address, | |||||
| name: username, | |||||
| birthdate: birthdate, | |||||
| childrenList: tmeparr, | |||||
| height: e.detail.value.height ? e.detail.value.height : that.data.height, | |||||
| weight: e.detail.value.weight ? e.detail.value.weight : that.data.weight, | |||||
| } | |||||
| }) | |||||
| // if (username == null || address == null || sex == 0 || birthdate == null) { | |||||
| // wx.showToast({ | |||||
| // title: '请输入完整的用户信息', | |||||
| // icon: "none" | |||||
| // }) | |||||
| // } else {} | |||||
| let tmeparr = [] | |||||
| tmeparr = JSON.parse(JSON.stringify(that.data.childArr)) | |||||
| console.log(that.data.childArr) | |||||
| tmeparr.map(item => { | |||||
| item.birthdate = new Date(item.birthdate).getTime() | |||||
| }) | |||||
| console.log(that.data.childArr) | |||||
| Http.post({ | |||||
| url: config.api.updateInfo, | |||||
| data: { | |||||
| sex: sex, | |||||
| address: address, | |||||
| name: username, | |||||
| birthdate: birthdate, | |||||
| childrenList: tmeparr, | |||||
| height: e.detail.value.height ? e.detail.value.height : that.data.height, | |||||
| weight: e.detail.value.weight ? e.detail.value.weight : that.data.weight, | |||||
| } | |||||
| }) | |||||
| .then(res => { | .then(res => { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "信息提交成功,将在3分钟内生效", | title: "信息提交成功,将在3分钟内生效", | ||||
| icon: 'none', | icon: 'none', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }) | |||||
| }), | |||||
| setTimeout(() => { | |||||
| wx.navigateBack() | |||||
| }, 2000) | |||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| @@ -146,7 +150,7 @@ Page({ | |||||
| mask: false | mask: false | ||||
| }) | }) | ||||
| }) | }) | ||||
| } | |||||
| }, | }, | ||||
| radioChange: function (e) { | radioChange: function (e) { | ||||
| this.setData({ | this.setData({ | ||||
| @@ -154,7 +158,7 @@ Page({ | |||||
| flagsex: 1 | flagsex: 1 | ||||
| }) | }) | ||||
| }, | }, | ||||
| childSex(e){ | |||||
| childSex(e) { | |||||
| let index = e.currentTarget.dataset.index | let index = e.currentTarget.dataset.index | ||||
| let tmpeObj = this.data.childArr | let tmpeObj = this.data.childArr | ||||
| tmpeObj[index].sex = e.detail.value | tmpeObj[index].sex = e.detail.value | ||||
| @@ -163,7 +167,7 @@ Page({ | |||||
| }) | }) | ||||
| console.log(tmpeObj) | console.log(tmpeObj) | ||||
| }, | }, | ||||
| chidBirthday(e){ | |||||
| chidBirthday(e) { | |||||
| let index = e.currentTarget.dataset.index | let index = e.currentTarget.dataset.index | ||||
| let tmpeObj = this.data.childArr | let tmpeObj = this.data.childArr | ||||
| tmpeObj[index].birthdate = e.detail.value | tmpeObj[index].birthdate = e.detail.value | ||||
| @@ -171,7 +175,7 @@ Page({ | |||||
| childArr: tmpeObj | childArr: tmpeObj | ||||
| }) | }) | ||||
| }, | }, | ||||
| chidName(e){ | |||||
| chidName(e) { | |||||
| let index = e.currentTarget.dataset.index | let index = e.currentTarget.dataset.index | ||||
| let tmpeObj = this.data.childArr | let tmpeObj = this.data.childArr | ||||
| tmpeObj[index].name = e.detail.value | tmpeObj[index].name = e.detail.value | ||||
| @@ -179,17 +183,17 @@ Page({ | |||||
| childArr: tmpeObj | childArr: tmpeObj | ||||
| }) | }) | ||||
| }, | }, | ||||
| childDel(e){ | |||||
| childDel(e) { | |||||
| let index = e.currentTarget.dataset.index | let index = e.currentTarget.dataset.index | ||||
| let tmpeObj = this.data.childArr | let tmpeObj = this.data.childArr | ||||
| tmpeObj.splice(index,1) | |||||
| tmpeObj.splice(index, 1) | |||||
| this.setData({ | this.setData({ | ||||
| childArr: tmpeObj | childArr: tmpeObj | ||||
| }) | }) | ||||
| }, | }, | ||||
| childAdd(){ | |||||
| childAdd() { | |||||
| let tmpeObj = this.data.childArr | let tmpeObj = this.data.childArr | ||||
| tmpeObj.unshift({ sex:1}) | |||||
| tmpeObj.unshift({ sex: 1 }) | |||||
| this.setData({ | this.setData({ | ||||
| childArr: tmpeObj | childArr: tmpeObj | ||||
| }) | }) | ||||
| @@ -198,7 +202,12 @@ Page({ | |||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| let tmpeDateEnd = util.formatTime(new Date(), "yyyy-MM-dd") | |||||
| if (1 * options.type) { | |||||
| this.setData({ | |||||
| type: false | |||||
| }) | |||||
| } | |||||
| let tmpeDateEnd = util.formatTime(new Date(), "yyyy-MM-dd") | |||||
| let that = this; | let that = this; | ||||
| that.setData({ | that.setData({ | ||||
| dateEnd: tmpeDateEnd | dateEnd: tmpeDateEnd | ||||
| @@ -207,82 +216,83 @@ Page({ | |||||
| url: config.api.getScore, | url: config.api.getScore, | ||||
| data: {}, | data: {}, | ||||
| }) | }) | ||||
| .then(res => {res.data | |||||
| console.log(res); | |||||
| if(res.code == 200){ | |||||
| if (res.data.weight){ | |||||
| this.setData({ | |||||
| weight: res.data.weight | |||||
| .then(res => { | |||||
| res.data | |||||
| console.log(res); | |||||
| if (res.code == 200) { | |||||
| if (res.data.weight) { | |||||
| this.setData({ | |||||
| weight: res.data.weight | |||||
| }) | |||||
| } | |||||
| if (res.data.height) { | |||||
| this.setData({ | |||||
| height: res.data.height | |||||
| }) | |||||
| } | |||||
| if (res.data.childrenList) { | |||||
| let tmpeArr = res.data.childrenList | |||||
| tmpeArr.map(item => { | |||||
| item.birthdate = util.fmtDate(parseInt(item.birthdate)) | |||||
| that.setData({ | |||||
| childArr: tmpeArr | |||||
| }) | |||||
| }) | |||||
| } | |||||
| that.setData({ | |||||
| showPage: true, | |||||
| }) | }) | ||||
| } | } | ||||
| if (res.data.height) { | |||||
| this.setData({ | |||||
| height: res.data.height | |||||
| var reg = RegExp(/address/); | |||||
| if (res && res.data && res.data.address && res.data.address.match(reg)) { | |||||
| that.setData({ | |||||
| address: JSON.parse(res.data.address).address + JSON.parse(res.data.address).name, | |||||
| addressStr: JSON.parse(res.data.address).address + JSON.parse(res.data.address).name | |||||
| }) | |||||
| } else { | |||||
| that.setData({ | |||||
| address: res.data.address, | |||||
| addressStr: res.data.address | |||||
| }) | }) | ||||
| } | } | ||||
| if (res.data.childrenList){ | |||||
| let tmpeArr = res.data.childrenList | |||||
| tmpeArr.map(item => { | |||||
| item.birthdate = util.fmtDate(parseInt(item.birthdate)) | |||||
| that.setData({ | |||||
| childArr: tmpeArr | |||||
| }) | |||||
| if (res.data.name) { | |||||
| that.setData({ | |||||
| username: res.data.name | |||||
| }) | }) | ||||
| } | } | ||||
| that.setData({ | |||||
| showPage:true, | |||||
| }) | |||||
| } | |||||
| var reg = RegExp(/address/); | |||||
| if (res&&res.data&&res.data.address&&res.data.address.match(reg)) { | |||||
| that.setData({ | |||||
| address: JSON.parse(res.data.address).address + JSON.parse(res.data.address).name, | |||||
| addressStr: JSON.parse(res.data.address).address + JSON.parse(res.data.address).name | |||||
| }) | |||||
| }else{ | |||||
| that.setData({ | |||||
| address: res.data.address, | |||||
| addressStr: res.data.address | |||||
| }) | |||||
| } | |||||
| if (res.data.name) { | |||||
| that.setData({ | |||||
| username: res.data.name | |||||
| }) | |||||
| } | |||||
| if (res.data.sex) { | |||||
| if (res.data.sex == 1) { | |||||
| var checked = 'items[' + 0 + '].checked' | |||||
| if (res.data.sex) { | |||||
| if (res.data.sex == 1) { | |||||
| var checked = 'items[' + 0 + '].checked' | |||||
| that.setData({ | |||||
| [checked]: true, | |||||
| flagsex: 1 | |||||
| }) | |||||
| } else if (res.data.sex == 2) { | |||||
| var checked = 'items[' + 1 + '].checked' | |||||
| that.setData({ | |||||
| [checked]: true, | |||||
| flagsex: 1 | |||||
| }) | |||||
| } | |||||
| that.setData({ | that.setData({ | ||||
| [checked]: true, | |||||
| flagsex: 1 | |||||
| sex: res.data.sex | |||||
| }) | }) | ||||
| } else if (res.data.sex == 2) { | |||||
| var checked = 'items[' + 1 + '].checked' | |||||
| } | |||||
| if (res.data.birthdate) { | |||||
| that.setData({ | that.setData({ | ||||
| [checked]: true, | |||||
| flagsex: 1 | |||||
| date: util.fmtDate(parseInt(res.data.birthdate)), | |||||
| flag: 2 | |||||
| }) | }) | ||||
| } | } | ||||
| that.setData({ | |||||
| sex: res.data.sex | |||||
| }) | |||||
| } | |||||
| if (res.data.birthdate) { | |||||
| that.setData({ | |||||
| date: util.fmtDate(parseInt(res.data.birthdate)), | |||||
| flag: 2 | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(error=>{ | |||||
| wx.showToast({ | |||||
| title: error.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }) | |||||
| .catch(error => { | |||||
| wx.showToast({ | |||||
| title: error.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }) | }) | ||||
| @@ -1,78 +1,83 @@ | |||||
| <navbar back home text="编辑信息"></navbar> | <navbar back home text="编辑信息"></navbar> | ||||
| <view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
| <form bindsubmit="formSubmit" wx:if="{{showPage}}"> | <form bindsubmit="formSubmit" wx:if="{{showPage}}"> | ||||
| <view class='section'> | |||||
| <text>姓名</text> | |||||
| <input wx:if="{{username}}" name="username" type="text" placeholder='{{username}}' /> | |||||
| <input wx:if="{{!username}}" name="username" type="text" placeholder='请填写名字' /> | |||||
| </view> | |||||
| <view class="section sec"> | |||||
| <text>生日</text> | |||||
| <picker mode="date" value="{{date}}" start="1930-09-01" end="{{dateEnd}}" bindchange="bindDateChange"> | |||||
| <input wx:if="{{flag==1}}" class='input' placeholder='请输入生日' disabled/> | |||||
| <view wx:if="{{flag==2}}" class="picker"> {{date}}</view> | |||||
| </picker> | |||||
| <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> | |||||
| </view> | |||||
| <view class='section'> | |||||
| <text>身高</text> | |||||
| <input wx:if="{{height}}" name="height" type="text" placeholder='请填写身高单位cm' placeholder='{{height}}'/> | |||||
| <input wx:if="{{!height}}" name="height" type="text" placeholder='请填写身高单位cm' /> | |||||
| </view> | |||||
| <view class='section'> | |||||
| <text>体重</text> | |||||
| <input wx:if="{{weight}}" name="weight" type="text" placeholder='请填写体重单位kg' placeholder='{{weight}}'/> | |||||
| <input wx:if="{{!weight}}" name="weight" type="text" placeholder='请填写体重单位kg' /> | |||||
| </view> | |||||
| <view class="section section_gap"> | |||||
| <text>性别</text> | |||||
| <radio-group class="radio-group" bindchange="radioChange"> | |||||
| <radio class="radio" wx:for-items="{{items}}" wx:key="name" value="{{item.name}}" checked="{{item.checked}}"> | |||||
| <text>{{item.value}}</text> | |||||
| </radio> | |||||
| </radio-group> | |||||
| </view> | |||||
| <view wx:if="{{type}}"> | |||||
| <view class='section'> | |||||
| <text>姓名</text> | |||||
| <input wx:if="{{username}}" name="username" type="text" placeholder='{{username}}' /> | |||||
| <input wx:if="{{!username}}" name="username" type="text" placeholder='请填写名字' /> | |||||
| </view> | |||||
| <view class="section sec"> | |||||
| <text>生日</text> | |||||
| <picker mode="date" value="{{date}}" start="1930-09-01" end="{{dateEnd}}" bindchange="bindDateChange"> | |||||
| <input wx:if="{{flag==1}}" class='input' placeholder='请输入生日' disabled /> | |||||
| <view wx:if="{{flag==2}}" class="picker"> {{date}}</view> | |||||
| </picker> | |||||
| <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> | |||||
| </view> | |||||
| <view class='section'> | |||||
| <text>身高</text> | |||||
| <input wx:if="{{height}}" name="height" type="text" placeholder='请填写身高单位cm' placeholder='{{height}}' /> | |||||
| <input wx:if="{{!height}}" name="height" type="text" placeholder='请填写身高单位cm' /> | |||||
| </view> | |||||
| <view class='section'> | |||||
| <text>体重</text> | |||||
| <input wx:if="{{weight}}" name="weight" type="text" placeholder='请填写体重单位kg' placeholder='{{weight}}' /> | |||||
| <input wx:if="{{!weight}}" name="weight" type="text" placeholder='请填写体重单位kg' /> | |||||
| </view> | |||||
| <view class="section section_gap"> | |||||
| <text>性别</text> | |||||
| <radio-group class="radio-group" bindchange="radioChange"> | |||||
| <radio class="radio" wx:for-items="{{items}}" wx:key="name" value="{{item.name}}" checked="{{item.checked}}"> | |||||
| <text>{{item.value}}</text> | |||||
| </radio> | |||||
| </radio-group> | |||||
| </view> | |||||
| <view class='address sec' bindtap='address'> | |||||
| <text>住址</text> | |||||
| <view class='names' wx:if="{{address}}">{{address}}</view> | |||||
| <view class='names' wx:if="{{!address}}">请选择地址</view> | |||||
| <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> | |||||
| <view class='address sec' bindtap='address'> | |||||
| <text>住址</text> | |||||
| <view class='names' wx:if="{{address}}">{{address}}</view> | |||||
| <view class='names' wx:if="{{!address}}">请选择地址</view> | |||||
| <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <view class="child_add" bindtap="childAdd">+ 添加子女信息</view> | |||||
| <view class="child_box" wx:for="{{childArr}}" wx:kye="index"> | |||||
| <view class="contBox"> | |||||
| <view class='contBox_section'> | |||||
| <text>姓名</text> | |||||
| <input wx:if="{{item.name}}" type="text" placeholder='{{item.name}}' bindinput="chidName" data-index="{{index}}" /> | |||||
| <input wx:if="{{!item.name}}" type="text" placeholder='请填写名字' bindinput="chidName" data-index="{{index}}" /> | |||||
| </view> | |||||
| <view wx:else> | |||||
| <view class="child_add" bindtap="childAdd">+ 添加子女信息</view> | |||||
| <view class="contBox_section sec"> | |||||
| <text>生日</text> | |||||
| <picker class="contBox_picker" mode="date" value="{{date}}" start="1930-09-01" end="{{dateEnd}}" bindchange="chidBirthday" data-index="{{index}}"> | |||||
| <input wx:if="{{!item.birthdate}}" class='contBox_picker' placeholder='请输入生日' disabled/> | |||||
| <view wx:if="{{item.birthdate}}" class="contBox_picker"> {{item.birthdate}}</view> | |||||
| </picker> | |||||
| <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> | |||||
| </view> | |||||
| <view class="child_box" wx:for="{{childArr}}" wx:key="index"> | |||||
| <view class="contBox"> | |||||
| <view class='contBox_section'> | |||||
| <text>姓名</text> | |||||
| <input wx:if="{{item.name}}" type="text" placeholder='{{item.name}}' bindinput="chidName" data-index="{{index}}" /> | |||||
| <input wx:if="{{!item.name}}" type="text" placeholder='请填写名字' bindinput="chidName" data-index="{{index}}" /> | |||||
| </view> | |||||
| <view class="contBox_section sec"> | |||||
| <text>生日</text> | |||||
| <picker class="contBox_picker" mode="date" value="{{date}}" start="1930-09-01" end="{{dateEnd}}" bindchange="chidBirthday" data-index="{{index}}"> | |||||
| <input wx:if="{{!item.birthdate}}" class='contBox_picker' placeholder='请输入生日' disabled /> | |||||
| <view wx:if="{{item.birthdate}}" class="contBox_picker"> {{item.birthdate}}</view> | |||||
| </picker> | |||||
| <image class="rArrow" src="{{chevronUrl}}" mode='widthFix'></image> | |||||
| </view> | |||||
| <view class="contBox_section section_gap"> | |||||
| <text>性别</text> | |||||
| <radio-group class="radio-group" bindchange="childSex" data-index="{{index}}"> | |||||
| <radio class="radio" value="1" checked="{{item.sex==1?true:false}}"> | |||||
| <text>男</text> | |||||
| </radio> | |||||
| <radio class="radio" value="2" checked="{{item.sex==2?true:false}}"> | |||||
| <text>女</text> | |||||
| </radio> | |||||
| </radio-group> | |||||
| <view class="contBox_section section_gap"> | |||||
| <text>性别</text> | |||||
| <radio-group class="radio-group" bindchange="childSex" data-index="{{index}}"> | |||||
| <radio class="radio" value="1" checked="{{item.sex==1?true:false}}"> | |||||
| <text>男</text> | |||||
| </radio> | |||||
| <radio class="radio" value="2" checked="{{item.sex==2?true:false}}"> | |||||
| <text>女</text> | |||||
| </radio> | |||||
| </radio-group> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <view class="det_child_box" bindtap="childDel" data-index="{{index}}"> 删除</view> | |||||
| </view> | </view> | ||||
| <view class="det_child_box" bindtap="childDel" data-index="{{index}}"> 删除</view> | |||||
| </view> | </view> | ||||
| <button class='btn' wx:if="{{!username}}" formType="submit" hover-class='active' style='background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)'>完成</button> | <button class='btn' wx:if="{{!username}}" formType="submit" hover-class='active' style='background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)'>完成</button> | ||||
| @@ -14,10 +14,11 @@ Page({ | |||||
| skipUrl: 0, | skipUrl: 0, | ||||
| fillIndentId: "", | fillIndentId: "", | ||||
| couponId: "", | couponId: "", | ||||
| go: '' | |||||
| // skip: app.globalData.skip | // skip: app.globalData.skip | ||||
| }, | }, | ||||
| onLoad: function(options) { | |||||
| onLoad: function (options) { | |||||
| console.log(options, 'options'); | |||||
| var that = this; | var that = this; | ||||
| console.log(options.skipUrl, "options.skipUrl") | console.log(options.skipUrl, "options.skipUrl") | ||||
| if (options.skipUrl) { | if (options.skipUrl) { | ||||
| @@ -26,6 +27,12 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| if (options.go) { | |||||
| that.setData({ | |||||
| go: options.go | |||||
| }) | |||||
| } | |||||
| that.setData({ | that.setData({ | ||||
| path: options.path | path: options.path | ||||
| }) | }) | ||||
| @@ -44,7 +51,7 @@ Page({ | |||||
| }); | }); | ||||
| } | } | ||||
| if (options && options.mineFlag) { | |||||
| if (options && options.mineFlag) { | |||||
| that.setData({ | that.setData({ | ||||
| mineFlag: options.mineFlag | mineFlag: options.mineFlag | ||||
| }) | }) | ||||
| @@ -56,18 +63,18 @@ Page({ | |||||
| } | } | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.marketicon, | |||||
| data: { | |||||
| appId: config.weapp.AppId | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| mallImgUrl: res.data.mallImgUrl | |||||
| }); | |||||
| wx.setNavigationBarTitle({ | |||||
| title: res.data.mallName | |||||
| }) | |||||
| url: config.api.marketicon, | |||||
| data: { | |||||
| appId: config.weapp.AppId | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| mallImgUrl: res.data.mallImgUrl | |||||
| }); | |||||
| wx.setNavigationBarTitle({ | |||||
| title: res.data.mallName | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | .catch(err => { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: err.errMsg, | title: err.errMsg, | ||||
| @@ -77,7 +84,7 @@ Page({ | |||||
| }); | }); | ||||
| }) | }) | ||||
| }, | }, | ||||
| onShow: function() { | |||||
| onShow: function () { | |||||
| wx.checkSession({ | wx.checkSession({ | ||||
| success() { | success() { | ||||
| //session_key 未过期,并且在本生命周期一直有效 | //session_key 未过期,并且在本生命周期一直有效 | ||||
| @@ -105,12 +112,12 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| }, | }, | ||||
| backHome: function() { | |||||
| backHome: function () { | |||||
| wx.switchTab({ | wx.switchTab({ | ||||
| url: app.globalData.goHomeUrl, | url: app.globalData.goHomeUrl, | ||||
| }) | }) | ||||
| }, | }, | ||||
| getPhoneNumber: function(e) { | |||||
| getPhoneNumber: function (e) { | |||||
| var that = this; | var that = this; | ||||
| var iv = e.detail.iv; | var iv = e.detail.iv; | ||||
| var encryptedData = e.detail.encryptedData; | var encryptedData = e.detail.encryptedData; | ||||
| @@ -223,15 +230,21 @@ Page({ | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.data.msg, | title: res.data.msg, | ||||
| icon: "success", | icon: "success", | ||||
| success: function(res) { | |||||
| success: function (res) { | |||||
| if (that.data.couponChannelId) { | if (that.data.couponChannelId) { | ||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | ||||
| }) | }) | ||||
| } else { | } else { | ||||
| wx.switchTab({ | |||||
| url: '/index/passCar', | |||||
| }) | |||||
| if (that.data.paramData.go) { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/setUserInfo/index', | |||||
| }) | |||||
| } else { | |||||
| wx.switchTab({ | |||||
| url: '/index/passCar', | |||||
| }) | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -0,0 +1,134 @@ | |||||
| let app = getApp(); | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| const bgColor = require("../../utils/bgColor.js") | |||||
| const config = require("../../config/config"); | |||||
| const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0' | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| avatarUrl: defaultAvatarUrl, | |||||
| theme: wx.getSystemInfoSync().theme, | |||||
| typeLsit: {}, | |||||
| }, | |||||
| /** | |||||
| * 获取全局样式 | |||||
| */ | |||||
| getType() { | |||||
| Http.get({ | |||||
| url: config.api.setType, | |||||
| data: { | |||||
| mouldType: app.globalData.mouldType | |||||
| } | |||||
| }).then(res => { | |||||
| const { | |||||
| code, | |||||
| data | |||||
| } = res | |||||
| if (code == 200) { | |||||
| app.globalData.typeLsit = data | |||||
| this.setData({ | |||||
| typeLsit: data, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getNickName(e) { | |||||
| }, | |||||
| formSubmit(e) { | |||||
| const data = { | |||||
| avatarUrl: this.data.avatarUrl, | |||||
| nickName: e.detail.value.nickname | |||||
| } | |||||
| Http.post({ | |||||
| url: "/user/updateUserInfo", | |||||
| data, | |||||
| }).then(res => { | |||||
| if (res.code == 200) { | |||||
| wx.showToast({ | |||||
| title: '更改成功!', | |||||
| duration: 2000 | |||||
| }) | |||||
| setTimeout(() => { | |||||
| wx.navigateBack() | |||||
| }, 2000) | |||||
| } | |||||
| }).catch(err => { | |||||
| console.log(err); | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad(options) { | |||||
| this.getType(), | |||||
| wx.onThemeChange((result) => { | |||||
| this.setData({ | |||||
| theme: result.theme | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload() { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh() { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom() { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage() { | |||||
| }, | |||||
| onChooseAvatar(e) { | |||||
| const { avatarUrl } = e.detail | |||||
| this.setData({ | |||||
| avatarUrl, | |||||
| }) | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,8 @@ | |||||
| { | |||||
| "usingComponents": { | |||||
| "navbar": "/components/navbar/navbar" | |||||
| }, | |||||
| "enablePullDownRefresh": true, | |||||
| "navigationBarBackgroundColor": "#F4F5F9", | |||||
| "pageOrientation": "auto" | |||||
| } | |||||
| @@ -0,0 +1,15 @@ | |||||
| <view> | |||||
| <navbar home back color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="用户名和昵称"></navbar> | |||||
| <view class="container"> | |||||
| <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar"> | |||||
| <image class="avatar" src="{{avatarUrl}}"></image> | |||||
| </button> | |||||
| <view class="des">点击更换头像</view> | |||||
| <form bindsubmit="formSubmit"> | |||||
| <input type="nickname" name='nickname' class="input" placeholder="请输入昵称" /> | |||||
| <button class="submit" type="primary" form-type='submit'>确定</button> | |||||
| </form> | |||||
| </view> | |||||
| </view> | |||||
| @@ -0,0 +1,36 @@ | |||||
| @import "../../app.wxss"; | |||||
| .container { | |||||
| margin-top: 200rpx; | |||||
| padding: 0 40rpx 0 40rpx; | |||||
| text-align: center; | |||||
| } | |||||
| .avatar-wrapper { | |||||
| padding: 0; | |||||
| width: 103rpx !important; | |||||
| border-radius: 10rpx; | |||||
| margin-top: 40rpx; | |||||
| margin-bottom: 40rpx; | |||||
| } | |||||
| .avatar { | |||||
| display: block; | |||||
| width: 56px; | |||||
| height: 56px; | |||||
| } | |||||
| .des { | |||||
| margin-bottom: 30rpx; | |||||
| } | |||||
| .submit { | |||||
| margin-top: 40rpx; | |||||
| } | |||||
| .input { | |||||
| text-align: left; | |||||
| padding-left: 20rpx; | |||||
| height: 70rpx; | |||||
| border-bottom: 1px solid #afafaf; | |||||
| } | |||||
| @@ -9,7 +9,7 @@ Page({ | |||||
| data: { | data: { | ||||
| navigationBarHeight, | navigationBarHeight, | ||||
| }, | }, | ||||
| go(e){ | |||||
| go(e) { | |||||
| let url = e.currentTarget.dataset.url | let url = e.currentTarget.dataset.url | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: url, | url: url, | ||||
| @@ -20,7 +20,6 @@ Page({ | |||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -1,9 +1,13 @@ | |||||
| <navbar back home text="个人信息" background='#FD832D' color="white"></navbar> | <navbar back home text="个人信息" background='#FD832D' color="white"></navbar> | ||||
| <view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
| <view class="item" bindtap="go" data-url="/pages/edit/edit"> | |||||
| <view class="item" bindtap="go" data-url="/pages/edit/edit?type=0"> | |||||
| 我的个人信息 | 我的个人信息 | ||||
| <view class="logo">></view> | <view class="logo">></view> | ||||
| </view> | </view> | ||||
| <view class="item" bindtap="go" data-url="/pages/edit/edit?type=1"> | |||||
| 我的子女信息 | |||||
| <view class="logo">></view> | |||||
| </view> | |||||
| <view class="item" bindtap="go" data-url="/pages/siteUser/siteUser"> | <view class="item" bindtap="go" data-url="/pages/siteUser/siteUser"> | ||||
| 我的收货地址 | 我的收货地址 | ||||
| <view class="logo">></view> | <view class="logo">></view> | ||||
| @@ -146,6 +146,23 @@ Page({ | |||||
| }) | }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| // 2022年11月8日微信收回接口“wx.getUserProfile”、“wx.getUserInfo”之后,需要手动设置用户头像与昵称 | |||||
| goSetAvatar() { | |||||
| const accreditFlag = this.data.accreditFlag | |||||
| // 没授权手机号 | |||||
| if (accreditFlag == 2) { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/getphoneInfo/index?go="setUserInfo"' | |||||
| }) | |||||
| // 手机号已授权 | |||||
| } else { | |||||
| wx.navigateTo({ | |||||
| url: '/pages/setUserInfo/index', | |||||
| }) | |||||
| } | |||||
| }, | |||||
| getCouponChannelList(key) { | getCouponChannelList(key) { | ||||
| if (this.data.noDataFlag) { | if (this.data.noDataFlag) { | ||||
| return | return | ||||
| @@ -15,7 +15,7 @@ | |||||
| <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
| <view class="user-avatar1"> | <view class="user-avatar1"> | ||||
| <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | ||||
| <image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||||
| <image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image> | |||||
| <image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../../../assets/images/default.png"></image> | <image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../../../assets/images/default.png"></image> | ||||
| </view> | </view> | ||||
| <!-- 成长值--> | <!-- 成长值--> | ||||
| @@ -34,7 +34,7 @@ | |||||
| }, | }, | ||||
| "compileType": "miniprogram", | "compileType": "miniprogram", | ||||
| "libVersion": "2.11.2", | "libVersion": "2.11.2", | ||||
| "appid": "wx453ae0d37f3550d0", | |||||
| "appid": "wxfa336cad86ed598d", | |||||
| "projectname": "C", | "projectname": "C", | ||||
| "simulatorType": "wechat", | "simulatorType": "wechat", | ||||
| "simulatorPluginLibVersion": {}, | "simulatorPluginLibVersion": {}, | ||||