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