From 2a68448ad6dbd3a5393e5aad73d7cda8043afd3b Mon Sep 17 00:00:00 2001
From: cshenfu <men883234@gmail.com>
Date: 星期四, 01 六月 2023 10:35:33 +0800
Subject: [PATCH] mix new
---
pages/mine/mine.vue | 14
static/login/smscode.png | 0
pages/index/write.vue | 6
pages.json | 17
pages/index/home.vue | 6
static/login/513984f2eeec8266766b5d1bedf4386f.png | 0
pages/login/reg.vue | 534 +++++++++++++++++++++++
pages/index/question.vue | 6
pages/vip/vip.vue | 16
static/login/e5ce8f238eb87138bad6ec59ea16a7af.png | 0
static/login/02fdccc95ea34e937ec1edcee2d69b21.png | 0
static/login/ff05399c7d6e9e083474a6bec24440d2.png | 0
pages/login/newlogin.vue | 758 ++++++++++++++++++++++++++++++++
static/login/0316f830b076fd836291cfb192b3ef65.png | 0
static/login/acde9f55d278d771fe4bb0c73271082f.png | 0
static/login/b17f7f0690876b2c1c9f62a06ee82d02.png | 0
static/login/32d84522d79c35d58299896595991b54.png | 0
static/login/532d85c2bb2b38c49a37446e1b76def1.png | 0
18 files changed, 1,342 insertions(+), 15 deletions(-)
diff --git a/pages.json b/pages.json
index c1ea35c..cf2537f 100755
--- a/pages.json
+++ b/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" :
{
diff --git a/pages/index/home.vue b/pages/index/home.vue
index cc10ff1..55ab615 100755
--- a/pages/index/home.vue
+++ b/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)
})
diff --git a/pages/index/question.vue b/pages/index/question.vue
index 8fe52c3..c68e7af 100755
--- a/pages/index/question.vue
+++ b/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;
diff --git a/pages/index/write.vue b/pages/index/write.vue
index 718f880..86d5ad0 100755
--- a/pages/index/write.vue
+++ b/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;
diff --git a/pages/login/newlogin.vue b/pages/login/newlogin.vue
new file mode 100644
index 0000000..62692f1
--- /dev/null
+++ b/pages/login/newlogin.vue
@@ -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>
diff --git a/pages/login/reg.vue b/pages/login/reg.vue
new file mode 100644
index 0000000..0ef7f60
--- /dev/null
+++ b/pages/login/reg.vue
@@ -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>
diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue
index c2e2993..7ec7338 100755
--- a/pages/mine/mine.vue
+++ b/pages/mine/mine.vue
@@ -205,7 +205,7 @@
},
onShareAppMessage() {
return {
- title: '蹇潵鍜岃儢澶ф捣鑱婂ぉ鍛�',
+ title: '蹇潵鍜孋hatFox鑱婂ぉ鍛�',
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) {
diff --git a/pages/vip/vip.vue b/pages/vip/vip.vue
index 5312b25..c6b2bb1 100755
--- a/pages/vip/vip.vue
+++ b/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) {
diff --git a/static/login/02fdccc95ea34e937ec1edcee2d69b21.png b/static/login/02fdccc95ea34e937ec1edcee2d69b21.png
new file mode 100755
index 0000000..a9691f7
--- /dev/null
+++ b/static/login/02fdccc95ea34e937ec1edcee2d69b21.png
Binary files differ
diff --git a/static/login/0316f830b076fd836291cfb192b3ef65.png b/static/login/0316f830b076fd836291cfb192b3ef65.png
new file mode 100755
index 0000000..9da28bb
--- /dev/null
+++ b/static/login/0316f830b076fd836291cfb192b3ef65.png
Binary files differ
diff --git a/static/login/32d84522d79c35d58299896595991b54.png b/static/login/32d84522d79c35d58299896595991b54.png
new file mode 100755
index 0000000..bc2c4d6
--- /dev/null
+++ b/static/login/32d84522d79c35d58299896595991b54.png
Binary files differ
diff --git a/static/login/513984f2eeec8266766b5d1bedf4386f.png b/static/login/513984f2eeec8266766b5d1bedf4386f.png
new file mode 100755
index 0000000..c2ab02b
--- /dev/null
+++ b/static/login/513984f2eeec8266766b5d1bedf4386f.png
Binary files differ
diff --git a/static/login/532d85c2bb2b38c49a37446e1b76def1.png b/static/login/532d85c2bb2b38c49a37446e1b76def1.png
new file mode 100755
index 0000000..e43e485
--- /dev/null
+++ b/static/login/532d85c2bb2b38c49a37446e1b76def1.png
Binary files differ
diff --git a/static/login/acde9f55d278d771fe4bb0c73271082f.png b/static/login/acde9f55d278d771fe4bb0c73271082f.png
new file mode 100755
index 0000000..48d5992
--- /dev/null
+++ b/static/login/acde9f55d278d771fe4bb0c73271082f.png
Binary files differ
diff --git a/static/login/b17f7f0690876b2c1c9f62a06ee82d02.png b/static/login/b17f7f0690876b2c1c9f62a06ee82d02.png
new file mode 100755
index 0000000..91756ed
--- /dev/null
+++ b/static/login/b17f7f0690876b2c1c9f62a06ee82d02.png
Binary files differ
diff --git a/static/login/e5ce8f238eb87138bad6ec59ea16a7af.png b/static/login/e5ce8f238eb87138bad6ec59ea16a7af.png
new file mode 100755
index 0000000..bd9b034
--- /dev/null
+++ b/static/login/e5ce8f238eb87138bad6ec59ea16a7af.png
Binary files differ
diff --git a/static/login/ff05399c7d6e9e083474a6bec24440d2.png b/static/login/ff05399c7d6e9e083474a6bec24440d2.png
new file mode 100755
index 0000000..2a03add
--- /dev/null
+++ b/static/login/ff05399c7d6e9e083474a6bec24440d2.png
Binary files differ
diff --git a/static/login/smscode.png b/static/login/smscode.png
new file mode 100755
index 0000000..7d65634
--- /dev/null
+++ b/static/login/smscode.png
Binary files differ
--
Gitblit v1.9.1