Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
00df751b
authored
Sep 25, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
917d15da
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
134 additions
and
41 deletions
pages/person/auth/index.js
pages/person/certification/certificationmanage/index.less
pages/person/certification/certificationmanage/index.wxml
pages/person/certification/certificationmanage/index.wxss
pages/person/getphone/index.js
pages/person/invitation/index.js
pages/person/setting/index.js
pages/person/welfare/index.js
pages/tab/home/home.js
pages/tab/home/home.wxml
pages/tab/me/me.js
project.config.json
pages/person/auth/index.js
View file @
00df751b
...
@@ -17,7 +17,46 @@ Page({
...
@@ -17,7 +17,46 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
var
token
=
wx
.
getStorageSync
(
'access_token'
);
if
(
options
.
from
==
'share'
)
{
//判断页面是从分享页面过来的
//已登录
if
(
token
)
{
//已登录状态回调分享接口
http
.
getData
(
apis
.
shareAdd
,
'GET'
,
{
user_id
:
options
.
user_id
},
(
res
)
=>
{
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
})
},
false
,
false
,
true
);
}
else
{
//未登录情况下 记录分享者的used_id
wx
.
setStorage
({
key
:
"share_id"
,
data
:
options
.
user_id
});
}
}
else
if
(
options
.
from
==
'invites'
)
{
//判断页面是从邀请好友页面过来的
//只需要判断未登录者的情况
if
(
!
token
)
{
//未登录情况下 记录邀请者的used_id
wx
.
setStorage
({
key
:
"invites_id"
,
data
:
options
.
user_id
});
}
}
},
},
...
...
pages/person/certification/certificationmanage/index.less
View file @
00df751b
This diff could not be displayed because it is too large.
pages/person/certification/certificationmanage/index.wxml
View file @
00df751b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view class="content">
<view class="content">
<text class="time">更新时间:{{authInfo.update_time}}</text>
<text class="time">更新时间:{{authInfo.update_time}}</text>
<view class="status row verCenter rowCenter">
<view class="status row verCenter rowCenter">
<
cover-image src="{{authInfo.auth_img}}" class="img"></cover-
image>
<
image src="{{authInfo.auth_img}}" class="img"></
image>
<block wx:if="{{authInfo.status === 1}}">
<block wx:if="{{authInfo.status === 1}}">
<text class="a"></text>
<text class="a"></text>
</block>
</block>
...
@@ -41,16 +41,14 @@
...
@@ -41,16 +41,14 @@
</view>
</view>
</view>
</view>
<block wx:if="{{authInfo.status === 1}}">
<block wx:if="{{authInfo.status === 1}}">
<button class="btn" data-type="1" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
<button class="btn opac" data-id="{{authInfo.id}}">资料审核中</button>
更新认证信息
</button>
</block>
</block>
<block wx:elif="{{authInfo.status === 3}}">
<block wx:elif="{{authInfo.status === 3}}">
<button class="btn" data-type="
3" data-id="{{authInfo.id}}" data-url='/pages/tab/me/me
' bind:tap="toUrl">
<button class="btn" data-type="
1" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index
' bind:tap="toUrl">
返回会员中心
更新认证信息
</button>
</button>
</block>
</block>
<block wx:elif="{{authInfo.status ===
2
}}">
<block wx:elif="{{authInfo.status ===
1
}}">
<button class="btn" data-type="2" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
<button class="btn" data-type="2" data-id="{{authInfo.id}}" data-url='/pages/person/certification/addcertification/index' bind:tap="toUrl">
重新提交信息
重新提交信息
</button>
</button>
...
...
pages/person/certification/certificationmanage/index.wxss
View file @
00df751b
This diff could not be displayed because it is too large.
pages/person/getphone/index.js
View file @
00df751b
...
@@ -79,12 +79,36 @@ Page({
...
@@ -79,12 +79,36 @@ Page({
data
:
res
.
data
.
access_token
data
:
res
.
data
.
access_token
});
});
let
share_id
=
wx
.
getStorageSync
(
'share_id'
);
//记录分享者的user_id
let
invites_id
=
wx
.
getStorageSync
(
'invites_id'
);
//记录邀请者的user_id
if
(
share_id
)
{
http
.
getData
(
apis
.
shareAdd
,
'GET'
,
{
user_id
:
share_id
},
(
res
)
=>
{},
false
,
false
,
true
);
}
if
(
invites_id
)
{
http
.
getData
(
apis
.
invitesAdd
,
'GET'
,
{
user_id
:
invites_id
},
(
res
)
=>
{},
false
,
false
,
true
);
}
//登录环信帐号
//登录环信帐号
getApp
().
getImUser
();
getApp
().
getImUser
();
wx
.
switchTab
({
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
url
:
'/pages/tab/home/home'
});
});
}
}
},
true
);
},
true
);
...
...
pages/person/invitation/index.js
View file @
00df751b
...
@@ -67,20 +67,11 @@ Page({
...
@@ -67,20 +67,11 @@ Page({
*/
*/
onShareAppMessage
:
function
(
res
)
{
onShareAppMessage
:
function
(
res
)
{
let
user_id
=
wx
.
getStorageSync
(
'user_id'
);
return
{
return
{
title
:
'邀请好友'
,
title
:
'邀请好友'
,
success
:
function
(
res
)
{
path
:
"/pages/person/auth/index?from=share&user_id="
+
user_id
if
(
res
.
errMsg
==
'shareAppMessage:ok'
)
{
http
.
getData
(
apis
.
invitesAdd
,
'GET'
,
{
user_id
:
this
.
data
.
invitesInfo
.
user_id
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
}
},
false
,
false
,
true
);
}
},
path
:
"/pages/person/invitation/index"
,
}
}
},
},
...
...
pages/person/setting/index.js
View file @
00df751b
...
@@ -65,9 +65,9 @@ Page({
...
@@ -65,9 +65,9 @@ Page({
*/
*/
toUrl
:
function
(
e
)
{
toUrl
:
function
(
e
)
{
if
(
e
.
t
arget
.
dataset
.
url
)
{
if
(
e
.
currentT
arget
.
dataset
.
url
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
e
.
t
arget
.
dataset
.
url
url
:
e
.
currentT
arget
.
dataset
.
url
})
})
}
}
...
...
pages/person/welfare/index.js
View file @
00df751b
...
@@ -68,23 +68,14 @@ Page({
...
@@ -68,23 +68,14 @@ Page({
*/
*/
onShareAppMessage
:
function
(
res
)
{
onShareAppMessage
:
function
(
res
)
{
let
user_id
=
wx
.
getStorageSync
(
'user_id'
);
return
{
return
{
title
:
'每日分享'
,
title
:
'每日分享'
,
imageUrl
:
'/res/images/imgs/re.png'
,
path
:
"/pages/person/auth/index?from=share&user_id="
+
user_id
path
:
"/pages/person/invitation/index"
,
success
:
function
(
res
)
{
if
(
res
.
errMsg
==
'shareAppMessage:ok'
)
{
http
.
getData
(
apis
.
shareAdd
,
'GET'
,
{
user_id
:
wx
.
getStorageSync
(
'user_id'
)
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
}
},
true
,
false
,
true
);
}
}
}
}
},
},
/**
/**
* 获取数据
* 获取数据
...
...
pages/tab/home/home.js
View file @
00df751b
...
@@ -32,7 +32,7 @@ Page({
...
@@ -32,7 +32,7 @@ Page({
// wx.setStorageSync('homeToken', 1)
// wx.setStorageSync('homeToken', 1)
// };
// };
getApp
().
globalData
.
bus
.
on
(
'addXj'
,
()
=>
{
getApp
().
globalData
.
bus
.
on
(
'addXj'
,
()
=>
{
if
(
me
.
data
.
xb
==
1
)
{
if
(
me
.
data
.
xb
==
1
)
{
me
.
getData
();
me
.
getData
();
}
}
})
})
...
@@ -201,13 +201,19 @@ Page({
...
@@ -201,13 +201,19 @@ Page({
url
:
'/pages/search/index/index'
,
url
:
'/pages/search/index/index'
,
})
})
},
},
toWelfare
:
function
()
{
if
(
judgeToken
(
true
))
{
wx
.
navigateTo
({
url
:
"/pages/person/welfare/index"
})
}
},
toXj
:
function
()
{
toXj
:
function
()
{
if
(
judgeToken
(
true
))
{
if
(
judgeToken
(
true
))
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/form/xj/index"
url
:
"/pages/form/xj/index"
})
})
}
}
},
},
fbGood
:
function
()
{
fbGood
:
function
()
{
if
(
judgeToken
(
true
))
{
if
(
judgeToken
(
true
))
{
...
...
pages/tab/home/home.wxml
View file @
00df751b
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<image src="/res/images/icons/home-s-3.png" class="img"></image>
<image src="/res/images/icons/home-s-3.png" class="img"></image>
<text class="text">发布商品</text>
<text class="text">发布商品</text>
</view>
</view>
<view class="function-item column verCenter">
<view class="function-item column verCenter"
bindtap="toWelfare"
>
<image src="/res/images/icons/home-s-4.png" class="img"></image>
<image src="/res/images/icons/home-s-4.png" class="img"></image>
<text class="text">福利中心</text>
<text class="text">福利中心</text>
</view>
</view>
...
...
pages/tab/me/me.js
View file @
00df751b
...
@@ -108,17 +108,18 @@ Page({
...
@@ -108,17 +108,18 @@ Page({
if
(
e
.
currentTarget
.
dataset
.
type
==
'certification'
)
{
if
(
e
.
currentTarget
.
dataset
.
type
==
'certification'
)
{
if
(
this
.
data
.
userInfo
.
auth_status
==
null
)
{
if
(
this
.
data
.
userInfo
.
auth_status
==
null
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/person/certification/addcertification/index"
url
:
"/pages/person/certification/addcertification/index"
});
});
}
else
if
(
this
.
data
.
userInfo
.
auth_status
==
-
1
)
{
//取消认证
wx
.
navigateTo
({
url
:
"/pages/person/certification/addcertification/index"
});
}
else
{
}
else
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/person/certification/certificationmanage/index"
url
:
"/pages/person/certification/certificationmanage/index"
});
});
}
}
}
}
...
...
project.config.json
View file @
00df751b
...
@@ -219,6 +219,49 @@
...
@@ -219,6 +219,49 @@
"id"
:
-1
,
"id"
:
-1
,
"name"
:
"pages/person/helpfriend/index"
,
"name"
:
"pages/person/helpfriend/index"
,
"pathName"
:
"pages/person/helpfriend/index"
,
"pathName"
:
"pages/person/helpfriend/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/auth/index"
,
"pathName"
:
"pages/person/auth/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/welfare/index"
,
"pathName"
:
"pages/person/welfare/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/auth/index"
,
"pathName"
:
"pages/person/auth/index"
,
"query"
:
"from=share&user_id=123"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/tab/home/home"
,
"pathName"
:
"pages/tab/home/home"
,
"query"
:
"from=share&user_id=123"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/auth/index"
,
"pathName"
:
"pages/person/auth/index"
,
"query"
:
"from=share&user_id=123"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/certification/certificationmanage/index"
,
"pathName"
:
"pages/person/certification/certificationmanage/index"
,
"query"
:
"from=share&user_id=123"
,
"scene"
:
null
"scene"
:
null
}
}
]
]
...
...
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