From 8a214f7b326635c8ad72bb4142b3114aee93f8c7 Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Fri, 11 Aug 2023 19:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E4=B8=8E=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/mixins.js | 15 + common/js/uniExport.js | 8 + common/js/utils.js | 2 + components/privacyPopup/privacyPopup.vue | 79 +++ components/privacyRadion/privacyRadion.vue | 35 ++ main.js | 9 +- manifest.json | 11 +- pages.json | 2 +- pages/tabbar/index/index.vue | 642 ++++++++++++--------- pages/tabbar/learnCar/index.vue | 8 +- pages/tabbar/mine/index.vue | 98 +++- pages/userCenter/login/login.vue | 144 ++++- pages/userCenter/login/loginByPhone.vue | 40 +- static/images/bigImg/topbg.png | Bin 0 -> 132621 bytes static/images/userCenter/btn_shouye_nor@2x.png | Bin 0 -> 2878 bytes static/images/userCenter/btn_wode_cli@2x.png | Bin 0 -> 1286 bytes static/images/userCenter/btn_xueche_nor@2x.png | Bin 0 -> 1881 bytes static/images/userCenter/home_icon_biangen@2x.png | Bin 0 -> 2251 bytes .../userCenter/home_icon_shenqingtuixue@2x.png | Bin 0 -> 705 bytes .../images/userCenter/home_icon_tgzhuanxiao@2x.png | Bin 0 -> 865 bytes static/images/userCenter/ic_chaxun@2x.png | Bin 0 -> 1060 bytes static/images/userCenter/ic_dingdan@2x.png | Bin 0 -> 2122 bytes static/images/userCenter/ic_erweima@2x.png | Bin 0 -> 1389 bytes static/images/userCenter/ic_hetong@2x.png | Bin 0 -> 2280 bytes static/images/userCenter/ic_pingjia@2x.png | Bin 0 -> 2332 bytes static/images/userCenter/ic_shenghuo@2x.png | Bin 0 -> 3119 bytes static/images/userCenter/ic_shoucang@2x.png | Bin 0 -> 3224 bytes static/images/userCenter/ic_shuju@2x.png | Bin 0 -> 2871 bytes static/images/userCenter/ic_yuyue@2x.png | Bin 0 -> 3168 bytes static/images/userCenter/loginTitle.png | Bin 0 -> 19016 bytes static/images/userCenter/title_1.png | Bin 8982 -> 0 bytes static/images/userCenter/topbg.png | Bin 0 -> 132621 bytes .../__MACOSX/登录流程切图/._.DS_Store | Bin 120 -> 0 bytes .../__MACOSX/登录流程切图/._btn_1.png | Bin 233 -> 0 bytes .../登录流程切图/.DS_Store | Bin 6148 -> 0 bytes .../登录流程切图/登录流程切图/bg_1.png | Bin 36319 -> 0 bytes .../登录流程切图/btn_1.png | Bin 461 -> 0 bytes .../登录流程切图/btn_2.png | Bin 567 -> 0 bytes .../登录流程切图/title_1.png | Bin 8982 -> 0 bytes store/getters.js | 22 +- store/index.js | 58 +- store/modules/user.js | 104 +++- 42 files changed, 861 insertions(+), 416 deletions(-) create mode 100644 common/js/mixins.js create mode 100644 common/js/uniExport.js create mode 100644 components/privacyPopup/privacyPopup.vue create mode 100644 components/privacyRadion/privacyRadion.vue create mode 100644 static/images/bigImg/topbg.png create mode 100644 static/images/userCenter/btn_shouye_nor@2x.png create mode 100644 static/images/userCenter/btn_wode_cli@2x.png create mode 100644 static/images/userCenter/btn_xueche_nor@2x.png create mode 100644 static/images/userCenter/home_icon_biangen@2x.png create mode 100644 static/images/userCenter/home_icon_shenqingtuixue@2x.png create mode 100644 static/images/userCenter/home_icon_tgzhuanxiao@2x.png create mode 100644 static/images/userCenter/ic_chaxun@2x.png create mode 100644 static/images/userCenter/ic_dingdan@2x.png create mode 100644 static/images/userCenter/ic_erweima@2x.png create mode 100644 static/images/userCenter/ic_hetong@2x.png create mode 100644 static/images/userCenter/ic_pingjia@2x.png create mode 100644 static/images/userCenter/ic_shenghuo@2x.png create mode 100644 static/images/userCenter/ic_shoucang@2x.png create mode 100644 static/images/userCenter/ic_shuju@2x.png create mode 100644 static/images/userCenter/ic_yuyue@2x.png create mode 100644 static/images/userCenter/loginTitle.png delete mode 100644 static/images/userCenter/title_1.png create mode 100644 static/images/userCenter/topbg.png delete mode 100644 static/images/登录流程切图/__MACOSX/登录流程切图/._.DS_Store delete mode 100644 static/images/登录流程切图/__MACOSX/登录流程切图/._btn_1.png delete mode 100644 static/images/登录流程切图/登录流程切图/.DS_Store delete mode 100644 static/images/登录流程切图/登录流程切图/bg_1.png delete mode 100644 static/images/登录流程切图/登录流程切图/btn_1.png delete mode 100644 static/images/登录流程切图/登录流程切图/btn_2.png delete mode 100644 static/images/登录流程切图/登录流程切图/title_1.png diff --git a/common/js/mixins.js b/common/js/mixins.js new file mode 100644 index 0000000..bdfe885 --- /dev/null +++ b/common/js/mixins.js @@ -0,0 +1,15 @@ + +import { mapState } from 'vuex' + +export default { + computed: { + ...mapState({ + city: state=> state.user.vuex_cityInfo.city, + vuex_cityInfo: state=> state.user.vuex_cityInfo + }), + }, + data() { + return { + } + } +} \ No newline at end of file diff --git a/common/js/uniExport.js b/common/js/uniExport.js new file mode 100644 index 0000000..9f30b6a --- /dev/null +++ b/common/js/uniExport.js @@ -0,0 +1,8 @@ + +export let goPage = (url, params={}, type='navigateTo')=> { + uni.$u.route({ + url, + params, + type + }) + } \ No newline at end of file diff --git a/common/js/utils.js b/common/js/utils.js index 17ea3fd..c3c501a 100644 --- a/common/js/utils.js +++ b/common/js/utils.js @@ -76,6 +76,8 @@ const install = (Vue, vm) => { const day = date.getDate() return `${year}${splitor}${addZeroPrefix(month)}${splitor}${addZeroPrefix(day)}` } + + diff --git a/components/privacyPopup/privacyPopup.vue b/components/privacyPopup/privacyPopup.vue new file mode 100644 index 0000000..18e7578 --- /dev/null +++ b/components/privacyPopup/privacyPopup.vue @@ -0,0 +1,79 @@ + + + + + \ No newline at end of file diff --git a/components/privacyRadion/privacyRadion.vue b/components/privacyRadion/privacyRadion.vue new file mode 100644 index 0000000..dd065f0 --- /dev/null +++ b/components/privacyRadion/privacyRadion.vue @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git a/main.js b/main.js index 4f59e28..0319b9f 100644 --- a/main.js +++ b/main.js @@ -2,10 +2,11 @@ import App from './App' import Vue from 'vue' import store from './store'; -// import config from "./utils/config.js" -// import {storage, goPage} from "./utils/utils.js" -// Vue.prototype.$config = config; -// Vue.prototype.$goPage = goPage; +import { goPage } from './common/js/uniExport.js' +Vue.prototype.$goPage = goPage; + +import mixin from "./common/js/mixins.js" +Vue.mixin(mixin) import './uni.promisify.adaptor' Vue.config.productionTip = false diff --git a/manifest.json b/manifest.json index 72ac63f..4344c67 100644 --- a/manifest.json +++ b/manifest.json @@ -52,15 +52,20 @@ "mp-weixin" : { "appid" : "wx2d71605af3b620e6", "setting" : { - "urlCheck" : false, - "es6" : true + "urlCheck": true, + "es6": true, + "postcss": true, + "minified": true }, "usingComponents" : true, "permission" : { "scope.userLocation" : { "desc" : "查询用户地理位置,推荐本地驾校,提高用户服务" } - } + }, + "requiredPrivateInfos": [ + "getLocation" + ] }, "mp-alipay" : { "usingComponents" : true diff --git a/pages.json b/pages.json index 425f69c..8d28d29 100644 --- a/pages.json +++ b/pages.json @@ -69,7 +69,7 @@ ], "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "学车小程序", + "navigationBarTitleText": "", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" }, diff --git a/pages/tabbar/index/index.vue b/pages/tabbar/index/index.vue index 7fdd9a0..0338f62 100644 --- a/pages/tabbar/index/index.vue +++ b/pages/tabbar/index/index.vue @@ -1,15 +1,30 @@ diff --git a/pages/tabbar/mine/index.vue b/pages/tabbar/mine/index.vue index 05d501f..540ae37 100644 --- a/pages/tabbar/mine/index.vue +++ b/pages/tabbar/mine/index.vue @@ -1,6 +1,42 @@ @@ -26,6 +62,62 @@ diff --git a/pages/userCenter/login/login.vue b/pages/userCenter/login/login.vue index ea765d1..2667488 100644 --- a/pages/userCenter/login/login.vue +++ b/pages/userCenter/login/login.vue @@ -1,6 +1,27 @@ @@ -8,14 +29,48 @@ export default { data() { return { - + isCheck: false, + show: false, + decodePhoneParams: {} } }, onLoad() { - // this.init() - + this.getCode() + // uni.getLocation({ + // type: 'wgs84', + // success: function (res) { + // console.log(res) + // console.log('当前位置的经度:' + res.longitude); + // console.log('当前位置的纬度:' + res.latitude); + // } + // }); }, methods: { + // 获取code + getCode() { + uni.login({ + provider: 'weixin', + success: loginRes => { + this.decodePhoneParams.code = loginRes.code + console.log('loginRes') + console.log(loginRes) + } + }); + }, + // 获取手机号 + async getPhoneNumber(e) { + await this.getCode(); + console.log('获取手机号') + console.log(e) + if(!this.decodePhoneParams.code || !e.detail.encryptedData){ + return false; + } + + }, + // 是否选择协议 + changeRadio(val) { + this.isCheck = val + }, init() { uni.login({ provider: 'weixin', @@ -45,27 +100,68 @@ \ No newline at end of file diff --git a/pages/userCenter/login/loginByPhone.vue b/pages/userCenter/login/loginByPhone.vue index b700bce..429a9a4 100644 --- a/pages/userCenter/login/loginByPhone.vue +++ b/pages/userCenter/login/loginByPhone.vue @@ -1,10 +1,11 @@