Browse Source

no message

featrue/v4.1
xpz2018 5 years ago
parent
commit
f8298595a0
5 changed files with 27 additions and 25 deletions
  1. 6
      pages/article/point-index/index.wxml
  2. 2
      pages/article/price-index/index.wxml
  3. 1
      pages/home/index/index.js
  4. 24
      pages/index/index.js
  5. 19
      pages/login/index.js

6
pages/article/point-index/index.wxml

@ -1,7 +1,5 @@
<!--pages/main/index.wxml-->
<!-- <scroll-view scroll-y style="height: {{height}}rpx;" lower-threshold="200" bindscrolltolower="fetchMomentList"> -->
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchMomentList">
<!----------------------------------------------------帖子列表---------------------------------------------------------------->
<view wx:if="{{userInfo && userInfo.isVIP}}">
<wux-skeleton active wx:if="{{!momentList.length}}">
<view class="cu-card dynamic no-card" wx:for="{{4}}" wx:key="index">
@ -40,7 +38,6 @@
</view>
</view>
<view class="bg-white list-empty" style="height: {{height}}rpx;" wx:else>
<!-- <image class="img-empty" src="/assets/image/list_empty.png"></image> -->
<view class="flex" style="margin-bottom:48rpx">
<text class="cuIcon-info text-blue" style="font-size:42rpx;"></text>
<view style="width:540rpx;margin-left: 12rpx">
@ -50,5 +47,4 @@
</view>
<wux-button type="positive" size="join" bind:click="toVip">立即开通</wux-button>
</view>
</refresh-view>
<!-- </scroll-view> -->
</refresh-view>

2
pages/article/price-index/index.wxml

@ -4,7 +4,7 @@
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchMomentList">
<!----------------------------------------------------帖子列表---------------------------------------------------------------->
<wux-skeleton active wx:if="{{!momentList.length}}">
<view class="cu-card dynamic no-card" wx:for="{{4}}" wx:key="index">
<view class="cu-card dynamic no-card" wx:for="{{6}}" wx:key="index">
<view class="cu-item shadow" style="padding-left:30rpx">
<view class="cu-list menu-avatar">
<view class="cu-item" style="justify-content: flex-start;">

1
pages/home/index/index.js

@ -62,6 +62,7 @@ Component({
if(!util.isEmpty(result.data.avatarUrl)){
app.globalData.userInfo.avatarUrl = result.data.avatarUrl
}
app.globalData.userInfo.isVIP = result.data.isVIP
app.globalData.userInfo.hasStore = result.data.hasStore
this.setData({
avatarUrl: app.globalData.userInfo.avatarUrl,

24
pages/index/index.js

@ -1,5 +1,5 @@
import { config, getUserInfo} from "../api/user"
import { zconfig, loginToken, getPopupInfo } from "../api/ztb"
import { zconfig, loginToken, getBaseInfo, getPopupInfo } from "../api/ztb"
import { pconfig } from "../api/payment"
import { mconfig } from "../api/moment"
import { sconfig, getOrderExists } from "../api/saas"
@ -93,7 +93,6 @@ Page({
fetchUserInfo:function(){
config.header = { 'Authorization': 'QNT ' + app.globalData.token }
getUserInfo().then(result => {
app.globalData.userInfo = result.data
this.toIndex()
}).catch(err => {
wx.hideLoading()
@ -120,14 +119,19 @@ Page({
zconfig.header = { 'Authorization': 'QNT ' + result.data.token }
pconfig.header = { 'Authorization': 'QNT ' + result.data.token }
mconfig.header = { 'Authorization': 'QNT ' + result.data.token }
// 登录流程完成;
if(!util.isEmpty(result.data.userToken)){
this.handleUserToken(result.data.userToken)
return
}
wx.hideLoading()
this.defaultIndex()
getBaseInfo().then(result => {
app.globalData.userInfo = result.data
// 登录流程完成;
if(!util.isEmpty(result.data.userToken)){
this.handleUserToken(result.data.userToken)
return
}
wx.hideLoading()
this.defaultIndex()
}).catch(err => {
wx.hideLoading()
this.defaultIndex()
})
}).catch(err => {
wx.hideLoading()
this.defaultIndex()

19
pages/login/index.js

@ -1,7 +1,7 @@
//获取应用实例
import { $wuxCountDown } from '../../components/index'
import { config, postCaptcha, loginCaptcha, loginPwd, wechatApplet, getUserInfo, loginWechat } from "../api/user"
import { zconfig, loginToken } from "../api/ztb"
import { config, postCaptcha, loginCaptcha, loginPwd, wechatApplet, loginWechat } from "../api/user"
import { zconfig, loginToken, getBaseInfo } from "../api/ztb"
import { pconfig } from "../api/payment"
import { mconfig } from "../api/moment"
import { sconfig, getOrderExists } from "../api/saas"
@ -56,13 +56,13 @@ Page({
}
app.globalData.token = authorization
config.header = { 'Authorization': 'QNT ' + authorization }
getUserInfo().then(result => {
app.globalData.userInfo = result.data
loginToken({loginToken: app.globalData.token}).then(result => {
zconfig.header = { 'Authorization': 'QNT ' + result.data.token }
pconfig.header = { 'Authorization': 'QNT ' + result.data.token }
mconfig.header = { 'Authorization': 'QNT ' + result.data.token }
// 登录流程完成;
loginToken({loginToken: app.globalData.token}).then(result => {
zconfig.header = { 'Authorization': 'QNT ' + result.data.token }
pconfig.header = { 'Authorization': 'QNT ' + result.data.token }
mconfig.header = { 'Authorization': 'QNT ' + result.data.token }
// 登录流程完成;
getBaseInfo().then(result => {
app.globalData.userInfo = result.data
if(!util.isEmpty(result.data.userToken)){
this.handleUserToken(result.data.userToken)
} else {
@ -89,6 +89,7 @@ Page({
this.setData({ loging: false})
wx.navigateBack()
})
},
handleUserToken: function(userToken){
storage.put('userToken', userToken)

Loading…
Cancel
Save