123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- const app = getApp();
- const api = app.api;
- Page({
-
- data: {
- agree:true,
- isShowPop:false,
- settleInfo:{
- artistCaStatus: 0,
- companyCaStatus: 0,
- curatorCaStatus: 0,
- isArtist: 0,
- isArtistAgree: 0,
- isArtistInvoiceAgree: 0,
- isCompany: 0,
- isCompanyAgree: 0,
- isCurator: 0,
- isCuratorAgree: 0,
- isVerification: null,
- isWeChatLogin: null
- }
- },
-
- onLoad: function (options) {
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- this.getData()
- },
- getData(){
- app.post(api.getUserSettleInfo).then(res=>{
- console.log(res);
- this.setData({
- settleInfo:res.data
- })
- })
- },
- handlerTap(e){
- const {index}=e.currentTarget.dataset;
- const { settleInfo } = this.data;
- if(settleInfo.isVerification==0){
- this.showPop()
- }else if(settleInfo.artistCaStatus && settleInfo.artistCaStatus === 2){
-
- wx.navigateTo({
- url: '/pages/user/artUpload/artUpload'
- })
- }else if(settleInfo.curatorCaStatus && settleInfo.curatorCaStatus === 2){
-
- wx.navigateTo({
-
- url: '/pages/settled/contacts/contacts'
- })
- }else if(settleInfo.companyCaStatus && settleInfo.companyCaStatus == 1){
-
- wx.navigateTo({
- url: '/pages/settled/success/success'
- })
- }else if(settleInfo.companyCaStatus && settleInfo.companyCaStatus == 2){
-
- wx.navigateTo({
- url: '/pages/settled/contacts/contacts'
- })
- }else{
- if(index==0){
- this.artistGo();
- }else if(index==1){
- this.companyGo();
- }else{
- this.curatorGO();
- }
- }
- },
- artistGo(){
- const {settleInfo}=this.data;
- if(!settleInfo.isVerification&&settleInfo.isArtistAgree){
- wx.navigateTo({
- url:"/pages/invoice/authentication/authentication?id=0"
- })
- return
-
- }else{
- wx.navigateTo({
- url:"/pages/user/personalInfo/personalInfo"
- })
- }
-
-
-
-
-
- },
- companyGo(){
-
- const {settleInfo}=this.data;
- if(settleInfo.isCompanyAgree){
- wx.navigateTo({
- url:"/pages/settled/authenticationCompany/authenticationCompany"
- })
- }else{
- wx.navigateTo({
- url:`/pages/settled/companyStep/companyStep`
-
- })
- }
- },
- curatorGO(){
- const {settleInfo}=this.data;
- if(!settleInfo.isVerification&&settleInfo.isArtistAgree){
- wx.navigateTo({
- url:"/pages/invoice/authentication/authentication?id=2"
- })
- }else if(settleInfo.isArtistAgree){
- wx.navigateTo({
-
- url:"/pages/user/personalInfo/personalInfo?type=2"
- })
- }else{
- wx.navigateTo({
- url:`/pages/settled/curatorStep/curatorStep`
-
- })
- }
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- },
- showPop(){
- this.setData({
- isShowPop:true
- });
- },
- hidePop(){
- this.setData({
- isShowPop:false
- });
- }
- })
|