From 73996dd0f37cb2dabc55d0a5e488bdad34fccac7 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期一, 20 三月 2023 15:53:25 +0800
Subject: [PATCH] 修改路由
---
miniprogram/pages/user/pubulicty/index.ts | 62 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 1 deletions(-)
diff --git a/miniprogram/pages/user/pubulicty/index.ts b/miniprogram/pages/user/pubulicty/index.ts
index 7f880b5..36c2870 100644
--- a/miniprogram/pages/user/pubulicty/index.ts
+++ b/miniprogram/pages/user/pubulicty/index.ts
@@ -4,18 +4,78 @@
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() {
+ 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') },
success: (res) => {
- console.log(res)
+
+ res.data.data.map(i => {
+ if (i.photoStr != null) {
+ i.photoStr = i.photoStr.split(",").map(i => userCause.globalData.imageUrl + "/img/" + i),
+ this.data.images = i.photoStr
+ }
+ })
this.setData({
causeList: res.data.data
})
--
Gitblit v1.8.0