diff --git a/App.vue b/App.vue index 90b210a..f1cec1b 100644 --- a/App.vue +++ b/App.vue @@ -166,8 +166,8 @@ uni.getImageInfo({ src: `${config.baseUrl}/recycle-admin/applet/promotion/getInviteCode?token=${uni.getStorageSync('token')}`, success: res => { - getApp().globalData.configData.qr_path = res.path - console.log(getApp().globalData.configData.qr_path, 'qr_path') + getApp().globalData.qr_path = res.path + console.log(getApp().globalData.qr_path, 'qr_path') this.updateProgress() resolve() }, diff --git a/config.js b/config.js index 081fdcd..a1172f2 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,10 @@ // config.js -const type = 'dev' +const type = 'local' const config = { + local: { + baseUrl: 'http://127.0.0.1:8002', + }, dev: { baseUrl: 'http://h5.xzaiyp.top', }, diff --git a/pages/subcomponent/promo-qrcode.vue b/pages/subcomponent/promo-qrcode.vue index 4dbff79..2041e37 100644 --- a/pages/subcomponent/promo-qrcode.vue +++ b/pages/subcomponent/promo-qrcode.vue @@ -1,197 +1,237 @@ \ No newline at end of file + .promo-modal-page { + min-height: 100vh; + background: linear-gradient(to bottom, #f6fff2 0%, #fff 100%); + display: flex; + flex-direction: column; + align-items: center; + position: relative; + + .nav-bar { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; + width: 100vw; + background: linear-gradient(to right, #b2f08d 0%, #39e9d2 100%); + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03); + + .nav-bar-inner { + display: flex; + align-items: center; + height: 44px; + width: 100vw; + position: relative; + } + + .back-icon, + .nav-bar-right { + width: 44px; + height: 44px; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: 0; + } + + .back-icon { + left: 0; + } + + .nav-bar-right { + right: 0; + } + + .nav-bar-title { + flex: 1; + text-align: center; + font-size: 36rpx; + font-weight: bold; + color: #222; + letter-spacing: 2rpx; + line-height: 44px; + } + } + + .user-info-modal { + display: flex; + flex-direction: column; + align-items: center; + + .avatar-frame { + width: 104rpx; + height: 104rpx; + border-radius: 10rpx; + overflow: hidden; + background: #f2f2f2; + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.10); + + .avatar-img { + width: 104rpx; + height: 104rpx; + object-fit: cover; + display: block; + } + } + + .nickname { + margin-top: 24rpx; + font-size: 32rpx; + font-weight: bold; + color: #222; + text-align: center; + } + } + + .qrcode-modal-section { + margin-top: 48rpx; + width: 300rpx; + display: flex; + flex-direction: column; + align-items: center; + + .qrcode-img { + width: 100%; + height: 100%; + background: #fff; + border-radius: 24rpx; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); + } + + .invite-code { + margin-top: 32rpx; + font-size: 30rpx; + color: #222; + font-weight: bold; + text-align: center; + } + } + + .bottom-btns-modal { + position: fixed; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: space-between; + padding: 24rpx 32rpx calc(env(safe-area-inset-bottom) + 24rpx) 32rpx; + background: #fff; + z-index: 100; + + .btn { + flex: 1; + height: 88rpx; + border-radius: 44rpx; + font-size: 32rpx; + font-weight: bold; + margin: 0 12rpx; + border: none; + + &.gray { + background: linear-gradient(90deg, #f7f7f7, #f2f2f2); + color: #888; + } + + &.green { + background: linear-gradient(90deg, #b2f08d, #39e9d2); + color: #fff; + } + } + } + } + \ No newline at end of file