From 3c5744ad47d3307ef2daf3b3f999ddb400e44f7e Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Wed, 17 May 2023 18:18:03 +0800 Subject: [PATCH 1/4] upload --- index/passCar.js | 235 ++++++++++++++++++++++-------------- index/user.js | 45 +++++-- index/user.wxml | 29 ++++- pages/getphoneInfo/index.js | 6 +- 4 files changed, 209 insertions(+), 106 deletions(-) diff --git a/index/passCar.js b/index/passCar.js index 4e728e2..ac38fe7 100644 --- a/index/passCar.js +++ b/index/passCar.js @@ -253,8 +253,17 @@ Page({ }, gotomange: function () { - wx.navigateTo({ - url: '/pages/managelicenseplate/managelicenseplate', + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + wx.navigateTo({ + url: '/pages/managelicenseplate/managelicenseplate', + }) + }).catch(err => { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=passCar`, + }) }) }, bindfail: function (res) { @@ -283,14 +292,32 @@ Page({ } }, showquan: function () { - wx.navigateTo({ - url: '/pages/passCar/couponList/couponList', + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + wx.navigateTo({ + url: '/pages/passCar/couponList/couponList', + }) + }).catch(err => { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=passCar`, + }) }) }, showList: function () { - wx.navigateTo({ - url: '/pages/passCar/showList/showList', + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + wx.navigateTo({ + url: '/pages/passCar/showList/showList', + }) + }).catch(err => { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=passCar`, + }) }) }, @@ -302,66 +329,79 @@ Page({ }) }, onShow: function (options) { - this.setData({ - goHomeUrl: app.globalData.goHomeUrl - }) - if (typeof this.getTabBar === 'function' && - this.getTabBar()) { - this.getTabBar().setData({ - selected: 2 - }) - } var that = this; - that.setData({ - etcpAppId: extConfig.attr.car.etcp.etcpAppId, - carMiniVersion: extConfig.attr.car.version, - etcpCallbackUrl: extConfig.attr.car.etcp.etcpCallbackUrl, - payPath: extConfig.attr.car.etcp.payPath, - ifHaveCarModular: extConfig.attr.ifHaveCarModular - }) - console.log(this.data.ifHaveCarModular, 'ifHaveCarModular'); - if (app.globalData.token) { - that.getList(); - that.init(); - } else { - that.init(); - } - /** - * 只有用户选择了优惠券 - * 才会进行券和车牌的绑定 - */ - /* if (wx.getStorageSync("chosed") && that.data.quanid) { - that.getStopFee(that.data.listCardNum); - that.bindCoupon(that.data.quanid); - wx.setStorage({ - key: 'chosed', - data: '', + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + this.setData({ + goHomeUrl: app.globalData.goHomeUrl }) - }; */ - if (app.globalData.token) { - // that.initUsrCarList(); - that.initUsrCarList("flags"); + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 2 + }) + } + that.setData({ - current: 0 + etcpAppId: extConfig.attr.car.etcp.etcpAppId, + carMiniVersion: extConfig.attr.car.version, + etcpCallbackUrl: extConfig.attr.car.etcp.etcpCallbackUrl, + payPath: extConfig.attr.car.etcp.payPath, + ifHaveCarModular: extConfig.attr.ifHaveCarModular }) - } - - if (that.data.addCar) { - // 绑车牌 - if (app.globalData.carLogin) { - that.bindCar(that.data.addCar); + console.log(this.data.ifHaveCarModular, 'ifHaveCarModular'); + if (app.globalData.token) { + that.getList(); + that.init(); } else { - that.bindCar(that.data.addCar); + that.init(); + } + /** + * 只有用户选择了优惠券 + * 才会进行券和车牌的绑定 + */ + /* if (wx.getStorageSync("chosed") && that.data.quanid) { + that.getStopFee(that.data.listCardNum); + that.bindCoupon(that.data.quanid); + wx.setStorage({ + key: 'chosed', + data: '', + }) + }; */ + if (app.globalData.token) { + // that.initUsrCarList(); + that.initUsrCarList("flags"); + that.setData({ + current: 0 + }) } - that.setData({ - addCar: null - }); - } - - this.getTicketList(0, 1); - + if (that.data.addCar) { + // 绑车牌 + if (app.globalData.carLogin) { + that.bindCar(that.data.addCar); + } else { + that.bindCar(that.data.addCar); + } + that.setData({ + addCar: null + }); + } + this.getTicketList(0, 1); + }).catch(err => { + that.setData({ + etcpAppId: extConfig.attr.car.etcp.etcpAppId, + carMiniVersion: extConfig.attr.car.version, + etcpCallbackUrl: extConfig.attr.car.etcp.etcpCallbackUrl, + payPath: extConfig.attr.car.etcp.payPath, + ifHaveCarModular: extConfig.attr.ifHaveCarModular + }) + that.initPark(); + that.getParkStatus(); + }) }, cancelMove: function () { console.log(111) @@ -376,39 +416,45 @@ Page({ }) }, onLoad: function (options) { - var that = this; - /** - * 获得分享小程序的 - * title - * desc - */ + Http.get({ - url: config.api.getWeapNote, - data: { - appId: config.weapp.AppId, + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + /** + * 获得分享小程序的 + * title + * desc + */ + Http.get({ + url: config.api.getWeapNote, + data: { + appId: config.weapp.AppId, + } + }) + .then(res => { + let weapNote = JSON.parse(res.data.weapNote); + that.setData({ + desc: weapNote.carpage.desc, + title: weapNote.carpage.title + }) + }) + .catch(err => { + console.log(err); + }) + // 登录 + var scene = decodeURIComponent(options.scene); + that.setData({ + scene: scene + }); + if (app.globalData.token) { } else { + // app.getLocation(); + that.userLogin() } + }).catch(err => { + return }) - .then(res => { - let weapNote = JSON.parse(res.data.weapNote); - that.setData({ - desc: weapNote.carpage.desc, - title: weapNote.carpage.title - }) - }) - .catch(err => { - console.log(err); - }) - // 登录 - var scene = decodeURIComponent(options.scene); - that.setData({ - scene: scene - }); - if (app.globalData.token) { } else { - // app.getLocation(); - that.userLogin() - } - }, /** * 用户登录 @@ -499,9 +545,18 @@ Page({ .catch(err => { }) }, jumpToAdd: function () { - wx.navigateTo({ - url: `/pages/addPark/addPark?flags=managepalte` - }); + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + wx.navigateTo({ + url: `/pages/addPark/addPark?flags=managepalte` + }); + }).catch(err => { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=passCar`, + }) + }) }, passc: function () { wx.navigateTo({ diff --git a/index/user.js b/index/user.js index ea44edb..4af1f2e 100644 --- a/index/user.js +++ b/index/user.js @@ -13,7 +13,6 @@ Page({ * 页面的初始数据 */ data: { - mch_id: mch_id, businessSwitch: businessSwitch, goUrl: "", @@ -63,6 +62,7 @@ Page({ placeholder: '', userAvatarUrl: "", userName: "", + ifSetUserInfo: false }, suerService() { console.log("打开客服") @@ -107,14 +107,25 @@ Page({ url: config.api.checkPhoneStatus, data: {} }).then(res => { + that.setData({ + ifSetUserInfo: true + }) return }).catch(err => { - wx.setStorageSync('ifSetUserInfo', 1) //手机号未授权 - wx.navigateTo({ - url: `/pages/getphoneInfo/index?mineFlag=mine`, + that.setData({ + ifSetUserInfo: false }) + const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') + if (ifSetUserInfo != 2) { + wx.setStorageSync('ifSetUserInfo', 1) //手机号未授权 + } + + // wx.navigateTo({ + // url: `/pages/getphoneInfo/index?mineFlag=mine`, + // }) }) }, + /* 判断是否授权*/ userAuthorization() { Http.get({ @@ -138,15 +149,27 @@ Page({ * 跳转到成长值的页面 */ gotograde: function () { - wx.navigateTo({ - url: '/pages/czdetail/czdetail', - }) + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/czdetail/czdetail', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } }, gotointegralmall: function () { - wx.navigateTo({ - url: '/pages/integralmall/integraHistory/index', - }) + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/integralmall/integraHistory/index', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } }, /** @@ -265,11 +288,11 @@ Page({ console.log('cancel'); } if (res.confirm) { - wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 wx.navigateTo({ url: '/pages3/setUserInfo/index', }) } + wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 } }) } diff --git a/index/user.wxml b/index/user.wxml index 90a1c06..88d3aaa 100644 --- a/index/user.wxml +++ b/index/user.wxml @@ -13,12 +13,28 @@ - + - + + + + + + + + + +

登录成为会员

+ + +
+ +

{{userName}}

@@ -26,6 +42,7 @@ {{levelName}}
-->
+ @@ -44,11 +61,14 @@ - + + + + - 会员码:{{userId}} + 会员码:{{ifSetUserInfo ? userId : '加入会员查看会员码,享受更多折扣优惠'}} 我的成长值:{{score}} @@ -56,6 +76,7 @@ 更多成长值 + 我的积分:{{credit}} | diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index 7921956..d6dca73 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -231,6 +231,10 @@ Page({ wx.switchTab({ url: '/index/user' }); + } else if (that.data.mineFlag == 'passCar') { + wx.switchTab({ + url: '/index/passCar' + }); } else if (that.data.mineFlag == 'index') { wx.switchTab({ url: app.globalData.goHomeUrl @@ -243,7 +247,7 @@ Page({ wx.navigateTo({ url: `/pages/index/searchbar/detail/index?id=${that.data.id}` }) - } else { + }else { wx.showToast({ title: res.data.msg, icon: "success", From 17f57a9b5ef9693b0ae5970dd68183a00680eaf0 Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 18 May 2023 14:20:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 +- index/passCar.wxss | 2 +- index/user.js | 173 ++++++++++++++++++++++- index/user.json | 14 +- index/user.wxml | 71 +++++----- index/user.wxss | 192 ++++++++++++++++---------- pages/getphoneInfo/index.js | 8 +- pages/getphoneInfo/index.wxml | 10 +- pages/getphoneInfo/index.wxss | 9 +- pages3/userProtocol/userProtocol.js | 66 +++++++++ pages3/userProtocol/userProtocol.json | 8 ++ pages3/userProtocol/userProtocol.wxml | 116 ++++++++++++++++ pages3/userProtocol/userProtocol.wxss | 25 ++++ utils/bgColor.js | 31 +++-- 14 files changed, 593 insertions(+), 135 deletions(-) create mode 100644 pages3/userProtocol/userProtocol.js create mode 100644 pages3/userProtocol/userProtocol.json create mode 100644 pages3/userProtocol/userProtocol.wxml create mode 100644 pages3/userProtocol/userProtocol.wxss diff --git a/app.json b/app.json index bfed136..cad04ea 100644 --- a/app.json +++ b/app.json @@ -99,7 +99,8 @@ "root": "pages3", "name": "pages3", "pages": [ - "setUserInfo/index" + "setUserInfo/index", + "userProtocol/userProtocol" ] } ], diff --git a/index/passCar.wxss b/index/passCar.wxss index 0eb82f9..eb159e5 100644 --- a/index/passCar.wxss +++ b/index/passCar.wxss @@ -123,7 +123,7 @@ page { width: 680rpx; margin: 0 auto; font-size: 36rpx; - border: 2rpx dashed #fd832d; + border: 2rpx dashed #209cff; border-radius: 16rpx; padding-bottom: 40rpx; height: 202rpx; diff --git a/index/user.js b/index/user.js index 4af1f2e..c43a879 100644 --- a/index/user.js +++ b/index/user.js @@ -22,9 +22,9 @@ Page({ ifStoreApp: ifStoreApp, aboutUs: imgurl.aboutUs.url, rqCode: imgurl.barcode.url, - banneColor: bgColor.colorFirst.user.banneColor, + banneColor: bgColor.colorFirst.user2.banneColor, levelBg: bgColor.colorFirst.user.levelBg, - view: bgColor.colorFirst.user.view, + view: bgColor.colorFirst.user2.view, fenxiang: imgurl.fenxiang1.url, redirectUrl: imgurl.redirect.url, editUrl: imgurl.edit.url, @@ -172,6 +172,175 @@ Page({ } }, + goToOrder() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/order/index/index?id=all', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToCouponorder() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/couponorder/index/index', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToCardorder() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/cardorder/index/index', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToIntegralmall() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/integralmall/index', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToBargain() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/bargain/bargain?from=myhtml', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToSpellGroup() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/spellGroup/spellGroup?from=myhtml', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToMyactivity() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/user/myactivity/index', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToSetUserInfo() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages3/setUserInfo/index', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToSpecialcourtesy() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/specialcourtesy/specialcourtesy', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToExchangeCard() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/exchangeCard/exchangeCard', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToQuestionnaire() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/questionnaire/questionnaireLsit/questionnaireLsit', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToComplaint() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/complaint/complaint', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToQuestionnaire() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/questionnaire/questionnaireLsit/questionnaireLsit', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + goToBusinessSwitch() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: this.data.goUrl, + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, + + /** * 跳转到商场信息的页面 */ diff --git a/index/user.json b/index/user.json index f78492e..69ea4dc 100644 --- a/index/user.json +++ b/index/user.json @@ -1,8 +1,8 @@ { - "usingComponents": { - "i-button": "../dist/button/index", - "navbar": "../components/navbar/navbar" - }, - "navigationBarBackgroundColor": "#FD832D", - "navigationBarTextStyle": "white" - } \ No newline at end of file + "usingComponents": { + "i-button": "../dist/button/index", + "navbar": "../components/navbar/navbar" + }, + "navigationBarBackgroundColor": "#FD832D", + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/index/user.wxml b/index/user.wxml index 88d3aaa..e6e9320 100644 --- a/index/user.wxml +++ b/index/user.wxml @@ -1,4 +1,4 @@ - + @@ -27,7 +27,7 @@ -

登录成为会员

+

登录/注册

{{curPhone}} - [微信授权手机号] + [微信授权手机号]
- 获取微信授权手机号 + [微信一键登录] @@ -76,7 +76,7 @@ 更多成长值 - + 我的积分:{{credit}} | @@ -89,25 +89,24 @@ - + 我的订单 - + - + 我的券包 - - - +
+ 我的卡包 @@ -115,48 +114,53 @@ -
+
- + 积分商城 - +
+ - + 我的砍价 > - - + + + 我的拼团 > - - + + + 我的活动 > - - + + + 完善个人信息 > - - + + + 特享礼遇 > - + - + 绑定消费卡 > - + - + 问券调查 > - + - + 投诉建议 > - - + + + 自助积分 > - + + 关于我们 > + diff --git a/index/user.wxss b/index/user.wxss index 51695fb..b76af55 100644 --- a/index/user.wxss +++ b/index/user.wxss @@ -1,15 +1,17 @@ -page{ +page { overflow-y: scroll !important; /* height: none; */ background: #f6f6f6; } + .icons { display: block; width: 50rpx; margin: 0 auto 10rpx; - + } -.particulars_list{ + +.particulars_list { overflow: hidden; border-bottom: 1rpx #f6f6f6 solid; width: 90%; @@ -19,10 +21,12 @@ page{ color: #888; font-family: PingFangSC-Regular; } -.particulars_name{ + +.particulars_name { float: left } -.particulars_go{ + +.particulars_go { color: rgba(0, 0, 0, 0.1); float: right; } @@ -50,11 +54,12 @@ page{ width: 100%; height: 100%; } -.user-name{ + +.user-name { font-family: PingFangSC-Medium; height: 42rpx; margin-top: 66rpx; - + line-height: 44rpx; font-size: 32rpx; color: #FFFFFF; @@ -69,10 +74,11 @@ page{ left: 200rpx; } -.user_phone{ + +.user_phone { font-family: PingFangSC-Medium; height: 42rpx; - + line-height: 44rpx; font-size: 32rpx; color: #FFFFFF; @@ -85,34 +91,40 @@ page{ top: -96rpx; left: 200rpx; } -.user_growth_box{ + +.user_growth_box { overflow: hidden; } -.RQcode{ + +.RQcode { width: 80rpx; height: 80rpx; margin: 20rpx 10rpx 0 40rpx; float: left; } -.memberLogo{ + +.memberLogo { max-width: 150rpx; height: 80rpx; margin: 20rpx 10rpx 0 30rpx; float: left; } -.memberBox{ + +.memberBox { float: left; margin-left: 20rpx; margin-top: 10rpx; margin-bottom: 10rpx; } -.memberCode{ + +.memberCode { font-size: 24rpx; font-family: PingFangSC-Regular; font-weight: 400; color: #888; line-height: 34rpx; } + .user-phone { font-family: PingFangSC-Regular; line-height: 44rpx; @@ -126,39 +138,43 @@ page{ height: 119rpx; border-radius: 50%; overflow: hidden; - top:-133rpx; + top: -133rpx; left: -500rpx; right: 0; margin: auto; } -.marketTitleBox{ + +.marketTitleBox { border-radius: 16rpx 16rpx 0 0; - background-color: #ff9933; + background-color: #007cc1; overflow: hidden; height: 172rpx; - position: relative ; + position: relative; } -.share{ + +.share { position: absolute; bottom: 20rpx; right: 0; font-size: 26rpx; - border-radius:10rpx 0 0 10rpx; + border-radius: 10rpx 0 0 10rpx; background-color: #f6f6f6; - color:#993300; + color: #993300; padding: 5rpx 10rpx; } -.marketName{ + +.marketName { margin: 30rpx 40rpx; font-weight: 600; width: 80%; font-size: 32rpx; color: #fff; } -.levelName{ + +.levelName { font-size: 34rpx; font-weight: 600; - margin: 0 40rpx 20rpx 40rpx ; + margin: 0 40rpx 20rpx 40rpx; width: 80%; color: #fff; } @@ -194,33 +210,38 @@ page{ width: 120rpx; height: 120rpx; } -.user-btns{ + +.user-btns { display: flex; text-align: center; flex-wrap: wrap; width: 94%; background: #fff; border-radius: 16rpx; - margin: 30rpx auto ; + margin: 30rpx auto; /* box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); */ } - .user-btns navigator{ - width: 25%; - height: 160rpx; - } -.user-btns:nth-of-type(3){ +.user-btns .link { + width: 25%; + height: 160rpx; +} + +.user-btns:nth-of-type(3) { margin-bottom: 0; } + .user-btns .user-btn { font-size: 30rpx; letter-spacing: 1.16rpx; } -.top-content{ + +.top-content { width: 100%; height: auto; } -.user_title{ + +.user_title { position: relative; width: 94%; background: #fff; @@ -228,7 +249,8 @@ page{ margin: -100rpx auto 0; /* box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); */ } -.btns_bg{ + +.btns_bg { width: 94%; background: #fff; border-radius: 16rpx; @@ -236,8 +258,9 @@ page{ padding: 20rpx 0; /* box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); */ } -.user-btns .user-btn > view { - padding: 30rpx 10px ; + +.user-btns .user-btn>view { + padding: 30rpx 10px; font-size: 28rpx; color: #888; letter-spacing: 1.16rpx; @@ -262,13 +285,14 @@ page{ padding-right: 25rpx; } -.user{ +.user { position: relative; } -.user .version{ + +.user .version { position: absolute; top: 140rpx; - left:30rpx; + left: 30rpx; width: 307rpx; height: 50rpx; text-align: center; @@ -276,6 +300,7 @@ page{ color: #999; z-index: 100; } + .user-out-btn { background-color: #fff; height: 100rpx; @@ -295,9 +320,11 @@ page{ .user-out-btn::after { opacity: 0; } + .gzh button::after { - border: none!important; + border: none !important; } + .gzh { width: 100%; height: 170rpx; @@ -321,7 +348,8 @@ page{ overflow: hidden; box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); } -.of1{ + +.of1 { width: 90%; margin: auto; height: 160rpx; @@ -331,10 +359,12 @@ page{ box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); display: flex; } -.of1 .img{ - width:100rpx; + +.of1 .img { + width: 100rpx; height: 100rpx; } + .activeimg { width: 200rpx !important; position: absolute; @@ -347,9 +377,11 @@ page{ width: 26rpx; vertical-align: middle; } -.qrcode{ + +.qrcode { display: none; } + .qrcode image { width: 70rpx; margin-right: 20rpx; @@ -461,61 +493,71 @@ page{ right: 0; margin: auto; background: #fff; - border-radius: 16rpx; + border-radius: 16rpx; } -.showQrcode text{ + +.showQrcode text { display: block; text-align: center; font-size: 28rpx; } + /* .membercode { margin-top: 20rpx; } */ -.integral{ - font-size:24rpx; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(166,166,166,1); - line-height:34rpx -} -.top{ +.integral { + font-size: 24rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: rgba(166, 166, 166, 1); + line-height: 34rpx +} + +.top { width: 100%; height: 234rpx; position: relative; } -.usre_level{ - height:32rpx; - border-radius:9px 9px 9px 0px; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(255,255,255,1); - line-height:32rpx; + +.usre_level { + height: 32rpx; + border-radius: 9px 9px 9px 0px; + font-family: PingFangSC-Regular; + font-weight: 400; + color: rgba(255, 255, 255, 1); + line-height: 32rpx; float: left; margin-top: 8rpx; } -.my{ - font-size:24rpx; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(166,166,166,1); - line-height:34rpx; + +.my { + font-size: 24rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: rgba(166, 166, 166, 1); + line-height: 34rpx; } -.chengzhang_h{ + +.chengzhang_h { /* color: #fff; */ - font-size:28rpx; + font-size: 28rpx; margin-right: 10rpx; /* font-weight: 600; */ } -.my_line{ + +.my_line { margin: 0 10rpx; } -.usre_level{ - font-size:20rpx; + +.usre_level { + font-size: 20rpx; } -.name{ + +.name { float: left; } -.aboutUs{ + +.aboutUs { border-radius: 12rpx; background: #fff; position: absolute; @@ -524,12 +566,14 @@ page{ display: flex; padding: 10rpx 20rpx; } + .aboutUs .aboutIcons { display: block; width: 50rpx; height: 40rpx; line-height: 40rpx; } + .aboutUs text { margin-left: 10rpx; line-height: 55rpx; diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index d6dca73..d286adf 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -247,7 +247,7 @@ Page({ wx.navigateTo({ url: `/pages/index/searchbar/detail/index?id=${that.data.id}` }) - }else { + } else { wx.showToast({ title: res.data.msg, icon: "success", @@ -286,4 +286,10 @@ Page({ }); }) }, + + goCheckProtocol() { + wx.navigateTo({ + url: '/pages3/userProtocol/userProtocol', + }) + } }); \ No newline at end of file diff --git a/pages/getphoneInfo/index.wxml b/pages/getphoneInfo/index.wxml index 003ba9e..34da502 100755 --- a/pages/getphoneInfo/index.wxml +++ b/pages/getphoneInfo/index.wxml @@ -1,15 +1,17 @@ - + Hi , 请登录~ - 授权后,可以更好的体验我们哦~ + 登录后可以更好的体验我们哦~ - + 请升级微信版本 - + + + 登录/注册即代表同意用户协议与隐私政策 \ No newline at end of file diff --git a/pages/getphoneInfo/index.wxss b/pages/getphoneInfo/index.wxss index 2442b8f..bb7a99a 100755 --- a/pages/getphoneInfo/index.wxss +++ b/pages/getphoneInfo/index.wxss @@ -1,5 +1,5 @@ page { - background: #fbfbfb; + background: #ffffff; } .login-body { @@ -65,4 +65,11 @@ page { .title text:nth-of-type(2) { font-size: 30rpx; margin-top: 25rpx; +} + +.protocol { + position: fixed; + bottom: 50rpx; + font-size: 25rpx; + color: #00c0ff; } \ No newline at end of file diff --git a/pages3/userProtocol/userProtocol.js b/pages3/userProtocol/userProtocol.js new file mode 100644 index 0000000..3d73114 --- /dev/null +++ b/pages3/userProtocol/userProtocol.js @@ -0,0 +1,66 @@ +// pages3/userProtocol/userProtocol.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages3/userProtocol/userProtocol.json b/pages3/userProtocol/userProtocol.json new file mode 100644 index 0000000..6290c34 --- /dev/null +++ b/pages3/userProtocol/userProtocol.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "navbar": "/components/navbar/navbar" + }, + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#F4F5F9", + "pageOrientation": "auto" +} \ No newline at end of file diff --git a/pages3/userProtocol/userProtocol.wxml b/pages3/userProtocol/userProtocol.wxml new file mode 100644 index 0000000..14ff977 --- /dev/null +++ b/pages3/userProtocol/userProtocol.wxml @@ -0,0 +1,116 @@ + + + + 网络用户协议 + + + 欢迎使用小闲聊小程序! + 小闲聊小程序所有服务和产品均受以下条款和条件的约束。请仔细阅读本产品的用户协议(以下简称“协议”)并确保您完全理解并同意其中的条款和条件。如果您不同意本协议中的任何内容,您应立即停止使用本产品。 + + + 1. 服务 + + 本产品提供的服务仅供您个人使用。您不得将任何服务或产品用于商业目的。本产品有权随时更改或中断服务或产品的供应,并且不承担任何责任。 + + + + 2. 用户注册信息 + + + 2.1 用户应该注册真实的个人信息,包括但不限于姓名、地址、联系电话、电子邮件地址等。用户应该及时更新这些信息。 + + + + 2.2 用户应该保护好自己的账户和密码,避免泄露。并承担您账户下的所有活动的责任。如果您发现未经授权使用您的账户或任何其他安全漏洞,您应立即通知我司。 + + + + 2.3 如有任何违反本协议的行为,本产品有权随时停止或终止用户的账户。 + + + + + + 3. 用户行为 + + + 3.1 用户应该遵守法律法规和社会公德,不得在本产品发布任何违法内容。 + + + 3.2 用户应该尊重其他用户的权利和利益,不得侵犯他人的知识产权等合法权益。 + + + 3.3 用户应该保证自己发布的信息真实、准确、完整、不误导。 + + + 3.4 用户不得利用本产品进行任何商业活动或广告宣传行为。 + + + 3.5 您同意不会在本产品上从事任何非法、欺诈、骚扰、侵犯隐私、垃圾邮件或其他违法或侵权行为。如果本产品发现您从事这些行为,则有权立即终止您的账户或限制您的访问。 + + + + + + + 4. 知识产权 + + + 4.1 本产品上所有内容(包括但不限于文字、图片、音频、视频等)均为本产品所有。包括但不限于商标、版权和专利。您不得复制、修改、分发或创建派生作品。您同意不会挑战我们的所有权或控制权。 + + + 4.2 本产品允许用户发布或提交内容,包括但不限于文字、照片、视频、音频等。您保证对于您发布或提交的内容,您拥有必要的权利和许可,并且这些内容不会侵犯任何第三方的权利。我司有权删除或编辑用户提交的任何内容。 + + + 4.3 本产品上的所有内容,包括但不限于文字、图片、音频、视频、图形、商标和标识等,均受版权、商标和其他知识产权法律的保护。未经本网站或相关权利人书面许可,您不得复制、传播、转载、修改、发布、展示或以其他方式使用这些内容。 + + + + + 5. 付费声明 + + + 5.1 本产品拥有完全自主定价权,所有价格及相关免费、优惠政策,相关调整时间由我司自行决定,如果您继续使用本产品,则视为您接受修改后的价格政策。 + + + 5.2 本产品由于开通即可服务,一经购买不能退款,如果您继续使用本产品,则视为您接受该政策。 + + + + + + 6. 免责声明 + + 本产品不对任何信息的准确性、完整性、可靠性或适用性作任何明示或暗示的保证。本产品不对由于使用或无法使用本产品而导致的任何损失或损害承担任何责任。 + + + + 7. 法律适用 + + 本协议受中华人民共和国法律的管辖。任何因本协议产生的纠纷,应提交到有管辖权的法院解决。 + + + + 8. 协议变更 + + 本产品有权随时修改本协议的条款和条件。一旦本协议的任何条款和条件发生变化,您必须遵守修改后的协议。如果您继续使用本产品,则视为您接受修改后的协议。 + + + + 9. 终止 + + 本产品有权随时终止本协议,而无需事先通知您。如果您违反本协议中的任何条款和条件,本产品有权立即终止您的账户和访问权限。 + + + + 10. 其他 + + 本协议构成您与本产品之间的完整协议,取代了一切先前的协议和谈判。如果本协议中的任何条款或条件被认为无效或不可执行,则该条款或条件将被视为与本协议的其余部分分离,不影响其有效性和可执行性。本产品未行使或强制执行本协议中规定的任何权利或条款,并不构成对该权利或条款的豁免。 + + + + + 如果您对这些条款及条件有任何问题,请联系我们。 + + + \ No newline at end of file diff --git a/pages3/userProtocol/userProtocol.wxss b/pages3/userProtocol/userProtocol.wxss new file mode 100644 index 0000000..83208ee --- /dev/null +++ b/pages3/userProtocol/userProtocol.wxss @@ -0,0 +1,25 @@ +/* pages3/userProtocol/userProtocol.wxss */ +.content { + padding: 30rpx; + padding-top: 200rpx; + color: #525252; +} + + +.content view { + margin-bottom: 30rpx; +} + +.title { + font-weight: 600; + font-size: 35rpx; + text-align: center; +} + +.paragraph { + text-indent: 40rpx; +} + +.item .titleInside { + font-weight: 600; +} \ No newline at end of file diff --git a/utils/bgColor.js b/utils/bgColor.js index 99c3b1a..b06e96e 100644 --- a/utils/bgColor.js +++ b/utils/bgColor.js @@ -1,23 +1,30 @@ module.exports = { - colorFirst:{ + colorFirst: { // 我的 "user": { "banneColor": "linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%)", - "levelBg":"linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", - "view":"#FD832D", - "backColor":"#cc6633" + "levelBg": "linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", + "view": "#FD832D", + "backColor": "#cc6633" + }, + + "user2": { + "banneColor": "linear-gradient(180deg, #26558b 0%, #26558b 100%)", + "levelBg": "linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", + "view": "#007cc1", + "backColor": "#cc6633" }, //首页 "main": { - "chengzhangBox":"linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", - "activeColor":"#FC8B37", - "qg":"#FD782D", - "sql":"linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", + "chengzhangBox": "linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", + "activeColor": "#FC8B37", + "qg": "#FD782D", + "sql": "linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)", "txt": "#2C8DFF", }, }, - colorSecond:{ + colorSecond: { // 我的 "user": { "banneColor": "linear-gradient(180deg,rgba(50,177,252,1) 0%,rgba(47,108,255,1) 100%)", @@ -30,9 +37,9 @@ module.exports = { "activeColor": "#2C8DFF", "qg": "#31A5FC", "sql": "linear-gradient(127deg,rgba(119,192,254,1) 0%,rgba(48,120,255,1) 100%)", - "txt":"#FF1D30", + "txt": "#FF1D30", }, } - - + + } \ No newline at end of file From 972486d32cefafc13c76844371fc5e2bf1a1da80 Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 18 May 2023 14:53:27 +0800 Subject: [PATCH 3/4] upload --- index/user.js | 14 +++++++++++++- index/user.wxml | 4 ++-- pages3/userProtocol/userProtocol.wxml | 19 +++++++++---------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/index/user.js b/index/user.js index c43a879..180a9ea 100644 --- a/index/user.js +++ b/index/user.js @@ -340,7 +340,17 @@ Page({ } }, - + share() { + if (this.data.ifSetUserInfo) { + wx.navigateTo({ + url: '/pages/shareFriend/shareFriend', + }) + } else { + wx.navigateTo({ + url: `/pages/getphoneInfo/index?mineFlag=mine`, + }) + } + }, /** * 跳转到商场信息的页面 */ @@ -441,9 +451,11 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + this.ifPhoneInfo() const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') || 2 // 手机号未授权 if (ifSetUserInfo == 1) { + if (!this.data.ifSetUserInfo) return wx.showModal({ title: '完善个人信息', content: '请继续完成个人信息哦', diff --git a/index/user.wxml b/index/user.wxml index e6e9320..992110a 100644 --- a/index/user.wxml +++ b/index/user.wxml @@ -56,9 +56,9 @@ {{memberName}} {{levelName}} - + - + diff --git a/pages3/userProtocol/userProtocol.wxml b/pages3/userProtocol/userProtocol.wxml index 14ff977..c00eaa0 100644 --- a/pages3/userProtocol/userProtocol.wxml +++ b/pages3/userProtocol/userProtocol.wxml @@ -4,12 +4,11 @@ 网络用户协议 - 欢迎使用小闲聊小程序! - 小闲聊小程序所有服务和产品均受以下条款和条件的约束。请仔细阅读本产品的用户协议(以下简称“协议”)并确保您完全理解并同意其中的条款和条件。如果您不同意本协议中的任何内容,您应立即停止使用本产品。 + 欢迎使用! + 本小程序所有服务和产品均受以下条款和条件的约束。请仔细阅读本产品的用户协议(以下简称“协议”)并确保您完全理解并同意其中的条款和条件。如果您不同意本协议中的任何内容,您应立即停止使用本产品。 1. 服务 - 本产品提供的服务仅供您个人使用。您不得将任何服务或产品用于商业目的。本产品有权随时更改或中断服务或产品的供应,并且不承担任何责任。 @@ -66,7 +65,7 @@ - + - 6. 免责声明 + 5. 免责声明 本产品不对任何信息的准确性、完整性、可靠性或适用性作任何明示或暗示的保证。本产品不对由于使用或无法使用本产品而导致的任何损失或损害承担任何责任。 - 7. 法律适用 + 6. 法律适用 本协议受中华人民共和国法律的管辖。任何因本协议产生的纠纷,应提交到有管辖权的法院解决。 - 8. 协议变更 + 7. 协议变更 本产品有权随时修改本协议的条款和条件。一旦本协议的任何条款和条件发生变化,您必须遵守修改后的协议。如果您继续使用本产品,则视为您接受修改后的协议。 - 9. 终止 + 8. 终止 本产品有权随时终止本协议,而无需事先通知您。如果您违反本协议中的任何条款和条件,本产品有权立即终止您的账户和访问权限。 - 10. 其他 + 9. 其他 本协议构成您与本产品之间的完整协议,取代了一切先前的协议和谈判。如果本协议中的任何条款或条件被认为无效或不可执行,则该条款或条件将被视为与本协议的其余部分分离,不影响其有效性和可执行性。本产品未行使或强制执行本协议中规定的任何权利或条款,并不构成对该权利或条款的豁免。 From 1027b0048d87b44d83d28df44ed7eb729290787f Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 18 May 2023 16:04:08 +0800 Subject: [PATCH 4/4] upload --- index/user.js | 54 ++++++++++++++++++++----------------- pages/getphoneInfo/index.js | 1 - 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/index/user.js b/index/user.js index 180a9ea..85dfd96 100644 --- a/index/user.js +++ b/index/user.js @@ -107,11 +107,39 @@ Page({ url: config.api.checkPhoneStatus, data: {} }).then(res => { + console.log(res, 'res'); that.setData({ ifSetUserInfo: true }) + // 手机号未授权 + const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') + if (ifSetUserInfo == 1) { + if (!that.data.ifSetUserInfo) return + wx.showModal({ + title: '完善个人信息', + content: '请继续完成个人信息哦', + showCancel: true, + cancelText: "以后再说", + cancelColor: '', + confirmText: "去完善", + confirmColor: '#FD832D', + complete: (res) => { + if (res.cancel) { + console.log('cancel'); + } + if (res.confirm) { + wx.navigateTo({ + url: '/pages3/setUserInfo/index', + }) + } + // 已完成手机号授权 + wx.setStorageSync('ifSetUserInfo', 2) + } + }) + } return }).catch(err => { + console.log(err, 'err'); that.setData({ ifSetUserInfo: false }) @@ -452,31 +480,7 @@ Page({ */ onShow: function () { this.ifPhoneInfo() - const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') || 2 - // 手机号未授权 - if (ifSetUserInfo == 1) { - if (!this.data.ifSetUserInfo) return - wx.showModal({ - title: '完善个人信息', - content: '请继续完成个人信息哦', - showCancel: true, - cancelText: "以后再说", - cancelColor: '', - confirmText: "去完善", - confirmColor: '#FD832D', - complete: (res) => { - if (res.cancel) { - console.log('cancel'); - } - if (res.confirm) { - wx.navigateTo({ - url: '/pages3/setUserInfo/index', - }) - } - wx.setStorageSync('ifSetUserInfo', 2) // 已完成手机号授权 - } - }) - } + if (businessSwitch) { let openId = wx.getStorageSync("openId") this.setData({ diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index d286adf..0fa6373 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -227,7 +227,6 @@ Page({ url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` }) } else if (that.data.mineFlag == 'mine') { - wx.switchTab({ url: '/index/user' });