Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7_Eleven_Alipay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7_Eleven_Alipay
Commits
a46f040a
Commit
a46f040a
authored
Sep 26, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memberActivateStatus
parent
19622304
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
213 additions
and
55 deletions
+213
-55
mini-program.json
.tea/configuration/mini-program.json
+1
-1
editor.json
.tea/editor.json
+0
-0
editorTabs.json
.tea/editorTabs.json
+1
-1
f6a2a1d3cadf7abe17aac70808a88ef31569465743265890
...p-saving/f6a2a1d3cadf7abe17aac70808a88ef31569465743265890
+92
-0
f6a2a1d3cadf7abe17aac70808a88ef31569465743417572
...p-saving/f6a2a1d3cadf7abe17aac70808a88ef31569465743417572
+92
-0
authorization-modal.js
component/authorization-modal/authorization-modal.js
+0
-6
personCenter.js
component/personCenter/personCenter.js
+1
-0
wxService.js
utils/wxService.js
+26
-47
No files found.
.tea/configuration/mini-program.json
View file @
a46f040a
{
"undefined::component2"
:
false
,
"undefined::_enableAutoPush"
:
false
,
"undefined::_appIdList"
:[],
"undefined::uploadTime"
:
""
,
"undefined::packageSize"
:
0
,
"tinyType"
:
"alipay"
,
"tinyCnName"
:
"支付宝"
,
"tinyProjectType"
:
"alipay-mini"
,
"alipay:alipay-mini:tinyIcon"
:
"https://gw.alipayobjects.com/zos/rmsportal/rcwFIauzePpMqlTzzanK.svg"
,
"alipay:alipay-mini:auditLink"
:
null
,
"alipay:alipay-mini:whiteListLink"
:
null
,
"alipay:alipay-mini:createLink"
:
null
,
"alipay:alipay-mini:component2"
:
true
,
"alipay:alipay-mini:_enableAutoPush"
:
true
,
"alipay:alipay-mini:_appIdList"
:[{
"appid"
:
"2019091967575819"
,
"name"
:
"大禹dev"
,
"logoUrl"
:
"https://appstoreisvpic.alipayobjects.com/prod/eebdb2f7-2747-499e-9a22-2b89664d7739.png"
}],
"alipay:alipay-mini:uploadTime"
:
""
,
"alipay:alipay-mini:packageSize"
:
0
,
"alipay:alipay-mini:MockStore"
:{
"reLoginErr"
:
false
},
"alipay:alipay-mini:_appId"
:
"2019091967575819"
,
"alipay:alipay-mini:_appName"
:
"大禹dev"
,
"alipay:alipay-mini:remoteVersion"
:
"0.0.0"
,
"alipay:alipay-mini:currentVersion"
:
"0.0.1"
,
"alipay:alipay-mini:whiteList"
:[],
"alipay:alipay-mini:h5WhiteList"
:[],
"alipay:alipay-mini:appLogo"
:
"https://appstoreisvpic.alipayobjects.com/prod/eebdb2f7-2747-499e-9a22-2b89664d7739.png"
,
"alipay:alipay-mini:userAuthorization"
:[],
"isSimulatorOpen"
:
tru
e
,
"isNotFirstToggleSimulator"
:
true
,
"compilerList"
:[{
"title"
:
"普通编译"
,
"query"
:
""
,
"page"
:
""
},{
"title"
:
"积分商城"
,
"page"
:
"pages/IntegralMall/IntegralMall"
},{
"title"
:
"我的消费"
,
"page"
:
"pages/mySpend/mySpend"
},{
"title"
:
"动态子页面_pageId"
,
"page"
:
"subPackage/page/pages/subPage/subPage"
}],
"compilerIndex"
:
0
,
"alipay:alipay-mini:preAuditLimit"
:
5
,
"alipay:alipay-mini:preAuditUsed"
:
0
,
"storageVersion"
:
"0.70.7"
}
{
"undefined::component2"
:
false
,
"undefined::_enableAutoPush"
:
false
,
"undefined::_appIdList"
:[],
"undefined::uploadTime"
:
""
,
"undefined::packageSize"
:
0
,
"tinyType"
:
"alipay"
,
"tinyCnName"
:
"支付宝"
,
"tinyProjectType"
:
"alipay-mini"
,
"alipay:alipay-mini:tinyIcon"
:
"https://gw.alipayobjects.com/zos/rmsportal/rcwFIauzePpMqlTzzanK.svg"
,
"alipay:alipay-mini:auditLink"
:
null
,
"alipay:alipay-mini:whiteListLink"
:
null
,
"alipay:alipay-mini:createLink"
:
null
,
"alipay:alipay-mini:component2"
:
true
,
"alipay:alipay-mini:_enableAutoPush"
:
true
,
"alipay:alipay-mini:_appIdList"
:[{
"appid"
:
"2019091967575819"
,
"name"
:
"大禹dev"
,
"logoUrl"
:
"https://appstoreisvpic.alipayobjects.com/prod/eebdb2f7-2747-499e-9a22-2b89664d7739.png"
}],
"alipay:alipay-mini:uploadTime"
:
""
,
"alipay:alipay-mini:packageSize"
:
0
,
"alipay:alipay-mini:MockStore"
:{
"reLoginErr"
:
""
,
"_loginCode"
:
"83dfda6fc0144982ba02589b2cacQA68"
,
"_accreditUserInfo"
:{
"code"
:
"10000"
,
"msg"
:
"Success"
,
"avatar"
:
"https://tfs.alipayobjects.com/images/partner/TB1G5LYXaFzDuNkUuyQXXbFwXXa"
,
"city"
:
"上海市"
,
"countryCode"
:
"CN"
,
"gender"
:
"f"
,
"nickName"
:
"大倩。"
,
"province"
:
"上海"
},
"_baseUserInfo"
:{
"token"
:
"f46a67309ff4046b9888b061921e80f6"
,
"applyCardUrl"
:
"https%3A%2F%2Fmemberprod.alipay.com%2Faccount%2Fopenform%2Factivecard.htm%3Fapp_id%3D2019091967575819%26template_id%3D20190923000000002110649000300848%26__webview_options__%3DcanPullDown%253dNO%2526transparentTitle%253dauto%26out_string%3Dalipay%26isv_app_id%3D2019080966120777"
,
"authToken"
:
"composeB8ccdbe74d55946f5ad4fb11f358a9X68"
,
"member"
:{
"id"
:
"626718288768012288"
,
"createTime"
:
"2019-09-26 09:54:43"
,
"updateTime"
:
"2019-09-26 09:54:56"
,
"code"
:
"770213714001465086"
,
"brandId"
:
"1001"
,
"mobile"
:
"17521232119"
,
"cardNoAlipay"
:
"prex0000000568"
,
"alipayUserId"
:
"2088702576494684"
,
"alipayAccessToken"
:
"composeB8ccdbe74d55946f5ad4fb11f358a9X68"
,
"lock"
:
false
,
"activateAlipayCardTime"
:
"2019-09-26 09:54:56"
,
"level"
:
0
}},
"token"
:
"f46a67309ff4046b9888b061921e80f6"
,
"_userInfo"
:{
"code"
:
"10000"
,
"msg"
:
"Success"
,
"avatar"
:
"https://tfs.alipayobjects.com/images/partner/TB1G5LYXaFzDuNkUuyQXXbFwXXa"
,
"city"
:
"上海市"
,
"countryCode"
:
"CN"
,
"gender"
:
"f"
,
"nickName"
:
"大倩。"
,
"province"
:
"上海"
}},
"alipay:alipay-mini:_appId"
:
"2019091967575819"
,
"alipay:alipay-mini:_appName"
:
"大禹dev"
,
"alipay:alipay-mini:remoteVersion"
:
"0.0.0"
,
"alipay:alipay-mini:currentVersion"
:
"0.0.1"
,
"alipay:alipay-mini:whiteList"
:[],
"alipay:alipay-mini:h5WhiteList"
:[],
"alipay:alipay-mini:appLogo"
:
"https://appstoreisvpic.alipayobjects.com/prod/eebdb2f7-2747-499e-9a22-2b89664d7739.png"
,
"alipay:alipay-mini:userAuthorization"
:[],
"isSimulatorOpen"
:
fals
e
,
"isNotFirstToggleSimulator"
:
true
,
"compilerList"
:[{
"title"
:
"普通编译"
,
"query"
:
""
,
"page"
:
""
},{
"title"
:
"积分商城"
,
"page"
:
"pages/IntegralMall/IntegralMall"
},{
"title"
:
"我的消费"
,
"page"
:
"pages/mySpend/mySpend"
},{
"title"
:
"动态子页面_pageId"
,
"page"
:
"subPackage/page/pages/subPage/subPage"
}],
"compilerIndex"
:
0
,
"alipay:alipay-mini:preAuditLimit"
:
5
,
"alipay:alipay-mini:preAuditUsed"
:
0
,
"storageVersion"
:
"0.70.7"
}
.tea/editor.json
View file @
a46f040a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
.tea/editorTabs.json
View file @
a46f040a
{
"tabs"
:[
"file:///f%3A/code/7_Eleven_Alipay/pages/userCenter/userCenter.js"
,
"file:///f%3A/code/7_Eleven_Alipay/pages/userCenter/userCenter.axml"
,
"file:///f%3A/code/7_Eleven_Alipay/component/personCenter/personCenter.js"
,
"file:///f%3A/code/7_Eleven_Alipay/
component/personCenter/personCenter.axml"
,
"file:///f%3A/code/7_Eleven_Alipay/utils/Http.js"
,
"file:///f%3A/code/7_Eleven_Alipay/utils/wxService.js"
,
"file:///f%3A/code/7_Eleven_Alipay/utils/util.js"
,
"file:///f%3A/code/7_Eleven_Alipay/component/authorization-modal/authorization-modal.axml"
,
"file:///f%3A/code/7_Eleven_Alipay/component/authorization-modal/authorization-modal
.js"
],
"current"
:
"file:///f%3A/code/7_Eleven_Alipay/utils/wxService.js"
,
"storageVersion"
:
"0.70.7"
}
{
"tabs"
:[
"file:///f%3A/code/7_Eleven_Alipay/pages/userCenter/userCenter.js"
,
"file:///f%3A/code/7_Eleven_Alipay/pages/userCenter/userCenter.axml"
,
"file:///f%3A/code/7_Eleven_Alipay/component/personCenter/personCenter.js"
,
"file:///f%3A/code/7_Eleven_Alipay/
utils/wxService
.js"
],
"current"
:
"file:///f%3A/code/7_Eleven_Alipay/utils/wxService.js"
,
"storageVersion"
:
"0.70.7"
}
.tea/tmp-saving/f6a2a1d3cadf7abe17aac70808a88ef31569465743265890
0 → 100644
View file @
a46f040a
const wx2my = require('../../wx2my');
const Behavior = require('../../Behavior');
// component/personCenter/personCenter.js
var app = getApp();
const wxService = require('../../utils/wxService');
const envInfo = require('../../config/index').envInfo;
Component({
props: {
personData: {},
integralNum: 0,
baseUserInfo: {},
couponNum: 0,
token: null
},
/**
* 页面的初始数据
*/
data: {
personCenter: {},
memberCardNo: "",
memberActivateStatus: false,
integralNum: 0,
couponNum: 0,
// baseUrl: '/assets/imgs/060610.png',
baseUrl: '#02bb70',
isAuthorization: false,
_token: '',
currentMobile: '',
baseImgUrl: '',
storgeUserInfo: wx2my.getStorageSync('_baseUserInfo')
},
observers: {
'**': function (e) {// 每次 setData 都触发
}
},
didMount() {
this.setData({
personCenter: this.props.personData,
baseImgUrl: app.globalData.imageUrl
});
},
methods: {
_userInfoChange(newVal, oldVal) {
console.log('newVal, oldVal', newVal, oldVal)
if (newVal !== oldVal) {
this.setData({
memberActivateStatus: newVal && newVal.memberActivateStatus || false,
memberCardNo: newVal && newVal.memberCardNo || '',
currentMobile: newVal && newVal.member && newVal.member.mobile || ''
});
}
},
handleToMemberOfOwn() {
wxService.router(`/pages/memberOfOwn/memberOfOwn`);
},
toBonusDetails() {
wxService.router(`/pages/integralWater/integralWater`);
},
toCouponList() {
wxService.router(`/pages/coupons/coupons`);
},
handleTtoActiveMemebr() {
if (wx2my.getStorageSync('_baseUserInfo')) {
wxService.openCard();
} else {
this.setData({
isAuthorization: true
});
}
},
handleGoWxCard() {
wxService.openCard();
}
},
detached() {
this._userInfoChange = null;
}
});
\ No newline at end of file
.tea/tmp-saving/f6a2a1d3cadf7abe17aac70808a88ef31569465743417572
0 → 100644
View file @
a46f040a
const wx2my = require('../../wx2my');
const Behavior = require('../../Behavior');
// component/personCenter/personCenter.js
var app = getApp();
const wxService = require('../../utils/wxService');
const envInfo = require('../../config/index').envInfo;
Component({
props: {
personData: {},
integralNum: 0,
baseUserInfo: {},
couponNum: 0,
token: null
},
/**
* 页面的初始数据
*/
data: {
personCenter: {},
memberCardNo: "",
memberActivateStatus: false,
integralNum: 0,
couponNum: 0,
// baseUrl: '/assets/imgs/060610.png',
baseUrl: '#02bb70',
isAuthorization: false,
_token: '',
currentMobile: '',
baseImgUrl: '',
storgeUserInfo: wx2my.getStorageSync('_baseUserInfo')
},
observers: {
'**': function (e) {// 每次 setData 都触发
}
},
didMount() {
this.setData({
personCenter: this.props.personData,
baseImgUrl: app.globalData.imageUrl
});
},
methods: {
_userInfoChange(newVal, oldVal) {
console.log('newVal, oldVal', newVal, oldVal)
if (newVal !== oldVal) {
this.setData({
memberActivateStatus: newVal && newVal.memberActivateStatus || false,
memberCardNo: newVal && newVal.memberCardNo || '',
currentMobile: newVal && newVal.member && newVal.member.mobile || ''
});
}
},
handleToMemberOfOwn() {
wxService.router(`/pages/memberOfOwn/memberOfOwn`);
},
toBonusDetails() {
wxService.router(`/pages/integralWater/integralWater`);
},
toCouponList() {
wxService.router(`/pages/coupons/coupons`);
},
handleTtoActiveMemebr() {
if (wx2my.getStorageSync('_baseUserInfo')) {
wxService.openCard();
} else {
this.setData({
isAuthorization: true
});
}
},
handleGoWxCard() {
wxService.openCard();
}
},
detached() {
this._userInfoChange = null;
}
});
\ No newline at end of file
component/authorization-modal/authorization-modal.js
View file @
a46f040a
...
...
@@ -150,12 +150,6 @@ Component({
})
}
// my.alert({
// content: userInfo.nickName
// });
// my.alert({
// content: userInfo.avatar
// });
}
});
},
...
...
component/personCenter/personCenter.js
View file @
a46f040a
...
...
@@ -46,6 +46,7 @@ Component({
methods
:
{
_userInfoChange
(
newVal
,
oldVal
)
{
console
.
log
(
'newVal, oldVal'
,
newVal
,
oldVal
)
if
(
newVal
!==
oldVal
)
{
this
.
setData
({
memberActivateStatus
:
newVal
&&
newVal
.
memberActivateStatus
||
false
,
...
...
utils/wxService.js
View file @
a46f040a
...
...
@@ -589,7 +589,11 @@ class WXService extends Http {
const
baseUserInfo
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
)
&&
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
;
console
.
log
(
'open'
,
baseUserInfo
)
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
baseUserInfo
)
{
if
(
baseUserInfo
&&
baseUserInfo
.
memberActivateStatus
)
{
console
.
log
(
'已开卡'
)
wxService
.
openCardList
()
resolve
(
baseUserInfo
)
}
else
if
(
!
baseUserInfo
||
!
baseUserInfo
.
memberActivateStatus
)
{
let
url
=
decodeURIComponent
(
baseUserInfo
.
applyCardUrl
)
console
.
log
(
'去开卡'
,
url
);
return
my
.
addCardAuth
({
...
...
@@ -607,39 +611,11 @@ class WXService extends Http {
// my.alert({ content: '授权失败' });
},
});
// resolve(baseUserInfo);
}
else
{
reject
({
state
:
0
});
}
// if (baseUserInfo && baseUserInfo.memberActivateStatus) {
// console.log('已开卡');
// wxService.openCardList();
// resolve(baseUserInfo);
// } else if (!baseUserInfo || !baseUserInfo.memberActivateStatus) {
// console.log('去开卡');
// return my.addCardAuth({
// url: `${baseUserInfo.applyCardUrl}`,
// success: (res) => {
// my.alert({ content: '授权成功' });
// },
// fail: (res) => {
// my.alert({ content: '授权失败' });
// },
// });
// // return this.navigateToMiniProgram({
// // biz: baseUserInfo.biz,
// // encrypt_card_id: baseUserInfo.encryptCardId,
// // outer_str: baseUserInfo.outerStr
// // });
// } else {
// reject({
// state: 0
// });
// }
});
}
// 支付宝激活会员卡
...
...
@@ -651,7 +627,8 @@ class WXService extends Http {
console
.
log
(
'激活会员卡res'
,
res
)
let
baseUserInfo
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
).
data
;
console
.
log
(
'storage-----baseUserInfo'
,
baseUserInfo
)
baseUserInfo
.
member
=
res
baseUserInfo
.
member
=
res
.
data
.
data
baseUserInfo
.
memberActivateStatus
=
true
wx2my
.
setStorageSync
(
'_baseUserInfo'
,
baseUserInfo
);
}).
catch
(
err
=>
{
console
.
log
(
'err'
,
err
)
...
...
@@ -663,25 +640,27 @@ class WXService extends Http {
*/
openCardList
()
{
// wechatCardId wechatCode
const
{
wechatCardId
,
wechatCode
}
=
wx2my
.
getStorageSync
(
'_baseUserInfo'
);
wx
.
openCard
({
cardList
:
[{
cardId
:
wechatCardId
,
code
:
wechatCode
}],
success
(
res
)
{
console
.
log
(
'openCardList success'
,
res
);
},
my
.
openCardList
();
// const {
// wechatCardId,
// wechatCode
// } = wx2my.getStorageSync('_baseUserInfo');
// wx.openCard({
// cardList: [{
// cardId: wechatCardId,
// code: wechatCode
// }],
// success(res) {
// console.log('openCardList success', res);
// },
fail
(
err
)
{
console
.
log
(
'openCardList fail data is %o'
,
err
);
}
//
fail(err) {
//
console.log('openCardList fail data is %o', err);
//
}
});
//
});
}
getRandom
(
num
=
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment