定位
1
App.vue
@@ -6,6 +6,7 @@
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
this.initApp()
|
||||
this.$store.dispatch('CheckIds', false)
|
||||
},
|
||||
methods: {
|
||||
// 初始化应用
|
||||
|
||||
40
api/api.js
@@ -1,28 +1,24 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取登录授权login
|
||||
*
|
||||
*/
|
||||
export function getLogo()
|
||||
{
|
||||
return request.get('wechat/getLogo', {}, { noAuth : true});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 首页接口,公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* 首页 获取底部导航信息
|
||||
*
|
||||
*/
|
||||
export function getBottomNavigationApi()
|
||||
{
|
||||
return request.get("index/get/bottom/navigation",{},{ noAuth : true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页 第一级商品分类
|
||||
*
|
||||
@@ -70,14 +66,6 @@ export function getIndexData()
|
||||
return request.get("index/info",{},{ noAuth : true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录授权login
|
||||
*
|
||||
*/
|
||||
export function getLogo()
|
||||
{
|
||||
return request.get('wechat/getLogo', {}, { noAuth : true});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
12
api/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 获取门店列表
|
||||
*
|
||||
*/
|
||||
export function getStoreList(params)
|
||||
{
|
||||
return request.get('repair/merchant/search/list', params, { noAuth : true});
|
||||
}
|
||||
|
||||
|
||||
10
api/user.js
@@ -2,10 +2,10 @@
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
/**
|
||||
* 绑定推广关系
|
||||
* @param {Object} spreadPid
|
||||
*/
|
||||
export function spread(spreadPid)
|
||||
* 获取用户信息
|
||||
*
|
||||
*/
|
||||
export function getStoreList(params)
|
||||
{
|
||||
return request.post(`retail/store/binding/user/${spreadPid}`);
|
||||
return request.get('user/info', params, { noAuth : true});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//移动端商城API
|
||||
// let domain = 'https://api.app.jimeite.cn/jmt_app_api' //负载均衡
|
||||
let domain = 'https://mall.lianxianke.cn/car_app_api' //老地址
|
||||
// let domain = 'http://192.168.31.15:8081/car_app_api' //老地址
|
||||
module.exports = {
|
||||
// 请求域名 格式: https://您的域名
|
||||
HTTP_H5_URL: 'https://app.jimeite.cn/shop_h5',
|
||||
|
||||
1472
data/address_a.js
Normal file
1122
js_sdk/qqmap-wx-jssdk/qqmap-wx-jssdk.js
Normal file
1
js_sdk/qqmap-wx-jssdk/qqmap-wx-jssdk.min.js
vendored
Normal file
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name" : "连线客APP模版",
|
||||
"name" : "汽车系统",
|
||||
"appid" : "__UNI__7220EB0",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.0",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
@@ -56,7 +56,16 @@
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
},
|
||||
"usingComponents" : true
|
||||
"usingComponents" : true,
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "你的位置信息将用于寻找距您最近的门店"
|
||||
},
|
||||
"scope.userFuzzyLocation" : {
|
||||
"desc" : "你的位置信息将用于寻找距您最近的门店"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ]
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"h5" : {
|
||||
|
||||
13
package.json
@@ -17,9 +17,10 @@
|
||||
"通用组件"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.27.2",
|
||||
"base-64": "^1.0.0",
|
||||
"image-tools": "^1.4.0"
|
||||
}
|
||||
}
|
||||
"dependencies": {
|
||||
"axios": "^0.27.2",
|
||||
"base-64": "^1.0.0",
|
||||
"element-china-area-data": "^6.1.0",
|
||||
"image-tools": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
62
pages.json
@@ -4,12 +4,7 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "维修",
|
||||
"enablePullDownRefresh": false
|
||||
// "navigationStyle": "custom"
|
||||
}
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "若依移动端框架",
|
||||
// "navigationStyle": "custom"
|
||||
// }
|
||||
}, {
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
@@ -21,6 +16,39 @@
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/user/realName/realName",
|
||||
"style": {
|
||||
"navigationBarTitleText" : "完善资料",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/repair",
|
||||
"style": {
|
||||
"navigationBarTitleText" : "常规保养",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/repairDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText" : "维修预约",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/selectCity",
|
||||
"style":{
|
||||
"navigationBarTitleText" : "搜索城市",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
"path": "pages/mine/avatar/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改头像"
|
||||
@@ -94,14 +122,6 @@
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/user/user_authentication/user_authentication",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "完善资料",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/user/user_bindingResult/user_bindingResult",
|
||||
"style" :
|
||||
@@ -110,22 +130,6 @@
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/home/home_store/home_store",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "常规保养",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/home/home_maintenanceAppointment/home_maintenanceAppointment",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "维修预约",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/home/home_MA_result/home_MA_result",
|
||||
"style" :
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="con_imgView">
|
||||
<image class="img" src="@/static/home/imgCar.png"></image>
|
||||
</view>
|
||||
<view class="positionView">
|
||||
<view class="posTop">
|
||||
<view class="posLeft">
|
||||
<!-- <image class="leftImg" src="@/static/home/position.png" mode=""></image> -->
|
||||
<u-icon name="map-fill" color="#3D3D3D" size="14"></u-icon>
|
||||
<text class="leftTxt">选择门店</text>
|
||||
</view>
|
||||
<view class="posRight">
|
||||
<text class="rightTxt">杭州</text>
|
||||
<u-icon name="arrow-right" color="#999999" size="10"></u-icon>
|
||||
<!-- <image class="rightImg" src="@/static/home/Ricon.png" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="posFoot">
|
||||
<view class="footView" @click="toMaintenanceAppointmentPage">
|
||||
<view class="footLeft">
|
||||
<image class="footLeft_img" src="@/static/home/footLeft.png"></image>
|
||||
</view>
|
||||
<view class="footRight">
|
||||
<view class="FR_up"> 星桔EV(祥园路店) </view>
|
||||
<view class="FR_centre">
|
||||
<text>2.5km </text> <text class="suxian">|</text> <text> 杭州市余杭区莫干山路1665号 </text>
|
||||
</view>
|
||||
<view class="FR_down">
|
||||
<view class="down_L">
|
||||
<text>评分:</text> <text class="redTxt"> 5.0 </text>
|
||||
</view>
|
||||
<view class="down_R">
|
||||
<view class="down_R_icon">
|
||||
<u-icon name="phone" color="#fff" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="down_R_icon">
|
||||
<u-icon name="arrow-up-fill" color="#fff" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footView">
|
||||
<view class="footLeft">
|
||||
<image class="footLeft_img" src="@/static/home/footLeft.png"></image>
|
||||
</view>
|
||||
<view class="footRight">
|
||||
<view class="FR_up"> 星桔EV(祥园路店) </view>
|
||||
<view class="FR_centre">
|
||||
<text>2.5km </text> <text class="suxian">|</text> <text> 杭州市余杭区莫干山路1665号 </text>
|
||||
</view>
|
||||
<view class="FR_down">
|
||||
<view class="down_L">
|
||||
<text>评分:</text> <text class="redTxt"> 5.0 </text>
|
||||
</view>
|
||||
<view class="down_R">
|
||||
<view class="down_R_icon">
|
||||
<u-icon name="phone" color="#fff" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="down_R_icon">
|
||||
<u-icon name="arrow-up-fill" color="#fff" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footView">
|
||||
<view class="footLeft">
|
||||
<image class="footLeft_img" src="@/static/home/footLeft.png"></image>
|
||||
</view>
|
||||
<view class="footRight">
|
||||
<view class="FR_up"> 星桔EV(祥园路店) </view>
|
||||
<view class="FR_centre">
|
||||
<text>2.5km </text> <text class="suxian">|</text> <text> 杭州市余杭区莫干山路1665号 </text>
|
||||
</view>
|
||||
<view class="FR_down">
|
||||
<view class="down_L">
|
||||
<text>评分:</text> <text class="redTxt"> 5.0 </text>
|
||||
</view>
|
||||
<view class="down_R">
|
||||
<view class="down_R_icon">
|
||||
<u-icon name="phone" color="#fff" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="down_R_icon">
|
||||
<u-icon name="arrow-up-fill" color="#fff" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toMaintenanceAppointmentPage() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/home_maintenanceAppointment/home_maintenanceAppointment'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
.con_imgView {
|
||||
padding: 16rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.img {
|
||||
width: 686rpx;
|
||||
height: 370rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.positionView {
|
||||
padding: 0 24rpx 24rpx 24rpx;
|
||||
|
||||
.posTop {
|
||||
// border: 1px solid;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 22rpx;
|
||||
|
||||
.posLeft {
|
||||
display: flex;
|
||||
|
||||
.leftImg {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.leftTxt {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #444444;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.posRight {
|
||||
display: flex;
|
||||
|
||||
.rightImg {
|
||||
width: 10rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.rightTxt {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #444444;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.posFoot {
|
||||
|
||||
// border: 1px solid red;
|
||||
.footView {
|
||||
// border: 1px solid blue;
|
||||
padding: 32rpx 24rpx;
|
||||
display: flex;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.footLeft {
|
||||
margin-right: 16rpx;
|
||||
|
||||
.footLeft_img {
|
||||
width: 168rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.footRight {
|
||||
.FR_up {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.FR_centre {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #111111;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.suxian {
|
||||
font-size: 20rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #AAAAAA;
|
||||
margin: 0 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.FR_down {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.down_L {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #111111;
|
||||
|
||||
.redTxt {
|
||||
font-size: 40rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 500;
|
||||
color: #F20808;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.down_R {
|
||||
display: flex;
|
||||
|
||||
.down_R_icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
background-color: #13AFA8;
|
||||
border-radius: 50%;
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="con_imgView">
|
||||
<u-swiper :list="list" :circular="true"></u-swiper>
|
||||
<u-swiper height="370rpx" :list="list" :circular="true" imgMode="widthFix"></u-swiper>
|
||||
</view>
|
||||
<view class="con_type">
|
||||
<view class="title">
|
||||
@@ -10,19 +10,19 @@
|
||||
<view class="typeView">
|
||||
<view class="typeView_one" @click="toHomeStore">
|
||||
<text class="typeTxt">常规保养</text>
|
||||
<image class="type_img" src="@/static/home/baoyang.png"></image>
|
||||
<image class="type_img" src="@/static/images/images/booking_management.png"></image>
|
||||
</view>
|
||||
<view class="typeView_one">
|
||||
<text class="typeTxt">故障维修</text>
|
||||
<image class="type_img" src="@/static/home/baoyang.png"></image>
|
||||
<image class="type_img" src="@/static/images/images/troubleshooting.png"></image>
|
||||
</view>
|
||||
<view class="typeView_one">
|
||||
<text class="typeTxt">事故维修</text>
|
||||
<image class="type_img" src="@/static/home/baoyang.png"></image>
|
||||
<image class="type_img" src="@/static/images/images/maintenance_reception.png"></image>
|
||||
</view>
|
||||
<view class="typeView_one">
|
||||
<text class="typeTxt">退车</text>
|
||||
<image class="type_img" src="@/static/home/baoyang.png"></image>
|
||||
<image class="type_img" src="@/static/images/images/cart_reception.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footTxt">
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
methods: {
|
||||
toHomeStore() {
|
||||
uni.navigateTo({ url: '/pages/home/home_store/home_store' })
|
||||
uni.navigateTo({ url: '/pages/repair/repair' })
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,11 +57,8 @@
|
||||
|
||||
.con_imgView {
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.img {
|
||||
width: 686rpx;
|
||||
height: 370rpx;
|
||||
}
|
||||
width: 686rpx;
|
||||
height: 370rpx;
|
||||
}
|
||||
|
||||
.con_type {
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
openType="getPhoneNumber"
|
||||
@getphonenumber="getphonenumber"
|
||||
text="微信登录"/> -->
|
||||
<<<<<<< HEAD
|
||||
<u-button type="success" text="登录"
|
||||
@click="$tab.navigateTo('/pages/user/user_authentication/user_authentication')"></u-button>
|
||||
<!-- <u-button type="success" text="登录" @click="$tab.navigateTo('/pages/user/user_authentication/user_authentication')"></u-button> -->
|
||||
</view>
|
||||
<u-popup :show="show" :round="10" mode="bottom">
|
||||
<view class="outsideView">
|
||||
@@ -34,27 +32,41 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footView">
|
||||
<view class="btnTop" shape="circle" @click="toHomePage">不同意,仅浏览</view>
|
||||
<view class="btnFoot" shape="circle" @click="show=false">同意</view>
|
||||
<view class="footView flex align-center justify-between">
|
||||
<u-button
|
||||
plain
|
||||
class="btn"
|
||||
color="#222"
|
||||
shape="circle"
|
||||
:customStyle="customStyle"
|
||||
text="不同意,仅浏览"
|
||||
@click="toHomePage"/>
|
||||
<view style="width: 24rpx;" />
|
||||
<u-button
|
||||
class="btn"
|
||||
shape="circle"
|
||||
color="#13AFA8"
|
||||
:loading="loading"
|
||||
throttleTime="1000"
|
||||
:customStyle="customStyle"
|
||||
openType="getPhoneNumber"
|
||||
@getphonenumber="getphonenumber"
|
||||
text="同意"/>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
const app = getApp()
|
||||
import {
|
||||
loginPhone,
|
||||
getUserPhone
|
||||
} from '@/api/public'
|
||||
import { loginPhone, getUserPhone } from '@/api/public'
|
||||
import { spread } from '@/api/user'
|
||||
export default {
|
||||
name: 'user_login',
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
// -------------------
|
||||
isAgree: false,
|
||||
logo: '',
|
||||
Wxform: {
|
||||
@@ -66,9 +78,12 @@
|
||||
},
|
||||
startCode: false,
|
||||
loading: false,
|
||||
customStyle: {
|
||||
width: '325rpx',
|
||||
height: '88rpx'
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
toHomePage() {
|
||||
this.show = false
|
||||
@@ -76,7 +91,6 @@
|
||||
},
|
||||
//微信小程序登录
|
||||
getphonenumber({ detail }) {
|
||||
console.log(detail, 'detaillllllll')
|
||||
this.loading = true
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
@@ -84,21 +98,28 @@
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: s => {
|
||||
console.log(s, 'ssssssss')
|
||||
loginPhone({
|
||||
jsCode: wx.code,
|
||||
code: s.code,
|
||||
spreadPid: app.globalData.spreadPid,
|
||||
jsCode: s.code,
|
||||
code: wx.code,
|
||||
encryptedData: detail.encryptedData,
|
||||
iv: detail.iv,
|
||||
type: 'routine'
|
||||
}).then(res => {
|
||||
if (res.data.type === 'login') {
|
||||
this.$store.commit('LOGIN', { 'token': res.data.token })
|
||||
this.$store.commit('SETUID', res.data.id)
|
||||
this.$store.dispatch('USERINFO')
|
||||
uni.$emit('refresher')
|
||||
uni.navigateBack()
|
||||
console.log(res.data);
|
||||
setToken(res.data.token)
|
||||
setTimeout(() => {
|
||||
if(uni.getStorageSync('oldPage')) {
|
||||
uni.reLaunch({
|
||||
url: uni.getStorageSync('oldPage'),
|
||||
})
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
} else if (res.data.type === 'register') {
|
||||
let Wxform = {
|
||||
encryptedData: detail.encryptedData,
|
||||
@@ -108,13 +129,10 @@
|
||||
key: res.data.key
|
||||
}
|
||||
getUserPhone(Wxform).then(r => {
|
||||
this.$store.commit('LOGIN', { 'token': r.data.token })
|
||||
this.$store.commit('SETUID', res.data
|
||||
.id)
|
||||
this.$store.dispatch('USERINFO')
|
||||
// spread(app.globalData.spreadPid);
|
||||
uni.$emit('refresher')
|
||||
uni.navigateBack()
|
||||
setToken(res.data.token)
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}).catch(e => {
|
||||
this.loading = false
|
||||
this.$u.toast(e)
|
||||
@@ -140,141 +158,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
=======
|
||||
<u-button type="success" text="临时按钮" @click="$tab.navigateTo('/pages/user/user_authentication/user_authentication')"></u-button>
|
||||
</view>
|
||||
<u-popup :show="show" :round="10" mode="bottom">
|
||||
<view class="outsideView">
|
||||
<view class="topView">
|
||||
<u--image src="https://cdn.uviewui.com/uview/album/1.jpg" shape="circle" width="48rpx" height="48rpx"></u--image>
|
||||
<!-- <view class="txt">用户协议与隐私政策</view> -->
|
||||
<text class="txt" text='用户协议与隐私政策'>用户协议与隐私政策</text>
|
||||
</view>
|
||||
<view class="contentView">
|
||||
<view>
|
||||
欢迎使用“星桔EV”小程序,在您使用本小程序之前,请您在您使用本小程序之前,请您在您使用本小程序之前,请您在您使用本小程序之前,请您仔细阅读
|
||||
<a class='con_a' href="https://www.uviewui.com">《隐私政策》</a>和<a class='con_a' href="https://www.uviewui.com">《用户协议》</a>
|
||||
<!-- <a style="display: inline;color: #13AFA8;" href="https://www.uviewui.com">《隐私政策》</a>和<a style="display: inline;color: #13AFA8;" href="https://www.uviewui.com">《用户协议》</a> -->
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;">
|
||||
<text class="footTxt">
|
||||
请您在您使用本小程序之前,请您在您使用本小程序之前,请您仔细阅读
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footView">
|
||||
<u-button color="" shape="circle" @click="toHomePage">不同意,仅浏览</u-button>
|
||||
<u-button openType="getPhoneNumber" @getphonenumber="getphonenumber" shape="circle" throttleTime="1000">同意</u-button>
|
||||
<!-- <view class="btnTop">不同意,仅浏览</view>
|
||||
<view class="btnFoot" shape="circle">同意</view> -->
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import { loginPhone, getUserPhone } from "@/api/public";
|
||||
import { spread } from "@/api/user";
|
||||
export default {
|
||||
name: "user_login",
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
isAgree: false,
|
||||
logo: '',
|
||||
Wxform: {
|
||||
encryptedData: '',
|
||||
iv: '',
|
||||
code: '',
|
||||
type: 'routine',
|
||||
key: ''
|
||||
},
|
||||
startCode: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
toHomePage(){
|
||||
this.show=false
|
||||
uni.switchTab({
|
||||
// url: '/pages/home/index'
|
||||
url: '/pages/user/user_authentication/user_authentication'
|
||||
});
|
||||
},
|
||||
//微信小程序登录
|
||||
getphonenumber({detail}) {
|
||||
console.log(detail, 'detaillllllll');
|
||||
this.loading = true;
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (wx) => {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (s) => {
|
||||
console.log(s, 'ssssssss');
|
||||
loginPhone({
|
||||
jsCode: wx.code,
|
||||
code: s.code,
|
||||
spreadPid: app.globalData.spreadPid,
|
||||
encryptedData: detail.encryptedData,
|
||||
iv: detail.iv,
|
||||
type: 'routine'
|
||||
}).then(res => {
|
||||
if (res.data.type === 'login') {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.data.id);
|
||||
this.$store.dispatch('USERINFO');
|
||||
uni.$emit('refresher');
|
||||
uni.navigateBack();
|
||||
} else if (res.data.type === 'register') {
|
||||
let Wxform = {
|
||||
encryptedData: detail.encryptedData,
|
||||
iv: detail.iv,
|
||||
code: wx.code,
|
||||
type: 'routine',
|
||||
key: res.data.key
|
||||
}
|
||||
getUserPhone(Wxform).then(r => {
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': r.data.token
|
||||
});
|
||||
this.$store.commit("SETUID", res.data
|
||||
.id);
|
||||
this.$store.dispatch('USERINFO');
|
||||
// spread(app.globalData.spreadPid);
|
||||
uni.$emit('refresher');
|
||||
uni.navigateBack();
|
||||
}).catch(e => {
|
||||
this.loading = false;
|
||||
this.$u.toast(e);
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false;
|
||||
this.$u.toast(err);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
open() {
|
||||
this.show=true
|
||||
// console.log('open');
|
||||
},
|
||||
close() {
|
||||
this.show = false
|
||||
// console.log('close');
|
||||
}
|
||||
}
|
||||
};
|
||||
>>>>>>> 1221d7f1ae155cc2f9b5ea2f7ed260c5ea07f743
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.outsideView {
|
||||
@@ -315,42 +198,7 @@
|
||||
font-weight: 400;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
// fooot
|
||||
.footView {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
line-height: 88rpx;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
opacity: 1;
|
||||
padding: 0 39rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.btnTop {
|
||||
width: 325rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 48rpx 48rpx 48rpx 48rpx;
|
||||
opacity: 1;
|
||||
border: 2rpx solid #222222;
|
||||
font-size: 34rpx;
|
||||
font-family: Noto Sans SC, Noto Sans SC;
|
||||
font-weight: 400;
|
||||
color: #222222;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.btnFoot {
|
||||
width: 325rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 48rpx 48rpx 48rpx 48rpx;
|
||||
opacity: 1;
|
||||
color: #fff;
|
||||
background-color: #13AFA8;
|
||||
margin-left: 18rpx;
|
||||
font-size: 34rpx;
|
||||
font-family: Noto Sans SC, Noto Sans SC;
|
||||
font-weight: 400;
|
||||
}
|
||||
.footView {
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -132,67 +132,6 @@
|
||||
// 广告图轮播变化
|
||||
changePic(e) {
|
||||
|
||||
<<<<<<< HEAD
|
||||
},
|
||||
gotoSet() {
|
||||
this.$tab.navigateTo('/pages/mine/setting/index')
|
||||
},
|
||||
// 点击tab菜单
|
||||
checkTabItem(item) {
|
||||
if (item.outUrl) {
|
||||
this.$tab.navigateTo(`/pages/common/webview/index?title=${item.name}&url=${item.outUrl}`)
|
||||
} else {
|
||||
// #ifdef APP
|
||||
this.$tab.navigateTo(item.url)
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
this.$tab.navigateTo(item.htmlUrl)
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$tab.navigateTo(item.wxUrl)
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
// 获取 菜单
|
||||
// getUserMenuData() {
|
||||
// userMenuData().then(res => {
|
||||
// this.tabList = res.data
|
||||
// })
|
||||
// },
|
||||
handleToInfo() {
|
||||
this.$tab.navigateTo('/pages/mine/info/index')
|
||||
},
|
||||
handleToEditInfo() {
|
||||
this.$tab.navigateTo('/pages/mine/info/edit')
|
||||
},
|
||||
handleToSetting() {
|
||||
this.$tab.navigateTo('/pages/mine/setting/index')
|
||||
},
|
||||
handleToLogin() {
|
||||
this.$tab.reLaunch('/pages/login/login')
|
||||
},
|
||||
handleLogout() {
|
||||
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
this.$tab.reLaunch('/pages/index')
|
||||
})
|
||||
})
|
||||
},
|
||||
handleHelp() {
|
||||
this.$tab.navigateTo('/pages/mine/help/index')
|
||||
},
|
||||
handleAbout() {
|
||||
this.$tab.navigateTo('/pages/mine/about/index')
|
||||
},
|
||||
handleJiaoLiuQun() {
|
||||
this.$modal.showToast('QQ群:133713780')
|
||||
},
|
||||
handleBuilding() {
|
||||
this.$modal.showToast('模块建设中~')
|
||||
}
|
||||
}
|
||||
}
|
||||
=======
|
||||
},
|
||||
gotoSet() {
|
||||
this.$tab.navigateTo('/pages/mine/setting/index')
|
||||
@@ -252,7 +191,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
>>>>>>> 1221d7f1ae155cc2f9b5ea2f7ed260c5ea07f743
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
275
pages/repair/repair.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="con_imgView">
|
||||
<u-swiper height="370rpx" :list="list" :circular="true" imgMode="widthFix"></u-swiper>
|
||||
</view>
|
||||
<view class="positionView">
|
||||
<view class="posTop">
|
||||
<view class="posLeft">
|
||||
<!-- <image class="leftImg" src="@/static/home/position.png" mode=""></image> -->
|
||||
<u-icon name="map-fill" color="#3D3D3D" size="14"></u-icon>
|
||||
<text class="leftTxt">选择门店</text>
|
||||
</view>
|
||||
<view class="posRight" @click="link('/pages/repair/selectCity')">
|
||||
<text class="rightTxt">{{ citySave }}</text>
|
||||
<u-icon name="arrow-right" color="#999999" size="10"></u-icon>
|
||||
<!-- <image class="rightImg" src="@/static/home/Ricon.png" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<z-paging ref="paging" :fixed="false" use-page-scroll auto-full-height v-model="dataList" @query="queryList">
|
||||
<view class="posFoot">
|
||||
<view class="footView" hover-class="hover-footView" v-for="(item,index) in dataList" :key="id" @click="link(`/pages/repair/repairDetail?id=${item.id}`,`${item.id}`)">
|
||||
<view class="footLeft">
|
||||
<image class="footLeft_img" src="@/static/home/footLeft.png"></image>
|
||||
</view>
|
||||
<view class="footRight">
|
||||
<view :class="['FR_up', checkIds.indexOf(item.id) !== -1 && 'checked-imp']">{{item.name}}</view>
|
||||
<view :class="['FR_centre', 'line-one', checkIds.indexOf(item.id) !== -1 && 'checked-imp']">
|
||||
<text>{{item.distance}}km </text> <text class="suxian">|</text> <text> {{item.province + item.city + item.addressDetail}} </text>
|
||||
</view>
|
||||
<view class="FR_down">
|
||||
<view class="down_L">
|
||||
<text :class="[ checkIds.indexOf(item.id) !== -1 && 'checked-imp']">评分:</text> <text class="redTxt"> 5.0 </text>
|
||||
</view>
|
||||
<view class="down_R">
|
||||
<view class="down_R_icon" @click.stop="callPhone(JSON.stringify(item.phone))">
|
||||
<image src="@/static/images/images/phone_fill.png" mode=""></image>
|
||||
</view>
|
||||
<view class="down_R_icon">
|
||||
<image src="@/static/images/images/pos_icon.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getStoreList } from '@/api/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
const QQMapWX = require('../../js_sdk/qqmap-wx-jssdk/qqmap-wx-jssdk.js');
|
||||
var qqmapsdk = new QQMapWX({
|
||||
key: 'SH4BZ-BN36N-UYSFP-SJMPC-LZMGK-EWF3P'
|
||||
});
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
list: [
|
||||
require('../../static/home/imgCar.png'),
|
||||
require('../../static/home/imgCar1.png'),
|
||||
require('../../static/home/imgCar2.png'),
|
||||
],
|
||||
query: {
|
||||
latitude: '30',
|
||||
longitude: '126'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {...mapGetters(['checkIds', 'citySave'])},
|
||||
onShow() {
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success:(res) => {
|
||||
console.log(res);
|
||||
qqmapsdk.reverseGeocoder({
|
||||
location:{
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude
|
||||
},
|
||||
success: (res1) => {
|
||||
console.log(res1.result.address_component.city);
|
||||
this.$store.dispatch('SetCity', res1.result.address_component.city)
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log(res);
|
||||
},
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
getStoreList({limit: pageSize, page: pageNo, city: this.citySave, ...this.query}).then(res => {
|
||||
console.log(res);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch( err => {
|
||||
this.$refs.paging.complete(false);
|
||||
})
|
||||
},
|
||||
callPhone(phoneNumber) {
|
||||
console.log(phoneNumber);
|
||||
uni.makePhoneCall({ phoneNumber })
|
||||
},
|
||||
link(url, id) {
|
||||
if(id) {
|
||||
this.$store.dispatch('CheckIds', id*1)
|
||||
}
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
background-color: #f5f5f5;
|
||||
.con_imgView {
|
||||
margin: 0 auto;
|
||||
margin-bottom: 32rpx;
|
||||
width: 686rpx;
|
||||
height: 370rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.positionView {
|
||||
padding: 0 24rpx 24rpx 24rpx;
|
||||
|
||||
.posTop {
|
||||
// border: 1px solid;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 22rpx;
|
||||
|
||||
.posLeft {
|
||||
display: flex;
|
||||
|
||||
.leftImg {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.leftTxt {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #444444;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.posRight {
|
||||
display: flex;
|
||||
|
||||
.rightImg {
|
||||
width: 10rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.rightTxt {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #444444;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.posFoot {
|
||||
|
||||
// border: 1px solid red;
|
||||
.footView {
|
||||
display: flex;
|
||||
padding: 32rpx 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
width: 702rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.footLeft {
|
||||
width: 168rpx;
|
||||
height: 140rpx;
|
||||
.footLeft_img {
|
||||
width: 168rpx;
|
||||
height: 140rpx;
|
||||
background-color: #AAAAAA;
|
||||
}
|
||||
}
|
||||
|
||||
.footRight {
|
||||
padding-left: 16rpx;
|
||||
width: 470rpx;
|
||||
.FR_up {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.FR_centre {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #111111;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.suxian {
|
||||
font-size: 20rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #AAAAAA;
|
||||
margin: 0 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.FR_down {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
|
||||
.down_L {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #111111;
|
||||
line-height: 1;
|
||||
|
||||
.redTxt {
|
||||
font-size: 40rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 500;
|
||||
color: #F20808;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.down_R {
|
||||
display: flex;
|
||||
|
||||
.down_R_icon {
|
||||
image {
|
||||
margin-left: 20rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.hover-footView {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.line-one {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.checked-imp {
|
||||
color: #999999 !important;
|
||||
}
|
||||
</style>
|
||||
75
pages/repair/selectCity.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<u-index-list :index-list="indexList">
|
||||
<template v-for="(item, index) in itemArr">
|
||||
<u-index-anchor :text="indexList[index]" :id="index" :index="index"></u-index-anchor>
|
||||
<u-index-item :key="indexList[index]">
|
||||
<view class="list-cell" v-for="(cell, index) in item">
|
||||
{{cell.city}}
|
||||
</view>
|
||||
</u-index-item>
|
||||
</template>
|
||||
</u-index-list>
|
||||
<!-- <view>
|
||||
<view class="search">
|
||||
<u-search placeholder="搜索城市" @search="searchCity"></u-search>
|
||||
</view>
|
||||
<view class="now-city">
|
||||
<view class="">
|
||||
当前城市
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
{{ citySave }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hot-city">
|
||||
<view class="" v-for="(item,index) in hotCity" :key="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="city-list">
|
||||
|
||||
</view>
|
||||
<view class="search-city">
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
const area = require('../../data/address_a.js')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hotCity: ['北京市', '上海市', '深圳', '广州', '重庆'],
|
||||
indexList: area.select_list,
|
||||
itemArr: []
|
||||
};
|
||||
},
|
||||
computed: {...mapGetters(['citySave'])},
|
||||
onLoad() {
|
||||
let areas = area.city_list
|
||||
console.log(area);
|
||||
for (let key in areas) {
|
||||
this.itemArr.push(areas[key])
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
citySelect(e) {
|
||||
console.log(e);
|
||||
},
|
||||
searchCity(e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.search {
|
||||
padding: 24rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
@@ -2,21 +2,22 @@ import { getToken } from '@/utils/auth'
|
||||
|
||||
// 登录页面
|
||||
const loginPage = "/pages/login/login"
|
||||
|
||||
console.log(loginPage);
|
||||
// 页面白名单
|
||||
const whiteList = [
|
||||
'/pages/home/index',
|
||||
'/pages/login/login'
|
||||
// '/pages/mine/index',
|
||||
'/pages/login/login',
|
||||
'/pages/login/login-code',
|
||||
'/pages/login/login-password',
|
||||
'/pages/login/reset-password',
|
||||
'/pages/mine/pwd/index',
|
||||
'/pages/common/webview/index',
|
||||
'/pages/componentsTest',
|
||||
'/pages/mine/faceRecognition/faceRecognition',
|
||||
'/pages/user/user_authentication/user_authentication',
|
||||
'/pages/user/user_binding/user_binding'
|
||||
// '/pages/login/login',
|
||||
// '/pages/login/login-code',
|
||||
// '/pages/login/login-password',
|
||||
// '/pages/login/reset-password',
|
||||
// '/pages/mine/pwd/index',
|
||||
// '/pages/common/webview/index',
|
||||
// '/pages/componentsTest',
|
||||
// '/pages/mine/faceRecognition/faceRecognition',
|
||||
// '/pages/user/user_authentication/user_authentication',
|
||||
// '/pages/user/user_binding/user_binding'
|
||||
]
|
||||
|
||||
// 检查地址白名单
|
||||
@@ -25,27 +26,31 @@ function checkWhite(url) {
|
||||
return whiteList.indexOf(path) !== -1
|
||||
}
|
||||
|
||||
console.log('token', getToken());
|
||||
// 页面跳转验证拦截器
|
||||
// let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
|
||||
// list.forEach(item => {
|
||||
// uni.addInterceptor(item, {
|
||||
// invoke(to) {
|
||||
// if (getToken()) {
|
||||
// if (to.url === loginPage) {
|
||||
// uni.reLaunch({ url: "/" })
|
||||
// }
|
||||
// return true
|
||||
// } else {
|
||||
// if (checkWhite(to.url)) {
|
||||
// return true
|
||||
// }
|
||||
// console.log("触发页面验证拦截", to.url)
|
||||
// uni.reLaunch({ url: loginPage })
|
||||
// return false
|
||||
// }
|
||||
// },
|
||||
// fail(err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]
|
||||
list.forEach(item => {
|
||||
uni.addInterceptor(item, {
|
||||
invoke(to) {
|
||||
console.log('页面拦截', to);
|
||||
console.log('页面token', getToken());
|
||||
if (getToken()) {
|
||||
if (to.url === loginPage) {
|
||||
uni.navigateTo({ url: "/" })
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
if (checkWhite(to.url)) {
|
||||
return true
|
||||
}
|
||||
console.log("触发页面验证拦截", to.url)
|
||||
uni.setStorageSync('oldPage', to.url)
|
||||
uni.navigateTo({ url: loginPage })
|
||||
return false
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
BIN
static/images/images/booking_management.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
static/images/images/cart_reception.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
static/images/images/logo.jpg
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
static/images/images/maintenance_reception.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
static/images/images/phone_fill.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/images/images/pos_icon.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/images/images/troubleshooting.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 34 KiB |
@@ -7,6 +7,8 @@ const getters = {
|
||||
phonenumber: state => state.user.phonenumber,
|
||||
birthDay: state => state.user.birthDay,
|
||||
roles: state => state.user.roles,
|
||||
permissions: state => state.user.permissions
|
||||
permissions: state => state.user.permissions,
|
||||
checkIds: state => state.tools.checkIds,
|
||||
citySave: state => state.tools.citySave
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import user from '@/store/modules/user'
|
||||
import websocket from '@/store/modules/websocket.js'
|
||||
import websocket from '@/store/modules/websocket'
|
||||
import tools from '@/store/modules/tools'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
@@ -9,7 +10,8 @@ Vue.use(Vuex)
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
user,
|
||||
websocket
|
||||
websocket,
|
||||
tools
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
||||
37
store/modules/tools.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import storage from '@/utils/storage'
|
||||
import constant from '@/utils/constant'
|
||||
|
||||
const tools = {
|
||||
state: {
|
||||
checkIds: uni.getStorageSync('vuex_checkIds') || [],
|
||||
citySave: '',
|
||||
},
|
||||
|
||||
mutations: {
|
||||
SET_CHECKIDS: (state, id) => {
|
||||
if(id) {
|
||||
state.checkIds.push(id)
|
||||
uni.setStorageSync('vuex_checkIds', state.checkIds)
|
||||
} else {
|
||||
state.checkIds = []
|
||||
uni.setStorageSync('vuex_checkIds', [])
|
||||
}
|
||||
},
|
||||
SET_CITY: (state, city) => {
|
||||
state.citySave = city
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
CheckIds({ commit }, id) {
|
||||
console.log('vuex', id);
|
||||
commit('SET_CHECKIDS', id)
|
||||
},
|
||||
SetCity({ commit }, city) {
|
||||
console.log('vuex', city);
|
||||
commit('SET_CITY', city)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default tools
|
||||
@@ -22,6 +22,7 @@ const user = {
|
||||
mutations: {
|
||||
SET_TOKEN: (state, token) => {
|
||||
state.token = token
|
||||
setToken(token)
|
||||
},
|
||||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
@@ -73,31 +74,6 @@ const user = {
|
||||
})
|
||||
})
|
||||
},
|
||||
PhoneLogin({ commit }, userInfo) {
|
||||
console.log(userInfo);
|
||||
const phone = userInfo.phoneNumber
|
||||
const smsCode = userInfo.code
|
||||
return new Promise((resolve, reject) => {
|
||||
phoneLogin({phone, smsCode}).then(res => {
|
||||
setToken(res.data.loginToken)
|
||||
commit('SET_TOKEN', res.data.loginToken)
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
WeixinPhoneLogin({ commit }, userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
weixinPhoneLogin(userInfo).then(res => {
|
||||
setToken(res.data.loginToken)
|
||||
commit('SET_TOKEN', res.data.loginToken)
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取用户信息
|
||||
GetInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -24,6 +24,12 @@ export default {
|
||||
customNavHeight: {
|
||||
type: [String, Number],
|
||||
default: uni.$u.props.indexList.customNavHeight
|
||||
}
|
||||
},
|
||||
// children: {
|
||||
// type: Array,
|
||||
// default() {
|
||||
// return []
|
||||
// }
|
||||
// },
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,6 +298,7 @@
|
||||
},
|
||||
// 设置各项由触摸而导致变化的值
|
||||
setValueForTouch(currentIndex) {
|
||||
|
||||
// 如果偏移量太小,前后得出的会是同一个索引字母,为了防抖,进行返回
|
||||
if (currentIndex === this.activeIndex) return
|
||||
this.activeIndex = currentIndex
|
||||
@@ -345,6 +346,7 @@
|
||||
const header = await this.getHeaderRect()
|
||||
// item的top值,在nvue下,模拟出的anchor的top,类似非nvue下的index-item的top
|
||||
let top = header.height
|
||||
console.log(top);
|
||||
// 由于list组件无法获取cell的top值,这里通过header slot和各个item之间的height,模拟出类似非nvue下的位置信息
|
||||
children = this.children.map((item, index) => {
|
||||
const child = {
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import {
|
||||
HTTP_REQUEST_URL,
|
||||
HEADER,
|
||||
TOKENNAME,
|
||||
HEADERPARAMS
|
||||
} from '@/config/app';
|
||||
import { HTTP_REQUEST_URL, HEADER, TOKENNAME, HEADERPARAMS } from '@/config/app';
|
||||
import util from "@/utils/util.js";
|
||||
import {LOGIN_STATUS} from '@/config/cache';
|
||||
import Cache from '@/utils/cache';
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
|
||||
|
||||
/**
|
||||
@@ -18,7 +14,7 @@ function baseRequest(url, method, data, {
|
||||
}, params) {
|
||||
let Url = HTTP_REQUEST_URL,
|
||||
header = HEADER,
|
||||
token = Cache.get(LOGIN_STATUS);
|
||||
token = getToken();
|
||||
if (params != undefined) {
|
||||
header = HEADERPARAMS;
|
||||
}
|
||||
|
||||