diff --git a/miniprogram/app.js b/miniprogram/app.js index 44e1707..55a88bf 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -38,12 +38,14 @@ App({ }).then(res => { console.log(res, 'loginSuccess'); // 存储数据 - request.setHead(res.data.token, res.data.tenantId) - wx.setStorageSync('sessionKey', res.data.sessionKey) wx.setStorageSync('openId', res.data.openId) - wx.setStorageSync('token', res.data.token) - - checkUserInfo() + if (res.data.sessionKey) { + wx.setStorageSync('sessionKey', res.data.sessionKey) + } + if (res.data.token) { + wx.setStorageSync('token', res.data.token) + request.setHead(res.data.token) + } }).catch(err => { console.log(err); wx.showToast({ @@ -52,37 +54,5 @@ App({ }) }) } - - /** - * @description 检查用户信息 - * @returns userInfo - */ - const checkUserInfo = () => { - const that = this - request.get({ - url: '/api/user/userinfo' - }).then(res => { - console.log(res, 'userinfo'); - res.data.createDate = res.data.createDate ? timestampToTime(res.data.createDate, 'YYYY-MM-DD hh:mm:ss') : '' - res.data.updateDate = res.data.updateDate ? timestampToTime(res.data.updateDate, 'YYYY-MM-DD hh:mm:ss') : '' - res.data.validStartTime = res.data.validStartTime ? timestampToTime(res.data.validStartTime, 'YYYY-MM-DD hh:mm:ss') : '' - res.data.validEndTime = res.data.validEndTime ? timestampToTime(res.data.validEndTime, 'YYYY-MM-DD hh:mm:ss') : '' - res.data.coverPhone = res.data.phone ? (res.data.phone.slice(0, 3) + `****` + res.data.phone.slice(7)) : '' - const userInfo = res.data - that.globalData.userInfo = userInfo - - // 请求完成后的回调,在index.js中调用防止异步 - that.userInfoCallback(res) - - wx.setStorageSync('promotContentCount', res.data.promotContentCount) - that.globalData.promotContentCount = res.data.promotContentCount - - wx.setStorageSync('completionContentCount', res.data.completionContentCount) - that.globalData.completionContentCount = res.data.completionContentCount - - }).catch(err => { - console.log(err, 'err'); - }) - } }, }) \ No newline at end of file diff --git a/miniprogram/app.json b/miniprogram/app.json index 69b4b74..7752e89 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -10,7 +10,6 @@ "navigationBarTextStyle": "black" }, "plugins": {}, - "style": "v2", "sitemapLocation": "sitemap.json", "usingComponents": { "VanNoticeBar": "@vant/weapp/notice-bar/index", @@ -19,5 +18,6 @@ "VanIcon": "@vant/weapp/icon/index", "VanEmpty": "@vant/weapp/empty/index", "van-toast": "@vant/weapp/toast/index" - } + }, + "__usePrivacyCheck__": false } \ No newline at end of file diff --git a/miniprogram/asset/icon/Home.png b/miniprogram/asset/icon/Home.png deleted file mode 100644 index 5d42a29..0000000 Binary files a/miniprogram/asset/icon/Home.png and /dev/null differ diff --git a/miniprogram/asset/icon/HomeSelect.png b/miniprogram/asset/icon/HomeSelect.png deleted file mode 100644 index 9b02474..0000000 Binary files a/miniprogram/asset/icon/HomeSelect.png and /dev/null differ diff --git a/miniprogram/asset/icon/User.png b/miniprogram/asset/icon/User.png deleted file mode 100644 index 0751fa1..0000000 Binary files a/miniprogram/asset/icon/User.png and /dev/null differ diff --git a/miniprogram/asset/icon/UserSelect.png b/miniprogram/asset/icon/UserSelect.png deleted file mode 100644 index c9e76a9..0000000 Binary files a/miniprogram/asset/icon/UserSelect.png and /dev/null differ diff --git a/miniprogram/asset/icon/arrowBlack.png b/miniprogram/asset/icon/arrowBlack.png deleted file mode 100644 index 23ef504..0000000 Binary files a/miniprogram/asset/icon/arrowBlack.png and /dev/null differ diff --git a/miniprogram/asset/icon/arrowGreen.png b/miniprogram/asset/icon/arrowGreen.png deleted file mode 100644 index 1fcaa2c..0000000 Binary files a/miniprogram/asset/icon/arrowGreen.png and /dev/null differ diff --git a/miniprogram/asset/icon/arrowWhite.png b/miniprogram/asset/icon/arrowWhite.png deleted file mode 100644 index 199203c..0000000 Binary files a/miniprogram/asset/icon/arrowWhite.png and /dev/null differ diff --git a/miniprogram/asset/icon/chatGpt.png b/miniprogram/asset/icon/chatGpt.png deleted file mode 100644 index 8e9ed51..0000000 Binary files a/miniprogram/asset/icon/chatGpt.png and /dev/null differ diff --git a/miniprogram/asset/icon/close.png b/miniprogram/asset/icon/close.png deleted file mode 100644 index 5266e18..0000000 Binary files a/miniprogram/asset/icon/close.png and /dev/null differ diff --git a/miniprogram/asset/icon/keyboard.png b/miniprogram/asset/icon/keyboard.png deleted file mode 100644 index 5641fc6..0000000 Binary files a/miniprogram/asset/icon/keyboard.png and /dev/null differ diff --git a/miniprogram/asset/icon/loading.png b/miniprogram/asset/icon/loading.png deleted file mode 100644 index f62d8c3..0000000 Binary files a/miniprogram/asset/icon/loading.png and /dev/null differ diff --git a/miniprogram/asset/icon/logo-1.png b/miniprogram/asset/icon/logo-1.png new file mode 100644 index 0000000..aee228c Binary files /dev/null and b/miniprogram/asset/icon/logo-1.png differ diff --git a/miniprogram/asset/icon/logo-5.png b/miniprogram/asset/icon/logo-5.png new file mode 100644 index 0000000..417681b Binary files /dev/null and b/miniprogram/asset/icon/logo-5.png differ diff --git a/miniprogram/asset/icon/more.png b/miniprogram/asset/icon/more.png new file mode 100644 index 0000000..f6d155f Binary files /dev/null and b/miniprogram/asset/icon/more.png differ diff --git a/miniprogram/asset/icon/success.png b/miniprogram/asset/icon/success.png deleted file mode 100644 index 4f3c97e..0000000 Binary files a/miniprogram/asset/icon/success.png and /dev/null differ diff --git a/miniprogram/asset/icon/tiny-Chat-rotate.png b/miniprogram/asset/icon/tiny-Chat-rotate.png deleted file mode 100644 index 32db439..0000000 Binary files a/miniprogram/asset/icon/tiny-Chat-rotate.png and /dev/null differ diff --git a/miniprogram/asset/icon/tiny-Chat.png b/miniprogram/asset/icon/tiny-Chat.png deleted file mode 100644 index d75c865..0000000 Binary files a/miniprogram/asset/icon/tiny-Chat.png and /dev/null differ diff --git a/miniprogram/asset/icon/voice.png b/miniprogram/asset/icon/voice.png deleted file mode 100644 index 2b80792..0000000 Binary files a/miniprogram/asset/icon/voice.png and /dev/null differ diff --git a/miniprogram/asset/image/Audi-RS7-item.png b/miniprogram/asset/image/Audi-RS7-item.png deleted file mode 100644 index e4dbdd4..0000000 Binary files a/miniprogram/asset/image/Audi-RS7-item.png and /dev/null differ diff --git a/miniprogram/asset/image/Audi-RS7.png b/miniprogram/asset/image/Audi-RS7.png deleted file mode 100644 index a2dc714..0000000 Binary files a/miniprogram/asset/image/Audi-RS7.png and /dev/null differ diff --git a/miniprogram/asset/image/contacter.png b/miniprogram/asset/image/contacter.png deleted file mode 100644 index 4b6a0a3..0000000 Binary files a/miniprogram/asset/image/contacter.png and /dev/null differ diff --git a/miniprogram/asset/image/homeImg.jpg b/miniprogram/asset/image/homeImg.jpg new file mode 100644 index 0000000..1a94881 Binary files /dev/null and b/miniprogram/asset/image/homeImg.jpg differ diff --git a/miniprogram/asset/image/image.zip b/miniprogram/asset/image/image.zip deleted file mode 100644 index b9d3212..0000000 Binary files a/miniprogram/asset/image/image.zip and /dev/null differ diff --git a/miniprogram/asset/image/payOrder.png b/miniprogram/asset/image/payOrder.png deleted file mode 100644 index a664919..0000000 Binary files a/miniprogram/asset/image/payOrder.png and /dev/null differ diff --git a/miniprogram/asset/image/test.png b/miniprogram/asset/image/test.png new file mode 100644 index 0000000..c7453a3 Binary files /dev/null and b/miniprogram/asset/image/test.png differ diff --git a/miniprogram/pages/index/index.js b/miniprogram/pages/index/index.js index 2abbdc6..abe1921 100644 --- a/miniprogram/pages/index/index.js +++ b/miniprogram/pages/index/index.js @@ -1,9 +1,12 @@ const app = getApp() import request from '../../utils/request' import { timestampToTime } from '../../utils/util' +import Dialog from '@vant/weapp/dialog/dialog'; Page({ data: { + isLogin: true, + itemList: [1, 1, 1, 1, 1, 1], showPrivacy: false }, // 事件处理函数 @@ -119,16 +122,29 @@ Page({ }) }, + showMore() { + Dialog.confirm({ + title: '删除作品', + message: '确定要删除这个作品吗?', + }) + .then(() => { + // on confirm + }) + .catch(() => { + // on cancel + }); + }, + onShareAppMessage() { const promise = new Promise(resolve => { setTimeout(() => { resolve({ - title: '小闲聊' + title: '智像小相册' }) }, 500) }) return { - title: '小闲聊', + title: '智像小相册', promise } }, @@ -136,12 +152,12 @@ Page({ const promise = new Promise(resolve => { setTimeout(() => { resolve({ - title: '小闲聊' + title: '智像小相册' }) }, 500) }) return { - title: '小闲聊', + title: '智像小相册', promise } } diff --git a/miniprogram/pages/index/index.json b/miniprogram/pages/index/index.json index a860429..543ddf3 100644 --- a/miniprogram/pages/index/index.json +++ b/miniprogram/pages/index/index.json @@ -1,4 +1,8 @@ { - "navigationBarTitleText": "首页", - "usingComponents": {} + "navigationBarTitleText": "我的作品", + "navigationBarBackgroundColor": "#333333", + "navigationBarTextStyle": "white", + "usingComponents": { + "van-dialog": "@vant/weapp/dialog/index" + } } \ No newline at end of file diff --git a/miniprogram/pages/index/index.less b/miniprogram/pages/index/index.less index 3a2a620..39dc85c 100644 --- a/miniprogram/pages/index/index.less +++ b/miniprogram/pages/index/index.less @@ -1,167 +1,118 @@ -.content { +page { + background-color: #333333; +} + +.pages { padding: 0 0 25rpx 0; - .logo { - position: relative; - width: 500rpx; - height: 120rpx; - line-height: 120rpx; - text-align: center; - color: #838383; - font-size: 50rpx; - font-weight: 600; - margin: auto; - border-bottom: 1px solid #000; - transition: all 0.3s; - - &.active { - color: aqua; + .glass { + position: fixed; + width: 100vw; + height: 100vh; + z-index: -9; + + image { + width: 100vw; + height: 100vh; + filter: blur(20rpx); } + } - .tinyChatICon { - position: absolute; - top: 15rpx; - left: 30rpx; - width: 60rpx; - text-align: center; - transition: all 0.3s; - - &.active { - transform: scale(1.05); - } + .content { + position: fixed; + width: 100vw; + height: 100vh; + background-color: #333333a6; + padding-top: 60rpx; + z-index: -8; + + .avatar { + width: 220rpx; + height: 220rpx; + border-radius: 25%; + overflow: hidden; + margin: auto; image { width: 100%; + height: 100%; } } - } - - .introduction { - position: relative; - width: 600rpx; - margin: 50rpx auto; - padding: 0 20rpx; - border: 1px dashed #747474; - border-radius: 60rpx; - .title { + .nickname { + font-size: 32rpx; + margin-top: 25rpx; + color: #ffffff; text-align: center; - font-size: 45rpx; - color: #585858; - margin-bottom: 10rpx; - margin-top: 20rpx; } - .contain { - width: 500rpx; - font-size: 30rpx; - color: #585858; - text-indent: 1cm; - margin: 0 auto; - padding: 20rpx; - font-family: Verdana, Geneva, Tahoma, sans-serif; - } - - .notice { - text-indent: 44rpx; - font-size: 22rpx; - color: #929292; - padding: 0 50rpx; - margin-top: 35rpx; + .tab { + width: 200rpx; + height: 70rpx; + line-height: 70rpx; + text-align: center; + color: #ffffff; + background-color: #ff4f00; + margin: 50rpx auto; + border-radius: 15rpx; } - .switch { - position: absolute; - width: 100rpx; - height: 100rpx; - border-radius: 50% 50%; - - &.topLeft { - top: 0; - left: 0; - transform: translate(-50%, -50%); - } - - &.topRight { - top: 0; - right: 0; - transform: translate(50%, -50%); - } + .scrollView { + width: 100%; + height: 900rpx; + z-index: 1; - &.bottomLeft { - bottom: 0; - left: 0; - transform: translate(-50%, 50%); - } + .item { + width: 92%; + height: 280rpx; + // background-color: grey; + margin: 30rpx auto; - &.bottomRight { - bottom: 0; - right: 0; - transform: translate(50%, 50%); - } - } + .top { + display: flex; + justify-content: space-between; + .modelName { + font-size: 32rpx; + color: #ffffff; + } - } + .date { + color: #ffffff; + } - .buttons { - font-size: 25rpx; + .more { + position: relative; + left: 20rpx; + width: 40rpx; + height: 40rpx; - .userProtocolModel { - text-align: center; - margin-bottom: 30rpx; - - .textInside { - position: relative; - width: 550rpx; - margin: auto; - - .agreeButton { - position: absolute; - left: 0rpx; - width: 30rpx; - height: 30rpx; - line-height: 35rpx; - border: 1px solid #464646; - border-radius: 50% 50%; - color: #ffffff; - text-align: center; - - &.active { - border: 1px solid #07c160; - background-color: #07c160; + image { + width: 12rpx; + } } } - .userProtocol { - text-align: center; - color: #929292; - text-decoration: underline; - margin-bottom: 15rpx; + .photoList { + display: flex; + justify-content: space-between; + margin-top: 20rpx; + + image { + width: 150rpx; + border-radius: 10%; + } } } - - } - - .getPhoneNumberBtn { - display: none; - } - - .userPhone { - text-align: center; - margin-bottom: 15rpx; - color: #929292; } - .payHistory { + .goLogin { + font-size: 32rpx; text-align: center; - color: #929292; + font-weight: 600; + color: #ff4f00; text-decoration: underline; - margin-bottom: 15rpx; - } - - button { - border-radius: 30rpx; + margin-top: 40rpx; } } @@ -172,6 +123,7 @@ width: 100%; height: 100%; background-color: #00000059; + z-index: -999; .showPrivacy { position: fixed; diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml index 6eab855..c800a14 100644 --- a/miniprogram/pages/index/index.wxml +++ b/miniprogram/pages/index/index.wxml @@ -1,5 +1,44 @@ - + + + + + + + + + + + 微信用户 + + + + 我的写真 + + + + name + 2023-10-1 12:43:14 + + + + + + + + + + + + + + 登录即可体验全部功能哦 + + + + + + 隐私协议更新 diff --git a/project.config.json b/project.config.json index 5f2303c..6dd6323 100644 --- a/project.config.json +++ b/project.config.json @@ -26,7 +26,8 @@ "miniprogramNpmDistDir": "./miniprogram/" } ], - "minified": true + "minified": true, + "ignoreUploadUnusedFiles": true }, "simulatorType": "wechat", "simulatorPluginLibVersion": {},