diff --git a/app.js b/app.js index 1ed57c4..26d04a1 100644 --- a/app.js +++ b/app.js @@ -1,19 +1,6 @@ -// app.js +const { checkLogin } = require('./utils/logcheck'); App({ onLaunch() { - // 展示本地存储能力 - const logs = wx.getStorageSync('logs') || [] - logs.unshift(Date.now()) - wx.setStorageSync('logs', logs) - - // 登录 - wx.login({ - success: res => { - // 发送 res.code 到后台换取 openId, sessionKey, unionId - } - }) - }, - globalData: { - userInfo: null + checkLogin(); } -}) +}); diff --git a/app.json b/app.json index 2169b25..c3ad2ff 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,8 @@ { "pages": [ + "pages/jiedan/jiedan", "pages/logain/logain", "pages/logs/logs", - "pages/jiedan/jiedan", "pages/mypage/mypage", "pages/shop/shop", "pages/find/find", diff --git a/app.wxss b/app.wxss index 0276508..cc59e77 100644 --- a/app.wxss +++ b/app.wxss @@ -25,7 +25,6 @@ text { .flex-row { display: flex; flex-direction: row; - } .flex-col { diff --git a/image/20250515110258.jpg b/image/20250515110258.jpg new file mode 100644 index 0000000..ba51e37 Binary files /dev/null and b/image/20250515110258.jpg differ diff --git a/image/close.png b/image/close.png new file mode 100644 index 0000000..b0be254 Binary files /dev/null and b/image/close.png differ diff --git a/miniprogram_npm/futext.js b/miniprogram_npm/futext.js new file mode 100644 index 0000000..514fe7e --- /dev/null +++ b/miniprogram_npm/futext.js @@ -0,0 +1,31 @@ +// miniprogram_npm/rich-text.js +Component({ + + /** + * 组件的属性列表 + */ + properties: { + settlementDesc: { + type: String, + value: '' + }, + xiangmuname: { + type: String, + value: '' + } + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) \ No newline at end of file diff --git a/miniprogram_npm/futext.json b/miniprogram_npm/futext.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram_npm/futext.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram_npm/futext.wxml b/miniprogram_npm/futext.wxml new file mode 100644 index 0000000..8699fa7 --- /dev/null +++ b/miniprogram_npm/futext.wxml @@ -0,0 +1,12 @@ + + + + + + {{xiangmuname}} + + + + + + \ No newline at end of file diff --git a/miniprogram_npm/futext.wxss b/miniprogram_npm/futext.wxss new file mode 100644 index 0000000..2155ba0 --- /dev/null +++ b/miniprogram_npm/futext.wxss @@ -0,0 +1,27 @@ +.xiangqing{ + width: 95%; + margin-top: 20rpx; + border-radius: 20px; + background-color: #F8F8F8; +} +.titlemessgae{ + width: 100%; + height: 50px; + display: flex; + align-items: center; +} +.richtext { + padding: 0rpx 24rpx 24rpx 0rpx; + border-radius: 16rpx; + font-size: 28rpx; + color: #333; + line-height: 1.8; + box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05); +} +.fenbu{ + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..11cb01d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,17 @@ +{ + "name": "青橙", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "mp-html": "^2.5.1" + } + }, + "node_modules/mp-html": { + "version": "2.5.1", + "resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.1.tgz", + "integrity": "sha512-7BEH8dnQ89kOIyjdoYni8zcc0QAg+lgEWg0n9or9q2D4l26JNG+KPzHfttDyisC/5S7aPBblpXrFTYQv475w/Q==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a9e6f59 --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "mp-html": "^2.5.1" + } + +} diff --git a/pages/find/find.js b/pages/find/find.js index 0a66c0e..7f9977c 100644 --- a/pages/find/find.js +++ b/pages/find/find.js @@ -1,4 +1,4 @@ -// pages/find/find.js +const { checkLogin } = require('../../utils/logcheck'); Page({ /** @@ -48,7 +48,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + checkLogin(); }, /** diff --git a/pages/findxiangqing/findxiangqing.js b/pages/findxiangqing/findxiangqing.js index a8a4950..b455a9a 100644 --- a/pages/findxiangqing/findxiangqing.js +++ b/pages/findxiangqing/findxiangqing.js @@ -1,4 +1,4 @@ -// pages/findxiangqing/findxiangqing.js +const { checkLogin } = require('../../utils/logcheck'); Page({ /** @@ -26,7 +26,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + checkLogin(); }, /** diff --git a/pages/jiedan/jiedan.js b/pages/jiedan/jiedan.js index 2882cc4..a659f33 100644 --- a/pages/jiedan/jiedan.js +++ b/pages/jiedan/jiedan.js @@ -1,4 +1,5 @@ import {url} from '../../request' +const { checkLogin } = require('../../utils/logcheck'); Page({ data: { list:[], @@ -40,6 +41,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { + checkLogin(); const that = this wx.getStorage({ key: "logmessage", diff --git a/pages/logain/logain.js b/pages/logain/logain.js index 208d5ad..508c7a2 100644 --- a/pages/logain/logain.js +++ b/pages/logain/logain.js @@ -4,6 +4,35 @@ Page({ show: true, morenshow: false, currentTab: 'code', + countdown: 60, // 设置倒计时时长(秒) + timer: null, // 存储计时器 + }, + startCountdown() { + this.setData({ + isCountingDown: true, + countdown: 60 + }); + + this.data.timer = setInterval(() => { + let count = this.data.countdown; + if (count <= 1) { + clearInterval(this.data.timer); + this.setData({ + isCountingDown: false, + countdown: 60 + }); + } else { + this.setData({ + countdown: count - 1 + }); + } + }, 1000); + }, + onUnload() { + // 页面卸载时清除定时器 + if (this.data.timer) { + clearInterval(this.data.timer); + } }, // 初始加载 onShow(){ @@ -118,15 +147,14 @@ submit(){ icon: 'success', duration: 2000 }); - wx.setStorage({ - key: "logmessage", - data: { - Authorization:res.data.data - }, - success() { - console.log("信息存储成功"); - } - }) + try { + wx.setStorageSync('logmessage', { + Authorization: res.data.data + }); + console.log("信息存储成功"); + } catch (e) { + console.error("存储失败", e); + } setTimeout(() => { that.setmessage(); wx.switchTab({ @@ -135,7 +163,7 @@ submit(){ }, 2000); }else{ wx.showToast({ - title: res.data.message, + title: res.data.message||res.data.error, icon: 'error', duration: 2000 }); @@ -183,7 +211,7 @@ getcode(){ }else{ wx.showToast({ title: res.data.message, - icon: 'success', + icon: 'error', duration: 2000 }); } @@ -192,6 +220,7 @@ getcode(){ console.error('请求失败', err); } }); + this.startCountdown(); }, // 验证码登录提交 submityanzhengma(){ @@ -230,15 +259,14 @@ submityanzhengma(){ icon: 'success', duration: 2000 }); - wx.setStorage({ - key: "logmessage", - data: { - Authorization:res.data.data - }, - success() { - console.log("信息存储成功"); - } - }) + try { + wx.setStorageSync('logmessage', { + Authorization: res.data.data + }); + console.log("信息存储成功"); + } catch (e) { + console.error("存储失败", e); + } setTimeout(() => { _this.setmessage(); wx.switchTab({ @@ -247,7 +275,7 @@ submityanzhengma(){ }, 2000); }else{ wx.showToast({ - title: res.data.message, + title: res.data.message||res.data.error, icon: 'error', duration: 2000 }); @@ -278,19 +306,18 @@ setmessage() { success(res) { console.log('查询成功', res); if (res.data.code==1) { - wx.setStorage({ - key: "usermessage", - data: { - nickName:res.data.data.nickName, - phoneNumber:res.data.data.phoneNumber, - userRole:res.data.data.userRole, - invitationCode:res.data.data.invitationCode, - userAvatar:res.data.data.userAvatar - }, - success() { - console.log("信息存储成功"); - } - }) + try { + wx.setStorageSync("usermessage", { + nickName: res.data.data.nickName, + phoneNumber: res.data.data.phoneNumber, + userRole: res.data.data.userRole, + invitationCode: res.data.data.invitationCode, + userAvatar: res.data.data.userAvatar + }); + console.log("信息存储成功"); + } catch (e) { + console.error("信息存储失败", e); + } } else { wx.showToast({ title: res.data.message, diff --git a/pages/logain/logain.wxml b/pages/logain/logain.wxml index f800c74..14fcf33 100644 --- a/pages/logain/logain.wxml +++ b/pages/logain/logain.wxml @@ -16,7 +16,7 @@ - 获取验证码 + {{ isCountingDown ? countdown + '秒后重试' : '获取验证码' }} @@ -38,7 +38,7 @@ - + 我已阅读并同意 用户服务协议、隐私政策 diff --git a/pages/logain/logain.wxss b/pages/logain/logain.wxss index 77fc377..33ffb4c 100644 --- a/pages/logain/logain.wxss +++ b/pages/logain/logain.wxss @@ -106,9 +106,12 @@ line-height: 26.92rpx; } .text_9 { - margin-left: 50.94rpx; + margin-left: 20.94rpx; color: #000000; } +.radio{ + margin-left: 30rpx; +} .text_10 { color: #d43030; margin-left: 10rpx; diff --git a/pages/mingxi/mingxi.js b/pages/mingxi/mingxi.js index 28ece12..05377a6 100644 --- a/pages/mingxi/mingxi.js +++ b/pages/mingxi/mingxi.js @@ -1,4 +1,4 @@ -// pages/mingxi/mingxi.js +const { checkLogin } = require('../../utils/logcheck'); Page({ /** @@ -12,7 +12,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - + checkLogin(); }, /** diff --git a/pages/mypage/mypage.js b/pages/mypage/mypage.js index 9ac1ccf..687d51a 100644 --- a/pages/mypage/mypage.js +++ b/pages/mypage/mypage.js @@ -1,9 +1,10 @@ - +const { checkLogin } = require('../../utils/logcheck'); Page({ data: { - + userAvatar:'https://tse2-mm.cn.bing.net/th/id/OIP-C.jHUH4s7TQ48X_B-1iozuJgHaHa?w=207&h=207&c=7&r=0&o=5&dpr=1.5&pid=1.7', + nickName:'请登录' }, myteam(){ @@ -19,21 +20,19 @@ Page({ }, onShow() { - console.log("askjda"); - const that = this - wx.getStorage({ - key: "usermessage", - success(res) { - console.log(res.data,'aslkdjas'); - const userInfo = res.data - that.setData({ - nickName : userInfo.nickName, - phoneNumber: userInfo.phoneNumber, - invitationCode:userInfo.invitationCode, - userAvatar:userInfo.userAvatar - }); - } - }) + console.log("页面展示 onShow"); + try { + const userInfo = wx.getStorageSync('usermessage'); + console.log('用户信息:', userInfo); + this.setData({ + nickName: userInfo.nickName || '', + phoneNumber: userInfo.phoneNumber || '', + invitationCode: userInfo.invitationCode || '', + userAvatar: userInfo.userAvatar || 'https://tse2-mm.cn.bing.net/th/id/OIP-C.jHUH4s7TQ48X_B-1iozuJgHaHa?w=207&h=207&c=7&r=0&o=5&dpr=1.5&pid=1.7' + }); + } catch (e) { + console.error('读取缓存失败:', e); + } }, wodejiedan(){ wx.navigateTo({ diff --git a/pages/wangjimima/wangjimima.js b/pages/wangjimima/wangjimima.js index 4b04b1d..8929125 100644 --- a/pages/wangjimima/wangjimima.js +++ b/pages/wangjimima/wangjimima.js @@ -146,6 +146,39 @@ getcode(){ console.error('请求失败', err); } }); + this.startCountdown(); }, +startCountdown() { + this.setData({ + isCountingDown: true, + countdown: 60 + }); + + this.data.timer = setInterval(() => { + let count = this.data.countdown; + if (count <= 1) { + clearInterval(this.data.timer); + this.setData({ + isCountingDown: false, + countdown: 60 + }); + } else { + this.setData({ + countdown: count - 1 + }); + } + }, 1000); +}, +onUnload() { + // 页面卸载时清除定时器 + if (this.data.timer) { + clearInterval(this.data.timer); + } +}, +back(){ + wx.navigateTo({ + url: '/pages/logain/logain', + }) +} }) \ No newline at end of file diff --git a/pages/wangjimima/wangjimima.wxml b/pages/wangjimima/wangjimima.wxml index c03c9f3..6b2d39e 100644 --- a/pages/wangjimima/wangjimima.wxml +++ b/pages/wangjimima/wangjimima.wxml @@ -10,14 +10,14 @@ - 获取验证码 + {{ isCountingDown ? countdown + '秒后重试' : '获取验证码' }} - 登陆账号 + 登陆账号 diff --git a/pages/wodejiedan/wodejiedan.js b/pages/wodejiedan/wodejiedan.js index 85fcd4d..6d7cef8 100644 --- a/pages/wodejiedan/wodejiedan.js +++ b/pages/wodejiedan/wodejiedan.js @@ -1,10 +1,11 @@ import {url} from '../../request' +const { checkLogin } = require('../../utils/logcheck'); Page({ data: { items: [null, null, null,null], }, onLoad(options) { - + checkLogin(); }, onReady() { diff --git a/pages/wodetuandui/wodetuandui.js b/pages/wodetuandui/wodetuandui.js index f8f7c6b..7843863 100644 --- a/pages/wodetuandui/wodetuandui.js +++ b/pages/wodetuandui/wodetuandui.js @@ -1,4 +1,4 @@ -// pages/wodetuandui/wodetuandui.js +const { checkLogin } = require('../../utils/logcheck'); Page({ /** @@ -12,7 +12,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - + checkLogin(); }, /** diff --git a/pages/woyaojiedan/woyaojiedan.js b/pages/woyaojiedan/woyaojiedan.js index 63bf1c1..de8deae 100644 --- a/pages/woyaojiedan/woyaojiedan.js +++ b/pages/woyaojiedan/woyaojiedan.js @@ -1,9 +1,11 @@ import {url} from '../../request' +const { checkLogin } = require('../../utils/logcheck'); Page({ data: { }, onLoad(options){ + checkLogin(); const id = options.id this.setData({ id:id @@ -47,6 +49,9 @@ Page({ icon: 'sucess', duration: 2000 }) + wx.navigateBack({ + delta: 1 + }) }else{ wx.showToast({ title: res.data.message, diff --git a/pages/woyaojiedan/woyaojiedan.wxml b/pages/woyaojiedan/woyaojiedan.wxml index 2df5dcd..9769501 100644 --- a/pages/woyaojiedan/woyaojiedan.wxml +++ b/pages/woyaojiedan/woyaojiedan.wxml @@ -7,7 +7,9 @@ - - 申请资料报备 - + + + 申请资料报备 + + \ No newline at end of file diff --git a/pages/woyaojiedan/woyaojiedan.wxss b/pages/woyaojiedan/woyaojiedan.wxss index bedffc6..4b70a42 100644 --- a/pages/woyaojiedan/woyaojiedan.wxss +++ b/pages/woyaojiedan/woyaojiedan.wxss @@ -1,8 +1,22 @@ .ml-124 { margin-left: 238.46rpx; } -.mt-609 { - margin-top: 1171.15rpx; +.bottoma{ + width: 100%; + height: 60px; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 999; +} +.youbuttonm{ + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: #ff8d1a; } .page { background-color: #ffffff; diff --git a/pages/xiangqing/xiangqing.js b/pages/xiangqing/xiangqing.js index 2007184..8dc0f61 100644 --- a/pages/xiangqing/xiangqing.js +++ b/pages/xiangqing/xiangqing.js @@ -1,4 +1,5 @@ import {url} from '../../request' +const { checkLogin } = require('../../utils/logcheck'); Page({ /** @@ -8,12 +9,9 @@ Page({ projectImage:"", selected: 'detail', show:false, - promoCodeApplyVOList:[] + promoCodeApplyVOList:[], + mashow:false }, - - /** - * 生命周期函数--监听页面加载 - */ onSelect(e) { const key = e.currentTarget.dataset.key; console.log(key,'dianjile'); @@ -33,7 +31,13 @@ Page({ url: '/pages/mingxi/mingxi', }) }, + xianshi(){ + this.setData({ + mashow:true + }) + }, onLoad(options) { + checkLogin(); const that = this const id = options.id wx.getStorage({ @@ -81,6 +85,11 @@ Page({ wx.navigateBack({ delta: 1 }) + }, + clossma(){ + this.setData({ + mashow:false + }) } }) \ No newline at end of file diff --git a/pages/xiangqing/xiangqing.json b/pages/xiangqing/xiangqing.json index 503673b..561684b 100644 --- a/pages/xiangqing/xiangqing.json +++ b/pages/xiangqing/xiangqing.json @@ -1,4 +1,6 @@ { "navigationBarTitleText": "项目详情", - "usingComponents": {} + "usingComponents": { + "futext":"/miniprogram_npm/futext" + } } \ No newline at end of file diff --git a/pages/xiangqing/xiangqing.wxml b/pages/xiangqing/xiangqing.wxml index d2c8c61..90b2642 100644 --- a/pages/xiangqing/xiangqing.wxml +++ b/pages/xiangqing/xiangqing.wxml @@ -1,69 +1,38 @@ - - - - - - {{projectName}} - - {{projectDescription}} - - 结算明细 + + + + - - - - 最高价 - ¥{{projectPrice}} - - - - - - - 项目详情 - - + + {{projectName}} + {{projectDescription}} - 我的推广码 - + 最高价 + ¥{{projectPrice}} - - - - - - - 结算说明: - - + + + + 结算明细 - - - - 项目说明: - - - - 项目流程: - - - - 再想想 - - - 申请推广码 - + + + + 项目详情 + + + + 我的推广码 + @@ -71,6 +40,12 @@ 暂无数据 + + + + + + @@ -92,12 +67,39 @@ - + 查看推广码 + + + 再想想 + + + 我要接单 + + + + + + + + 项目推广码 + 引导用户通过扫描此码来完成相应的任务 + + + + + + + 复制推广码 + + + + + \ No newline at end of file diff --git a/pages/xiangqing/xiangqing.wxss b/pages/xiangqing/xiangqing.wxss index 237f878..c6add20 100644 --- a/pages/xiangqing/xiangqing.wxss +++ b/pages/xiangqing/xiangqing.wxss @@ -1,245 +1,6 @@ -.ml-123 { - margin-left: 236.54rpx; -} -.mt-7 { - margin-top: 13.46rpx; -} .ml-3 { margin-left: 5.77rpx; } -.mt-19 { - margin-top: 36.54rpx; -} -.mt-3 { - margin-top: 5.77rpx; -} -.page { - background-color: #ffffff; - width: 100%; - overflow-y: auto; - overflow-x: hidden; - height: 100%; -} -.section { - padding: 34.62rpx 23.08rpx; - background-color: #f8f8f8; -} -.image { - width: 34.62rpx; - height: 19.23rpx; -} -.font { - font-size: 25rpx; - font-family: SourceHanSansCN; - line-height: 23.1rpx; - color: #000000; -} -.text { - font-size: 26.92rpx; - line-height: 24.83rpx; -} -.group { - padding-left: 57.69rpx; - padding-right: 25rpx; -} -.image_2 { - width: 103.85rpx; - height: 103.85rpx; -} -.text_2 { - margin-left: 38.46rpx; - margin-top: 11.54rpx; - font-size: 26.92rpx; - line-height: 24.9rpx; -} -.group_2 { - padding-top: 38.46rpx; - width: 526rpx; -} -.pos { - position: absolute; - right: 0; - top: 15.38rpx; -} -.font_2 { - font-size: 23.08rpx; - font-family: SourceHanSansCN; - line-height: 23.1rpx; -} -.text_4 { - color: #00000080; - font-size: 21.15rpx; - line-height: 21.75rpx; -} -.text-wrapper { - padding: 15.38rpx 0; - background-color: #a5d63fcc; - border-radius: 19.23rpx; - width: 126.92rpx; -} -.pos_2 { - position: absolute; - right: 0; - top: 50%; - transform: translateY(-50%); -} -.text_3 { - color: #ffffff; - line-height: 21.5rpx; -} -.group_3 { - padding: 0 142.31rpx; -} -.text_5 { - color: #00000080; - font-size: 15.38rpx; - font-family: HarmonyOSSansTC; - line-height: 14.42rpx; -} -.text_6 { - color: #e33c64; - font-size: 17.31rpx; - font-family: SourceHanSansCN; - line-height: 13.13rpx; -} -.group_4 { - padding-left: 138.46rpx; - padding-right: 134.62rpx; -} -.group_5 { - padding-bottom: 11.54rpx; -} -.section_2 { - margin-left: 26.92rpx; - background-color: #ff8d1a; - width: 48.08rpx; - height: 3.85rpx; -} -.group_6 { - padding-left: 32.69rpx; - padding-right: 25rpx; -} -.section_3 { - margin-right: 13.46rpx; - padding: 21.15rpx 25rpx 284.62rpx; - background-color: #f8f8f8; - border-radius: 19.23rpx; -} -.image_3 { - width: 34.62rpx; - height: 38.46rpx; -} -.font_3 { - font-size: 25rpx; - font-family: HarmonyOSSansTC; - line-height: 23.1rpx; - color: #000000; -} -.text_8 { - line-height: 23.56rpx; -} -.text_7 { - color: #ff8d1a; - line-height: 23.06rpx; -} -.text_9 { - line-height: 23.19rpx; -} -.section_4 { - margin-left: 13.46rpx; - padding: 15.38rpx 30.77rpx 36.54rpx; - background-color: #f8f8f8; - border-radius: 19.23rpx; -} -.text_10 { - margin-left: 34.62rpx; - line-height: 23.52rpx; -} -.text_100 { - line-height: 23.52rpx; -} -.font_4 { - font-size: 23.08rpx; - font-family: SourceHanSansCN; - line-height: 26.92rpx; - color: #000000; -} -.text_11 { - line-height: 21.69rpx; -} -.equal-division { - align-self: stretch; - margin: 0 15.38rpx; -} -.image_4 { - flex: 1 1 292.31rpx; -} -.equal-division-item { - height: 403.85rpx; -} -.section_5 { - margin-left: 13.46rpx; - padding: 23.08rpx 26.92rpx 30.77rpx; - background-color: #f8f8f8; - border-radius: 19.23rpx; -} -.text_12 { - margin-left: 0.46rpx; -} -.group_7 { - margin-top: 23.08rpx; -} -.text_13 { - text-indent: 0rpx; -} -.text_14 { - margin-top: 38.46rpx; -} -.section_6 { - margin-left: 13.46rpx; - padding: 30.77rpx 46.15rpx 40.38rpx; - background-color: #f8f8f8; - border-radius: 30.81rpx; -} -.text_15 { - - line-height: 22.88rpx; -} -.image_5 { - flex: 1 1 292.31rpx; -} -.image_6 { - margin-left: -7.69rpx; - margin-right: 7.69rpx; - flex: 1 1 292.31rpx; -} -.equal-division_2 { - align-self: stretch; -} -.text-wrapper_2 { - padding: 26.92rpx 0; - flex: 1 1 375rpx; - background-color: #cccccc; - height: 84.62rpx; -} -.font_5 { - font-size: 30.77rpx; - font-family: SourceHanSansCN; - line-height: 26.92rpx; - color: #000000; -} -.text_16 { - line-height: 28.31rpx; -} -.text-wrapper_3 { - padding: 26.92rpx 0; - flex: 1 1 375rpx; - background-color: #ff8d1a; - height: 84.62rpx; -} -.text_17 { - line-height: 28.37rpx; -} .active { color: #ff8d1a; } @@ -264,10 +25,85 @@ width: 100%; height: 100%; display: flex; - justify-content: center; align-items: center; flex-direction: column; } +.xinxibox{ + width: 100%; + display: flex; + align-items: center; + flex-direction: column; + padding-bottom: 60px; +} +.xiangqing{ + width: 95%; + background-color: #cccccc; + margin-top: 20rpx; + border-radius: 20px; +} +.bottoma{ + width: 100%; + height: 60px; + background-color: aqua; + display: flex; + position: fixed; + bottom: 0; + left: 0; + z-index: 999; +} +.zuobuttonm{ + width: 50%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: rgb(255, 255, 255); +} +.youbuttonm{ + width: 50%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: #ff8d1a; +} +.richtext { + padding: 24rpx; + background-color: #ffffff; + border-radius: 16rpx; + font-size: 28rpx; + color: #333; + line-height: 1.8; + box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05); +} + +/* 去掉 li 的黑点 */ +.richtext li { + list-style: none; + padding-left: 0; + margin-left: 0; +} + +/* 美化段落和图片 */ +.richtext p { + margin-bottom: 16rpx; +} +.richtext img { + max-width: 100%; + border-radius: 8rpx; + margin: 12rpx 0; +} +.richtext h1, .richtext h2, .richtext h3 { + font-weight: bold; + margin: 20rpx 0 12rpx; +} + +.titlemessgae{ + width: 100%; + height: 50px; + display: flex; + align-items: center; +} .messagebox{ width: 90%; height: 200px; @@ -308,4 +144,147 @@ .imagesize1{ width: 100px; height: 100px; +} +.renwuma{ + width: 90%; + height: 80%; + + +} +.tanhcuann{ + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + position: absolute; + top: 0px; + background-color: rgba(138, 135, 135, 0.5); +} +.titlema{ + width: 100%; + height: 30%; + background-color: #ffffff; + border-bottom: 1px solid #a09d9d ; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +.imagebox{ + width: 100%; + height: 40%; + display: flex; + justify-content: center; + align-items: center; + background-color: #ffffff; +} +.masize{ + width: 200px; + height: 200px; + +} +.erweimacopy{ + width: 100%; + height: 20%; + display: flex; + justify-content: center; + align-items: center; + background-color: #ffffff; +} +.copy{ + width: 180px; + height: 40px; + background-color: rgb(17, 17, 240); + border-radius: 20px; + display: flex; + justify-content: center; + align-items: center; + color: #ffffff; +} +.closs{ + width: 100%; + height: 10%; + display: flex; + justify-content: center; + align-items: center; +} +.closssize{ + width: 80rpx; + height: 80rpx; +} +.maxbox{ + width: 100%; +} +.kuang{ + width: 100%; + display: flex; + margin-top: 30rpx; +} +.lan{ + width: 100%; + height: 60px; + display: flex; +} +.zuolan{ + width: 50%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +.youlan{ + width: 50%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +.shopimage{ + width: 23%; + display: flex; + justify-content: center; + align-items: center; +} +.textbox{ + width: 57%; + height: 100%; + display: flex; + flex-direction: column; +} +.mingxi{ + width: 20%; + height: 150rpx; + display: flex; + justify-content: center; + align-items: center; +} +.colorkuang{ + width: 70px; + height: 30px; + background-color: #A5D63F; + display: flex; + justify-content: center; + align-items: center; + border-radius: 10rpx; +} +.imagesizeshop{ + width: 70px; + height: 70px; + border-radius: 20rpx; +} +.text_5 { + color: #585857; + font-size: 20rpx; +} +.text_6 { + color: #e33c64; + font-size: 20rpx; +} +.section_2 { + background-color: #ff8d1a; + width: 100rpx; + height: 4rpx; } \ No newline at end of file diff --git a/pages/zucepage/zucepage.js b/pages/zucepage/zucepage.js index ff90e4c..28bc958 100644 --- a/pages/zucepage/zucepage.js +++ b/pages/zucepage/zucepage.js @@ -5,7 +5,8 @@ Page({ * 页面的初始数据 */ data: { - + countdown: 60, // 设置倒计时时长(秒) + timer: null, // 存储计时器 }, name(e){ @@ -76,6 +77,34 @@ Page({ console.error('请求失败', err); } }); + this.startCountdown(); + }, + startCountdown() { + this.setData({ + isCountingDown: true, + countdown: 60 + }); + + this.data.timer = setInterval(() => { + let count = this.data.countdown; + if (count <= 1) { + clearInterval(this.data.timer); + this.setData({ + isCountingDown: false, + countdown: 60 + }); + } else { + this.setData({ + countdown: count - 1 + }); + } + }, 1000); + }, + onUnload() { + // 页面卸载时清除定时器 + if (this.data.timer) { + clearInterval(this.data.timer); + } }, // 注册 submit(){ @@ -161,6 +190,7 @@ Page({ icon: 'error', duration: 2000 }); + } }, fail(err) { diff --git a/pages/zucepage/zucepage.wxml b/pages/zucepage/zucepage.wxml index eae2a3b..f9272c5 100644 --- a/pages/zucepage/zucepage.wxml +++ b/pages/zucepage/zucepage.wxml @@ -13,11 +13,11 @@ 获取验证码 - + - + 我已阅读并同意 青橙用户服务协议、隐私政策 diff --git a/pages/zucepage/zucepage.wxss b/pages/zucepage/zucepage.wxss index 51a692f..ee3635b 100644 --- a/pages/zucepage/zucepage.wxss +++ b/pages/zucepage/zucepage.wxss @@ -112,9 +112,12 @@ line-height: 26.92rpx; } .text_10 { - margin-left: 35.56rpx; + margin-left: 15.56rpx; color: #000000; } +.radio{ + margin-left: 30rpx; +} .text_11 { color: #d43030; margin-left: 10rpx; @@ -148,4 +151,4 @@ .imagesize{ width: 150px; height: 150px; -} \ No newline at end of file +} diff --git a/request.js b/request.js index 015f335..4598e8f 100644 --- a/request.js +++ b/request.js @@ -1 +1 @@ -export const url='http://1.94.237.210:3456'; +export const url='http://1.94.237.210:3457'; diff --git a/utils/logcheck.js b/utils/logcheck.js new file mode 100644 index 0000000..cdde082 --- /dev/null +++ b/utils/logcheck.js @@ -0,0 +1,25 @@ +function checkLogin() { + try { + const user = wx.getStorageSync('usermessage'); + if (!user || (typeof user === 'object' && Object.keys(user).length === 0)) { + wx.showToast({ + title: '您未登录请先登录', + icon:'error', + duration:2000 + }) + setTimeout(() => { + wx.navigateTo({ + url: '/pages/logain/logain', + }); + }, 2000); + } + } catch (e) { + wx.navigateTo({ + url: '/pages/logain/logain', + }); + } +} + +module.exports = { + checkLogin +};