From f693c859cdaf607c2a146ef89a7a2ce0d9476d1a Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期五, 07 四月 2023 15:49:09 +0800
Subject: [PATCH] 修改首页
---
miniprogram/pages/user/pubulicty/index.ts | 61 +++++++++++++++++++++++++++++-
1 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/miniprogram/pages/user/pubulicty/index.ts b/miniprogram/pages/user/pubulicty/index.ts
index 1c1aef5..a3db613 100644
--- a/miniprogram/pages/user/pubulicty/index.ts
+++ b/miniprogram/pages/user/pubulicty/index.ts
@@ -4,19 +4,76 @@
Page({
data: {
+ cardFig:true,
swcurrent: 0,
causeList: [],
isShow: false
},
+ register(e){
+ console.log(e);
+
+ },
+ getMobile(){
+ // 鑾峰彇鎵嬫満鍙�
+ wx.request(
+ {
+ url:userCause.globalData.url+ "/wx/user/myself",
+ method:"GET",
+ data:{
+ id:wx.getStorageSync('id')
+ },
+ header:{'token':wx.getStorageSync('token')},
+ success:(res)=>{
+ console.log(res)
+ if (res.data.data.userMobile) {
+ this.getUserRegister(res.data.data.userMobile)
+ }
+ }
+ })
+
+ },
+ // 閫氳繃鎵嬫満鍙锋煡璇㈡槸鍚︽槸宸叉敞鍐岀敤鎴�
+ getUserRegister(phone){
+ wx.request(
+ {
+ url:userCause.globalData.url+ "/wx/isExist",
+ method:"GET",
+ data:{
+ phone:phone
+ },
+ header:{'token':wx.getStorageSync('token')},
+ success:(res)=>{
+ console.log(res)
+
+ }
+ })
+ },
// 浜嬩欢澶勭悊鍑芥暟
onLoad() {
+ if (wx.getStorageSync('token')) {
+ this.setData({
+ cardFig:false
+ })
+ }
+ // this.getMobile()
+ // let info=wx.getStorageSync('card')
+ // console.log(info);
+
+ // if (info) {
+ // this.setData({
+ // cardFig :false
+ // })
+ // }else{
+ // this.setData({
+ // cardFig :true
+ // })
+ // }
wx.request(
{
url: userCause.globalData.url + "/wx/publicity",
method: "GET",
- header: { 'token': wx.getStorageSync('token') },
+ // header: { 'token': wx.getStorageSync('token') },
success: (res) => {
-
res.data.data.map(i => {
if (i.photoStr != null) {
i.photoStr = i.photoStr.split(",").map(i => userCause.globalData.imageUrl + "/img/" + i),
--
Gitblit v1.8.0