pages.json
@@ -99,8 +99,23 @@ "enablePullDownRefresh": false } },{ "path": "pages/login/newlogin", "style": { "navigationBarTitleText": "", "navigationStyle": "custom", "enablePullDownRefresh": false } }, { "path": "pages/login/reg", "style": { "navigationBarTitleText": "注册", "navigationStyle": "custom", "enablePullDownRefresh": false } } ,{ ,{ "path" : "pages/shar/shar", "style" : { pages/index/home.vue
@@ -192,6 +192,12 @@ } }, toChat() { if (!this.userInfo.token) { uni.navigateTo({ url: "/pages/login/newlogin" }) return } uni.navigateTo({ url: "./chat?model=" + JSON.stringify(this.main_model) }) pages/index/question.vue
@@ -143,6 +143,12 @@ }) }, submit() { if (!this.userInfo.token) { uni.navigateTo({ url: "/pages/login/newlogin" }) return } if (!this.prompt) { this.$failToast("请输入内容"); return; pages/index/write.vue
@@ -178,6 +178,12 @@ }) }, submit() { if (!this.userInfo.token) { uni.navigateTo({ url: "/pages/login/newlogin" }) return } if (!this.title || !this.desc) { this.$failToast("请输入内容"); return; pages/login/newlogin.vue
New file @@ -0,0 +1,758 @@ <template> <view class="cp-flex-col page"> <view class="cp-flex-col cp-justify-start cp-items-center cp-relative group"> <navigator url="reg"> <view class="cp-flex-col cp-justify-start cp-items-center text-wrapper"><text class="font_1">注册</text></view> </navigator> <view class="cp-flex-col section space-y-56 pos_2"> <text class="cp-self-center font_1 text"> {{ config.site_title }} </text> <view class="cp-flex-col space-y-31"> <view class="cp-flex-col space-y-27"> <view class="cp-flex-row cp-items-center section_2 space-x-19"> <image class="image_2" src="../../static/login/b17f7f0690876b2c1c9f62a06ee82d02.png" /> <!-- <text class="font_2 text_2">手机号/邮箱</text> --> <input v-model="username" type="text" class="font_2 text_2" placeholder="手机号"> </view> <view class="cp-flex-row cp-justify-between cp-items-center section_3"> <view class="cp-flex-row cp-items-center space-x-17"> <image class="cp-shrink-0 image_3" src="../../static/login/532d85c2bb2b38c49a37446e1b76def1.png" /> <input v-model="password" type="password" class="font_2 text_3" placeholder="密码"> </view> <!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> --> </view> </view> <view class="cp-flex-col group_2 space-y-32"> <!-- <text class="cp-self-end text_4">验证码登陆</text> --> <view @click="submit" class="cp-flex-col cp-justify-start cp-items-center button"><text class="text_5">登陆</text></view> </view> </view> </view> <view class="cp-flex-col cp-justify-start cp-items-center image-wrapper pos"> <image class="image" :src="config.logo" /> </view> </view> <view class="cp-flex-row cp-justify-center cp-items-center group_3"> <view class="section_4"></view> <text class="font_1 text_6">快捷登录</text> <view class="section_4 view"></view> </view> <view class="cp-flex-row cp-justify-between cp-self-center equal-division" @click="nologin"> <image class="equal-division-item" src="../../static/login/ff05399c7d6e9e083474a6bec24440d2.png" /> <image class="equal-division-item" src="../../static/login/513984f2eeec8266766b5d1bedf4386f.png" /> <image class="equal-division-item" src="../../static/login/32d84522d79c35d58299896595991b54.png" /> </view> </view> </template> <script> import {mapState,mapMutations} from 'vuex' import mixin from "@/mixin/checkLoaded"; export default { mixins: [mixin], data() { return { show:true, timer:null, count:'', username:'', password:'', isPass:true,//是否账号密码登录 array:['+86','+85','+101','+102'], index:0, key:'', code:'', mpWxCode:'' } }, computed:{ ...mapState(['config', 'tabbar']) }, onLoad(op) { // #ifdef MP if(op.quickLogin){ this.mpPreLogin() } let provider = ''; // #ifdef MP-WEIXIN provider = 'weixin'; // #endif // #ifdef MP-QQ provider = 'qq'; // #endif uni.login({ provider: provider, success: (res) => { console.log(res) if(res.errMsg == 'login:ok'){ this.mpWxCode = res.code } } }) // #endif }, methods: { nologin() { this.$failToast('待开放...') }, mpPreLogin(){ let provider = ''; // #ifdef MP-WEIXIN provider = 'weixin'; // #endif // #ifdef MP-QQ provider = 'qq'; // #endif uni.showLoading({title:'请稍等...'}) uni.login({ provider: provider, success: (res) => { console.log(res) if(res.errMsg == 'login:ok'){ // this.mpWxCode = res.code let api = '/api/member/wxMpQuickLogin'; // #ifdef MP-WEIXIN api = '/api/member/wxMpQuickLogin' // #endif // #ifdef MP-QQ api = '/api/member/qqMpQuickLogin' // #endif this.$request(api,'POST',{ code:res.code }).then(ret => { console.log(ret) uni.hideLoading() if(ret.status == 200){ uni.showToast({ title:"登录成功" }) ret.data.token = ret.token uni.setStorageSync('userInfo',ret.data); uni.setStorageSync('token',ret.token) this.login(ret.data) if(!ret.data.mobile){ uni.showModal({ title:"绑定手机", content:"绑定手机号就可以发布内容啦!", cancelText:"先跳过", confirmText:"去绑定", success: (rs) => { if(rs.confirm){ uni.redirectTo({ url:'../regiester/regiester?bindMob=1' }) }else{ uni.switchTab({ url:"../index/index" }) } } }) }else{ uni.navigateBack({ delta:1 }) } } }) } } }); }, async getValidate(){ if(!(/^1(3|4|5|7|8)\d{9}$/.test(this.username))){ uni.showToast({ title:"请输入正确的手机号码", icon:"none" }) return false; } const TIME_COUNT = 60; if (!this.timer) { this.count = TIME_COUNT; this.show = false; //此处写提交获取验证码的请求 this.$request("/api/base/smsbao","GET",{mobile:this.username}).then(res=>{ if(res.status == 200){ uni.showToast({ title:res.msg, icon:"none" }) this.timer = setInterval(() => { if (this.count > 0 && this.count <= TIME_COUNT) { this.count--; } else { this.show = true; clearInterval(this.timer); this.timer = null; } }, 1000) this.key = res.key }else{ uni.showToast({ title:res.msg, icon:"none" }) } }).catch(err=>{ this.$failToast() }) this.timer = setInterval(() => { if (this.count > 0 && this.count <= TIME_COUNT) { this.count--; } else { this.show = true; clearInterval(this.timer); this.timer = null; } }, 1000) } }, click1(){ this.isPass?this.isPass = false : this.isPass = true }, click2(){ uni.navigateTo({ url:"../regiester/regiester" }) }, bindPickerChange(e){ this.index = e.target.value }, submit(){ uni.showLoading({}) //账号密码登录 if(this.isPass){ if(!this.password || !this.username){ uni.hideLoading() return } this.$request("/api/Member/login","POST",{ mobile:this.username,passwd:this.password }).then(res=>{ console.log(res) if(res.status == 200){ uni.hideLoading() uni.showToast({ title:"登录成功" }) res.data.token = res.token uni.setStorageSync('userInfo',res.data); uni.setStorageSync('token',res.token) this.login(res.data) setTimeout(() => { uni.redirectTo({ url: this.tabbar.list[0].pagePath }) }, 800); } else { uni.hideLoading() uni.showToast({ title:res.msg, icon:'none' }) } }).catch(err=>{ uni.hideLoading() this.$failToast(err) // console.log(err) }) }else{ if(!this.code || !this.username || !this.key){ uni.hideLoading() this.$failToast('参数错误') return } this.$request("/api/member/validateLogin","POST",{ mobile:this.username,code:this.code,key:this.key }).then(res=>{ console.log(res) uni.hideLoading() if(res.status == 200){ uni.showToast({ title:"登录成功" }) res.data.token = res.token uni.setStorageSync('userInfo',res.data); uni.setStorageSync('token',res.token) this.login(res.data) setTimeout(() => { uni.redirectTo({ url: this.tabbar.list[0].pagePath }) }, 800); }else if (res.status == 201){ uni.showToast({ title:res.msg, icon:'none' }) } }).catch(err=>{ uni.hideLoading() this.$failToast(err) // console.log(err) }) } }, async wxMpLogin(e){ console.log(e) uni.showLoading({}) // let [err,ret] = await uni.login({ // provider:'weixin' // }) // console.log(ret) if(!this.mpWxCode){ uni.hideLoading() this.$failToast('第三方登录失败') return } this.$request('/api/member/wxMpLogin','POST',{ code: this.mpWxCode, encryptedData: e.detail.encryptedData, iv: e.detail.iv }).then(res => { console.log(res) if(res.status == 200){ uni.hideLoading() uni.showToast({ title:"登录成功" }) res.data.token = res.token uni.setStorageSync('userInfo',res.data); uni.setStorageSync('token',res.token) this.login(res.data) if(!res.data.mobile){ uni.showModal({ title:"绑定手机", content:"绑定手机号就可以发布内容啦!", cancelText:"先跳过", confirmText:"去绑定", success: (res) => { if(res.confirm){ uni.redirectTo({ url:'../regiester/regiester?bindMob=1' }) }else{ uni.switchTab({ url:"../index/index" }) } } }) }else{ setTimeout(function() { uni.switchTab({ url:"../index/index" }) }, 800); } }else if (res.status == 201){ uni.showToast({ title:res.msg, icon:'none' }) } }) }, async qqMpLogin(e){ console.log(e) uni.showLoading({}) // let [err,ret] = await uni.login({ // provider:'qq' // }) // console.log(ret) if(!this.mpWxCode){ uni.hideLoading() this.$failToast('第三方登录失败') return } let user = e.detail.userInfo this.$request('/api/member/qqMpLogin','POST',{ code: this.mpWxCode, parent_id:'', ...user }).then(res => { console.log(res) uni.hideLoading() if(res.status == 200){ uni.hideLoading() uni.showToast({ title:"登录成功" }) res.data.token = res.token uni.setStorageSync('userInfo',res.data); uni.setStorageSync('token',res.token) this.login(res.data) if(!res.data.mobile){ uni.showModal({ title:"绑定手机", content:"绑定手机号就可以发布内容啦!", cancelText:"先跳过", confirmText:"去绑定", success: (res) => { if(res.confirm){ uni.redirectTo({ url:'../regiester/regiester?bindMob=1' }) }else{ uni.switchTab({ url:"../index/index" }) } } }) }else{ setTimeout(function() { uni.switchTab({ url:"../index/index" }) }, 800); } }else if (res.status == 201){ uni.showToast({ title:res.msg, icon:'none' }) } }) }, ...mapMutations(['login']) } } </script> <style scoped lang="css"> html { font-size: 16px; } body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } view, image, text { box-sizing: border-box; flex-shrink: 0; } #app { width: 100vw; height: 100vh; } .cp-flex-row { display: flex; flex-direction: row; } .cp-flex-col { display: flex; flex-direction: column; } .cp-justify-start { justify-content: flex-start; } .cp-justify-end { justify-content: flex-end; } .cp-justify-center { justify-content: center; } .cp-justify-between { justify-content: space-between; } .cp-justify-around { justify-content: space-around; } .cp-justify-evenly { justify-content: space-evenly; } .cp-items-start { align-items: flex-start; } .cp-items-end { align-items: flex-end; } .cp-items-center { align-items: center; } .cp-items-baseline { align-items: baseline; } .cp-items-stretch { align-items: stretch; } .cp-self-start { align-self: flex-start; } .cp-self-end { align-self: flex-end; } .cp-self-center { align-self: center; } .cp-self-baseline { align-self: baseline; } .cp-self-stretch { align-self: stretch; } .cp-flex-1 { flex: 1 1 0%; } .cp-flex-auto { flex: 1 1 auto; } .cp-grow { flex-grow: 1; } .cp-grow-0 { flex-grow: 0; } .cp-shrink { flex-shrink: 1; } .cp-shrink-0 { flex-shrink: 0; } .cp-relative { position: relative; } .page { padding: 127rpx 34rpx 218rpx; background-image: linear-gradient(66deg, #6186fe 0%, #a23aff 100%); width: 100%; overflow-y: auto; overflow-x: hidden; height: 100vh; } .group { padding-top: 650rpx; } .text-wrapper { padding: 147rpx 0 21rpx; background-color: #ffffff75; border-radius: 30rpx; width: 473rpx; } .font_1 { font-size: 30rpx; font-family: HiraginoSansGB; line-height: 28rpx; color: #ffffff; } .section { padding: 118rpx 40rpx 38rpx; background-color: #ffffff; border-radius: 20rpx; width: 536rpx; } .space-y-56>view:not(:first-child), .space-y-56>text:not(:first-child), .space-y-56>image:not(:first-child) { margin-top: 56rpx; } .pos_2 { position: absolute; left: 50%; top: 280rpx; transform: translateX(-50%); } .text { color: #333333; line-height: 29rpx; } .space-y-31>view:not(:first-child), .space-y-31>text:not(:first-child), .space-y-31>image:not(:first-child) { margin-top: 31rpx; } .space-y-27>view:not(:first-child), .space-y-27>text:not(:first-child), .space-y-27>image:not(:first-child) { margin-top: 27rpx; } .section_2 { padding: 14rpx 22rpx 10rpx; border-radius: 30rpx; background-image: url('../../static/login/02fdccc95ea34e937ec1edcee2d69b21.png'); background-size: 100% 100%; background-repeat: no-repeat; } .space-x-19>view:not(:first-child), .space-x-19>text:not(:first-child), .space-x-19>image:not(:first-child) { margin-left: 19rpx; } .image_2 { width: 38rpx; height: 45rpx; } .font_2 { font-size: 24rpx; font-family: HiraginoSansGB; color: #666666; } .text_2 { margin-right: 222rpx; line-height: 25rpx; } .section_3 { padding: 11rpx 22rpx 6rpx; border-radius: 30rpx; background-image: url('../../static/login/02fdccc95ea34e937ec1edcee2d69b21.png'); background-size: 100% 100%; background-repeat: no-repeat; } .space-x-17>view:not(:first-child), .space-x-17>text:not(:first-child), .space-x-17>image:not(:first-child) { margin-left: 17rpx; } .image_3 { width: 41rpx; height: 52rpx; } .text_3 { line-height: 23rpx; } .image_4 { width: 26rpx; height: 15rpx; } .group_2 { padding: 0 11rpx; } .space-y-32>view:not(:first-child), .space-y-32>text:not(:first-child), .space-y-32>image:not(:first-child) { margin-top: 32rpx; } .text_4 { color: #666666; font-size: 20rpx; font-family: HiraginoSansGB; line-height: 22rpx; text-decoration: underline; } .button { padding: 16rpx 0; background-image: linear-gradient(212deg, #6384fe 0%, #a13bff 100%); border-radius: 30rpx; width: 434rpx; } .text_5 { color: #ffffff; font-size: 36rpx; font-family: HiraginoSansGB; line-height: 33rpx; } .image-wrapper { padding: 58rpx 0 63rpx; background-image: url('../../static/login/0316f830b076fd836291cfb192b3ef65.png'); background-size: 100% 100%; background-repeat: no-repeat; width: 199rpx; } .pos { position: absolute; left: 50%; top: 180rpx; transform: translateX(-50%); } .image { width: 147rpx; height: 78rpx; } .group_3 { margin-top: 93rpx; } .section_4 { opacity: 0.5; width: 217rpx; height: 1rpx; border: solid 1rpx #ffffff; } .text_6 { margin-left: 20rpx; } .view { margin-left: 15rpx; } .equal-division { margin-top: 73rpx; width: 421rpx; } .equal-division-item { margin: 2rpx 0; width: 70.5rpx; height: 63rpx; } </style> pages/login/reg.vue
New file @@ -0,0 +1,534 @@ <template> <view class="cp-flex-col page"> <view class="cp-flex-col cp-justify-start cp-items-center cp-relative group"> <view class="cp-flex cp-items-center text-wrapper" style="justify-content: center;display: flex;color: #fff;"> <view @click="click1" class="">用户服务协议</view> <view @click="click2" class="" style="padding-left: 30px;">隐私协议</view> </view> <view class="cp-flex-col section space-y-56 pos_2"> <text class="cp-self-center font_1 text"> {{ config.site_title }} </text> <view class="cp-flex-col space-y-31"> <view class="cp-flex-col space-y-27"> <view class="cp-flex-row cp-items-center section_2 space-x-19"> <image class="image_2" src="../../static/login/b17f7f0690876b2c1c9f62a06ee82d02.png" /> <!-- <text class="font_2 text_2">手机号/邮箱</text> --> <input v-model="mobile" type="text" class="font_2 text_2" placeholder="手机号"> </view> <view v-if="config.is_h5_sms == 1" class="cp-flex-row cp-justify-between cp-items-center section_3"> <view class="cp-flex-row cp-items-center space-x-17"> <image class="cp-shrink-0 image_3" src="../../static/login/smscode.png" /> <input v-model="code" type="number" class="font_2 text_3" placeholder="请输入验证码"> </view> <view @click="getValidate" style="color: #a13bff;font-size: 12px;padding-right: 10px;">{{show?"获取验证码":`已发送${count}s`}}</view> <!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> --> </view> <view class="cp-flex-row cp-justify-between cp-items-center section_3"> <view class="cp-flex-row cp-items-center space-x-17"> <image class="cp-shrink-0 image_3" src="../../static/login/532d85c2bb2b38c49a37446e1b76def1.png" /> <input v-model="password" type="password" class="font_2 text_3" placeholder="密码"> </view> <!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> --> </view> <view class="cp-flex-row cp-justify-between cp-items-center section_3"> <view class="cp-flex-row cp-items-center space-x-17"> <image class="cp-shrink-0 image_3" src="../../static/login/532d85c2bb2b38c49a37446e1b76def1.png" /> <input v-model="passwordd" type="password" class="font_2 text_3" placeholder="确认密码"> </view> <!-- <image class="image_4" src="../../static/login/acde9f55d278d771fe4bb0c73271082f.png" /> --> </view> </view> <view class="cp-flex-col group_2 space-y-32"> <!-- <text class="cp-self-end text_4">验证码登陆</text> --> <view @click="submit" class="cp-flex-col cp-justify-start cp-items-center button"><text class="text_5">立即注册</text></view> <view @click="navtologin" class="cp-flex-col cp-justify-start cp-items-center button"><text class="text_5">返回登录</text></view> </view> </view> </view> <view class="cp-flex-col cp-justify-start cp-items-center image-wrapper pos"> <image class="image" :src="config.logo" /> </view> </view> <!-- <view class="cp-flex-row cp-justify-center cp-items-center group_3"> <view class="section_4"></view> <text class="font_1 text_6">快捷登录</text> <view class="section_4 view"></view> </view> <view class="cp-flex-row cp-justify-between cp-self-center equal-division"> <image class="equal-division-item" src="../../static/login/ff05399c7d6e9e083474a6bec24440d2.png" /> <image class="equal-division-item" src="../../static/login/513984f2eeec8266766b5d1bedf4386f.png" /> <image class="equal-division-item" src="../../static/login/32d84522d79c35d58299896595991b54.png" /> </view> --> </view> </template> <script> import mixin from "@/mixin/checkLoaded"; export default { mixins: [mixin], data() { return { show:true, timer:null, count:'', mobile:'', code:'', password:'', passwordd:'', parent_id:'', key:'', config:{}, isMpBind:false } }, onLoad(op) { if(op.share_id){ this.parent_id = op.share_id } // #ifdef MP if(op.bindMob){ this.isMpBind = true } // #endif this.config = this.$store.state.config }, methods: { getValidate(){ if(!(/^1(3|4|5|7|8)\d{9}$/.test(this.mobile))){ uni.showToast({ title:"请输入正确的手机号码", icon:"none" }) return } const TIME_COUNT = 60; if (!this.timer) { this.count = TIME_COUNT; this.show = false; //此处写提交获取验证码的请求 this.$request("/api/Member/sendSms","POST",{mobile:this.mobile}).then(res=>{ if(res.status == 200){ uni.showToast({ title:res.msg, icon:"none" }) this.timer = setInterval(() => { if (this.count > 0 && this.count <= TIME_COUNT) { this.count--; } else { this.show = true; clearInterval(this.timer); this.timer = null; } }, 1000) uni.setStorageSync('key',res.key) uni.setStorageSync('keyTime',new Date().getTime()) this.key = res.key }else{ uni.showToast({ title:res.msg, icon:"none" }) uni.removeStorageSync('key') uni.removeStorageSync('keyTime') } }).catch(err=>{ this.$failToast() }) } }, navtologin() { uni.navigateBack({ delta:1 }) }, submit(){ if(!(this.mobile && this.password)){ this.$failToast("请输入手机号和密码") return } if(this.password != this.passwordd){ this.$failToast("密码不一致,请重新输入") return } if (this.config.is_h5_sms == 1) { if(!this.code){ this.$failToast("请输入验证码") return } if(!this.key){ this.$failToast("请获取验证码") return } } let m_id = '' if(this.$store.state.userInfo.member_id){ m_id = this.$store.state.userInfo.member_id } this.$request("/api/Member/add","POST",{ key:this.key, code:this.code, mobile:this.mobile, passwd:this.password, }).then(res=>{ uni.showModal({ title:'提示', content:res.msg }) if(res.status == 800){ setTimeout(function() { uni.reLaunch({ url: "/pages/login/newlogin" }) }, 500); } }).catch(err=>{ this.$failToast() }) }, click1(){ uni.navigateTo({ url:"../content/content?content_id=1" }) }, click2(){ uni.navigateTo({ url:"../content/content?content_id=2" }) } } } </script> <style scoped lang="css"> html { font-size: 16px; } body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } view, image, text { box-sizing: border-box; flex-shrink: 0; } #app { width: 100vw; height: 100vh; } .cp-flex-row { display: flex; flex-direction: row; } .cp-flex-col { display: flex; flex-direction: column; } .cp-justify-start { justify-content: flex-start; } .cp-justify-end { justify-content: flex-end; } .cp-justify-center { justify-content: center; } .cp-justify-between { justify-content: space-between; } .cp-justify-around { justify-content: space-around; } .cp-justify-evenly { justify-content: space-evenly; } .cp-items-start { align-items: flex-start; } .cp-items-end { align-items: flex-end; } .cp-items-center { align-items: center; } .cp-items-baseline { align-items: baseline; } .cp-items-stretch { align-items: stretch; } .cp-self-start { align-self: flex-start; } .cp-self-end { align-self: flex-end; } .cp-self-center { align-self: center; } .cp-self-baseline { align-self: baseline; } .cp-self-stretch { align-self: stretch; } .cp-flex-1 { flex: 1 1 0%; } .cp-flex-auto { flex: 1 1 auto; } .cp-grow { flex-grow: 1; } .cp-grow-0 { flex-grow: 0; } .cp-shrink { flex-shrink: 1; } .cp-shrink-0 { flex-shrink: 0; } .cp-relative { position: relative; } .page { padding: 0rpx 34rpx 218rpx; background-image: linear-gradient(66deg, #6186fe 0%, #a23aff 100%); width: 100%; overflow-y: auto; overflow-x: hidden; height: 100vh; } .group { padding-top: 650rpx; } .text-wrapper { padding: 327rpx 0 21rpx; background-color: #ffffff75; border-radius: 30rpx; width: 473rpx; } .font_1 { font-size: 30rpx; font-family: HiraginoSansGB; line-height: 28rpx; color: #ffffff; } .section { padding: 118rpx 40rpx 38rpx; background-color: #ffffff; border-radius: 20rpx; width: 536rpx; } .space-y-56>view:not(:first-child), .space-y-56>text:not(:first-child), .space-y-56>image:not(:first-child) { margin-top: 56rpx; } .pos_2 { position: absolute; left: 50%; top: 280rpx; transform: translateX(-50%); } .text { color: #333333; line-height: 29rpx; } .space-y-31>view:not(:first-child), .space-y-31>text:not(:first-child), .space-y-31>image:not(:first-child) { margin-top: 31rpx; } .space-y-27>view:not(:first-child), .space-y-27>text:not(:first-child), .space-y-27>image:not(:first-child) { margin-top: 27rpx; } .section_2 { padding: 14rpx 22rpx 10rpx; border-radius: 30rpx; background-image: url('../../static/login/02fdccc95ea34e937ec1edcee2d69b21.png'); background-size: 100% 100%; background-repeat: no-repeat; } .space-x-19>view:not(:first-child), .space-x-19>text:not(:first-child), .space-x-19>image:not(:first-child) { margin-left: 19rpx; } .image_2 { width: 38rpx; height: 45rpx; } .font_2 { font-size: 24rpx; font-family: HiraginoSansGB; color: #666666; } .text_2 { margin-right: 222rpx; line-height: 25rpx; } .section_3 { padding: 11rpx 22rpx 6rpx; border-radius: 30rpx; background-image: url('../../static/login/02fdccc95ea34e937ec1edcee2d69b21.png'); background-size: 100% 100%; background-repeat: no-repeat; } .space-x-17>view:not(:first-child), .space-x-17>text:not(:first-child), .space-x-17>image:not(:first-child) { margin-left: 17rpx; } .image_3 { width: 41rpx; height: 52rpx; } .text_3 { line-height: 23rpx; } .image_4 { width: 26rpx; height: 15rpx; } .group_2 { padding: 0 11rpx; } .space-y-32>view:not(:first-child), .space-y-32>text:not(:first-child), .space-y-32>image:not(:first-child) { margin-top: 32rpx; } .text_4 { color: #666666; font-size: 20rpx; font-family: HiraginoSansGB; line-height: 22rpx; text-decoration: underline; } .button { padding: 16rpx 0; background-image: linear-gradient(212deg, #6384fe 0%, #a13bff 100%); border-radius: 30rpx; width: 434rpx; } .text_5 { color: #ffffff; font-size: 36rpx; font-family: HiraginoSansGB; line-height: 33rpx; } .image-wrapper { padding: 58rpx 0 63rpx; background-image: url('../../static/login/0316f830b076fd836291cfb192b3ef65.png'); background-size: 100% 100%; background-repeat: no-repeat; width: 199rpx; } .pos { position: absolute; left: 50%; top: 180rpx; transform: translateX(-50%); } .image { width: 147rpx; height: 78rpx; } .group_3 { margin-top: 93rpx; } .section_4 { opacity: 0.5; width: 217rpx; height: 1rpx; border: solid 1rpx #ffffff; } .text_6 { margin-left: 20rpx; } .view { margin-left: 15rpx; } .equal-division { margin-top: 73rpx; width: 421rpx; } .equal-division-item { margin: 2rpx 0; width: 70.5rpx; height: 63rpx; } </style> pages/mine/mine.vue
@@ -205,7 +205,7 @@ }, onShareAppMessage() { return { title: '快来和胖大海聊天呀', title: '快来和ChatFox聊天呀', path: '/pages/index/home?share_m_id=' + this.userInfo.member_id, imageUrl: 'https://s1.ax1x.com/2023/03/19/ppYVZRK.jpg' } @@ -221,6 +221,12 @@ } }, toVip() { if (!this.userInfo.token) { uni.navigateTo({ url: "/pages/login/newlogin" }) return } uni.navigateTo({ url:"/pages/vip/vip" }) @@ -290,6 +296,12 @@ // #endif }, rede() { if (!this.userInfo.token) { uni.navigateTo({ url: "/pages/login/newlogin" }) return } this.$refs.popup.open() }, dialogInputConfirm(val) { pages/vip/vip.vue
@@ -63,18 +63,7 @@ </view> <!-- <text class="tip">专属AI 1秒响应</text> <view class="main-title"> <text>会员特权</text> </view> <view class="privilege"> <view class="privilege-item" v-for="(item, index) in privilegeList" :key="index" hover-class="hover" @click="privilegeClick(index)"> <image class="privilege-item-pic" :src="item.pic" mode=""></image> <text class="privilege-item-text">{{ item.text }}</text> </view> </view> --> </view> </template> @@ -118,7 +107,9 @@ ...mapState(['userInfo','num']) }, onLoad() { // 判断当前页面路径,在#前加?避免支付时的路径错误,会报当前页面URL未注册 let url = window.location.href; if(!url.match(/\?/)) { location.replace(window.location.href.split('#')[0] + '?' + window.location.hash); } // 加载套餐列表数据 this.$request('/api/Comb/index').then(res => { console.log(res) this.rechargeOptions = res.data.data @@ -196,7 +187,6 @@ }) } // #endif console.log('pay end') }) }, privilegeClick(index) { static/login/02fdccc95ea34e937ec1edcee2d69b21.png
static/login/0316f830b076fd836291cfb192b3ef65.png
static/login/32d84522d79c35d58299896595991b54.png
static/login/513984f2eeec8266766b5d1bedf4386f.png
static/login/532d85c2bb2b38c49a37446e1b76def1.png
static/login/acde9f55d278d771fe4bb0c73271082f.png
static/login/b17f7f0690876b2c1c9f62a06ee82d02.png
static/login/e5ce8f238eb87138bad6ec59ea16a7af.png
static/login/ff05399c7d6e9e083474a6bec24440d2.png
static/login/smscode.png