From 6ea1f7ef11237ca43bbe32af3a92f7bf5476d5b0 Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Tue, 27 Jun 2023 10:26:51 +0800 Subject: [PATCH] 个人中心 --- src/api/getUserIfo.js | 26 ++++++++++++++++++++++++++ src/utils/utils.js | 38 +++++++++++++++++++++----------------- src/views/binding/binDing.vue | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------ src/views/mySelf/feedback/suggestionBack.vue | 59 +++++++++++++++++++++++++++-------------------------------- src/views/mySelf/selfNav.vue | 45 +++++++++++++++++++++------------------------ 5 files changed, 218 insertions(+), 91 deletions(-) diff --git a/src/api/getUserIfo.js b/src/api/getUserIfo.js index 7a3f637..bc06ab1 100644 --- a/src/api/getUserIfo.js +++ b/src/api/getUserIfo.js @@ -26,4 +26,30 @@ export function getFeedbackType(params) { // 获取建议反馈类型 }) } +export function sendverificode(params) { // 获取手机验证码 + return request({ + url: 'user/sendverificode', + method: 'post', + data: params + }) +} + + +export function bindCustByOpenId(params) { // 绑定手机号获取 + return request({ + url: 'wxPublicUser/bindCustByOpenId', + method: 'post', + data: params + }) +} + +export function getOpenIdByCode(params) { // 绑定openId + return request({ + url: 'weixinPublicPay/getOpenIdByCode', + method: 'post', + data: params + }) +} + + diff --git a/src/utils/utils.js b/src/utils/utils.js index 92cec0d..7539346 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -74,22 +74,7 @@ export default { } return time; }, - // myVxAppId: 'wx1489e48e6a547023', - signObject: function(jsonObj) { //签名字段 - jsonObj.sign_type = "md5"; - jsonObj.app_id = "ud8yq5tv0inxupc05xfeau39jywlqoj2"; - jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; - jsonObj.salt = myCommonSalt(32); - jsonObj.token = "99ecd32eed1b4ebea71bc73b0aabbb99"; - let sort = []; - for (let k in jsonObj) { - sort.push({ - keyname: k, - value: jsonObj[k] - }); - } - return this.myGetSign(sort); - }, + clientBrowser: function() { // 判断客户端 if (/MicroMessenger/.test(window.navigator.userAgent)) { console.log("微信客户端"); @@ -130,8 +115,27 @@ export default { myVarAppid: "ud8yq5tv0inxupc05xfeau39jywlqoj2",// 公共请求Appid myDeviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", // 公共请求设备信息 myVxAppId: "wx1489e48e6a547023", - openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs", + userToken:localStorage.getItem('userToken'), + userPhoneNum:localStorage.getItem('userPhoneNum'), + openId: "", myOrgId: "10120", // 归属地 赤峰id 10003 黄石 10079 + + // myVxAppId: 'wx1489e48e6a547023', + signObject: function(jsonObj) { //签名字段 + jsonObj.sign_type = "md5"; + jsonObj.app_id = "ud8yq5tv0inxupc05xfeau39jywlqoj2"; + jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; + jsonObj.salt = myCommonSalt(32); + jsonObj.token = localStorage.getItem('userToken'); + let sort = []; + for (let k in jsonObj) { + sort.push({ + keyname: k, + value: jsonObj[k] + }); + } + return this.myGetSign(sort); + }, myGetSign: function(objb) { // 获取签名 var compare = function(obj1, obj2) { var val1 = obj1.keyname; diff --git a/src/views/binding/binDing.vue b/src/views/binding/binDing.vue index 363649f..c498d21 100644 --- a/src/views/binding/binDing.vue +++ b/src/views/binding/binDing.vue @@ -8,40 +8,145 @@