123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- const app = getApp();
- const api = app.api;
- Page({
-
- data: {
- agreement:false,
- isShowPop:false,
- settleInfo:null
- },
-
- onLoad: function (options) {
- this.getData();
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- },
- getData(){
- app.post(api.getUserSettleInfo).then(res=>{
- console.log(res);
- this.setData({
- settleInfo:res.data
- })
- })
- },
- triggerAgree(){
- this.setData({
- agreement:!this.data.agreement
- })
- },
- prevStep(){
- wx.navigateBack()
- },
- nextStep(){
- if(!this.data.agreement){
- wx.showToast({
- title:"请先勾选协议",
- icon:'none',
- duration:2000
- })
- return false
- }
- if(this.data.agreement&&this.data.settleInfo.isVerification==0){
- this.showPop()
- }else{
- wx.redirectTo({
- url:"/pages/invoice/contract/contract"
- })
- }
-
- },
- showPop(){
- this.setData({
- isShowPop:true
- });
- },
- hidePop(){
- this.setData({
- isShowPop:false
- });
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- }
- })
|