gyhup
This commit is contained in:
parent
f21df2f107
commit
8bb1cdfd39
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
/node_modules/*
|
||||
unpackage
|
||||
manifest.json
|
||||
deming.keystore
|
@ -1,5 +1,9 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import {
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
@ -12,6 +16,8 @@ const store = new Vuex.Store({
|
||||
pintuangroup_headid: '', // 拼团团长id 有为开团 无为参团
|
||||
groupbuyInfo: {}, // 秒杀详情
|
||||
loadmore: {}, // 下拉加载返回的数据
|
||||
hasLogin: false, // 登录状态
|
||||
token: "" // 储存token
|
||||
},
|
||||
getters: {
|
||||
getOrderAddress(state) {
|
||||
@ -25,6 +31,23 @@ const store = new Vuex.Store({
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
// 登录
|
||||
loginIn(state, token) {
|
||||
state.hasLogin = true;
|
||||
state.token = token;
|
||||
uni.setStorage({
|
||||
key: "token",
|
||||
data: token
|
||||
})
|
||||
},
|
||||
// 退出登录
|
||||
logout(state) {
|
||||
state.hasLogin = false;
|
||||
state.token = "";
|
||||
uni.removeStorage({
|
||||
key: "token"
|
||||
})
|
||||
},
|
||||
setOrderType(state, type) {
|
||||
state.orderType = type;
|
||||
},
|
||||
@ -48,7 +71,7 @@ const store = new Vuex.Store({
|
||||
},
|
||||
setLoadMore(state, info) {
|
||||
state.loadmore = info;
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
export default store;
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "deming",
|
||||
"appid" : "__UNI__62A680B",
|
||||
"appid" : "__UNI__EBFF00A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
@ -18,7 +18,12 @@
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"OAuth" : {}
|
||||
"OAuth" : {},
|
||||
"Share" : {},
|
||||
"Push" : {},
|
||||
"Maps" : {},
|
||||
"LivePusher" : {},
|
||||
"Payment" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
@ -37,6 +42,7 @@
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
@ -46,6 +52,7 @@
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
@ -58,7 +65,14 @@
|
||||
"qq" : {
|
||||
"appid" : "101884160"
|
||||
}
|
||||
},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "eafe430aa31fa033dcf45a0e87032653",
|
||||
"appkey_android" : "8045e8a4cd6d544690c786265b248f91"
|
||||
}
|
||||
},
|
||||
"share" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8,11 +8,11 @@
|
||||
<view class="title">手机登录</view>
|
||||
<view class="labales">
|
||||
<!-- <text></text> -->
|
||||
<input type="tel" placeholder="请输入您的手机号" v-model="member_mobile" />
|
||||
<input type="tel" placeholder="请输入您的手机号" maxlength="11" v-model="member_mobile" />
|
||||
</view>
|
||||
<view class="labales">
|
||||
<!-- <text></text> -->
|
||||
<input type="tel" placeholder="请输入验证码" v-model="sms_code" />
|
||||
<input type="number" placeholder="请输入验证码" maxlength="6" v-model="sms_code" />
|
||||
<!-- <text class="identifying" @click="getCode">{{text}}</text> -->
|
||||
<identifying @tochange="tochange" :smslog_type="smslog_type" :member_mobile="member_mobile"></identifying>
|
||||
</view>
|
||||
@ -22,7 +22,8 @@
|
||||
<view>
|
||||
<view></view>
|
||||
<text>我已详细阅读并同意</text>
|
||||
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}} </text>
|
||||
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}}
|
||||
</text>
|
||||
</view>
|
||||
<u-checkbox-group @change="checkboxGroupChange" size="27">
|
||||
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
|
||||
@ -60,6 +61,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import identifying from '@/components/logininput/identifying'
|
||||
import { mapMutations } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -96,9 +98,10 @@
|
||||
},
|
||||
onLoad() {
|
||||
// 数据的请求
|
||||
this.apiwelcome()
|
||||
this.apiwelcome();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['loginIn']),
|
||||
apiwelcome() {
|
||||
this.$u.api.sendSmsCode({
|
||||
|
||||
@ -107,7 +110,7 @@
|
||||
})
|
||||
},
|
||||
// 协议跳转
|
||||
pact_click(index){
|
||||
pact_click(index) {
|
||||
console.log(index)
|
||||
uni.navigateTo({
|
||||
url: '/pageA/pactList/pactList?index=' + index
|
||||
@ -115,6 +118,7 @@
|
||||
},
|
||||
// 用户登录
|
||||
loginOn() {
|
||||
let me = this;
|
||||
// uni.navigateTo({
|
||||
// url: '/pageE/zhibo/index'
|
||||
// });
|
||||
@ -123,8 +127,8 @@
|
||||
// console.log(this.sms_code)
|
||||
// 判断手机号是否为空
|
||||
// 校验手机号
|
||||
let type_phone = this.$u.test.mobile( this.member_mobile)
|
||||
if( this.member_mobile == ''){
|
||||
let type_phone = this.$u.test.mobile(this.member_mobile)
|
||||
if (this.member_mobile == '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '手机号不能为空',
|
||||
type: 'error'
|
||||
@ -138,7 +142,7 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if( this.sms_code == ''){
|
||||
if (this.sms_code == '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '验证码不能为空',
|
||||
type: 'error'
|
||||
@ -152,16 +156,16 @@
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
if (res.errCode == 0) {
|
||||
if(res.data == ''){
|
||||
if (res.data == '') {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}else{
|
||||
uni.setStorageSync('token', res.data.token);//存储一个字符传值
|
||||
} else {
|
||||
me.loginIn(res.data.token); //存储一个字符传值
|
||||
uni.navigateTo({
|
||||
url : '/pageA/topick/topick'
|
||||
url: '/pageA/topick/topick'
|
||||
})
|
||||
// 缓存用户的信息
|
||||
// uni.setStorageSync({
|
||||
@ -178,7 +182,7 @@
|
||||
}
|
||||
|
||||
// 存储接口请求所需token
|
||||
uni.setStorageSync('token', res.data.token);//存储一个字符传值
|
||||
me.loginIn(res.data.token); //存储一个字符传值
|
||||
// // 注册返回参数
|
||||
// this.$refs.uToast.show({
|
||||
// title: res.message,
|
||||
@ -196,7 +200,7 @@
|
||||
},
|
||||
// qq授权登录
|
||||
rect_qq() {
|
||||
console.log("授权Q")
|
||||
console.log("授权QQ")
|
||||
var vm = this;
|
||||
uni.getProvider({
|
||||
service: 'oauth',
|
||||
@ -296,10 +300,12 @@
|
||||
width: 630rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.u-checkbox__icon-wrap .u-icon{
|
||||
width: 26rpx!important;
|
||||
|
||||
.u-checkbox__icon-wrap .u-icon {
|
||||
width: 26rpx !important;
|
||||
height: 26rpx;
|
||||
}
|
||||
|
||||
.more_Login text {
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
@ -397,7 +403,7 @@
|
||||
height: 22rpx;
|
||||
}
|
||||
|
||||
.buttones > view {
|
||||
.buttones>view {
|
||||
width: 628rpx;
|
||||
height: 98rpx;
|
||||
background: rgba(255, 120, 15, 1) !important;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="photo">
|
||||
<view class="back">
|
||||
<image></image>
|
||||
<u-icon name="close" color="#999999" :size="30"></u-icon>
|
||||
</view>
|
||||
<swiper class="swiper">
|
||||
<swiper-item>
|
||||
@ -34,11 +34,7 @@
|
||||
.back{
|
||||
padding-top: 28rpx;
|
||||
padding-right: 31rpx;
|
||||
>image{
|
||||
width: 31rpx;
|
||||
height: 31rpx;
|
||||
float: right;
|
||||
}
|
||||
text-align: right;
|
||||
}
|
||||
.swiper{
|
||||
width: 100%;
|
||||
|
@ -14,17 +14,15 @@
|
||||
<view>退出登录</view>
|
||||
<image src="../static/mine/21.png"></image>
|
||||
</view>
|
||||
<u-action-sheet
|
||||
v-model="sheetStatus"
|
||||
:list="list"
|
||||
:tips="tips"
|
||||
:border-radius="20"
|
||||
@click="choiceOption">
|
||||
<u-action-sheet v-model="sheetStatus" :list="list" :tips="tips" :border-radius="20" @click="choiceOption">
|
||||
</u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
import {
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked: false,
|
||||
@ -34,8 +32,7 @@ export default {
|
||||
fontSize: 24
|
||||
},
|
||||
sheetStatus: false,
|
||||
list: [
|
||||
{
|
||||
list: [{
|
||||
text: '换个账号登录',
|
||||
color: '#FF780F',
|
||||
fontSize: 28
|
||||
@ -46,8 +43,7 @@ export default {
|
||||
fontSize: 28
|
||||
}
|
||||
],
|
||||
settingList: [
|
||||
{
|
||||
settingList: [{
|
||||
title: '个人信息',
|
||||
link: '../mine/MineInfo'
|
||||
},
|
||||
@ -75,10 +71,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['logout']),
|
||||
// 退出登录选择 0:切换账号 | 1:退出登录
|
||||
choiceOption(index) {
|
||||
console.log(index);
|
||||
|
||||
// console.log(`点击了第${index + 1}项,内容为:${this.list[index].text}`)
|
||||
if (index == 1) {
|
||||
this.logout();
|
||||
}
|
||||
},
|
||||
toNextPage(url, ...params) {
|
||||
uni.navigateTo({
|
||||
@ -86,12 +85,13 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.setting {
|
||||
.setting {
|
||||
min-height: calc(100vh - var(--window-top));
|
||||
background-color: #ECECEC;
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -101,11 +101,12 @@ export default {
|
||||
background-color: #ffffff;
|
||||
padding: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
> image {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
|
||||
>image {
|
||||
width: 14rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user