From 47b673f0d6987a51125daf3214264ad7bdd3ff57 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期日, 04 六月 2023 14:54:30 +0800 Subject: [PATCH] no message --- uniapp/pages/mine/mine.vue | 74 ++++++++++++++++++++++++++++-------- 1 files changed, 57 insertions(+), 17 deletions(-) diff --git a/uniapp/pages/mine/mine.vue b/uniapp/pages/mine/mine.vue index dd7451d..1d99ce3 100644 --- a/uniapp/pages/mine/mine.vue +++ b/uniapp/pages/mine/mine.vue @@ -129,14 +129,14 @@ <swiper class="banerContent" :autoplay="true" :interval="3000" :duration="1000" circular> <swiper-item v-for="(items,index) in bannerList" :key="index" @tap="goUrl(items)"> <view class="swiper-items defIcon"> - <image :src="items.pic" mode="aspectFit"></image> + <image :src="items.image" mode="aspectFit"></image> </view> </swiper-item> </swiper> </view> - <view style="justify-content:end;padding-left:10px" class="matter-tranform-container rowCenCen" v-if="wuLiaoList.length>0"> - <!-- <view class="pushing-matter rowCen" @tap="goUrl(wuLiaoList[0])"> + <!-- <view style="justify-content:end;padding-left:10px" class="matter-tranform-container rowCenCen" v-if="wuLiaoList.length>0"> + <view class="pushing-matter rowCen" @tap="goUrl(wuLiaoList[0])"> <view class="leftIteminfo"> <view class="itemName"> {{wuLiaoList[0].mname}} @@ -149,7 +149,7 @@ <image :src="wuLiaoList[0].image" mode="aspectFill"></image> </view> </view> - <view class="centerBorder"></view> --> + <view class="centerBorder"></view> <view class="pushing-matter rowCen" @tap="goUrl(wuLiaoList[1])"> <view class="leftIteminfo"> <view class="itemName"> @@ -165,7 +165,7 @@ </view> - </view> + </view>--> <view class="commonFunctions-container" v-if="cygnList.length>0"> <view class="card-title"> @@ -262,7 +262,6 @@ platform: '', showtar: false, bbcList:'', - sct: 0, inviteCodeShow:false, inviterShow:false @@ -275,9 +274,11 @@ }, onPullDownRefresh() { + this.getuserInfo(); this.centerInfo(); this.getmoneyInfo(); + this.getInit(); uni.stopPullDownRefresh(); }, onLoad() { @@ -286,24 +287,32 @@ url:"/pages/login/wxlogin" }) }else{ - // #ifdef APP-PLUS - this.appInfo = uni.getStorageSync('appInfo'); - console.log(this.appInfo.iosExamine); - this.showtar = getApp().globalData.ifwt == 1 ? false : true; - this.platform = plus.os.name - // #endif + getApp().watch(this.getInit,'ifwt') this.centerInfo() this.getbanner() } - }, onShow() { if(this.hasLogin){ + this.getInit(); this.getmoneyInfo() this.getuserInfo() + } }, methods: { + getInit() + { + if(!getApp().globalData.hasinit) + { + getApp().getAppInfo(); + } + // #ifdef APP-PLUS + this.appInfo = uni.getStorageSync('appInfo'); + this.showtar = getApp().globalData.ifwt == 1 ? false : true; + this.platform = plus.os.name + // #endif + }, getmoneyInfo() { var that = this; this.$u.api.getEstimateAmount({}).then(e => { @@ -322,12 +331,12 @@ console.log(err) }) }, - getbanner() { // banner鏁版嵁 var that = this; this.$u.api.getBanner({type:'2'}).then(e => { if(e.code == 1)return that.$alert(e.msg); + console.log(e.data.info) that.bannerList = e.data.info; }).catch(function (err) { }) @@ -381,10 +390,41 @@ }, goUrl(info) { - util.goUrl(info,this) + console.log(info) + if(info.url_type == 15) + {//寰俊瀹㈡湇 + let wechat = null + let parameter = info.parameter_json; + plus.share.getServices(res => { + wechat = res.find(i => i.id === 'weixin') + if (wechat) { + wechat.openCustomerServiceChat({ + corpid: parameter.cmark, //浼佷笟ID + url: parameter.url, //瀹㈡湇鍦板潃 + }, src => { + console.log("success:", JSON.stringify(src)) + }, err => { + console.log("error:", JSON.stringify(err)) + }) + } else { + uni.showToast({ + title: '褰撳墠鐜涓嶆敮鎸佸井淇℃搷浣�', + icon: "error" + }); + } + }, function() { + uni.showToast({ + title: "鑾峰彇鏈嶅姟澶辫触锛屼笉鏀寔璇ユ搷浣溿��" + JSON.stringify(e), + icon: 'none' + }) + }); + } + else + { + util.goUrl(info,this) + } + }, - - cpr_version(a, b) { console.log(a); var _a = this.toNum(a), -- Gitblit v1.9.3