diff --git a/pages/signup/index.js b/pages/signup/index.js index 79028d8..9e6271f 100644 --- a/pages/signup/index.js +++ b/pages/signup/index.js @@ -1,4 +1,6 @@ // pages/signup/index.js +import _ from '../../commons/js/commons' +const app = getApp() Page({ /** @@ -16,19 +18,24 @@ Page({ icon: 'iconfont icon-yonghu', title: '用户全程0负担', content: '无需额外付费,即可享受报价权益' - },{ + }, { icon: 'iconfont icon-yonghu', title: '1次覆盖全范围', content: '权益覆盖空间站所有合作品牌' - },{ + }, { icon: 'iconfont icon-yonghu', title: '赔付至高2万元', content: '根据所购车型官方指导价划分,赔付差价' - },{ + }, { icon: 'iconfont icon-yonghu', title: '保价长达3个月', content: '自购车之日起(含购车当日)90天' - }] + }], + + userinfo: {}, + has_mobile: false, + lat: 0, + lng: 0 }, /** @@ -65,4 +72,75 @@ Page({ onUnload() { }, + + /** + * 是否绑定用户手机号 + */ + isBindMobile() { + _.userManager.isBindMobile().then(re => { + if (re) { + this.setData({ + has_mobile: true + }) + } else { + this.setData({ + has_mobile: false + }) + } + }) + }, + //授权手机号码 + getPhoneNumber(e) { + if (e.detail.errMsg && e.detail.errMsg.indexOf('ok') > -1){ + let that = this; + _.apiQuery.authUserPhone(e).then(res=>{ + _.apiQuery.getUserInfo() + that.setData({ + has_mobile: true + }) + }) + }else{ + app.printErrorClient('failGetPhoneNumber',['用户拒绝授权手机号码:'+JSON.stringify(e)]) + } + }, + + /** + * 授权地理位置 + */ + getUserLocation(){ + let that = this + return new Promise(function (resolve, reject) { + if(app.getStorageByKey('u_lat')&&app.getStorageByKey('u_lng')){ + that.setData({ + lat: app.getStorageByKey('u_lat'), + lng: app.getStorageByKey('u_lng') + },()=>{ + resolve() + }) + }else{ + //u_lat u_lng + _.userManager.getUserLocation().then(location => { + console.log(location) + that.setData({ + lat: location.lat, + lng: location.lng + },()=>{ + resolve() + }) + }).catch(res=>{ + reject(res) + }) + } + }) + }, + + /** + * 签到 + */ + bindsignup(){ + this.getUserLocation().then(()=>{ + ///...... + //签到方法 + }) + } }) \ No newline at end of file diff --git a/pages/signup/index.wxml b/pages/signup/index.wxml index 611f8b3..b1a8956 100644 --- a/pages/signup/index.wxml +++ b/pages/signup/index.wxml @@ -30,7 +30,8 @@ - + + \ No newline at end of file diff --git a/pages/signup/index.wxss b/pages/signup/index.wxss index d546811..7527266 100644 --- a/pages/signup/index.wxss +++ b/pages/signup/index.wxss @@ -6,7 +6,6 @@ page{ background-size:cover; background-color:#1a1c26; background-image:url('https://img.liche.cn/spacestation/bg.jpg?v=20240526'); - } .card{ diff --git a/pages/signup/status.wxss b/pages/signup/status.wxss index dfa97cc..7883d50 100644 --- a/pages/signup/status.wxss +++ b/pages/signup/status.wxss @@ -1,4 +1,11 @@ /* pages/signup/status.wxss */ +//- page{ +//- background-image:linear-gradient(to bottom, #f9fdff, #fff); +//- } page{ - background-image:linear-gradient(to bottom, #f9fdff, #fff); + background-repeat:no-repeat; + background-position:center bottom; + background-size:cover; + background-color:#1a1c26; + background-image:url('https://img.liche.cn/spacestation/bg.jpg?v=20240526'); } \ No newline at end of file diff --git a/project.config.json b/project.config.json index de99dab..67d4405 100644 --- a/project.config.json +++ b/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wx4733380c110313ec", + "appid": "wx71095d4049de3ed1", "compileType": "miniprogram", "libVersion": "3.0.0", "packOptions": {