|
@@ -23,6 +23,7 @@ Page({
|
|
|
disable:false,
|
|
|
id:0,
|
|
|
images:[],
|
|
|
+ lastdata:{},
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -61,6 +62,12 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ $api.getMineLatest().then(res=>{
|
|
|
+ this.setData({
|
|
|
+ lastdata: res.data.data,
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
onLoad: function (options) {
|
|
|
var y=new Date().getFullYear()
|
|
@@ -349,10 +356,10 @@ Page({
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if(slist[i].fund > 5000){
|
|
|
+ if(slist[i].fund > 10000){
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
- title: '持仓金额单位为万'
|
|
|
+ title: '持仓金额超过1亿'
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
@@ -381,7 +388,7 @@ Page({
|
|
|
if (parm.today_fund >= 10000) {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
- title: '今日净资产单位为万'
|
|
|
+ title: '今日净资产超过1亿'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
@@ -410,13 +417,42 @@ Page({
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if (this.data.lastdata && !this.data.id){
|
|
|
+ var lastfund = this.data.lastdata.today_fund;
|
|
|
+ if((this.data.today_fund - lastfund)/lastfund > 0.15){
|
|
|
+ const that = this
|
|
|
+ wx.showActionSheet({
|
|
|
+ alertText:'今日收益超过15%',
|
|
|
+ itemList: ['缺席期无出入金-收益正常','缺席期有出入金-忘了申报'],
|
|
|
+ success(res){
|
|
|
+ if(res.tapIndex == 0){
|
|
|
+ that.uploadData(parm)
|
|
|
+ } else if(res.tapIndex ==1){
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '../change/change',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ this.uploadData(parm)
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ uploadData(param){
|
|
|
wx.showLoading({
|
|
|
title: '正在提交',
|
|
|
})
|
|
|
this.setData({
|
|
|
disable: true
|
|
|
})
|
|
|
- $api.updateRecord(parm).then(res => {
|
|
|
+ $api.updateRecord(param).then(res => {
|
|
|
wx.hideLoading()
|
|
|
wx.showToast({
|
|
|
title: '提交成功',
|
|
@@ -444,9 +480,8 @@ Page({
|
|
|
this.setData({
|
|
|
disable:false
|
|
|
})
|
|
|
- )
|
|
|
+ )
|
|
|
},
|
|
|
-
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|