|
|
|
@ -42,8 +42,8 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="num"> |
|
|
|
|
<text>剩余生成次数</text> |
|
|
|
|
<text class="use">1</text> |
|
|
|
|
<text>/30</text> |
|
|
|
|
<text class="use">{{color_has}}</text> |
|
|
|
|
<text>/{{all}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
@ -93,10 +93,14 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
uploadImg: [], |
|
|
|
|
users_image:'', |
|
|
|
|
//颜色 |
|
|
|
|
colorList : [], |
|
|
|
|
selectIndex:0, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
color_has:0, //已生成 |
|
|
|
|
all:0, //可生成总数 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
@ -112,6 +116,13 @@ |
|
|
|
|
this.theme = 'blue'; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
var _this = this; |
|
|
|
|
var sceneList = _this.$user.session('sceneList'); |
|
|
|
|
var all = sceneList[1].number; |
|
|
|
|
console.log(all); |
|
|
|
|
_this.all = all; |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getNavHeight(e) { |
|
|
|
|
this.margin_top += e; |
|
|
|
@ -157,7 +168,7 @@ |
|
|
|
|
var d = res.data; |
|
|
|
|
|
|
|
|
|
_this.uploadImg = [{url:_this.$api.ossurl(d.file_url)}]; |
|
|
|
|
|
|
|
|
|
_this.users_image = d.file_url; |
|
|
|
|
|
|
|
|
|
},function(err){ |
|
|
|
|
console.log('ossUpload fail',err); |
|
|
|
@ -168,6 +179,15 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
///api/userInfo |
|
|
|
|
getUserInfo(){ |
|
|
|
|
|
|
|
|
|
var _this = this; |
|
|
|
|
_this.$api.get('/api/userInfo',{},function(res){ |
|
|
|
|
_this.color_has = res.attach.photo.back_color_number; |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getColorList() |
|
|
|
|
{ |
|
|
|
|
var _this = this; |
|
|
|
@ -189,7 +209,10 @@ |
|
|
|
|
submit(){ |
|
|
|
|
|
|
|
|
|
var _this = this; |
|
|
|
|
var post = {}; |
|
|
|
|
var post = { |
|
|
|
|
back_color_id:_this.colorList[_this.selectIndex].id, |
|
|
|
|
users_image:_this.users_image, |
|
|
|
|
}; |
|
|
|
|
_this.$api.post('api/color/append', post,function(rs){ |
|
|
|
|
console.log(rs); |
|
|
|
|
|
|
|
|
|