From b44e169dd8a6e0f15d3788970176922e96aec6e1 Mon Sep 17 00:00:00 2001 From: zhao_js <349234519@qq.com> Date: 星期三, 15 十一月 2023 09:55:33 +0800 Subject: [PATCH] no message --- uniapp/manifest.json | 4 +- uniapp/nativeplugins/xiguazhu-baichuan/android/res/drawable/yw_1222_baichuan.jpg | 0 uniapp/pages/goods/goodsDetail.vue | 6 ++ uniapp/pages/login/login.vue | 28 ++++++++++++- uniapp/utils/http.js | 1 uniapp/App.vue | 49 ++++++++++++++---------- uniapp/components/indexPage.vue | 1 7 files changed, 63 insertions(+), 26 deletions(-) diff --git a/uniapp/App.vue b/uniapp/App.vue index ac5afb2..d385ab8 100644 --- a/uniapp/App.vue +++ b/uniapp/App.vue @@ -33,11 +33,12 @@ } else { //APP鍦ㄧ嚎锛屾敹鍒版秷鎭笉浼氬寘鍚玹ype灞炴��,杩欐椂鐨刾ayload鏄疛SON瀛楃涓诧紝闇�瑕佽浆涓篔SON瀵硅薄 payload = JSON.parse(msg.payload); } - console.log(payload); + if (payload != null || payload != undefined) { // var messageType = payload.messageType; // onLaunch 鐢熷懡鍛ㄦ湡閲岋紝椤甸潰璺宠浆鏈夐棶棰�,璺充笉杩囧幓 // 搴旇鏄〉闈㈣繕娌″姞杞斤紝鍔犱笂瀹氭椂鍚庯紝灏卞彲浠ヤ簡锛� + console.log(payload); setTimeout(() => { uni.navigateTo({ url: payload @@ -46,6 +47,7 @@ } } else { // Android var payload = msg.payload; + console.log(payload); if (payload != null || payload != undefined) { // onLaunch 鐢熷懡鍛ㄦ湡閲岋紝椤甸潰璺宠浆鏈夐棶棰�,璺充笉杩囧幓 // 搴旇鏄〉闈㈣繕娌″姞杞斤紝鍔犱笂瀹氭椂鍚庯紝灏卞彲浠ヤ簡锛� @@ -74,12 +76,18 @@ }); } } else { // Android - var payload = JSON.parse(msg.content); + console.log(msg.content); + plus.push.createMessage(msg.content, msg.payload, { + title: messageTitle + //icon:'/static/images/app/pushlogo.png' + }); + /* var payload = JSON.parse(msg.content); + var messageTitle = payload.title; var messageContent = payload.content; plus.push.createMessage(messageContent, payload, { title: messageTitle - }) + }) */ } }, false); //娑堟伅鎺ㄩ�佺粨鏉� @@ -134,8 +142,8 @@ // #endif } }) - - + + }, globalData: { platform: '', @@ -151,9 +159,9 @@ argumentStr: '' }, - data(){ + data() { return { - + } }, onShow: function() { @@ -198,7 +206,8 @@ ...mapMutations(['login']), bcInit: function() { var that = this; - if (uni.getSystemInfoSync().platform == 'ios') { + //uni.getSystemInfoSync().platform == 'ios' + if (true) { const plug = uni.requireNativePlugin('xiguazhu-baichuan'); plug.init({}, result => { //console.log('1111111111111111111'); @@ -211,13 +220,15 @@ that.globalData.hasbcinit = true; } }, - targetArgument(args){ + targetArgument(args) { var toarg = args.replace('dafanguan://', ''); - var argObj = JSON.parse(decodeURIComponent(toarg)); + uni.navigateTo({ + url: toarg + }); + /* var argObj = JSON.parse(decodeURIComponent(toarg)); switch (argObj.totype) { case "0": //鍐呴摼 - if(argObj.url) - { + if (argObj.url) { uni.navigateTo({ url: argObj.url }); @@ -225,19 +236,17 @@ break; default: break; - } + } */ }, - getArgument(isload=false) { - if(this.globalData.argumentStr&&this.globalData.argumentStr.length>0) - { + getArgument(isload = false) { + if (this.globalData.argumentStr && this.globalData.argumentStr.length > 0) { return; } try { var args = plus.runtime.arguments; console.log(args); if (args) { - if(isload) - { + if (isload) { this.globalData.argumentStr = args; return; } @@ -267,7 +276,7 @@ updatePushCid: function() { let clientInfo = uni.getStorageSync('clientInfo'); if (clientInfo && clientInfo != 'null' && clientInfo.clientid) { - console.log('寮�濮嬫洿鏂�:'+clientInfo.clientid); + console.log('寮�濮嬫洿鏂�:' + clientInfo.clientid); this.$u.api.updateCid({ pushcid: clientInfo.clientid }).then(e => {}).catch(function(err) {}) @@ -314,7 +323,7 @@ that.globalData.ifwt = 0 } } - + // #endif }).catch(function(err) { that.globalData.hasinit = false; diff --git a/uniapp/components/indexPage.vue b/uniapp/components/indexPage.vue index b508431..021cf19 100644 --- a/uniapp/components/indexPage.vue +++ b/uniapp/components/indexPage.vue @@ -797,6 +797,7 @@ var that = this; if(type==7&&that.preferData) {//鐚滀綘鍠滄 + console.log(that.preferData); this.$u.api.gussessLikeGoods({ platefrom:that.preferData.p_platefrom, cids:that.preferData.p_cids, diff --git a/uniapp/manifest.json b/uniapp/manifest.json index 2f829fe..a92c7cd 100644 --- a/uniapp/manifest.json +++ b/uniapp/manifest.json @@ -2,8 +2,8 @@ "name" : "澶ц繑瀹�", "appid" : "__UNI__FC8858A", "description" : "澶ц繑瀹榓pp", - "versionName" : "1.2.7", - "versionCode" : 127, + "versionName" : "1.1.6", + "versionCode" : 116, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ "app-plus" : { diff --git a/uniapp/nativeplugins/xiguazhu-baichuan/android/res/drawable/yw_1222_baichuan.jpg b/uniapp/nativeplugins/xiguazhu-baichuan/android/res/drawable/yw_1222_baichuan.jpg index 8b38577..dc9b052 100644 --- a/uniapp/nativeplugins/xiguazhu-baichuan/android/res/drawable/yw_1222_baichuan.jpg +++ b/uniapp/nativeplugins/xiguazhu-baichuan/android/res/drawable/yw_1222_baichuan.jpg Binary files differ diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue index 48d87d0..9c50ade 100644 --- a/uniapp/pages/goods/goodsDetail.vue +++ b/uniapp/pages/goods/goodsDetail.vue @@ -589,6 +589,7 @@ this.inviteCodeShow = true } else { console.log(this.pageType) + console.log(this.user.tb_account) if (this.pageType == 'tb' || this.pageType == 'tmshop' || this.pageType == 'tm') { if (this.user.tb_account) { this.getTbsrc() @@ -647,6 +648,7 @@ goodsId: this.optionsInfo.goodsId, type: 0 }).then(e => { + if (e.code != 0) return that.$alert(e.msg) if(that.frompage=='freebuy') {//0鍏冭喘鐨勮褰曞晢鍝乮d @@ -667,12 +669,14 @@ pname: 'com.taobao.taobao', action: 'taobao://' })) { + const plug = uni.requireNativePlugin('xiguazhu-baichuan') + console.log(tburl); plug.detailPage({ url: tburl, "openType": 0 }, result => { - // console.log(result); + console.log(result); }); } else { uni.navigateTo({ diff --git a/uniapp/pages/login/login.vue b/uniapp/pages/login/login.vue index c3e3ee0..c5e2c1d 100644 --- a/uniapp/pages/login/login.vue +++ b/uniapp/pages/login/login.vue @@ -40,9 +40,9 @@ </view> <view class="bottom-fixed colCen"> - <!-- <view class="verification-Code" @click="changeWay()"> + <view v-if="issh" class="verification-Code" @click="changeWay()"> {{ifPasslogin?'楠岃瘉鐮�':'瀵嗙爜'}}鐧诲綍 - </view> --> + </view> <view class="explain-text rowCen"> <switch type="checkbox" @change="changeread" :checked='isread' style="transform:scale(0.6)"/> 鐧婚檰浠h〃宸茶缁嗛槄璇诲苟鍚屾剰<text @click="goPage('agreement')">銆婄敤鎴峰崗璁��</text>鍜�<text @click="goPage('policy')">銆婇殣绉佹斂绛栥��</text> @@ -66,6 +66,7 @@ }, data() { return { + issh:false, ifPasslogin: false, pass: '', phone: '', @@ -81,7 +82,7 @@ }; }, onLoad() { - + this.shShow(); }, methods: { ...mapMutations(['login']), @@ -93,6 +94,27 @@ changeread(e){ this.isread = e.target.value }, + shShow() + { + var that=this; + this.$u.api.comminInt({}).then(e => { + console.log(e) + that.hasshow=true; + // #ifdef APP-PLUS + if (plus.os.name == 'iOS') { + if (e.data.basic.iosExamine && plus.runtime.version == e.data.basic.IosExamineV) { + console.log('1') + that.issh=true; + } else { + console.log(0) + that.issh=false; + } + } + // #endif + }).catch(function(err) { + console.log(err); + }) + }, dologin() { var that = this; let clientInfo = uni.getStorageSync('clientInfo'); diff --git a/uniapp/utils/http.js b/uniapp/utils/http.js index 644eb43..65144da 100644 --- a/uniapp/utils/http.js +++ b/uniapp/utils/http.js @@ -46,6 +46,7 @@ } catch (e) { TOKEN = '' } + //TOKEN='fba93d1f-9bbe-49e7-9df7-074ddaba8790'; var startTime = new Date(); return new Promise((succ, error) => { uni.request({ -- Gitblit v1.9.3