From df52535848722485dbbbba0d41747ad6bdec61e7 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Sat, 15 Aug 2020 17:16:11 +0800
Subject: [PATCH 1/4] mine concerns 8.15
---
common/api/user.js | 6 +-
common/store/index.js | 6 +-
components/mine/collection-item/index.vue | 12 +
pageB/sdetails/index.vue | 15 +-
pageC/merchant/index.vue | 6 +-
pageE/mine/MineConcerns.vue | 276 ++++++----------------
pageE/mine/storeConcerns.vue | 176 ++++++++++++++
pageE/setting/Index.vue | 4 +-
pageE/setting/feedback.vue | 35 ++-
pageE/setting/question.vue | 51 ++++
pages.json | 17 +-
11 files changed, 377 insertions(+), 227 deletions(-)
create mode 100644 pageE/mine/storeConcerns.vue
create mode 100644 pageE/setting/question.vue
diff --git a/common/api/user.js b/common/api/user.js
index f45dc6f..a3f8cba 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -415,7 +415,7 @@ export default {
},
// 关注用户列表
attentionMemberList({ page = 1,role } = {}) {
- return vm.$u.post('member/attentionMemberList', { page,role });
+ return vm.$u.post('member/attentionMemberList', { page, role });
},
// 可用优惠券商品
couponGoodsList({ voucher_id, page, order }) {
@@ -437,6 +437,10 @@ export default {
friend_tomid:id
});
},
+ // 设置里的帮助
+ getSettingHelpList() {
+ return vm.$u.post('document/help');
+ }
}
}
diff --git a/common/store/index.js b/common/store/index.js
index d3f4929..91a1a40 100644
--- a/common/store/index.js
+++ b/common/store/index.js
@@ -18,7 +18,8 @@ const store = new Vuex.Store({
loadmore: {}, // 下拉加载返回的数据
hasLogin: false, // 登录状态
token: "", // 储存token
- showLoginModel: false, // 登录框
+ showLoginModel: false, // 登录框
+ question: {}, // 帮助与反馈
},
getters: {
getOrderAddress(state) {
@@ -75,6 +76,9 @@ const store = new Vuex.Store({
},
setLoadMore(state, info) {
state.loadmore = info;
+ },
+ setQuestion(state, question) {
+ state.question = question;
}
}
})
diff --git a/components/mine/collection-item/index.vue b/components/mine/collection-item/index.vue
index f10dca3..6c3f3a9 100644
--- a/components/mine/collection-item/index.vue
+++ b/components/mine/collection-item/index.vue
@@ -46,6 +46,7 @@ export default {
},
methods: {
viewGoodsDetails(item) {
+ if(this.closeAction()) return false;
const list = this.list.filter(item => {
return item.show;
})
@@ -57,6 +58,17 @@ export default {
}
})
},
+ closeAction() {
+ let status = false;
+ this.list.map((val, idx) => {
+ if(val.show) {
+ status = true;
+ this.$set(this.list[idx], 'show', false);
+ };
+ })
+ this.$forceUpdate();
+ return status;
+ },
getGoodsFavoritesList() {
this.$u.api.getFavoritesList().then(res => {
if(res.errCode == 0) {
diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue
index c8d4af4..5e80184 100644
--- a/pageB/sdetails/index.vue
+++ b/pageB/sdetails/index.vue
@@ -31,9 +31,9 @@
¥{{ goodsInfo.goods_price || '0.00' }}
-
-
- {{ !goodsInfo.is_collect == 1 ? '收藏' : '已收藏' }}
+
+
+ {{ goodsInfo.is_collect == 1 ? '已收藏' : '收藏' }}
@@ -638,7 +638,7 @@ export default {
current: arr[index]
})
},
- switchCollect(status) {
+ switchCollect(status = 0) {
if(status == 1) {
this.removeFavorite();
} else {
@@ -646,6 +646,13 @@ export default {
}
},
addFavoriteGoods() {
+ // // 尝试登录
+ // if (!this.$store.state.hasLogin) {
+ // uni.navigateTo({
+ // url: "pageA/login/login"
+ // })
+ // return false;
+ // }
this.$u.api.addFavoriteGoods({ fid: this.goodsInfo.goods_id }).then(res => {
if(res.errCode == 0) {
this.getGoodsDetails(this.id);
diff --git a/pageC/merchant/index.vue b/pageC/merchant/index.vue
index 0c1b0b7..f709d3a 100644
--- a/pageC/merchant/index.vue
+++ b/pageC/merchant/index.vue
@@ -169,9 +169,9 @@ export default {
}
},
getStoreInfo() {
- console.log(this.sid )
+ // console.log(this.sid )
this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{
- console.log(JSON.stringify(res))
+ // console.log(JSON.stringify(res))
this.info = res.data;
uni.stopPullDownRefresh();
})
@@ -221,7 +221,7 @@ export default {
const res = uni.getSystemInfoSync();
this.scrollHeiht = res.windowHeight - (73 + 20 + 170) + 'px';
this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px';
- console.log(this.paddingTop);
+ // console.log(this.paddingTop);
}
},
onLoad(option){
diff --git a/pageE/mine/MineConcerns.vue b/pageE/mine/MineConcerns.vue
index 15de9ce..e07ff62 100644
--- a/pageE/mine/MineConcerns.vue
+++ b/pageE/mine/MineConcerns.vue
@@ -1,259 +1,121 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
- {{ item.friend_tomname }}
-
-
- {{ item.friend_tomavatar | date }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ info.friend_tomname || '' }}
- 取消关注
-
-
-
+
+
+
+
+
+
+
+
+ {{ info.friend_tomname || '' }}
+ 取消关注
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/pageE/setting/Index.vue b/pageE/setting/Index.vue
index d7b084d..f89d52c 100644
--- a/pageE/setting/Index.vue
+++ b/pageE/setting/Index.vue
@@ -1,11 +1,11 @@
-
+
{{ item.title }}
diff --git a/pageE/setting/feedback.vue b/pageE/setting/feedback.vue
index cde52e8..e2fe288 100644
--- a/pageE/setting/feedback.vue
+++ b/pageE/setting/feedback.vue
@@ -5,17 +5,15 @@
拨打官方客服电话:400-100-100
- 周一至周五08:0-18:00
+ {{ wkTime }}
- 意见反馈
+ 意见反馈
常见服务
- 【账号问题】登录时需要验证码,手机号使用不了怎么办?
- 【账号问题】登录时需提示您的密码不安全,请重置?
- 【账号问题】登录密码忘记了怎么办?
+ {{ item.question }}
@@ -23,7 +21,32 @@
diff --git a/pageE/setting/question.vue b/pageE/setting/question.vue
new file mode 100644
index 0000000..3f3aad0
--- /dev/null
+++ b/pageE/setting/question.vue
@@ -0,0 +1,51 @@
+
+
+
+ Q:
+ {{ item.question }}
+
+
+ A:
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 2639e09..dff62ae 100644
--- a/pages.json
+++ b/pages.json
@@ -845,7 +845,6 @@
{
"path": "mine/MineConcerns",
"style": {
- "enablePullDownRefresh": true,
"navigationBarTitleText": "我的关注",
"app-plus": {
"titleSize": "36px",
@@ -861,10 +860,9 @@
"style": {
"navigationBarTitleText": "勋章介绍",
"app-plus": {
- "type": "transparent",
"titleSize": "36px",
"titleNView": {
- "backgroundColor": "rgba(255,255,255,0)",
+ "type": "transparent",
"titleColor": "#ffffff"
}
}
@@ -968,6 +966,19 @@
}
}
},
+ {
+ "path": "setting/question",
+ "style": {
+ "navigationBarTitleText": "常见问题",
+ "app-plus": {
+ "titleSize": "36px",
+ "titleNView": {
+ "titleColor": "#333333",
+ "backgroundColor": "#FFFFFF"
+ }
+ }
+ }
+ },
{
"path": "setting/ShieldUsers",
"style": {
From e427748a7977a1c6690ec6c5478091f065a839a3 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Sat, 15 Aug 2020 17:44:49 +0800
Subject: [PATCH 2/4] delete chat 8.15
---
pageD/chat/chat.vue | 544 ------------------------------------------
pageD/chat/index.scss | 354 ---------------------------
pages/index/index.vue | 1 -
3 files changed, 899 deletions(-)
delete mode 100644 pageD/chat/chat.vue
delete mode 100644 pageD/chat/index.scss
diff --git a/pageD/chat/chat.vue b/pageD/chat/chat.vue
deleted file mode 100644
index 5096cfd..0000000
--- a/pageD/chat/chat.vue
+++ /dev/null
@@ -1,544 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ item.content }}
-
-
-
- {{ item.contentDuration }}''
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ voiceTitle }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{voiceIconText}}
-
-
-
-
-
-
-
diff --git a/pageD/chat/index.scss b/pageD/chat/index.scss
deleted file mode 100644
index 765d1df..0000000
--- a/pageD/chat/index.scss
+++ /dev/null
@@ -1,354 +0,0 @@
-page {
- background-color: #f3f3f3;
-}
-
-.content {
- &-showfn{
- padding-bottom: 0rpx;
- padding-bottom: calc(420rpx + constant(safe-area-inset-bottom));
- padding-bottom: calc(420rpx + env(safe-area-inset-bottom) );
- /* #ifdef MP-WEIXIN */
- /* #endif */
- }
- &-box {
- width: 100%;
- height: auto;
- min-height: calc(100vh - env(safe-area-inset-top) - 200rpx);
- box-sizing: content-box;
- position: relative;
- padding-bottom: 120rpx;
-
- /* #ifdef APP-PLUS */
- margin-bottom: 0rpx;
- margin-bottom: constant(safe-area-inset-bottom);
- margin-bottom: env(safe-area-inset-bottom);
- /* #endif */
- /* #ifdef MP-WEIXIN */
- padding-bottom: 0rpx;
- padding-bottom: calc(120rpx + constant(safe-area-inset-bottom));
- padding-bottom: calc(120rpx + env(safe-area-inset-bottom) );
- /* #endif */
-
- &-bg {
- width: 100%;
- position: fixed;
- /* #ifdef MP-WEIXIN */
- bottom: 0;
- bottom: constant(safe-area-inset-bottom);
- bottom: env(safe-area-inset-bottom);
- /* #endif */
- /* #ifndef MP-WEIXIN */
- top: 0;
- left: 0;
- /* #endif */
- }
-
- &-loading {
- text-align: center;
- padding: 20rpx 0;
- }
-
- .message {
- padding: 13rpx 20rpx;
- }
-
- .message-item {
- display: flex;
- justify-content: flex-start;
- align-items: flex-start;
- align-content: flex-start;
- flex-wrap: nowrap;
- flex-direction: row;
-
- .img {
- width: 80rpx;
- height: 80rpx;
- border-radius: 5rpx;
- }
-
- .content {
- padding: 20rpx;
- max-width: 500rpx;
- border-radius: 10rpx;
- font-size: 28rpx;
- }
-
- // 语音
- .contentType2 {
- display: flex;
- flex-direction: row;
- align-items: center;
- .voice_icon {
- height: 34rpx;
- width: 34rpx;
- background-repeat: no-repeat;
- background-size: 100%;
- }
- .voice_icon_right {
- background-image: url(../../static/voice-left-3.png);
- margin-left: 10rpx;
- }
- .voice_icon_left {
- background-image: url(../../static/voice-right-3.png);
- margin-right: 10rpx;
- }
- .voice_icon_right_an {
- animation: voiceAn_right 1s linear alternate infinite;
- }
- .voice_icon_left_an {
- animation: voiceAn_left 1s linear alternate infinite;
- }
- @keyframes voiceAn_right {
- 0% {
- background-image: url(../../static/voice-left-1.png);
- }
- 50% {
- background-image: url(../../static/voice-left-2.png);
- }
- 100% {
- background-image: url(../../static/voice-left-3.png);
- }
- }
- @keyframes voiceAn_left {
- 0% {
- background-image: url(../../static/voice-right-1.png);
- }
- 50% {
- background-image: url(../../static/voice-right-2.png);
- }
- 100% {
- background-image: url(../../static/voice-right-3.png);
- }
- }
- }
-
- //图片
- .contentType3{
- padding: 0;
- border-radius: 2rpx;
- background-color: transparent !important;
- .img{
- width: 200rpx;
- height: auto;
- max-width: 300rpx;
- max-height: 400rpx;
- }
- }
- .contentType3::after{
- border: none !important;
- display: none !important;
- }
- .content-type-right {
- flex-direction: row-reverse;
- }
-
- &.right {
- flex-direction: row-reverse;
-
- .content {
- background-color: $uni-color-success;
- margin-right: 28rpx;
- word-break: break-all;
- line-height: 36rpx;
- position: relative;
-
- &::after {
- content: '';
- display: block;
- width: 0;
- height: 0;
- border-top: 10rpx solid transparent;
- border-bottom: 10rpx solid transparent;
- border-left: 16rpx solid $uni-color-success;
- position: absolute;
- right: -16rpx;
- top: 30rpx;
- }
- }
- }
-
- &.left {
- .content {
- background-color: $uni-text-color-inverse;
- margin-left: 28rpx;
- word-break: break-all;
- line-height: 36rpx;
- position: relative;
-
- &::after {
- content: '';
- display: block;
- width: 0;
- height: 0;
- border-top: 10rpx solid transparent;
- border-bottom: 10rpx solid transparent;
- border-right: 16rpx solid $uni-text-color-inverse;
- position: absolute;
- left: -16rpx;
- top: 30rpx;
- }
- }
- }
- }
- }
-
- .input-box {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- box-sizing: content-box;
- z-index: 999;
- background-color: #eaeaea;
-
- /* #ifdef APP-PLUS */
- margin-bottom: 0rpx;
- margin-bottom: constant(safe-area-inset-bottom);
- margin-bottom: env(safe-area-inset-bottom);
- /* #endif */
- /* #ifdef MP-WEIXIN */
- padding-bottom: 0rpx;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- /* #endif */
-
- &-flex {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-wrap: nowrap;
- flex-direction: row;
- padding: 20rpx;
- box-sizing: border-box;
- image{
- width: 56rpx;
- height: 56rpx;
- }
- .icon_img {
- margin-right: 20rpx;
- }
- .icon_btn_add{
- margin-left: 20rpx;
- }
- &-grow {
- flex-grow: 1;
-
- .content {
- box-sizing: border-box;
- background-color: #fff;
- height: 80rpx;
- padding: 0 20rpx;
- border-radius: 12rpx;
- font-size: 28rpx;
- caret-color: $uni-color-success;
- }
-
- .voice_title {
- text-align: center;
- background-color: #ffffff;
- height: 80rpx;
- line-height: 80rpx;
- border-radius: 12rpx;
- }
- }
-
- .btn {
- margin-left: 20rpx;
- background-color: $u-type-success;
- border: none;
- }
- }
-
- .fun-box{
- opacity: 0;
- transition: all 0.1s ease-in-out;
- height: 0;
- .grid-text{
- padding-top: 10rpx;
- color: $uni-text-color-grey;
- }
-
- }
- .show-fun-box{
- opacity: 1;
- height: 300rpx;
- }
- }
-
- .input-box-mpInputMargin {
- /* #ifdef MP-WEIXIN */
- padding-bottom: 0rpx;
- /* #endif */
- }
- .voice_an{
- width: 300rpx;
- height: 300rpx;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-55%);
- background-color: rgba(41,41,41,0.7);
- color: white;
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- border-radius: 10rpx;
- .text{
- padding-top: 30rpx;
- }
- @keyframes runVoice{
- 0%{
- height: 10%;
- }
- 20%{
- height: 50%;
- }
- 50%{
- height: 100%;
- }
- 80%{
- height: 50%;
- }
- 100%{
- height: 0%;
- }
- }
- .wave{
- width:6rpx;
- height: 100%;
- margin-left: 10rpx;
- border-radius: 50rpx;
- background-color: #999;
- vertical-align: middle;
- display: inline-block;
- }
- .voice_an_icon{
- width: 200rpx;
- height: 100rpx;
- line-height: 50rpx;
- margin: 50rpx 0;
- }
- .voice_an_icon #one{
- animation:runVoice 0.6s infinite 0.1s;
- }
- .voice_an_icon #two{
- animation:runVoice 0.6s infinite 0.3s;
- }
- .voice_an_icon #three{
- animation:runVoice 0.6s infinite 0.6s;
- }
- .voice_an_icon #four{
- animation:runVoice 0.6s infinite 0.1s;
- }
- .voice_an_icon #five{
- animation:runVoice 0.6s infinite 0.3s;
- }
- .voice_an_icon #six{
- animation:runVoice 0.6s infinite 0.6s;
- }
- .voice_an_icon #seven{
- animation:runVoice 0.6s infinite 0.1s;
- }
- }
-}
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5f13f56..a6d04a0 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -222,7 +222,6 @@
import zhiboItem from "@/components/index/zhibo-item/index"
import indexad from "@/components/index/ad/index"
import darenItem from "@/components/index/daren-item/index"
-import chatVue from '../../pageD/chat/chat.vue'
export default {
name: "index",
From 97676d75fb35283036fbc5aee8b0bc6bcb10bf8e Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Sat, 15 Aug 2020 18:32:46 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E8=BE=BE=E4=BA=BA=E5=88=97=E8=A1=A8=208.15?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api/shop.js | 4 ++
pageB/follow/index.vue | 109 +++++++++++++++++++++++++++--------------
2 files changed, 75 insertions(+), 38 deletions(-)
diff --git a/common/api/shop.js b/common/api/shop.js
index 2034005..353f654 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -54,6 +54,10 @@ export default {
getRecommendList(){
return vm.$u.post('MemberExpert/recommendList');
},
+ // 获取所有达人
+ getAllRecommendList({ page }) {
+ return vm.$u.post('MemberExpert/getRecommendList', { page });
+ },
// 达人(搜索)列表
getExpertList({ page, store_id, live_status, like_nickname }){
return vm.$u.post('MemberExpert/expertList', {
diff --git a/pageB/follow/index.vue b/pageB/follow/index.vue
index f102ffb..d8b75e3 100644
--- a/pageB/follow/index.vue
+++ b/pageB/follow/index.vue
@@ -1,43 +1,49 @@
-
-
- 输入达人名称
-
-
-
-
+
+
+
+ 输入达人名称
+
+
+
+
+
+
\ No newline at end of file
From c2346375c8f7946248ed23a76e0270d717f19d72 Mon Sep 17 00:00:00 2001
From: Gdpao <1341331954@qq.com>
Date: Sat, 15 Aug 2020 19:14:12 +0800
Subject: [PATCH 4/4] gdpaoup
---
App.vue | 34 +--
common/http.interceptor.js | 4 +
pageA/bindinges/bindinges.vue | 440 +++++++++++++++++-----------------
pageA/login/login.vue | 45 ++--
pageA/pactList/pactList.vue | 19 +-
pageB/photo/index.vue | 2 +-
pageB/video/video.nvue | 2 +-
pages/index/index.vue | 16 +-
8 files changed, 285 insertions(+), 277 deletions(-)
diff --git a/App.vue b/App.vue
index 4ad52c3..5182421 100644
--- a/App.vue
+++ b/App.vue
@@ -4,9 +4,9 @@
globalData: {
im: {}
},
- computed: {
- ...mapState(["hasLogin"])
- },
+ computed: {
+ ...mapState(["hasLogin"])
+ },
onLaunch() {
getApp().globalData.im = this.imService
// 缓存token
@@ -16,23 +16,23 @@
this.loginIn(res.data);
}
})
- // 刷新token
- if (this.hasLogin) {
- this.refreshToken_function();
- }
+ // 刷新token
+ if (this.hasLogin) {
+ this.refreshToken_function();
+ }
},
methods: {
...mapMutations(['loginIn']),
- // 刷新token
- refreshToken_function(){
- this.$u.api.refreshToken({}).then((res) => {
- // console.log(res);
- if (res.errCode == 0) {
- let token = res.data.token;
- uni.setStorageSync('token', token);//存储toke值
- }
- })
- },
+ // 刷新token
+ refreshToken_function(){
+ this.$u.api.refreshToken({}).then((res) => {
+ // console.log(res);
+ if (res.errCode == 0) {
+ let token = res.data.token;
+ uni.setStorageSync('token', token);//存储toke值
+ }
+ })
+ },
}
}
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index df8471e..b813783 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -47,6 +47,10 @@ const install = (Vue, vm) => {
// 假设201为token失效,这里跳转登录
// vm.$u.toast('您还没有登录哦,请先去登录!');
if (res.data.data.action != "memberinfo") {
+ uni.showToast({
+ title: "您还没有登录,请先去登录哦!",
+ icon: "none"
+ })
setTimeout(() => {
// 此为uView的方法,详见路由相关文档
uni.navigateTo({
diff --git a/pageA/bindinges/bindinges.vue b/pageA/bindinges/bindinges.vue
index 70d9d25..549e2c5 100644
--- a/pageA/bindinges/bindinges.vue
+++ b/pageA/bindinges/bindinges.vue
@@ -3,32 +3,28 @@
- 手机登录
+ 请绑定手机号
- 手机号
-
+
-
- 请输入验证码
-
- 获取验证码
+
+
+
-
+
+
+
我已详细阅读并同意
- 《用户协议》
- 《隐私协议》
- 《使用协议》
-
-
-
+
+ {{ item }}
+
- {{login}}
-
+ {{login}}
+
@@ -36,81 +32,151 @@
export default {
data() {
return {
- list: [{
- checked: false,
- disabled: false
- }],
- value: '',
- login: '注册',
- show: true
+ phone: "",
+ sms_code: "",
+ login: '绑定',
+ show: true,
+ checked: false,
+ // 时间
+ timer: null,
+ is_sendcode: false, // 60s
+ time_count: 60,
+ pactList: [ "《用户协议》", "《隐私协议》", "《使用协议》" ],
};
},
methods: {
- // 选中某个复选框时,由checkbox时触发
- checkboxChange(e) {
- //console.log(e);
- },
- // 选中任一checkbox时,由checkbox-group触发
- checkboxGroupChange(e) {
- // console.log(e);
- },
- mask_u(){
- this.show = !this.show
- },
+ // 勾选协议
+ change(e) {
+ this.checked = !this.checked;
+ console.log(this.checked);
+ },
+ // 获取验证码
+ getCode() {
+ if (this.$u.test.isEmpty(this.phone)) {
+ this.$refs.uToast.show({
+ title: '手机号格式不能为空!',
+ type: 'error',
+ })
+ return;
+ }
+ if(!(/^1[3456789]\d{9}$/.test(this.phone))){
+ this.$refs.uToast.show({
+ title: '手机号格式不正确!',
+ type: 'warning',
+ })
+ return;
+ }
+ this.$u.api.sendSmsCode({
+ member_mobile: this.phone,
+ smslog_type: 4,
+ }).then(res => {
+ if (res.errCode == 0) {
+ console.log(res);
+ this.$refs.uToast.show({
+ title: res.message,
+ type: 'success',
+ })
+ // 发送验证码
+ this.getSendCode();
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: 'warning',
+ })
+ }
+ })
+ },
+ // 绑定手机号
+ bindPhone() {
+ if (this.$u.test.isEmpty(this.phone)) {
+ this.$refs.uToast.show({
+ title: '手机号不能为空!',
+ type: 'error',
+ })
+ return;
+ }
+ if(!(/^1[3456789]\d{9}$/.test(this.phone))){
+ this.$refs.uToast.show({
+ title: '手机号格式不正确!',
+ type: 'warning',
+ })
+ return;
+ }
+ if(this.$u.test.isEmpty(this.sms_code)){
+ this.$refs.uToast.show({
+ title: '验证码不能为空!',
+ type: 'warning',
+ })
+ return;
+ }
+ if(this.sms_code.length == 0){
+ this.$refs.uToast.show({
+ title: '验证码有误!',
+ type: 'warning',
+ })
+ return;
+ }
+ if(!this.checked){
+ this.$refs.uToast.show({
+ title: '请同意协议!',
+ type: 'warning',
+ })
+ return;
+ }
+ this.$u.api.mobileBind({
+ member_mobile: this.phone,
+ sms_code: this.sms_code,
+ }).then(res => {
+ console.log(res);
+ if (res.errCode == 0) {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: 'success',
+ })
+ uni.switchTab({
+ url: '/pages/index/index'
+ });
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: 'warning',
+ })
+ }
+ })
+ },
+ // 协议详情
+ infoPact(index) {
+ // console.log(index);
+ uni.navigateTo({
+ url: '/pageA/pactList/pactList?index=' + index
+ });
+ },
+ // 60s
+ getSendCode() {
+ const TIME_COUNT = 60;
+ if (!this.timer) {
+ this.time_count = TIME_COUNT;
+ this.is_sendcode = true;
+ this.timer = setInterval(() => {
+ if (this.time_count > 0 && this.time_count <= TIME_COUNT) {
+ this.time_count--;
+ } else {
+ this.is_sendcode = false;
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ }, 1000);
+ }
+ },
}
};
diff --git a/pageA/login/login.vue b/pageA/login/login.vue
index 97f75df..834699b 100644
--- a/pageA/login/login.vue
+++ b/pageA/login/login.vue
@@ -226,14 +226,20 @@
member_nickname: data.userInfo.nickName,
member_avatar: data.userInfo.avatarUrl,
}).then(res => {
- console.log(res.errCode);
if (res.errCode == 0) {
this.loginIn(res.data.token);
- uni.setStorageSync('user_info',res.data);
+ uni.setStorageSync('user_info',res.data);
this.show = false;
- uni.switchTab({
- url: "../../pages/index/index"
- })
+ console.log(res.data.member.member_mobilebind);
+ if(res.data.member.member_mobilebind) {
+ uni.switchTab({
+ url: "/pages/index/index"
+ });
+ } else {
+ uni.navigateTo({
+ url: '/pageA/bindinges/bindinges'
+ });
+ }
}
})
}
@@ -247,11 +253,11 @@
uni.login({
provider: 'weixin',
success: (wxres) => {
- console.log(wxres);
+ // console.log(wxres);
uni.getUserInfo({
provider: 'weixin',
success: (data) => {
- console.log(data);
+ // console.log(data);
this.$u.api.wechatLogin({
member_wxopenid: data.userInfo.openId,
member_nickname: data.userInfo.nickName,
@@ -260,11 +266,18 @@
console.log(res);
if (res.errCode == 0) {
this.loginIn(res.data.token);
- uni.setStorageSync('user_info',res.data);
+ uni.setStorageSync('user_info',res.data);
this.show = false;
- uni.switchTab({
- url: "../../pages/index/index"
- })
+ console.log(res.data.member.member_mobilebind);
+ if(res.data.member.member_mobilebind) {
+ uni.switchTab({
+ url: "/pages/index/index"
+ });
+ } else {
+ uni.navigateTo({
+ url: '/pageA/bindinges/bindinges'
+ });
+ }
}
})
}
@@ -301,11 +314,11 @@
tochange() {
},
- goIndex() {
- uni.switchTab({
- url: "/pages/index/index"
- })
- }
+ goIndex() {
+ uni.switchTab({
+ url: "/pages/index/index"
+ })
+ }
},
components: {
identifying
diff --git a/pageA/pactList/pactList.vue b/pageA/pactList/pactList.vue
index a2c407e..53f53a3 100644
--- a/pageA/pactList/pactList.vue
+++ b/pageA/pactList/pactList.vue
@@ -29,9 +29,9 @@ export default {
document_code: 'agreement'
}).then((res)=>{
// console.log(res.data.document_title);
- uni.setNavigationBarTitle({
- title: res.data.document_title
- })
+ uni.setNavigationBarTitle({
+ title: res.data.document_title
+ })
let data = common.unescapeHTML(res.data.document_content);
this.document_content = data;
})
@@ -41,9 +41,9 @@ export default {
document_code: 'privacy'
}).then((res)=>{
// console.log(res.data.document_title);
- uni.setNavigationBarTitle({
- title: res.data.document_title
- })
+ uni.setNavigationBarTitle({
+ title: res.data.document_title
+ })
let data = common.unescapeHTML(res.data.document_content);
this.document_content = data
})
@@ -53,9 +53,9 @@ export default {
document_code: 'use'
}).then((res)=>{
// console.log(res.data.document_title);
- uni.setNavigationBarTitle({
- title: res.data.document_title
- })
+ uni.setNavigationBarTitle({
+ title: res.data.document_title
+ })
let data = common.unescapeHTML(res.data.document_content);
this.document_content = data
})
@@ -69,7 +69,6 @@ export default {