|
@@ -21,7 +21,7 @@
|
|
|
</view>
|
|
|
|
|
|
<graceDialog :isTitle="true" :title="scoreTitle" :isCloseBtn="true" :show="score" closeBtnColor="#FFFFFF" v-on:closeDialog="closeScore">
|
|
|
- <scroll-view :scroll-y="true" class="padding" slot="content" style="height:800rpx;">
|
|
|
+ <scroll-view :scroll-y="true" class="padding" slot="content" style="height:800rpx;" @scrolltolower="nextScore">
|
|
|
<view class="zhList padding margin-tb" v-for="(v, k) in fetch.score" :key="k">
|
|
|
<view class="flex justify-between">
|
|
|
<view class="text-black font-30 block margin-bottom-xs text-bold">{{v.title}}</view>
|
|
@@ -30,6 +30,7 @@
|
|
|
</view>
|
|
|
<view class="text-999 flex justify-between margin-top align-center">
|
|
|
<text class="font-24" v-if="v.total >= 0">余额:{{v.total}}</text>
|
|
|
+ <text class="font-24" v-if="v.price">金额:{{v.price}}</text>
|
|
|
<text class="font-24 block">{{v.cdate}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -37,6 +38,9 @@
|
|
|
|
|
|
<view slot="btns" class="grace-space-between">
|
|
|
<text class="grace-dialog-buttons" @tap="closeScore">关闭</text>
|
|
|
+ <text class="grace-dialog-buttons grace-blue" @tap="tixian" v-if="scoreType == 'yue'">提现</text>
|
|
|
+ <text class="grace-dialog-buttons grace-blue" @tap="duihuan" v-if="scoreType == 'score'">兑换</text>
|
|
|
+ <text class="grace-dialog-buttons grace-blue" @tap="zengsong" v-if="scoreType == 'ticket1'">赠送</text>
|
|
|
</view>
|
|
|
</graceDialog>
|
|
|
|
|
@@ -158,25 +162,46 @@ export default {
|
|
|
],
|
|
|
openAvatar : false,
|
|
|
score : false,
|
|
|
- scoreTitle : '',
|
|
|
+ scoreType : 'yue',
|
|
|
+ scoreTitle : '',
|
|
|
+ scoreIndex : 0,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getData();
|
|
|
},
|
|
|
methods:{
|
|
|
+ tixian : function() {
|
|
|
+ this.Dever.alert('敬请期待');
|
|
|
+ },
|
|
|
+ duihuan : function() {
|
|
|
+ this.Dever.alert('敬请期待');
|
|
|
+ },
|
|
|
showScore : function(index) {
|
|
|
- console.info(index);
|
|
|
- var info = this.fetch.num[index];
|
|
|
+ this.scoreIndex = index;
|
|
|
+ var info = this.fetch.num[this.scoreIndex];
|
|
|
var title = info[2] + ':' + info[0];
|
|
|
- this.getScore(1, info[3], title);
|
|
|
+ this.getScore(1, info[0], info[3], title);
|
|
|
},
|
|
|
- getScore : function(page, method, title) {
|
|
|
+ nextScore : function() {
|
|
|
+ var info = this.fetch.num[this.scoreIndex];
|
|
|
+ var title = info[2] + ':' + info[0];
|
|
|
+ this.getScore(2, info[0], info[3], title);
|
|
|
+ },
|
|
|
+ getScore : function(page, num, method, title) {
|
|
|
var self = this;
|
|
|
this.Dever.page([page, 'score'], this, 'app/user/?l=api.score', {code:this.Dever.config.code,method:method}, function(t) {
|
|
|
- self.fetch.score = t.score;
|
|
|
+ if (t.score.length > 0) {
|
|
|
+ self.fetch.score = t.score;
|
|
|
+ } else {
|
|
|
+ self.Dever.alert('无记录');
|
|
|
+ }
|
|
|
+ self.scoreType = t.type;
|
|
|
+
|
|
|
self.scoreTitle = title;
|
|
|
self.score = true;
|
|
|
+ }, function(t) {
|
|
|
+ self.Dever.alert('无记录');
|
|
|
});
|
|
|
},
|
|
|
closeScore : function() {
|