作者 xuqiang

提交

@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 ob_id:this.ob_id, 43 ob_id:this.ob_id,
44 gift_id:this.giftList[this.giftIndex].Id, 44 gift_id:this.giftList[this.giftIndex].Id,
45 message:'' 45 message:''
46 - },2).then((res)=>{ 46 + },2,2).then((res)=>{
47 if(res.code == 1){ 47 if(res.code == 1){
48 this.$emit('closeChooseGift',{code:1}) 48 this.$emit('closeChooseGift',{code:1})
49 } 49 }
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 name:this.name, 107 name:this.name,
108 mobile:this.mobile, 108 mobile:this.mobile,
109 message:this.message 109 message:this.message
110 - },2).then((res)=>{ 110 + },2,2).then((res)=>{
111 console.log('随礼支付',res) 111 console.log('随礼支付',res)
112 // #ifdef H5 112 // #ifdef H5
113 if (this.$wechat) { 113 if (this.$wechat) {
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 ob_id:this.ob_id, 78 ob_id:this.ob_id,
79 gift_id:0, 79 gift_id:0,
80 message:this.message 80 message:this.message
81 - },2).then((res)=>{ 81 + },2,2).then((res)=>{
82 if(res.code == 1){ 82 if(res.code == 1){
83 this.$emit('closeWriteMsg',{code:1}) 83 this.$emit('closeWriteMsg',{code:1})
84 } 84 }
@@ -29,7 +29,7 @@ Vue.prototype.obiUrl="http://obituaries.tvue.brofirst.cn/" @@ -29,7 +29,7 @@ Vue.prototype.obiUrl="http://obituaries.tvue.brofirst.cn/"
29 //正式腾讯地图key 29 //正式腾讯地图key
30 Vue.prototype.tencentMapKey = "AFZBZ-UCQL6-O3BSR-EMTTC-23YX7-33BRD" 30 Vue.prototype.tencentMapKey = "AFZBZ-UCQL6-O3BSR-EMTTC-23YX7-33BRD"
31 31
32 -Vue.prototype.$request=function(url,data='',loadType = 1){ 32 +Vue.prototype.$request=function(url,data='',loadType = 1,pageType = 1){
33 // var that=this 33 // var that=this
34 return new Promise((reslove,reject)=>{ 34 return new Promise((reslove,reject)=>{
35 if(loadType == 1){ 35 if(loadType == 1){
@@ -53,28 +53,16 @@ Vue.prototype.$request=function(url,data='',loadType = 1){ @@ -53,28 +53,16 @@ Vue.prototype.$request=function(url,data='',loadType = 1){
53 if(res.data.code==1){ 53 if(res.data.code==1){
54 reslove(res.data) 54 reslove(res.data)
55 } 55 }
56 - if(res.data.code==2){  
57 - uni.setStorageSync('Token',res.data.token)  
58 - uni.request({  
59 - url:this.apiUrl+url,  
60 - method:"POST",  
61 - header: {  
62 - 'token': uni.getStorageSync('token')  
63 - },  
64 - data:data,  
65 - success:(res)=>{  
66 - reslove(res.data)  
67 - }  
68 - })  
69 - }  
70 if(res.data.code == 90001){ 56 if(res.data.code == 90001){
71 - reslove(res.data)  
72 - uni.clearStorageSync()  
73 - window.location.href  
74 - }  
75 - if(res.data.code == 4){  
76 - reslove({"code":0,"msg":"没有相关数据"})  
77 uni.setStorageSync("Token",'') 57 uni.setStorageSync("Token",'')
  58 + if(pageType == 1){
  59 + uni.switchTab({
  60 + url:'/pages/index/index'
  61 + })
  62 + }else{
  63 + window.location.href = window.location.href
  64 + }
  65 + return
78 } 66 }
79 67
80 if(res.data.code==0||res.data.code){ 68 if(res.data.code==0||res.data.code){
@@ -86,19 +86,6 @@ @@ -86,19 +86,6 @@
86 wPicker 86 wPicker
87 }, 87 },
88 onLoad() { 88 onLoad() {
89 - this.isWeixin = this.isWechat()  
90 - if(!this.isWeixin){  
91 - uni.showToast({  
92 - title:'请在微信内置浏览器里打开!',  
93 - icon:'none',  
94 - duration:3000  
95 - })  
96 - return  
97 - }  
98 - if(uni.getStorageSync('Token') == ''){  
99 - this.checkWeChatCode()//通过微信官方接口获取code之后,会重新刷新设置的回调地址【redirect_uri】]  
100 - return  
101 - }  
102 // #ifdef H5 89 // #ifdef H5
103 //获取定位经纬度 90 //获取定位经纬度
104 if (this.$wechat) { 91 if (this.$wechat) {
@@ -135,6 +122,19 @@ @@ -135,6 +122,19 @@
135 this.getData() 122 this.getData()
136 }, 123 },
137 onShow(){ 124 onShow(){
  125 + this.isWeixin = this.isWechat()
  126 + if(!this.isWeixin){
  127 + uni.showToast({
  128 + title:'请在微信内置浏览器里打开!',
  129 + icon:'none',
  130 + duration:3000
  131 + })
  132 + return
  133 + }
  134 + if(uni.getStorageSync('Token') == ''){
  135 + this.checkWeChatCode()//通过微信官方接口获取code之后,会重新刷新设置的回调地址【redirect_uri】]
  136 + return
  137 + }
138 uni.setStorageSync('ob_id','') 138 uni.setStorageSync('ob_id','')
139 this.$store.commit('defaultCutImg') 139 this.$store.commit('defaultCutImg')
140 if(this.$store.state.keyword != ''){ 140 if(this.$store.state.keyword != ''){
@@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
94 </index-obituary-title> 94 </index-obituary-title>
95 <!-- 最后的祝福 --> 95 <!-- 最后的祝福 -->
96 <index-obituary-title :title="5" :temp="temp"> 96 <index-obituary-title :title="5" :temp="temp">
97 - <swiper class="msgList" v-if="obi.MessageArray.length > 0" :indicator-dots="false" :autoplay="true" :vertical="true" :circular="true" :interval="3000" :duration="1000"> 97 + <swiper class="msgList" v-if="obi.MessageArray.length > 0" display-multiple-items="3" :indicator-dots="false" :autoplay="true" :vertical="true" :circular="true" :interval="3000" :duration="1000">
98 <swiper-item class="msgItem" v-for="(item,index) in obi.MessageArray" :key="index"> 98 <swiper-item class="msgItem" v-for="(item,index) in obi.MessageArray" :key="index">
99 <!-- <view class="msgItem"> --> 99 <!-- <view class="msgItem"> -->
100 <view class="msgImg"> 100 <view class="msgImg">
@@ -412,7 +412,7 @@ @@ -412,7 +412,7 @@
412 this.randomMsg = res.data.data 412 this.randomMsg = res.data.data
413 } 413 }
414 }) 414 })
415 - this.$request('/api/Index/ObCon',{ob_id:this.ob_id}).then((res)=>{ 415 + this.$request('/api/Index/ObCon',{ob_id:this.ob_id},1,2).then((res)=>{
416 this.obi = res.data 416 this.obi = res.data
417 this.SellerArray = res.data.SellerArray 417 this.SellerArray = res.data.SellerArray
418 this.showObiDetail = true 418 this.showObiDetail = true
@@ -606,7 +606,7 @@ @@ -606,7 +606,7 @@
606 .userTalk .talkMsg{color: #323233;font-size: 20rpx;text-align: center;font-weight: 600;} 606 .userTalk .talkMsg{color: #323233;font-size: 20rpx;text-align: center;font-weight: 600;}
607 .giftBtn{height: 80rpx;border-radius: 4px;color: #fff;text-align: center;line-height: 80rpx;font-size: 28rpx;margin-top:10rpx;} 607 .giftBtn{height: 80rpx;border-radius: 4px;color: #fff;text-align: center;line-height: 80rpx;font-size: 28rpx;margin-top:10rpx;}
608 608
609 - .msgList{height: 100rpx;padding-top: 20rpx;} 609 + .msgList{height: 300rpx;padding-top: 20rpx;}
610 .msgItem{display: flex;height: 100rpx;} 610 .msgItem{display: flex;height: 100rpx;}
611 .msgItem .msgImg{width: 100rpx;} 611 .msgItem .msgImg{width: 100rpx;}
612 .msgItem .msgInfo{flex: 1;} 612 .msgItem .msgInfo{flex: 1;}
@@ -82,12 +82,16 @@ @@ -82,12 +82,16 @@
82 return 82 return
83 } 83 }
84 this.$request('/api/Config/OutMoney',{money:this.money},2).then((res)=>{ 84 this.$request('/api/Config/OutMoney',{money:this.money},2).then((res)=>{
85 - uni.showToast({  
86 - title:'提现成功'  
87 - })  
88 - setTimeout((res)=>{ 85 + if(res.code == 1){
89 this.getData() 86 this.getData()
90 - },1000) 87 + setTimeout(()=>{
  88 + uni.showToast({
  89 + title:'提现成功'
  90 + })
  91 + },1000)
  92 + }
  93 +
  94 +
91 95
92 }) 96 })
93 }, 97 },