From 05999b15c0dde2683c0ddc5fdfacde519fcc3c2f Mon Sep 17 00:00:00 2001
From: wuhui_zzw <1760308791@qq.com>
Date: Thu, 25 Apr 2024 13:46:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E7=BB=91=E5=AE=9A?=
=?UTF-8?q?=E4=B8=8A=E4=B8=8B=E7=BA=A7=E6=97=B6=20=20=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E9=94=99=E8=AF=AF=E5=BC=B9=E6=A1=86=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
libs/spread.js | 28 ++++++++++++++++++++--------
pages/index/index.vue | 24 ++++++++++++------------
2 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/libs/spread.js b/libs/spread.js
index 197ffd6..d926270 100644
--- a/libs/spread.js
+++ b/libs/spread.js
@@ -1,13 +1,25 @@
-
-import { spread } from '@/api/user.js'
+import {spread} from '@/api/user.js'
import Cache from '@/utils/cache'
-const shareScence = function(spid,islogin) {
- if(spid)Cache.set("spread", spid || 0);
- if(spid && islogin){
- spread(spid).then(res=>{
- })
- }
+const shareScence = function (spid, islogin, isTips = false) {
+ if (spid) Cache.set("spread", spid || 0);
+ if (spid && islogin) {
+ // 判断:是否已经提示
+ spread(spid).then(res => {
+ console.log("绑定关系 回调", res)
+ }).catch(err => {
+ console.log('错误', err)
+ console.log('是否提示',isTips)
+ if(isTips){
+ uni.showModal({
+ title: '提示',
+ content: err,
+ confirmText: '关闭',
+ showCancel: false
+ });
+ }
+ });
+ }
}
export default shareScence
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 16c9743..f787e75 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -53,7 +53,7 @@
-
+
@@ -125,7 +125,7 @@
更多
-
+
@@ -159,7 +159,7 @@
{{ loadTitle }}
-
+
@@ -522,7 +522,7 @@ export default {
query.exec(res =>{
that.isScrolled = res[0].top <= -60
})
- })
+ })
},
onHide() {
uni.setStorageSync('isIntegral',false)
@@ -545,7 +545,7 @@ export default {
uni.reLaunch({
url: "/pages/index/index"
});
-
+
}, 50)
// #endif
},
@@ -560,7 +560,7 @@ export default {
}, 1500);
})
}
- },
+ },
pageLoad(options){
let that = this;
if (options.spid) {
@@ -593,7 +593,7 @@ export default {
}
}
// #endif
- shareScence(that.currSpid, that.isLogin);
+ shareScence(that.currSpid, that.isLogin, true);
this.isLogin && silenceBindingSpread();
this.reloadData();
Promise.all([
@@ -677,7 +677,7 @@ export default {
let that = this;
let parmas = {
id: id,
- did: that.diyId,
+ did: that.diyId,
version: '221'
}
that.styleConfig = []
@@ -690,7 +690,7 @@ export default {
let data = res.data.data;
uni.setNavigationBarTitle({
title: data.title
- });
+ });
if (data.is_bg_color) {
that.bgColor = data.color_picker
}
@@ -973,7 +973,7 @@ export default {
});
},
getCateData(){
- getCateData().then(res => {
+ getCateData().then(res => {
res.data.unshift({
cate_name: '首页'
});
@@ -1130,7 +1130,7 @@ page {
padding: 0 20rpx;
}
.colum0{
- white-space: nowrap;
+ white-space: nowrap;
display: flex;
}
.ysize {
@@ -1674,7 +1674,7 @@ page {
}
.pictrue {
position: relative;
-
+
.border-picture {
position: absolute;
top: 0;