|
@@ -112,7 +112,7 @@ Page({
|
|
var i = e.target.dataset.id;
|
|
var i = e.target.dataset.id;
|
|
var v = e.detail.value
|
|
var v = e.detail.value
|
|
var stock = this.data.stock;
|
|
var stock = this.data.stock;
|
|
- stock[i].fund=v;
|
|
|
|
|
|
+ stock[i].fund = Number(v);
|
|
this.setData({
|
|
this.setData({
|
|
stock: stock
|
|
stock: stock
|
|
})
|
|
})
|
|
@@ -163,7 +163,28 @@ Page({
|
|
today_stock:this.data.stock,
|
|
today_stock:this.data.stock,
|
|
is_markt: this.data.is_markt,
|
|
is_markt: this.data.is_markt,
|
|
today_stock_img: this.data.today_stock_img,
|
|
today_stock_img: this.data.today_stock_img,
|
|
- today_fund: this.data.today_fund
|
|
|
|
|
|
+ today_fund: Number(this.data.today_fund)
|
|
|
|
+ }
|
|
|
|
+ if (!parm.today_fund){
|
|
|
|
+ wx.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '请输入今日净资产'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (today_fund.length<=0) {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '请选择股票'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (parm.today_stock_img.length<=0) {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '请上传截图'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
}
|
|
}
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
title: '正在提交',
|
|
title: '正在提交',
|
|
@@ -177,6 +198,13 @@ Page({
|
|
method:'POST',
|
|
method:'POST',
|
|
success: res => {
|
|
success: res => {
|
|
wx.hideLoading()
|
|
wx.hideLoading()
|
|
|
|
+ if (res.data.code != 0) {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: res.data.message,
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '提交成功',
|
|
title: '提交成功',
|
|
})
|
|
})
|