From ea0e57b9f2d6a0c34a040b965e0efae49123d0f7 Mon Sep 17 00:00:00 2001
From: jianbo <263303411@qq.com>
Date: Fri, 20 Nov 2020 14:06:42 +0800
Subject: [PATCH] =?UTF-8?q?python=E5=AD=A6=E4=B9=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 708 +++++++++++---------
mina | 2 +-
native/app.json | 2 +-
native/config.js | 4 +-
native/miniprogram_npm/apifm-wxapi/index.js | 53 +-
native/project.config.json | 219 +++---
native/utils/auth.js | 18 +-
7 files changed, 548 insertions(+), 458 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e111d1a..fa4578a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,8 +5,12 @@
-
+
+
+
+
+
@@ -15,7 +19,98 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- now-buy
- footer-box
- tobuy
- page-body-form-key
- page-body-button
- form-control
- ibox-content
- do-login
- btn-primary
- m-b
- login_wrap
- login_name
- pull-right
- checkReg
- foodIndex
- Member
- model_member
- app
- login
- /food/index
- /member/login
- mobile
- 走,
- checkLogin
- globalData
- regFlag
- buildUrl
- token
+ aicard/user/friend
+ friend
+ idcardCheck
+ detail
+ friend/detail
+ user/friend/detail
+ cardUid
+ setStorageSync
+ API_BASE_URL
+ getCardInfo
+ getCardUid
+ wx.request
+ friendUserDetail
+ user/wxapp/login
+ login_email
+ aicard
+ subDomain
+ appid
+ 密钥
+ api
+ key
+ wxlogin/login
+ food/index
getRequestHeader
- info
+ request
+ login
+ bindGetUserInfo
+ wx.getUserInfo
+ login_wx
+ register_complex
ops_render
@@ -67,10 +162,6 @@
@@ -142,7 +237,6 @@
-
@@ -153,31 +247,79 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -187,98 +329,26 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
@@ -288,19 +358,19 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -326,13 +396,6 @@
1528044544203
-
- 1564564379831
-
-
-
- 1564564379831
-
1564569007474
@@ -669,7 +732,14 @@
1583221802369
-
+
+ 1605610340669
+
+
+
+ 1605610340670
+
+
@@ -683,8 +753,9 @@
+
-
+
@@ -725,151 +796,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -899,34 +825,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1015,5 +913,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mina b/mina
index b84bf63..556449a 160000
--- a/mina
+++ b/mina
@@ -1 +1 @@
-Subproject commit b84bf63d7aa1fba5ea5ae824242bfba37cefbba8
+Subproject commit 556449ab50d4fe1a04016cde69d48e2b841dcb4b
diff --git a/native/app.json b/native/app.json
index 1973ebc..da085e2 100644
--- a/native/app.json
+++ b/native/app.json
@@ -41,7 +41,7 @@
]
},
"navigateToMiniProgramAppIdList": [
- "wx56c8f077de74b07c"
+ "wxaae03bb4c7273f06"
],
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
diff --git a/native/config.js b/native/config.js
index 6c7fee9..abea7ef 100644
--- a/native/config.js
+++ b/native/config.js
@@ -1,5 +1,7 @@
module.exports = {
version: "2.1.0",
note: '优化了名片二维码的生成效率,减少图片空间存储',
- subDomain: "aicard", // 根据教程 https://www.yuque.com/apifm/doc/qr6l4m 查看你自己的 subDomain
+ // subDomain: "aicard", // 根据教程 https://www.yuque.com/apifm/doc/qr6l4m 查看你自己的 subDomain
+ subDomain: "hcms", // 根据教程 https://www.yuque.com/apifm/doc/qr6l4m 查看你自己的 subDomain
+// subDomain: "", // 根据教程 https://www.yuque.com/apifm/doc/qr6l4m 查看你自己的 subDomain
}
\ No newline at end of file
diff --git a/native/miniprogram_npm/apifm-wxapi/index.js b/native/miniprogram_npm/apifm-wxapi/index.js
index 5d83c2c..c9c724c 100644
--- a/native/miniprogram_npm/apifm-wxapi/index.js
+++ b/native/miniprogram_npm/apifm-wxapi/index.js
@@ -94,11 +94,13 @@ module.exports =
/* eslint-disable */
// 小程序开发api接口工具包,https://github.com/gooking/wxapi
-var API_BASE_URL = 'https://api.it120.cc';
+//var API_BASE_URL = 'https://api.it120.cc';
+var API_BASE_URL = 'http://www.ruilaizipj.com';
var subDomain = 'tz';
var request = function request(url, needSubDomain, method, data) {
- var _url = API_BASE_URL + (needSubDomain ? '/' + subDomain : '') + url;
+ var _url = API_BASE_URL + (needSubDomain ? '/' + subDomain : '') + url;
+// var _url = API_BASE_URL + (needSubDomain ? '' + subDomain : '') + url;
return new Promise(function (resolve, reject) {
wx.request({
url: _url,
@@ -263,41 +265,21 @@ module.exports = {
alipay: function alipay(data) {
return request('/pay/alipay/semiAutomatic/payurl', true, 'post', data);
},
- login_wx: function login_wx(code) {
- return request('/user/wxapp/login', true, 'post', {
+ login_wx: function login_wx(code,nickName,avatarUrl,gender,province,city,country) {
+ return request('/wxlogin/login', true, 'post', {
code: code,
- type: 2
+ nickName: nickName,
+ avatarUrl: avatarUrl,
+ gender: gender,
+ province: province,
+ city: city,
+ country: country,
});
},
- login_username: function login_username(data) {
- return request('/user/username/login', true, 'post', data);
- },
- bindUsername: function bindUsername(token, username) {
- var pwd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
-
- return request('/user/username/bindUsername', true, 'post', {
- token: token, username: username, pwd: pwd
- });
- },
- login_mobile: function login_mobile(mobile, pwd) {
- var deviceId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
- var deviceName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
-
- return request('/user/m/login', true, 'post', {
- mobile: mobile, pwd: pwd, deviceId: deviceId, deviceName: deviceName
- });
- },
- resetPwdUseMobileCode: function resetPwdUseMobileCode(mobile, pwd, code) {
- return request('/user/m/reset-pwd', true, 'post', {
- mobile: mobile, pwd: pwd, code: code
- });
- },
- resetPwdUseEmailCode: function resetPwdUseEmailCode(email, pwd, code) {
- return request('/user/email/reset-pwd', true, 'post', {
- email: email, pwd: pwd, code: code
- });
- },
- register_complex: function register_complex(data) {
+// login_wx: function login_wx(data) {
+// return request('/wxlogin/login', true, 'post', data);
+// },
+ register_complex: function register_complex(data) {
return request('/user/wxapp/register/complex', true, 'post', data);
},
register_simple: function register_simple(data) {
@@ -480,6 +462,9 @@ module.exports = {
friendUserDetail: function friendUserDetail(token, uid) {
return request('/user/friend/detail', true, 'get', { token: token, uid: uid });
},
+// friendUserDetail: function friendUserDetail(token, uid) {
+// return request('/wxlogin/login', true, 'get', { token: token, uid: uid });
+// },
videoDetail: function videoDetail(videoId) {
return request('/media/video/detail', true, 'get', {
videoId: videoId
diff --git a/native/project.config.json b/native/project.config.json
index 535e884..1258db6 100644
--- a/native/project.config.json
+++ b/native/project.config.json
@@ -1,106 +1,117 @@
{
- "description": "项目配置文件。",
- "setting": {
- "urlCheck": false,
- "es6": true,
- "enhance": true,
- "postcss": false,
- "minified": true,
- "newFeature": true,
- "nodeModules": false,
- "autoAudits": false,
- "checkInvalidKey": true,
- "checkSiteMap": true,
- "uploadWithSourceMap": true,
- "babelSetting": {
- "ignore": [],
- "disablePlugins": [],
- "outputPath": ""
- }
- },
- "compileType": "miniprogram",
- "libVersion": "2.9.4",
- "appid": "wx872cc8cc1327641a",
- "projectname": "%E5%90%8D%E7%89%87%E5%B0%8F%E7%A8%8B%E5%BA%8F",
- "scripts": {},
- "simulatorType": "wechat",
- "simulatorPluginLibVersion": {},
- "condition": {
- "search": {
- "current": -1,
- "list": []
- },
- "conversation": {
- "current": -1,
- "list": []
- },
- "plugin": {
- "current": -1,
- "list": []
- },
- "game": {
- "current": -1,
- "list": []
- },
- "miniprogram": {
- "current": 7,
- "list": [
- {
- "id": -1,
- "name": "home",
- "pathName": "pages/index/index",
- "query": "",
- "scene": null
- },
- {
- "id": -1,
- "name": "商品详情页面",
- "pathName": "pages/goods-details/index",
- "query": "id=134&inviter_id=456",
- "scene": 1011
- },
- {
- "id": -1,
- "name": "商品详情页面",
- "pathName": "pages/goods-details/index",
- "query": "id= 6761",
- "scene": null
- },
- {
- "id": -1,
- "name": "砍价详情页面",
- "pathName": "pages/goods-details/index",
- "query": "id=6765",
- "scene": null
- },
- {
- "id": -1,
- "name": "砍价详情页面",
- "pathName": "pages/goods-details/index",
- "query": "id=6765&kjJoinUid=701677",
- "scene": null
- },
- {
- "id": -1,
- "name": "拼团",
- "pathName": "pages/goods-details/index",
- "query": "id=6761",
- "scene": null
- },
- {
- "id": -1,
- "name": "生成海报",
- "pathName": "pages/goods-details/poster",
- "query": "goodsid=6761",
- "scene": null
- },
- {
- "id": -1,
- "name": "分销中心",
- "pathName": "pages/fx/apply-status",
- "scene": null
- }
- ]
- }
- }
+ "description": "项目配置文件。",
+ "setting": {
+ "urlCheck": false,
+ "es6": true,
+ "enhance": true,
+ "postcss": false,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "newFeature": true,
+ "coverView": true,
+ "nodeModules": false,
+ "autoAudits": false,
+ "showShadowRootInWxmlPanel": true,
+ "scopeDataCheck": false,
+ "uglifyFileName": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "compileHotReLoad": false,
+ "useMultiFrameRuntime": false,
+ "useApiHook": true,
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ },
+ "enableEngineNative": false,
+ "bundle": false,
+ "useIsolateContext": true,
+ "useCompilerModule": true,
+ "userConfirmedUseCompilerModuleSwitch": false,
+ "packNpmManually": false,
+ "packNpmRelationList": [],
+ "minifyWXSS": true
+ },
+ "compileType": "miniprogram",
+ "libVersion": "2.9.4",
+ "appid": "wxaae03bb4c7273f06",
+ "projectname": "%E5%90%8D%E7%89%87%E5%B0%8F%E7%A8%8B%E5%BA%8F",
+ "scripts": {},
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {},
+ "condition": {
+ "search": {
+ "list": []
+ },
+ "conversation": {
+ "list": []
+ },
+ "plugin": {
+ "list": []
+ },
+ "game": {
+ "list": []
+ },
+ "miniprogram": {
+ "list": [
+ {
+ "id": -1,
+ "name": "home",
+ "pathName": "pages/index/index",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "商品详情页面",
+ "pathName": "pages/goods-details/index",
+ "query": "id=134&inviter_id=456",
+ "scene": 1011
+ },
+ {
+ "id": -1,
+ "name": "商品详情页面",
+ "pathName": "pages/goods-details/index",
+ "query": "id= 6761",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "砍价详情页面",
+ "pathName": "pages/goods-details/index",
+ "query": "id=6765",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "砍价详情页面",
+ "pathName": "pages/goods-details/index",
+ "query": "id=6765&kjJoinUid=701677",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "拼团",
+ "pathName": "pages/goods-details/index",
+ "query": "id=6761",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "生成海报",
+ "pathName": "pages/goods-details/poster",
+ "query": "goodsid=6761",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "分销中心",
+ "pathName": "pages/fx/apply-status",
+ "scene": null
+ }
+ ]
+ }
+ }
}
\ No newline at end of file
diff --git a/native/utils/auth.js b/native/utils/auth.js
index 797ddb9..73cb843 100644
--- a/native/utils/auth.js
+++ b/native/utils/auth.js
@@ -20,10 +20,22 @@ async function checkHasLogined() {
}
async function login(page){
+
const _this = this
wx.login({
success: function (res) {
- WXAPI.login_wx(res.code).then(function (res) {
+ // 必须是在用户已经授权的情况下调用
+ let code = res.code; // 微信登录接口返回的 code 参数,下面注册接口需要用到
+ wx.getUserInfo({
+ success: function (res) {
+ var userInfo = res.userInfo
+ var nickName = userInfo.nickName
+ var avatarUrl = userInfo.avatarUrl
+ var gender = userInfo.gender //性别 0:未知、1:男、2:女
+ var province = userInfo.province
+ var city = userInfo.city
+ var country = userInfo.country
+ WXAPI.login_wx(res.code,nickName,avatarUrl,gender,province,city,country).then(function (res) {
if (res.code == 10000) {
// 去注册
//_this.register(page)
@@ -44,6 +56,10 @@ async function login(page){
page.onShow()
}
})
+ }
+ })
+
+
}
})
}