|
@@ -2,20 +2,25 @@
|
|
|
<view>
|
|
<view>
|
|
|
<view :class="'mine' + (skinNotColor ? ' not-color' : '')">
|
|
<view :class="'mine' + (skinNotColor ? ' not-color' : '')">
|
|
|
<view :style="'height:' + systems.barHeight + 'rpx;'"></view>
|
|
<view :style="'height:' + systems.barHeight + 'rpx;'"></view>
|
|
|
- <view :style="'top:' + systems.ktxStatusHeight + 'rpx;z-index:3;position: absolute;'+'line-height: '+ systems.navigationHeight+'rpx;text-align: center;left: 0;font-size: 34rpx;right: 0;color: #FFFFFF;'">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ :style="'top:' + systems.ktxStatusHeight + 'rpx;z-index:3;position: absolute;'+'line-height: '+ systems.navigationHeight+'rpx;text-align: center;left: 0;font-size: 34rpx;right: 0;color: #FFFFFF;'">
|
|
|
我的
|
|
我的
|
|
|
</view>
|
|
</view>
|
|
|
- <image src="../../static/pages/images/userBg.png" class="wdbg" @click="jumpUrl('mine/userinfo/userinfo')"></image>
|
|
|
|
|
|
|
+ <image src="../../static/pages/images/userBg.png" class="wdbg" @click="jumpUrl('mine/userinfo/userinfo')">
|
|
|
|
|
+ </image>
|
|
|
<view class="minec">
|
|
<view class="minec">
|
|
|
<view class="minec-img" @click="jumpUrl('mine/set/index')">
|
|
<view class="minec-img" @click="jumpUrl('mine/set/index')">
|
|
|
- <image :src="userInfos.avatar ? userInfos.avatar : '/static/pages/images/userimg.png'" mode="aspectFit" class="user"></image>
|
|
|
|
|
|
|
+ <image :src="userInfos.avatar ? userInfos.avatar : '/static/pages/images/userimg.png'"
|
|
|
|
|
+ mode="aspectFit" class="user"></image>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="mines" @click="jumpUrl('mine/set/index')" v-if="isLogin">
|
|
<view class="mines" @click="jumpUrl('mine/set/index')" v-if="isLogin">
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
{{ userInfos.nickName }}
|
|
{{ userInfos.nickName }}
|
|
|
- <image src="../../static/pages/images/rz_qy_h.png" class="auth-img" v-if="userInfos.authStatus == 2"></image>
|
|
|
|
|
|
|
+ <image src="../../static/pages/images/rz_qy_h.png" class="auth-img"
|
|
|
|
|
+ v-if="userInfos.authStatus == 2"></image>
|
|
|
<image src="../../static/pages/images/rz_qy.png" class="auth-img" v-else></image>
|
|
<image src="../../static/pages/images/rz_qy.png" class="auth-img" v-else></image>
|
|
|
- <image src="../../static/pages/images/rz_gr_h.png" class="auth-img" v-if="userInfos.companyStatus == 2"></image>
|
|
|
|
|
|
|
+ <image src="../../static/pages/images/rz_gr_h.png" class="auth-img"
|
|
|
|
|
+ v-if="userInfos.companyStatus == 2"></image>
|
|
|
<image src="../../static/pages/images/rz_gr.png" class="auth-img" v-else></image>
|
|
<image src="../../static/pages/images/rz_gr.png" class="auth-img" v-else></image>
|
|
|
</view>
|
|
</view>
|
|
|
<text class="edu" v-if="userInfos.mobile">{{ styleHintPhoneText(userInfos.mobile) }}</text>
|
|
<text class="edu" v-if="userInfos.mobile">{{ styleHintPhoneText(userInfos.mobile) }}</text>
|
|
@@ -28,17 +33,14 @@
|
|
|
<!-- </navigator> -->
|
|
<!-- </navigator> -->
|
|
|
</view>
|
|
</view>
|
|
|
<view class="datas dflex">
|
|
<view class="datas dflex">
|
|
|
- <navigator url="" hover-class="none" class="li" v-if="is_open_wallet.isOpenWallet == 1" @click="jumpUrl('wallet/index/index')">
|
|
|
|
|
|
|
+ <navigator url="" hover-class="none" class="li" v-if="is_open_wallet.isOpenWallet == 1"
|
|
|
|
|
+ @click="jumpUrl('wallet/index/index')">
|
|
|
<text>{{ userMoney ? userMoney : '0.00' }}</text>
|
|
<text>{{ userMoney ? userMoney : '0.00' }}</text>
|
|
|
钱包
|
|
钱包
|
|
|
</navigator>
|
|
</navigator>
|
|
|
- <navigator
|
|
|
|
|
- url=""
|
|
|
|
|
- hover-class="none"
|
|
|
|
|
- class="li"
|
|
|
|
|
|
|
+ <navigator url="" hover-class="none" class="li"
|
|
|
:style="is_open_wallet.isOpenWallet != 1 && Open_Points_Mall != 1 ? 'width:50%' : ''"
|
|
:style="is_open_wallet.isOpenWallet != 1 && Open_Points_Mall != 1 ? 'width:50%' : ''"
|
|
|
- @click="jumpUrl('mine/coupons/coupons')"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click="jumpUrl('mine/coupons/coupons')">
|
|
|
<text>{{ userInfos.coupon ? userInfos.coupon : '0' }}</text>
|
|
<text>{{ userInfos.coupon ? userInfos.coupon : '0' }}</text>
|
|
|
优惠券
|
|
优惠券
|
|
|
</navigator>
|
|
</navigator>
|
|
@@ -46,13 +48,9 @@
|
|
|
<text>{{ userInfos.integral ? userInfos.integral : '0' }}</text>
|
|
<text>{{ userInfos.integral ? userInfos.integral : '0' }}</text>
|
|
|
积分
|
|
积分
|
|
|
</navigator>
|
|
</navigator>
|
|
|
- <navigator
|
|
|
|
|
- url=""
|
|
|
|
|
- hover-class="none"
|
|
|
|
|
- class="li"
|
|
|
|
|
|
|
+ <navigator url="" hover-class="none" class="li"
|
|
|
:style="is_open_wallet.isOpenWallet != 1 && Open_Points_Mall != 1 ? 'width:50%' : ''"
|
|
:style="is_open_wallet.isOpenWallet != 1 && Open_Points_Mall != 1 ? 'width:50%' : ''"
|
|
|
- @click="jumpUrl('mine/collect/collect')"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click="jumpUrl('mine/collect/collect')">
|
|
|
<text>{{ userInfos.collect ? userInfos.collect : '0' }}</text>
|
|
<text>{{ userInfos.collect ? userInfos.collect : '0' }}</text>
|
|
|
收藏
|
|
收藏
|
|
|
</navigator>
|
|
</navigator>
|
|
@@ -81,7 +79,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<view class="con">
|
|
<view class="con">
|
|
|
<view class="order">
|
|
<view class="order">
|
|
|
<navigator url="" hover-class="none" class="tits dflex" @click="jumpUrl('mine/order/order')">
|
|
<navigator url="" hover-class="none" class="tits dflex" @click="jumpUrl('mine/order/order')">
|
|
@@ -126,7 +124,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<view class="box mlist">
|
|
<view class="box mlist">
|
|
|
<navigator class="li ddflex" url="/promote/invite/invite" hover-class="none">
|
|
<navigator class="li ddflex" url="/promote/invite/invite" hover-class="none">
|
|
|
<image :src="picUrlss + 'scrm/mico_fx.png'" class="mico"></image>
|
|
<image :src="picUrlss + 'scrm/mico_fx.png'" class="mico"></image>
|
|
@@ -134,15 +132,17 @@
|
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
|
</navigator>
|
|
</navigator>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<view class="box mlist">
|
|
<view class="box mlist">
|
|
|
<view class="li ddflex">
|
|
<view class="li ddflex">
|
|
|
<view class="fflex">
|
|
<view class="fflex">
|
|
|
- <contact-button class-name="ddflex" :img-url="picUrlss+'scrm/mico_kf.png'" img-style='width: 49rpx;height: 49rpx;margin: 0 25rpx 0 0;' button-text="联系客服" styles="line-height:initial;"></contact-button>
|
|
|
|
|
|
|
+ <contact-button class-name="ddflex" :img-url="picUrlss+'scrm/mico_kf.png'"
|
|
|
|
|
+ img-style='width: 49rpx;height: 49rpx;margin: 0 25rpx 0 0;' button-text="联系客服"
|
|
|
|
|
+ styles="line-height:initial;"></contact-button>
|
|
|
</view>
|
|
</view>
|
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <navigator class="li ddflex" url="/mine/help/help" hover-class="none">
|
|
|
|
|
|
|
+ <navigator class="li ddflex" url="/mine/help/help" hover-class="none">
|
|
|
<image :src="picUrlss+'ruiteng/my_service5.png'" class="mico" mode="aspectFit"></image>
|
|
<image :src="picUrlss+'ruiteng/my_service5.png'" class="mico" mode="aspectFit"></image>
|
|
|
<view class="fflex">帮助中心</view>
|
|
<view class="fflex">帮助中心</view>
|
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
@@ -161,16 +161,10 @@
|
|
|
<footer-copyright></footer-copyright>
|
|
<footer-copyright></footer-copyright>
|
|
|
<!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeignt + 115) + 'rpx'"></view> -->
|
|
<!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeignt + 115) + 'rpx'"></view> -->
|
|
|
<foot channel="user"></foot>
|
|
<foot channel="user"></foot>
|
|
|
- <update-userinfo
|
|
|
|
|
- :update-info="isUpdateInfo"
|
|
|
|
|
- :update-mobile="isUpdateMobile"
|
|
|
|
|
- v-if="isShowUpdate"
|
|
|
|
|
- @closeUpdate="closeUpdate"
|
|
|
|
|
- @updateInfo="updateInfo"
|
|
|
|
|
- @updateMobile="updateMobile"
|
|
|
|
|
- ></update-userinfo>
|
|
|
|
|
-
|
|
|
|
|
- <view class="lt ddflex" @click="jumpUrl('chat/conversation/conversation')">
|
|
|
|
|
|
|
+ <update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate"
|
|
|
|
|
+ @closeUpdate="closeUpdate" @updateInfo="updateInfo" @updateMobile="updateMobile"></update-userinfo>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="lt ddflex" @click="jumpConversation()">
|
|
|
<view class="ddflex" style="position: relative;width: 100%;height: 100%;">
|
|
<view class="ddflex" style="position: relative;width: 100%;height: 100%;">
|
|
|
<image src="../../static/pages/images/lt.png"></image>
|
|
<image src="../../static/pages/images/lt.png"></image>
|
|
|
<view class="lt-num">1</view>
|
|
<view class="lt-num">1</view>
|
|
@@ -180,404 +174,410 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-// pages/user/user.js
|
|
|
|
|
-const app = getApp();
|
|
|
|
|
-const req = require('../../utils/request.js');
|
|
|
|
|
-const util = require('../../utils/util.js');
|
|
|
|
|
-const route = require('../../utils/route');
|
|
|
|
|
-import foot from '../../components/nav-bar/index';
|
|
|
|
|
-import footerCopyright from '../../components/footer-copyright/footer-copyright';
|
|
|
|
|
-
|
|
|
|
|
-export default {
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- systems: {},
|
|
|
|
|
- skinNotColor: req.public.skinNotColor,
|
|
|
|
|
- picUrlss: req.public.picUrls,
|
|
|
|
|
- bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
|
|
|
|
|
- // merchantId: '',
|
|
|
|
|
- iconSrc: req.public.iconSrc,
|
|
|
|
|
- //头部页面背景链接
|
|
|
|
|
- isHideVip: true,
|
|
|
|
|
- //隐藏会员
|
|
|
|
|
- isVip: true,
|
|
|
|
|
- //是否是会员
|
|
|
|
|
- IS_secondary_members: 0,
|
|
|
|
|
- distr: '',
|
|
|
|
|
- userinfovip: '',
|
|
|
|
|
- userMoney: '',
|
|
|
|
|
- istetphone: '',
|
|
|
|
|
- logo: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
- is_open_wallet: '',
|
|
|
|
|
- Open_Points_Mall: '',
|
|
|
|
|
- statistics: '',
|
|
|
|
|
- vipList: '',
|
|
|
|
|
- rongkang: req.header.appId,
|
|
|
|
|
- isSign: '',
|
|
|
|
|
- sign: 0,
|
|
|
|
|
- isLogin: false,
|
|
|
|
|
- noLogin: false,
|
|
|
|
|
- is_open_shop: '',
|
|
|
|
|
- isShowSign: false, //是否显示签到按钮
|
|
|
|
|
- config: {},
|
|
|
|
|
- userInfo:{},
|
|
|
|
|
- userInfos: {},
|
|
|
|
|
- isShowUpdate: false, //是否显示更新信息弹窗
|
|
|
|
|
- isUpdateInfo: false, //更新用户信息
|
|
|
|
|
- isUpdateMobile: false, //绑定手机号
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- components: {
|
|
|
|
|
- foot,
|
|
|
|
|
- footerCopyright
|
|
|
|
|
- },
|
|
|
|
|
- props: {},
|
|
|
|
|
-
|
|
|
|
|
- onLoad(options) {
|
|
|
|
|
- uni.hideTabBar();
|
|
|
|
|
-
|
|
|
|
|
- uni.setNavigationBarColor({
|
|
|
|
|
- frontColor: this.skinNotColor ? '#000' : '#ffffff',
|
|
|
|
|
- backgroundColor: this.skinNotColor ? '#fff' : req.public.titleTopBgColor
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if (JSON.parse(req.getStorage('configRes')).IS_secondary_members) {
|
|
|
|
|
- let IS_secondary_members = JSON.parse(req.getStorage('configRes')).IS_secondary_members;
|
|
|
|
|
- console.log(IS_secondary_members);
|
|
|
|
|
- this.setData({
|
|
|
|
|
- IS_secondary_members: IS_secondary_members
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- this.userInfo = req.getStorage('userInfo');
|
|
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
|
|
- let userInfo = req.getStorage('userInfo');
|
|
|
|
|
- if (req.isAuth()) {
|
|
|
|
|
- setTimeout(res => {
|
|
|
|
|
- if (!userInfo.avatar || userInfo.nickName == '微信用户' || this.userInfos.nickName == '微信用户') {
|
|
|
|
|
- this.isShowUpdate = true;
|
|
|
|
|
- this.isUpdateInfo = true;
|
|
|
|
|
- }
|
|
|
|
|
- if (userInfo.avatar && !userInfo.mobile && (this.userInfos && !this.userInfos.mobile)) {
|
|
|
|
|
- this.isShowUpdate = true;
|
|
|
|
|
- this.isUpdateMobile = true;
|
|
|
|
|
- }
|
|
|
|
|
- }, 2000);
|
|
|
|
|
- }
|
|
|
|
|
- // #endif
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- onShow: function() {
|
|
|
|
|
- let userInfo = req.getStorage('userInfo');
|
|
|
|
|
- this.isLogin = req.isLogins(false);
|
|
|
|
|
- if (this.isLogin) {
|
|
|
|
|
- this.getMy();
|
|
|
|
|
- this.getAbout();
|
|
|
|
|
- this.getRule();
|
|
|
|
|
- this.noLogin = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.noLogin = false;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- styleHintPhoneText(phone) {
|
|
|
|
|
- var phones=util.styleHintPhoneText(phone);
|
|
|
|
|
- return phones;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // pages/user/user.js
|
|
|
|
|
+ const app = getApp();
|
|
|
|
|
+ const req = require('../../utils/request.js');
|
|
|
|
|
+ const util = require('../../utils/util.js');
|
|
|
|
|
+ const route = require('../../utils/route');
|
|
|
|
|
+ import foot from '../../components/nav-bar/index';
|
|
|
|
|
+ import footerCopyright from '../../components/footer-copyright/footer-copyright';
|
|
|
|
|
|
|
|
- jumpUrl(url) {
|
|
|
|
|
- if (req.isLogins(true)) {
|
|
|
|
|
- app.globalData.navigateTo(url);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ export default {
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ systems: {},
|
|
|
|
|
+ skinNotColor: req.public.skinNotColor,
|
|
|
|
|
+ picUrlss: req.public.picUrls,
|
|
|
|
|
+ bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
|
|
|
|
|
+ // merchantId: '',
|
|
|
|
|
+ iconSrc: req.public.iconSrc,
|
|
|
|
|
+ //头部页面背景链接
|
|
|
|
|
+ isHideVip: true,
|
|
|
|
|
+ //隐藏会员
|
|
|
|
|
+ isVip: true,
|
|
|
|
|
+ //是否是会员
|
|
|
|
|
+ IS_secondary_members: 0,
|
|
|
|
|
+ distr: '',
|
|
|
|
|
+ userinfovip: '',
|
|
|
|
|
+ userMoney: '',
|
|
|
|
|
+ istetphone: '',
|
|
|
|
|
+ logo: '',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ is_open_wallet: '',
|
|
|
|
|
+ Open_Points_Mall: '',
|
|
|
|
|
+ statistics: '',
|
|
|
|
|
+ vipList: '',
|
|
|
|
|
+ rongkang: req.header.appId,
|
|
|
|
|
+ isSign: '',
|
|
|
|
|
+ sign: 0,
|
|
|
|
|
+ isLogin: false,
|
|
|
|
|
+ noLogin: false,
|
|
|
|
|
+ is_open_shop: '',
|
|
|
|
|
+ isShowSign: false, //是否显示签到按钮
|
|
|
|
|
+ config: {},
|
|
|
|
|
+ userInfo: {},
|
|
|
|
|
+ userInfos: {},
|
|
|
|
|
+ isShowUpdate: false, //是否显示更新信息弹窗
|
|
|
|
|
+ isUpdateInfo: false, //更新用户信息
|
|
|
|
|
+ isUpdateMobile: false, //绑定手机号
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- jumpMerchantManage() {
|
|
|
|
|
- let token = req.getStorage('AUTH_TOKEN');
|
|
|
|
|
- this.jumpUrl('merchant/index?appId=' + req.header.appId + '&token=' + token);
|
|
|
|
|
|
|
+ components: {
|
|
|
|
|
+ foot,
|
|
|
|
|
+ footerCopyright
|
|
|
},
|
|
},
|
|
|
- // 是否签到{}
|
|
|
|
|
- isSignFun() {
|
|
|
|
|
- req.getRequest('/api/integral/isSign', {}, res => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- isSign: res
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ props: {},
|
|
|
|
|
+
|
|
|
|
|
+ onLoad(options) {
|
|
|
|
|
+ uni.hideTabBar();
|
|
|
|
|
+
|
|
|
|
|
+ uni.setNavigationBarColor({
|
|
|
|
|
+ frontColor: this.skinNotColor ? '#000' : '#ffffff',
|
|
|
|
|
+ backgroundColor: this.skinNotColor ? '#fff' : req.public.titleTopBgColor
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
- gouserInfo() {
|
|
|
|
|
- app.globalData.navigateTo('mine/userinfo/userinfo');
|
|
|
|
|
- },
|
|
|
|
|
- getDistributionConfig() {
|
|
|
|
|
- req.postRequest('/api/distribution/config', {}, res => {
|
|
|
|
|
|
|
+ if (JSON.parse(req.getStorage('configRes')).IS_secondary_members) {
|
|
|
|
|
+ let IS_secondary_members = JSON.parse(req.getStorage('configRes')).IS_secondary_members;
|
|
|
|
|
+ console.log(IS_secondary_members);
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- distr: res
|
|
|
|
|
|
|
+ IS_secondary_members: IS_secondary_members
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ this.userInfo = req.getStorage('userInfo');
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
|
|
+ let userInfo = req.getStorage('userInfo');
|
|
|
|
|
+ if (req.isAuth()) {
|
|
|
|
|
+ setTimeout(res => {
|
|
|
|
|
+ if (!userInfo.avatar || userInfo.nickName == '微信用户' || this.userInfos.nickName == '微信用户') {
|
|
|
|
|
+ this.isShowUpdate = true;
|
|
|
|
|
+ this.isUpdateInfo = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (userInfo.avatar && !userInfo.mobile && (this.userInfos && !this.userInfos.mobile)) {
|
|
|
|
|
+ this.isShowUpdate = true;
|
|
|
|
|
+ this.isUpdateMobile = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 2000);
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ onShow: function() {
|
|
|
|
|
+ let userInfo = req.getStorage('userInfo');
|
|
|
|
|
+ this.isLogin = req.isLogins(false);
|
|
|
|
|
+ if (this.isLogin) {
|
|
|
|
|
+ this.getMy();
|
|
|
|
|
+ this.getAbout();
|
|
|
|
|
+ this.getRule();
|
|
|
|
|
+ this.noLogin = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.noLogin = false;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- // 签到
|
|
|
|
|
- signFun() {
|
|
|
|
|
- req.postRequest('/api/integral/sign', {}, data => {
|
|
|
|
|
- if (data) {
|
|
|
|
|
- req.msg('连续签到' + data.continuityDay + '天' + ',获得' + data.IntegralChange + '积分');
|
|
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ styleHintPhoneText(phone) {
|
|
|
|
|
+ var phones = util.styleHintPhoneText(phone);
|
|
|
|
|
+ return phones;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ jumpUrl(url) {
|
|
|
|
|
+ if (req.isLogins(true)) {
|
|
|
|
|
+ app.globalData.navigateTo(url);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ jumpMerchantManage() {
|
|
|
|
|
+ let token = req.getStorage('AUTH_TOKEN');
|
|
|
|
|
+ this.jumpUrl('merchant/index?appId=' + req.header.appId + '&token=' + token);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 是否签到{}
|
|
|
|
|
+ isSignFun() {
|
|
|
|
|
+ req.getRequest('/api/integral/isSign', {}, res => {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- sign: 1
|
|
|
|
|
|
|
+ isSign: res
|
|
|
});
|
|
});
|
|
|
- this.getOpenPonints();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- getuserVip() {
|
|
|
|
|
- req.getRequest('/api/user/levelDetails', {}, data => {
|
|
|
|
|
- let expireTime = Array;
|
|
|
|
|
-
|
|
|
|
|
- if (data.expireTime) {
|
|
|
|
|
- expireTime = data.expireTime.split(' ');
|
|
|
|
|
- data.expireTime = data.expireTime.replace(/-/g, '/');
|
|
|
|
|
- } // 解决苹果不兼容---日期
|
|
|
|
|
- // data.expireTime=data.expireTime.replace(/-/g, '/')
|
|
|
|
|
-
|
|
|
|
|
- let nowTime = new Date().getTime();
|
|
|
|
|
- let endTime = new Date(data.expireTime).getTime();
|
|
|
|
|
- let times = parseInt((endTime - nowTime) / 1000); // var expireTime= new Date(data.expireTime)
|
|
|
|
|
- // var time1=expireTime.getTime();
|
|
|
|
|
-
|
|
|
|
|
- // console.log(times, nowTime, endTime, data.expireTime);
|
|
|
|
|
- this.setData({
|
|
|
|
|
- userinfovip: data,
|
|
|
|
|
- ['userinfovip.expireTime']: expireTime[0]
|
|
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- if (times <= 0) {
|
|
|
|
|
|
|
+ gouserInfo() {
|
|
|
|
|
+ app.globalData.navigateTo('mine/userinfo/userinfo');
|
|
|
|
|
+ },
|
|
|
|
|
+ getDistributionConfig() {
|
|
|
|
|
+ req.postRequest('/api/distribution/config', {}, res => {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- ['userinfovip.end']: true
|
|
|
|
|
|
|
+ distr: res
|
|
|
});
|
|
});
|
|
|
- } else {
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 签到
|
|
|
|
|
+ signFun() {
|
|
|
|
|
+ req.postRequest('/api/integral/sign', {}, data => {
|
|
|
|
|
+ if (data) {
|
|
|
|
|
+ req.msg('连续签到' + data.continuityDay + '天' + ',获得' + data.IntegralChange + '积分');
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ sign: 1
|
|
|
|
|
+ });
|
|
|
|
|
+ this.getOpenPonints();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getuserVip() {
|
|
|
|
|
+ req.getRequest('/api/user/levelDetails', {}, data => {
|
|
|
|
|
+ let expireTime = Array;
|
|
|
|
|
+
|
|
|
|
|
+ if (data.expireTime) {
|
|
|
|
|
+ expireTime = data.expireTime.split(' ');
|
|
|
|
|
+ data.expireTime = data.expireTime.replace(/-/g, '/');
|
|
|
|
|
+ } // 解决苹果不兼容---日期
|
|
|
|
|
+ // data.expireTime=data.expireTime.replace(/-/g, '/')
|
|
|
|
|
+
|
|
|
|
|
+ let nowTime = new Date().getTime();
|
|
|
|
|
+ let endTime = new Date(data.expireTime).getTime();
|
|
|
|
|
+ let times = parseInt((endTime - nowTime) / 1000); // var expireTime= new Date(data.expireTime)
|
|
|
|
|
+ // var time1=expireTime.getTime();
|
|
|
|
|
+
|
|
|
|
|
+ // console.log(times, nowTime, endTime, data.expireTime);
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- ['userinfovip.end']: false
|
|
|
|
|
|
|
+ userinfovip: data,
|
|
|
|
|
+ ['userinfovip.expireTime']: expireTime[0]
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- // console.log(data);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- getOpenPonints() {
|
|
|
|
|
- req.getRequest('/api/integral/returnIntegral', {}, res => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- integral: res
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- getMy() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- req.getRequest('/api/user/my', {}, data => {
|
|
|
|
|
- // data.merchantId = req.getStorage('userInfo').merchantId
|
|
|
|
|
- data.nickName = req.excludeSpecial(data.nickName);
|
|
|
|
|
- this.userInfos = data;
|
|
|
|
|
- // that.setData(data); // this.isbindmobile();
|
|
|
|
|
- console.log('userinfo==' + JSON.stringify(data));
|
|
|
|
|
- this.isSignFun();
|
|
|
|
|
- this.getstatistics(data);
|
|
|
|
|
- this.getDistributionConfig();
|
|
|
|
|
- this.getuserVip();
|
|
|
|
|
- this.getuserMoney();
|
|
|
|
|
- this.getVip();
|
|
|
|
|
- this.getOpenPonints();
|
|
|
|
|
- // console.log(this);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ if (times <= 0) {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ ['userinfovip.end']: true
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ ['userinfovip.end']: false
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- getuserMoney() {
|
|
|
|
|
- let is_open_wallet = JSON.parse(req.getStorage('configRes')).is_open_wallet;
|
|
|
|
|
-
|
|
|
|
|
- if (is_open_wallet) {
|
|
|
|
|
- if (JSON.parse(is_open_wallet).isOpenWallet == 1) {
|
|
|
|
|
- route.extendNew({}, res => {
|
|
|
|
|
- // console.log(parseFloat(res.all).toFixed(2));
|
|
|
|
|
- if (res)
|
|
|
|
|
- this.setData({
|
|
|
|
|
- userMoney: parseFloat(res.all).toFixed(2)
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // console.log(data);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getOpenPonints() {
|
|
|
|
|
+ req.getRequest('/api/integral/returnIntegral', {}, res => {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ integral: res
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getMy() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ req.getRequest('/api/user/info', {}, data => {
|
|
|
|
|
+ // data.merchantId = req.getStorage('userInfo').merchantId
|
|
|
|
|
+ data.nickName = req.excludeSpecial(data.nickName);
|
|
|
|
|
+ this.userInfos = data;
|
|
|
|
|
+ // that.setData(data); // this.isbindmobile();
|
|
|
|
|
+ console.log('userinfo==' + JSON.stringify(data));
|
|
|
|
|
+ this.isSignFun();
|
|
|
|
|
+ this.getstatistics(data);
|
|
|
|
|
+ this.getDistributionConfig();
|
|
|
|
|
+ this.getuserVip();
|
|
|
|
|
+ this.getuserMoney();
|
|
|
|
|
+ this.getVip();
|
|
|
|
|
+ this.getOpenPonints();
|
|
|
|
|
+ // console.log(this);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- getAbout() {
|
|
|
|
|
- var _this = this;
|
|
|
|
|
|
|
+ getuserMoney() {
|
|
|
|
|
+ let is_open_wallet = JSON.parse(req.getStorage('configRes')).is_open_wallet;
|
|
|
|
|
|
|
|
- req.getRequest('/api/config', {}, function(res) {
|
|
|
|
|
- _this.phone = res.CONFIG_SERVICE_HOT_MOBILE;
|
|
|
|
|
- _this.config = res;
|
|
|
|
|
- _this.setData({
|
|
|
|
|
- istetphone: res.user_bind_mobile,
|
|
|
|
|
- logo: res.CONFIG_PROJECT_LOGO,
|
|
|
|
|
- name: res.CONFIG_PROJECT_TITLE
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (is_open_wallet) {
|
|
|
|
|
+ if (JSON.parse(is_open_wallet).isOpenWallet == 1) {
|
|
|
|
|
+ route.extendNew({}, res => {
|
|
|
|
|
+ // console.log(parseFloat(res.all).toFixed(2));
|
|
|
|
|
+ if (res)
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ userMoney: parseFloat(res.all).toFixed(2)
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getAbout() {
|
|
|
|
|
+ var _this = this;
|
|
|
|
|
|
|
|
- // console.log(res);
|
|
|
|
|
- if (res && res.is_open_wallet) {
|
|
|
|
|
|
|
+ req.getRequest('/api/config', {}, function(res) {
|
|
|
|
|
+ _this.phone = res.CONFIG_SERVICE_HOT_MOBILE;
|
|
|
|
|
+ _this.config = res;
|
|
|
_this.setData({
|
|
_this.setData({
|
|
|
- is_open_wallet: JSON.parse(res.is_open_wallet)
|
|
|
|
|
|
|
+ istetphone: res.user_bind_mobile,
|
|
|
|
|
+ logo: res.CONFIG_PROJECT_LOGO,
|
|
|
|
|
+ name: res.CONFIG_PROJECT_TITLE
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- if (res.is_open_shop) {
|
|
|
|
|
- _this.is_open_shop = res.is_open_shop;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ if (res && res.is_open_wallet) {
|
|
|
|
|
+ _this.setData({
|
|
|
|
|
+ is_open_wallet: JSON.parse(res.is_open_wallet)
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // if (res.user_bind_mobile == '1') {
|
|
|
|
|
- // let userInfo = req.getStorage('userInfo');
|
|
|
|
|
|
|
+ if (res.is_open_shop) {
|
|
|
|
|
+ _this.is_open_shop = res.is_open_shop;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // if (userInfo && (userInfo.mobile == null || userInfo.mobile == '')) {
|
|
|
|
|
- // app.globalData.openPage('pages/authorize/authorize?bindmobile=1');
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- });
|
|
|
|
|
- // 是否开启积分商城
|
|
|
|
|
- req.getRequest(
|
|
|
|
|
- '/api/params/value',
|
|
|
|
|
- {
|
|
|
|
|
- type: 'Open_Points_Mall'
|
|
|
|
|
- },
|
|
|
|
|
- res => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- Open_Points_Mall: res
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // if (res.user_bind_mobile == '1') {
|
|
|
|
|
+ // let userInfo = req.getStorage('userInfo');
|
|
|
|
|
|
|
|
- callPhone() {
|
|
|
|
|
- if (req.isLogins(true)) {
|
|
|
|
|
- uni.makePhoneCall({
|
|
|
|
|
- phoneNumber: this.phone
|
|
|
|
|
|
|
+ // if (userInfo && (userInfo.mobile == null || userInfo.mobile == '')) {
|
|
|
|
|
+ // app.globalData.openPage('pages/authorize/authorize?bindmobile=1');
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // 是否开启积分商城
|
|
|
|
|
+ req.getRequest(
|
|
|
|
|
+ '/api/params/value', {
|
|
|
|
|
+ type: 'Open_Points_Mall'
|
|
|
|
|
+ },
|
|
|
|
|
+ res => {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ Open_Points_Mall: res
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- goUrl() {
|
|
|
|
|
- app.globalData.openPage('mine/vip/vip');
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ callPhone() {
|
|
|
|
|
+ if (req.isLogins(true)) {
|
|
|
|
|
+ uni.makePhoneCall({
|
|
|
|
|
+ phoneNumber: this.phone
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- // 门店统计
|
|
|
|
|
- getstatistics(data) {
|
|
|
|
|
- let from = {};
|
|
|
|
|
|
|
+ goUrl() {
|
|
|
|
|
+ app.globalData.openPage('mine/vip/vip');
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- if (data.listShopBase && data.listShopBase != null && data.listShopBase.length > 0) {
|
|
|
|
|
- from.shopId = data.listShopBase[0].id;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 门店统计
|
|
|
|
|
+ getstatistics(data) {
|
|
|
|
|
+ let from = {};
|
|
|
|
|
|
|
|
- if (data.listMerchant && data.listMerchant != null && data.listMerchant.length > 0 && data.listShopBase.length < 1) {
|
|
|
|
|
- from.merchantId = data.listMerchant[0].id;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (data.listShopBase && data.listShopBase != null && data.listShopBase.length > 0) {
|
|
|
|
|
+ from.shopId = data.listShopBase[0].id;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- req.getRequest('/api/order/statistics', from, data => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- statistics: data
|
|
|
|
|
- });
|
|
|
|
|
- console.log(data);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- getRule() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- req.getRequest('/api/integral/config', {}, res => {
|
|
|
|
|
- if (res && res.length > 0) {
|
|
|
|
|
- res.map(it => {
|
|
|
|
|
- if (it.illustrate && it.illustrate.indexOf('签到') > -1) {
|
|
|
|
|
- if (it.state == 2) {
|
|
|
|
|
- that.isShowSign = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (data.listMerchant && data.listMerchant != null && data.listMerchant.length > 0 && data.listShopBase
|
|
|
|
|
+ .length < 1) {
|
|
|
|
|
+ from.merchantId = data.listMerchant[0].id;
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- getVipListOrg() {
|
|
|
|
|
- if (this.vipList && this.userinfovip) {
|
|
|
|
|
- if (!this.userinfovip.levelGrade) {
|
|
|
|
|
- this.vipList.map((it, index) => {
|
|
|
|
|
- this.vipList[0].isShowInfo = true;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ req.getRequest('/api/order/statistics', from, data => {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ statistics: data
|
|
|
});
|
|
});
|
|
|
- } else {
|
|
|
|
|
- this.vipList.map((it, index) => {
|
|
|
|
|
- if (this.userinfovip.level == it.id) {
|
|
|
|
|
- if (index < this.vipList.length - 1) {
|
|
|
|
|
- this.vipList[index + 1].isShowInfo = true;
|
|
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getRule() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ req.getRequest('/api/integral/config', {}, res => {
|
|
|
|
|
+ if (res && res.length > 0) {
|
|
|
|
|
+ res.map(it => {
|
|
|
|
|
+ if (it.illustrate && it.illustrate.indexOf('签到') > -1) {
|
|
|
|
|
+ if (it.state == 2) {
|
|
|
|
|
+ that.isShowSign = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getVipListOrg() {
|
|
|
|
|
+ if (this.vipList && this.userinfovip) {
|
|
|
|
|
+ if (!this.userinfovip.levelGrade) {
|
|
|
|
|
+ this.vipList.map((it, index) => {
|
|
|
|
|
+ this.vipList[0].isShowInfo = true;
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.vipList.map((it, index) => {
|
|
|
|
|
+ if (this.userinfovip.level == it.id) {
|
|
|
|
|
+ if (index < this.vipList.length - 1) {
|
|
|
|
|
+ this.vipList[index + 1].isShowInfo = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- getVip() {
|
|
|
|
|
- req.getRequest('/api/levelStrategy/userLevelList', {}, data => {
|
|
|
|
|
- if (data && data.length > 0) {
|
|
|
|
|
- data.map((it, index) => {
|
|
|
|
|
- it.upgradeTerm = JSON.parse(it.upgradeTerm);
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ getVip() {
|
|
|
|
|
+ req.getRequest('/api/levelStrategy/userLevelList', {}, data => {
|
|
|
|
|
+ if (data && data.length > 0) {
|
|
|
|
|
+ data.map((it, index) => {
|
|
|
|
|
+ it.upgradeTerm = JSON.parse(it.upgradeTerm);
|
|
|
|
|
+ it.isShowInfo = false;
|
|
|
|
|
+ // if(index == 0) it.isShowInfo = true;
|
|
|
|
|
+ return it;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.vipList = data;
|
|
|
|
|
+ this.getVipListOrg();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ showInfo(index) {
|
|
|
|
|
+ if (!this.vipList[index].isShowInfo) {
|
|
|
|
|
+ this.vipList.map(it => {
|
|
|
it.isShowInfo = false;
|
|
it.isShowInfo = false;
|
|
|
- // if(index == 0) it.isShowInfo = true;
|
|
|
|
|
return it;
|
|
return it;
|
|
|
});
|
|
});
|
|
|
- this.vipList = data;
|
|
|
|
|
- this.getVipListOrg();
|
|
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- showInfo(index) {
|
|
|
|
|
- if (!this.vipList[index].isShowInfo) {
|
|
|
|
|
- this.vipList.map(it => {
|
|
|
|
|
- it.isShowInfo = false;
|
|
|
|
|
- return it;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- this.vipList[index].isShowInfo = !this.vipList[index].isShowInfo;
|
|
|
|
|
- },
|
|
|
|
|
- closeUpdate() {
|
|
|
|
|
- this.isShowUpdate = false;
|
|
|
|
|
- },
|
|
|
|
|
- updateInfo(e) {
|
|
|
|
|
- this.isUpdateInfo = e;
|
|
|
|
|
- this.getMy();
|
|
|
|
|
- },
|
|
|
|
|
- updateMobile(e) {
|
|
|
|
|
- this.isUpdateMobile = e;
|
|
|
|
|
- this.getMy();
|
|
|
|
|
|
|
+ this.vipList[index].isShowInfo = !this.vipList[index].isShowInfo;
|
|
|
|
|
+ },
|
|
|
|
|
+ closeUpdate() {
|
|
|
|
|
+ this.isShowUpdate = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ updateInfo(e) {
|
|
|
|
|
+ this.isUpdateInfo = e;
|
|
|
|
|
+ this.getMy();
|
|
|
|
|
+ },
|
|
|
|
|
+ updateMobile(e) {
|
|
|
|
|
+ this.isUpdateMobile = e;
|
|
|
|
|
+ this.getMy();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ jumpConversation() {
|
|
|
|
|
+ req.jumpConversation();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 判断强制绑定手机号
|
|
|
|
|
+ // isbindmobile() {
|
|
|
|
|
+ // if (req.getStorage('configRes')) {
|
|
|
|
|
+ // let configRes = JSON.parse(req.getStorage('configRes'))
|
|
|
|
|
+ // this.setData({ istetphone: configRes.user_bind_mobile, logo: configRes.CONFIG_PROJECT_LOGO, name: configRes.CONFIG_PROJECT_TITLE })
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // req.g('/api/config', (res) => {
|
|
|
|
|
+ // req.setStorage('configRes', JSON.stringify(res))
|
|
|
|
|
+ // this.setData({ istetphone: res.user_bind_mobile, logo: res.CONFIG_PROJECT_LOGO, name: res.CONFIG_PROJECT_TITLE })
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if(this.data.istetphone=='1'){
|
|
|
|
|
+ // // 获取用户手机号
|
|
|
|
|
+ // let userInfo= req.getStorage('userInfo')
|
|
|
|
|
+ // if(userInfo.mobile==null||userInfo.mobile==''){
|
|
|
|
|
+ // console.log("获取用户手机号===============================")
|
|
|
|
|
+ // app.openPage('pages/authorize/authorize?bindmobile=1')
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
},
|
|
},
|
|
|
- // 判断强制绑定手机号
|
|
|
|
|
- // isbindmobile() {
|
|
|
|
|
- // if (req.getStorage('configRes')) {
|
|
|
|
|
- // let configRes = JSON.parse(req.getStorage('configRes'))
|
|
|
|
|
- // this.setData({ istetphone: configRes.user_bind_mobile, logo: configRes.CONFIG_PROJECT_LOGO, name: configRes.CONFIG_PROJECT_TITLE })
|
|
|
|
|
- // } else {
|
|
|
|
|
- // req.g('/api/config', (res) => {
|
|
|
|
|
- // req.setStorage('configRes', JSON.stringify(res))
|
|
|
|
|
- // this.setData({ istetphone: res.user_bind_mobile, logo: res.CONFIG_PROJECT_LOGO, name: res.CONFIG_PROJECT_TITLE })
|
|
|
|
|
- // })
|
|
|
|
|
- // }
|
|
|
|
|
- // if(this.data.istetphone=='1'){
|
|
|
|
|
- // // 获取用户手机号
|
|
|
|
|
- // let userInfo= req.getStorage('userInfo')
|
|
|
|
|
- // if(userInfo.mobile==null||userInfo.mobile==''){
|
|
|
|
|
- // console.log("获取用户手机号===============================")
|
|
|
|
|
- // app.openPage('pages/authorize/authorize?bindmobile=1')
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // },
|
|
|
|
|
- },
|
|
|
|
|
- created() {
|
|
|
|
|
- const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
- // px转换到rpx的比例
|
|
|
|
|
- let pxToRpxScale = 750 / systemInfo.windowWidth;
|
|
|
|
|
- let systems = {
|
|
|
|
|
- ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
|
|
|
|
|
- navigationHeight: 44 * pxToRpxScale // 导航栏的高度
|
|
|
|
|
- };
|
|
|
|
|
- systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
|
|
|
|
|
- this.systems = systems;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
+ // px转换到rpx的比例
|
|
|
|
|
+ let pxToRpxScale = 750 / systemInfo.windowWidth;
|
|
|
|
|
+ let systems = {
|
|
|
|
|
+ ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
|
|
|
|
|
+ navigationHeight: 44 * pxToRpxScale // 导航栏的高度
|
|
|
|
|
+ };
|
|
|
|
|
+ systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
|
|
|
|
|
+ this.systems = systems;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
</script>
|
|
</script>
|
|
|
<style>
|
|
<style>
|
|
|
-@import './user.css';
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+ @import './user.css';
|
|
|
|
|
+</style>
|