Procházet zdrojové kódy

[网络异常情况的判断,成长值][增加,修改]:成长值接口数据的更改

tags/2.2.8
meo před 6 roky
rodič
revize
d24463a089
10 změnil soubory, kde provedl 39 přidání a 64 odebrání
  1. +1
    -1
      pages/couponorder/detail/index.js
  2. +1
    -3
      pages/couponorder/detail/index.wxml
  3. +2
    -7
      pages/grade/grade.js
  4. +3
    -49
      pages/grade/grade.wxml
  5. +4
    -0
      pages/grade/grade.wxss
  6. +10
    -1
      pages/index/coupons/index.js
  7. +1
    -0
      pages/index/coupons/index.wxml
  8. +6
    -0
      pages/index/coupons/index.wxss
  9. +10
    -2
      pages/index/index.js
  10. +1
    -1
      pages/index/index.wxml

+ 1
- 1
pages/couponorder/detail/index.js Zobrazit soubor

@@ -17,7 +17,7 @@ Page({
//存储计时器
setInter: "",
staticGamedata: {},
showIf:false
showIf:false,
},
onUnload: function() {
let that = this;


+ 1
- 3
pages/couponorder/detail/index.wxml Zobrazit soubor

@@ -73,12 +73,10 @@
<text>退款时间:</text>
<text>{{updateDate}}</text>
</view>

<view>
<text>订单编号:</text>
<text>{{data.orderId}}</text>
</view>
<!-- <view><text>手机号</text><text>2018.05.25</text></view> -->
</view>
<view class='notes' style="border-bottom:0">
<view>
@@ -92,7 +90,7 @@
<view class='game' bindtap="gotogame" wx-if="{{showIf}}">
<view class='game-entry'>
<image src="{{staticGamedata.imgUrl}}" class='gameimg' mode='widthFix'></image>
<text>新用户专享神秘礼物</text>
<text>专享神秘礼物</text>
<text>独家福利,抢完即止</text>
</view>
</view>

+ 2
- 7
pages/grade/grade.js Zobrazit soubor

@@ -36,16 +36,11 @@ Page({
}
})
.then(res=>{
console.log(res);
console.log(JSON.parse(res.data.score.rules));

that.setData({
flags: 'have',
consumptionScoreNumber: res.data.score.consumptionScoreNumber,
loginscoreNumber: res.data.score.loginScoreNumber,
personscoreNumber: res.data.score.personScoreNumber,
phonescoreNumber: res.data.score.phoneScoreNumber,
wifiscoreNumber: res.data.score.wifiScoreNumber,
bindCarScoreNumber: res.data.score.bindCarScoreNumber,
rules: JSON.parse(res.data.score.rules),
levelList: res.data.levelList
})
})


+ 3
- 49
pages/grade/grade.wxml Zobrazit soubor

@@ -2,59 +2,13 @@
<view class='title'>生成规则</view>
<view class='scroll'>
<scroll-view scroll-x class="scroll-header">
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>每日</text>
<text>登录</text>
</view>
</view>
<text>{{loginscoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>线上</text>
<text>交易1元</text>
</view>
</view>
<text>{{consumptionScoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>授权</text>
<text>个人信息</text>
</view>
</view>
<text>{{personscoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>授权</text>
<text>手机号</text>
</view>
</view>
<text>{{phonescoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class='thin_circle'>
<view class='view'>
<text>连接</text>
<text>WIFI一次</text>
</view>
</view>
<text>{{wifiscoreNumber}}成长值</text>
</view>
<view class="scroll-view-item">
<view class="scroll-view-item" wx:for="{{rules}}" wx:key="index">
<view class='thin_circle last'>
<view class="view">
<text>绑定</text>
<text>车牌一个</text>
<text>{{item.desc}}</text>
</view>
</view>
<text>{{bindCarScoreNumber}}成长值</text>
<text>{{item.score}}成长值</text>
</view>
</scroll-view>
</view>


+ 4
- 0
pages/grade/grade.wxss Zobrazit soubor

@@ -55,6 +55,7 @@
text-align: center;
display: inline-block;
padding-left: 3rpx;
margin-right: 30rpx;
}

.view text {
@@ -63,6 +64,9 @@
text-align: center;
color: #fd9643;
line-height: 32rpx;
width: 80rpx;
margin: 0 auto;
white-space: normal;
}

.scroll-view-item > text {


+ 10
- 1
pages/index/coupons/index.js Zobrazit soubor

@@ -7,7 +7,16 @@ Component({
/**
* 组件的属性列表
*/
properties: {},
properties: {
loading: {
type: Boolean,
value: ''
},
loadingtext: {
type: String,
value: ''
},
},

/**
* 组件的初始数据


+ 1
- 0
pages/index/coupons/index.wxml Zobrazit soubor

@@ -9,4 +9,5 @@
<text>我们正在筹备一大波优惠活动</text>
</view>
<view class="loading" wx:if="{{loading}}"><image src="./../../../assets/img/loading.gif" mode="widthFix"></image>{{content}}</view>
<view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view>
</view>

+ 6
- 0
pages/index/coupons/index.wxss Zobrazit soubor

@@ -44,3 +44,9 @@
height: 300rpx;
margin: 0 auto 16rpx;
}
.loadingtext{
text-align: center;
color: #888;
font-size: 30rpx;
margin-top:30rpx;
}

+ 10
- 2
pages/index/index.js Zobrazit soubor

@@ -6,6 +6,7 @@ Page({
data: {
market: app.globalData.market,
list: [],
loading:true,
swiperCurrent: 0,
title:'',
desc:'',
@@ -222,7 +223,15 @@ Page({
console.log("checkUserStatus:res", res);
})
.catch(err => {
console.log("checkUserStatus:err", err);
console.log(err);
if(err.errMsg=='request:fail timeout'){
setTimeout(function(){
that.setData({
loading:false,
loadingtext:"网络异常,请检查您的网络设置"
})
},3000)
}
if (err.code == 11004) {
// 用户昵称未授权
wx.redirectTo({
@@ -255,7 +264,6 @@ Page({
token: token
}
}).then(res => {
console.log(res.data,77777)
if (res.data.id){
_this.setData({
showIf:true


+ 1
- 1
pages/index/index.wxml Zobrazit soubor

@@ -10,6 +10,6 @@
<text>独家福利,抢完即止</text>
</view>
</view>
<c-coupons id="lists" bind:myevent="onGetCode" />
<c-coupons id="lists" bind:myevent="onGetCode" loadingtext="{{loadingtext}}" loading="{{loading}}" />
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" />
</view>

Načítá se…
Zrušit
Uložit