cmy 1 tahun lalu
induk
melakukan
3c03422a60
61 mengubah file dengan 1529 tambahan dan 9101 penghapusan
  1. 0 20
      .hbuilderx/launch.json
  2. 0 18
      config/app.js
  3. 0 32
      config/cache.js
  4. 0 84
      libs/login.js
  5. 0 253
      libs/wechat.js
  6. 0 31
      main.js
  7. 1 1
      manifest.json
  8. 312 490
      pages.json
  9. 0 0
      pages/home/cart.vue
  10. 0 0
      pages/home/category.vue
  11. 4 7
      pages/home/index.vue
  12. 591 0
      pages/home/user.vue
  13. 1 1
      pages/index/indexComponents/noUser.vue
  14. 0 1223
      pages/index/indexComponents/onUser.vue
  15. 0 277
      pages/index/route.vue
  16. 0 85
      pages/index/routeDetail.vue
  17. 8 2
      pages/order/createOrder.vue
  18. 2 6
      pages/order/evaluate.vue
  19. 4 1
      pages/order/orderDetail.vue
  20. 20 5
      pages/public/forget.vue
  21. 8 2
      pages/public/login.vue
  22. 20 5
      pages/public/phoneLogin.vue
  23. 4 1
      pages/public/redirect.vue
  24. 28 7
      pages/public/register.vue
  25. 4 1
      pages/public/wxLogin.vue
  26. 9 3
      pages/set/address.vue
  27. 21 6
      pages/set/addressManage.vue
  28. 12 3
      pages/set/password.vue
  29. 12 3
      pages/set/phone.vue
  30. 4 1
      pages/set/userinfo.vue
  31. 0 312
      pages/shop/cartAciton.vue
  32. 0 301
      pages/shop/repair/clientRepair.vue
  33. 0 543
      pages/shop/repair/clientReparirDetail.vue
  34. 0 328
      pages/shop/repair/repairHistory.vue
  35. 0 284
      pages/shop/repair/taskClientRepair.vue
  36. 0 373
      pages/shop/shopIndex.vue
  37. 0 692
      pages/shop/shopOrder.vue
  38. 0 631
      pages/shop/shopOrderAfter.vue
  39. 0 185
      pages/shop/shopOrderDetail.vue
  40. 5 2
      pages/user/award/account.vue
  41. 4 1
      pages/user/money/pay.vue
  42. 0 366
      pages/user/myCart/Prepayment.vue
  43. 0 193
      pages/user/myCart/authorization.vue
  44. 0 188
      pages/user/myCart/authorizationList.vue
  45. 0 269
      pages/user/myCart/cartConfing.vue
  46. 0 299
      pages/user/myCart/myCart.vue
  47. 4 1
      pages/user/realName/realNameAuthentication.vue
  48. 0 154
      pages/user/repair/repairDetail.vue
  49. 0 327
      pages/user/repair/userRepair.vue
  50. 0 151
      pages/user/reportForRepair/Report.vue
  51. 0 283
      pages/user/reportForRepair/status1.vue
  52. 0 328
      pages/user/reportForRepair/status2.vue
  53. 0 192
      pages/user/reportForRepair/status3.vue
  54. 348 0
      pages/user/scoreAccumulate.vue
  55. 35 7
      pages/user/shareQrCode.vue
  56. 0 106
      pages/user/user.vue
  57. 15 0
      uni_modules/ksp-cropper/changelog.md
  58. 33 9
      uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue
  59. 4 7
      uni_modules/ksp-cropper/package.json
  60. 6 1
      uni_modules/ksp-cropper/readme.md
  61. 10 0
      utils/rocessor.js

+ 0 - 20
.hbuilderx/launch.json

@@ -1,20 +0,0 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
-  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
-    "version": "0.0",
-    "configurations": [{
-     	"app-plus" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"default" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"mp-weixin" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"type" : "uniCloud"
-     }
-    ]
-}

+ 0 - 18
config/app.js

@@ -1,18 +0,0 @@
-module.exports = {
-	// 请求域名 格式: https://您的域名
-	
-	HTTP_REQUEST_URL:'http://base.liuniu946.com',
-
-	
-	
-	// #ifdef H5
-	// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
-	// #endif
-	HEADER:{
-		'content-type': 'application/json'
-	},
-	// 回话密钥名称 请勿修改此配置
-	TOKENNAME: 'Authori-zation',
-	// 缓存时间 0 永久
-	EXPIRE:0,
-};

+ 0 - 32
config/cache.js

@@ -1,32 +0,0 @@
-module.exports = {
-	//token
-	LOGIN_STATUS: 'LOGIN_STATUS_TOKEN',
-	// uid
-	UID:'UID',
-	//�û�
-	USER_INFO: 'USER_INFO',
-	//token�����¼�
-	EXPIRES_TIME: 'EXPIRES_TIME',
-	//�Ƿ���Ȩ
-	WX_AUTH: 'WX_AUTH',
-	//���ں���Ȩcode
-	STATE_KEY: 'wx_authorize_state',
-	//�û�����
-	LOGINTYPE: 'loginType',
-	//���ں���ת����
-	BACK_URL: 'login_back_url',
-	// ����code
-	STATE_R_KEY: 'roution_authorize_state',
-	//��ȨlogoС����
-	LOGO_URL: 'LOGO_URL',
-	//模板缓存
-	SUBSCRIBE_MESSAGE: 'SUBSCRIBE_MESSAGE',
-
-	TIPS_KEY: 'TIPS_KEY',
-
-	SPREAD: 'spread',
-	//缓存经度
-	CACHE_LONGITUDE: 'LONGITUDE',
-	//缓存纬度
-	CACHE_LATITUDE: 'LATITUDE',
-}

+ 0 - 84
libs/login.js

@@ -1,84 +0,0 @@
-import store from "../store";
-import Cache from '../utils/cache';
-// #ifdef H5 || APP-PLUS
-import {
-	isWeixin
-} from "../utils";
-import auth from './wechat';
-// #endif
-
-import {
-	LOGIN_STATUS,
-	USER_INFO,
-	EXPIRES_TIME,
-	STATE_R_KEY
-} from './../config/cache';
-
-function prePage() {
-	let pages = getCurrentPages();
-	let prePage = pages[pages.length - 2];
-	// #ifdef H5
-	return prePage;
-	// #endif
-	return prePage.$vm;
-}
-
-export function toLogin(push, pathLogin) {
-	// store.commit("LOGOUT");
-	let path = prePage();
-	if (path) {
-		path = path.router;
-		if (path == undefined) {
-			path = location.pathname;
-		}
-	}
-	// #ifdef H5
-	else {
-		path = location.pathname;
-	}
-	// #endif
-
-	if (!pathLogin)
-		pathLogin = '/page/users/login/index'
-	Cache.set('login_back_url', path);
-	// #ifdef H5 || APP-PLUS
-	if (isWeixin()) {
-		auth.oAuth();
-	} else {
-		if (path !== pathLogin) {
-			push ? uni.navigateTo({
-				url: '/pages/users/login/index'
-			}) : uni.reLaunch({
-				url: '/pages/users/login/index'
-			});
-		}
-	}
-	// #endif
-
-	// #ifdef MP 
-
-
-	// #endif
-}
-
-
-export function checkLogin() {
-	let token = Cache.get(LOGIN_STATUS);
-	let expiresTime = Cache.get(EXPIRES_TIME);
-	let newTime = Math.round(new Date() / 1000);
-	if (expiresTime < newTime || !token) {
-		Cache.clear(LOGIN_STATUS);
-		Cache.clear(EXPIRES_TIME);
-		Cache.clear(USER_INFO);
-		Cache.clear(STATE_R_KEY);
-		return false;
-	} else {
-		store.commit('UPDATE_LOGIN', token);
-		let userInfo = Cache.get(USER_INFO, true);
-		if (userInfo) {
-			store.commit('UPDATE_USERINFO', userInfo);
-		}
-		return true;
-	}
-
-}

+ 0 - 253
libs/wechat.js

@@ -1,253 +0,0 @@
-// #ifdef H5
-import WechatJSSDK from "@/plugin/jweixin-module/index.js";
-// #endif
-
-import {
-	wechatConfig,
-	wechatAuth
-} from "@/api/wx.js";
-import {
-	WX_AUTH,
-	STATE_KEY,
-	LOGINTYPE,
-	BACK_URL
-} from '@/config/cache';
-import {
-	parseQuery
-} from '@/utils';
-import store from '@/store';
-import Cache from '@/utils/cache';
-
-class AuthWechat {
-	// #ifdef H5
-	constructor() {
-		//微信实例化对象
-		this.instance = WechatJSSDK;
-		//是否实例化
-		this.status = false;
-
-		this.initConfig = {};
-
-	}
-	// #endif
-	
-	isAndroid(){
-		let u = navigator.userAgent;
-		return u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
-	}
-
-	/**
-	 * 初始化wechat(分享配置)
-	 */
-	wechat() {
-		return new Promise((resolve, reject) => {
-			// if (this.status && !this.isAndroid()) return resolve(this.instance);
-			wechatConfig()
-				.then(res => {
-					this.instance.config(res.data);
-					this.initConfig = res.data;
-					this.status = true;
-					this.instance.ready(() => {
-						resolve(this.instance);
-					})
-				}).catch(err => {
-					console.log(err);
-					this.status = false;
-					reject(err);
-				});
-		});
-	}
-
-	/**
-	 * 验证是否初始化
-	 */
-	verifyInstance() {
-		let that = this;
-		return new Promise((resolve, reject) => {
-			if (that.instance === null && !that.status) {
-				that.wechat().then(res => {
-					resolve(that.instance);
-				}).catch(() => {
-					return reject();
-				})
-			} else {
-				return resolve(that.instance);
-			}
-		})
-	}
-	// 微信公众号的共享地址
-	openAddress() {
-		return new Promise((resolve, reject) => {
-			this.wechat().then(wx => {
-				this.toPromise(wx.openAddress).then(res => {
-					resolve(res);
-				}).catch(err => {
-					reject(err);
-				});
-			}).catch(err => {
-				reject(err);
-			})
-		});
-	}
-
-	/**
-	 * 微信支付
-	 * @param {Object} config
-	 */
-	pay(config) {
-		return new Promise((resolve, reject) => {
-			this.wechat().then((wx) => {
-				this.toPromise(wx.chooseWXPay, config).then(res => {
-					resolve(res);
-				}).catch(res => {
-					reject(res);
-				});
-			}).catch(res => {
-				reject(res);
-			});
-		});
-	}
-
-	toPromise(fn, config = {}) {
-		return new Promise((resolve, reject) => {
-			fn({
-				...config,
-				success(res) {
-					resolve(res);
-				},
-				fail(err) {
-					reject(err);
-				},
-				complete(err) {
-					reject(err);
-				},
-				cancel(err) {
-					reject(err);
-				}
-			});
-		});
-	}
-
-	/**
-	 * 自动去授权
-	 */
-	oAuth() {
-		if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
-		const {
-			code
-		} = parseQuery();
-		if (!code) return this.toAuth();
-	}
-
-	clearAuthStatus() {
-
-	}
-
-	/**
-	 * 授权登陆获取token
-	 * @param {Object} code
-	 */
-	auth(code) {
-		return new Promise((resolve, reject) => {
-			let loginType = Cache.get(LOGINTYPE);
-			wechatAuth(code, parseInt(Cache.get("spread")), loginType)
-				.then(({
-					data
-				}) => {
-					let expires_time = data.expires_time.substring(0, 19);
-					expires_time = expires_time.replace(/-/g, '/');
-					expires_time = new Date(expires_time).getTime();
-					let newTime = Math.round(new Date() / 1000);
-					store.commit("LOGIN", {
-						token: data.token,
-						time: expires_time - newTime
-					});
-					Cache.set(WX_AUTH, code);
-					Cache.clear(STATE_KEY);
-					loginType && Cache.clear(LOGINTYPE);
-					resolve();
-				})
-				.catch(reject);
-		});
-	}
-
-	/**
-	 * 获取跳转授权后的地址
-	 * @param {Object} appId
-	 */
-	getAuthUrl(appId) {
-		const redirect_uri = encodeURIComponent(
-			`${location.origin}/pages/auth/index?back_url=` +
-			encodeURIComponent(
-				encodeURIComponent(
-					uni.getStorageSync(BACK_URL) ?
-					uni.getStorageSync(BACK_URL) :
-					location.pathname + location.search
-				)
-			)
-		);
-		uni.removeStorageSync(BACK_URL);
-		const state = encodeURIComponent(
-			("" + Math.random()).split(".")[1] + "authorizestate"
-		);
-		uni.setStorageSync(STATE_KEY, state);
-		return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
-	}
-
-	/**
-	 * 跳转自动登陆
-	 */
-	toAuth() {
-		let that = this;
-		this.wechat().then(wx => {
-			location.href = this.getAuthUrl(that.initConfig.appId);
-		})
-	}
-
-	/**
-	 * 绑定事件
-	 * @param {Object} name 事件名
-	 * @param {Object} config 参数
-	 */
-	wechatEvevt(name, config) {
-		let that = this;
-		return new Promise((resolve, reject) => {
-			let configDefault = {
-				fail(res) {
-					console.log(res,11111);
-					if (that.instance) return reject({
-						is_ready: true,
-						wx: that.instance
-					});
-					that.verifyInstance().then(wx => {
-						return reject({
-							is_ready: true,
-							wx: wx
-						});
-					})
-				},
-				success(res) {
-					return resolve(res,2222);
-				}
-			};
-			Object.assign(configDefault, config);
-			that.wechat().then(wx => {
-				if (typeof name === 'object') {
-					name.forEach(item => {
-						wx[item] && wx[item](configDefault)
-					})
-				} else {
-					wx[name] && wx[name](configDefault)
-				}
-			})
-		});
-	}
-
-	isWeixin() {
-		return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
-	}
-
-}
-
-export default new AuthWechat();
-

+ 0 - 31
main.js

@@ -1,40 +1,9 @@
 import Vue from 'vue'
 import store from './store'
 import App from './App'
-/**
- *  所有测试用数据均存放于根目录json.js
- *  
- *  css部分使用了App.vue下的全局样式和iconfont图标,有需要图标库的可以留言。
- *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
- */
-const msg = (title, duration=1500, mask=false, icon='none')=>{
-	//统一提示方便全局修改
-	if(Boolean(title) === false){
-		return;
-	}
-	uni.showToast({
-		title,
-		duration,
-		mask,
-		icon
-	});
-}
-
-const prePage = ()=>{
-	// 获取当前页面
-	let pages = getCurrentPages();
-	let prePage = pages[pages.length - 2];
-	// #ifdef H5
-	return prePage;
-	// #endif
-	return prePage.$vm;
-}
-
-
 Vue.config.productionTip = false
 Vue.prototype.$fire = new Vue();
 Vue.prototype.$store = store;
-Vue.prototype.$api = {msg, prePage};
 
 App.mpType = 'app'
 

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "绿津",
-    "appid" : "__UNI__F0EBD91",
+    "appid" : "__UNI__1E38A9C",
     "description" : "",
     "versionName" : "1.0.19",
     "versionCode" : 122,

+ 312 - 490
pages.json

@@ -1,6 +1,6 @@
 {
 	"pages": [{
-			"path": "pages/index/index",
+			"path": "pages/home/index",
 			"style": {
 				// #ifndef MP
 				"navigationStyle": "custom",
@@ -12,382 +12,339 @@
 			}
 		},
 		{
-			"path": "pages/index/notice",
+			"path": "pages/home/user",
 			"style": {
-				"navigationBarTitleText": "消息中心"
-			}
-		},
-		{
-			"path": "pages/index/share",
-			"style": {
-				"navigationBarTitleText": "邀好友赚佣金"
-			}
-		},
-		// #ifndef APP
-		{
-			"path": "pages/index/follow",
-			"style": {
-				"navigationBarTitleText": "关注公众号"
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "个人中心"
 			}
 		},
-		// #endif
 		{
-			"path": "pages/index/noticeDetail",
+			"path": "pages/home/category",
 			"style": {
-				"navigationBarTitleText": "消息",
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP
 				"app-plus": {
+					"bounce": "none",
 					"titleNView": {
-						"type": "transparent"
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "商品搜索",
+							"disabled": true,
+							"placeholderColor": "#606266",
+							"align": "left"
+						}
 					}
-				}
+				},
+				// #endif
+				"navigationBarTitleText": "分类"
 			}
 		},
 		{
-			"path": "pages/index/shopTab",
+			"path": "pages/home/cart",
 			"style": {
-				// "enablePullDownRefresh": true,
+				// #ifndef MP-WEIXIN
 				"navigationStyle": "custom",
-				"navigationBarTitleText": "门店查询",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/user/myCart/authorization",
-			"style": {
-				"navigationBarTitleText": "授权"
-			}
-		},
-		{
-			"path": "pages/user/myCart/Prepayment",
-			"style": {
-				"navigationBarTitleText": "提前还款"
-			}
-		},
-		{
-			"path": "pages/index/route",
-			"style": {
-				"navigationBarTitleText": "历史行程"
-			}
-		},
-		{
-			"path": "pages/index/routeDetail",
-			"style": {
-				"navigationBarTitleText": "行程详情"
+				// #endif
+				"navigationBarTitleText": "购物车"
 			}
-		},
-		// #ifdef H5
-		{
-			"path": "pages/public/domApp",
-			"style": {
-				"navigationBarTitleText": "app下载",
-				"app-plus": {
-					"titleNView": false
+		}
+	],
+	"subPackages": [{ // 模块分包
+		"root": "pages/user",
+		"name": "user",
+		"pages": [
+			{
+				"path": "shareQrCode",
+				"style": {
+					"navigationBarTitleText": "邀请好友"
 				}
-			}
-		},
-		// #endif
-		// #ifndef MP
-		{
-			"path": "pages/public/workwork",
-			"style": {
-				"navigationBarTitleText": "关于我们"
-			}
-		},
-		// #endif
-		{
-			"path": "pages/public/register",
-			"style": {
-				"navigationBarTitleText": "注册",
-				"app-plus": {
-					"titleNView": false
+			},
+			{
+				"path": "realName/realNameAuthentication",
+				"style": {
+					"navigationBarTitleText": "实名认证"
 				}
-			}
-		},
-		{
-			"path": "pages/public/phoneLogin",
-			"style": {
-				"navigationBarTitleText": "手机登录",
-				"app-plus": {
-					"titleNView": false
+			},
+			{
+				"path": "realName/cropper",
+				"style": {
+					"navigationBarTitleText": "图片裁切"
 				}
-			}
-		},
-		{
-			"path": "pages/public/login",
-			"style": {
-				"navigationBarTitleText": "登录",
-				"app-plus": {
-					"titleNView": false
+			},
+			{
+				"path": "myteam",
+				"style": {
+					"navigationBarTitleText": "我的团队"
+				}
+			},
+			{
+				"path": "award/award",
+				"style": {
+					"navigationBarTitleText": "佣金",
+					"navigationBarBackgroundColor": "#f6ab0b",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "award/awardList",
+				"style": {
+					"navigationBarTitleText": "佣金明细"
+				}
+			},
+			{
+				"path": "award/withdrawal",
+				"style": {
+					"navigationBarTitleText": "提现"
+				}
+			},
+			{
+				"path": "money/pay",
+				"style": {
+					"navigationBarTitleText": "支付",
+					"navigationBarBackgroundColor": "#0BBB62",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "money/paySuccess",
+				"style": {
+					"navigationBarTitleText": "支付成功"
+				}
+			},
+			{
+				"path": "money/wallet",
+				"style": {
+					"navigationBarTitleText": "我的钱包",
+					"navigationBarBackgroundColor": "#0BBB62",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "money/walletList",
+				"style": {
+					"navigationBarTitleText": "余额明细"
+				}
+			},
+			{
+				"path": "award/account",
+				"style": {
+					"navigationBarTitleText": "提现账号"
+				}
+			},
+			{
+				"path": "money/recharge",
+				"style": {
+					"navigationBarTitleText": "充值",
+					"navigationBarBackgroundColor": "#0BBB62",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			// {
+			// 	"path": "favorites",
+			// 	"style": {
+			// 		"navigationBarTitleText": "收藏夹"
+			// 	}
+			// }, {
+			// 	"path": "coupon",
+			// 	"style": {
+			// 		"navigationBarTitleText": "我的卡卷"
+			// 	}
+			// },
+			{
+				"path": "scoreAccumulate",
+				"style": {
+					"navigationBarTitleText": "积分明细"
 				}
 			}
-		},
-		// #ifdef MP || H5
-		{
-			"path": "pages/public/wxLogin",
-			"style": {
-				"navigationBarTitleText": "微信登录",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
+		]
+	}, {
+		"root": "pages/index",
+		"name": "index",
+		"pages": [{
+				"path": "notice",
+				"style": {
+					"navigationBarTitleText": "消息中心"
+				}
+			},
+			{
+				"path": "share",
+				"style": {
+					"navigationBarTitleText": "邀好友赚佣金"
+				}
+			},
+			// #ifndef APP
+			{
+				"path": "follow",
+				"style": {
+					"navigationBarTitleText": "关注公众号"
+				}
+			},
+			// #endif
+			{
+				"path": "noticeDetail",
+				"style": {
+					"navigationBarTitleText": "消息",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
 					}
 				}
-			}
-		},
-		// #endif
-		{
-			"path": "pages/public/forget",
-			"style": {
-				"navigationBarTitleText": "忘记密码",
-				"app-plus": {
-					"titleNView": false
+			},
+			{
+				"path": "shopTab",
+				"style": {
+					// "enablePullDownRefresh": true,
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "门店查询",
+					"app-plus": {
+						"titleNView": false
+					}
 				}
 			}
-		},
-		{
-			"path": "pages/public/userAgreement",
-			"style": {
-				"navigationBarTitleText": "用户协议"
-			}
-		},
-		{
-			"path": "pages/public/privacyAgreement",
-			"style": {
-				"navigationBarTitleText": "隐私协议"
-			}
-		},
-		// {
-		// 	"path": "pages/product/reply",
-		// 	"style": {
-		// 		"navigationBarTitleText": "商品评价",
-		// 		"app-plus": {
-		// 			"titleNView": {
-		// 				"type": "transparent"
-		// 			}
-		// 		}
-		// 	}
-		// },
-		{
-			"path": "pages/product/product",
-			"style": {
-				"navigationBarTitleText": "详情展示",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
+		]
+	}, {
+		"root": "pages/public",
+		"name": "public",
+		"pages": [{
+				"path": "redirect",
+				"style": {
+					"navigationBarTitleText": "微信登录跳转页面",
+					"app-plus": {
+						"titleNView": false
 					}
 				}
-			}
-		},
-		{
-			"path": "pages/product/showImg",
-			"style": {
-				"navigationBarTitleText": "图片预览",
-				"app-plus": {
-					"animationType": "fade-in",
-					"titleNView": {
-						"type": "transparent"
-					},
-					"animationDuration": 300
+			},
+			// #ifdef H5
+			{
+				"path": "domApp",
+				"style": {
+					"navigationBarTitleText": "app下载",
+					"app-plus": {
+						"titleNView": false
+					}
 				}
-			}
-		},
-		// {
-		// 	"path": "pages/product/seckill",
-		// 	"style": {
-		// 		"navigationBarTitleText": "限时秒杀"
-		// 	}
-		// },
-		// {
-		// 	"path": "pages/product/list",
-		// 	"style": {
-		// 		"enablePullDownRefresh": true,
-		// 		"navigationBarTitleText": "商品列表"
-		// 	}
-		// },
-		{
-			"path": "pages/product/search",
-			"style": {
-				"enablePullDownRefresh": true,
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP || APP-PLUS
-				"app-plus": {
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "请输入关键字",
-							"disabled": false,
-							"placeholderColor": "#606266",
-							"align": "left"
-						},
-						"buttons": [{
-							"text": "搜索",
-							"fontSize": "14",
-							"color": "#303133",
-							"background": "rgba(0,0,0,0)",
-							"width": "40px"
-						}]
+			},
+			// #endif
+			// #ifndef MP
+			{
+				"path": "workwork",
+				"style": {
+					"navigationBarTitleText": "关于我们"
+				}
+			},
+			// #endif
+			{
+				"path": "register",
+				"style": {
+					"navigationBarTitleText": "注册",
+					"app-plus": {
+						"titleNView": false
 					}
-				},
-				// #endif
-				"navigationBarTitleText": "搜索"
+				}
+			},
+			{
+				"path": "phoneLogin",
+				"style": {
+					"navigationBarTitleText": "手机登录",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			{
+				"path": "login",
+				"style": {
+					"navigationBarTitleText": "登录",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			// #ifdef MP || H5
+			{
+				"path": "wxLogin",
+				"style": {
+					"navigationBarTitleText": "微信登录",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
+			},
+			// #endif
+			{
+				"path": "forget",
+				"style": {
+					"navigationBarTitleText": "忘记密码",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			{
+				"path": "userAgreement",
+				"style": {
+					"navigationBarTitleText": "用户协议"
+				}
+			},
+			{
+				"path": "privacyAgreement",
+				"style": {
+					"navigationBarTitleText": "隐私协议"
+				}
 			}
-		},
-		// {
-		// 	"path": "pages/product/classify",
-		// 	"style": {
-		// 		"navigationStyle": "custom",
-		// 		"app-plus": {
-		// 			"titleNView": {
-		// 				"type": "transparent"
-		// 			}
-		// 		}
-		// 	}
-		// },
-		{
-			"path": "pages/set/set",
+		]
+	},
+	{
+		"root": "pages/set",
+		"name": "set",
+		"pages": [{
+			"path": "set",
 			"style": {
 				"navigationBarTitleText": "设置"
 			}
 		},
 		{
-			"path": "pages/set/address",
+			"path": "address",
 			"style": {
 				"navigationBarTitleText": "收货地址"
 			}
 		},
 		{
-			"path": "pages/set/addressManage",
+			"path": "addressManage",
 			"style": {
-				"navigationBarTitleText": ""
+				"navigationBarTitleText": "編輯地址"
 			}
 		},
 		{
-			"path": "pages/set/phone",
+			"path": "phone",
 			"style": {
 				"navigationBarTitleText": "手机认证"
 			}
 		},
 		{
-			"path": "pages/set/password",
+			"path": "password",
 			"style": {
 				"navigationBarTitleText": "修改密码"
 			}
 		},
 		{
-			"path": "pages/set/userinfo",
+			"path": "userinfo",
 			"style": {
 				"navigationBarTitleText": "修改资料"
 			}
-		},
-		{
-			"path": "pages/cart/cart",
-			"style": {
-				// #ifndef MP-WEIXIN
-				"navigationStyle": "custom",
-				// #endif
-				"navigationBarTitleText": "购物车"
-			}
-		},
-
-		{
-			"path": "pages/user/user",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "个人中心"
-			}
-		},
-		{
-			"path": "pages/user/repair/userRepair",
-			"style": {
-				"navigationBarTitleText": "维修历史"
-			}
-		},
-		{
-			"path": "pages/user/repair/repairDetail",
-			"style": {
-				"navigationBarTitleText": "申请内容"
-			}
-		},
-		{
-			"path": "pages/user/myCart/authorizationList",
-			"style": {
-				"navigationBarTitleText": "授权列表"
-			}
-		},
-		{
-			"path": "pages/user/reportForRepair/Report",
-			"style": {
-				"navigationBarTitleText": "故障报修"
-			}
-		},
-		{
-			"path": "pages/user/realName/realNameAuthentication",
-			"style": {
-				"navigationBarTitleText": "实名认证"
-			}
-		},
-		{
-			"path": "pages/user/realName/cropper",
-			"style": {
-				"navigationBarTitleText": "图片裁切"
-			}
-		},
-		{
-			"path": "pages/user/myCart/myCart",
-			"style": {
-				"navigationBarTitleText": "我的车辆"
-			}
-		},
-		{
-			"path": "pages/user/myteam",
-			"style": {
-				"navigationBarTitleText": "我的团队"
-			}
-		},
-		{
-			"path": "pages/user/award/award",
-			"style": {
-				"navigationBarTitleText": "佣金",
-				"navigationBarBackgroundColor": "#f6ab0b",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/user/award/awardList",
-			"style": {
-				"navigationBarTitleText": "佣金明细"
-			}
-		},
-		{
-			"path": "pages/user/award/withdrawal",
-			"style": {
-				"navigationBarTitleText": "提现"
-			}
-		},
-
-		// {
-		// 	"path": "pages/user/favorites",
-		// 	"style": {
-		// 		"navigationBarTitleText": "收藏夹"
-		// 	}
-		// }, {
-		// 	"path": "pages/user/coupon",
-		// 	"style": {
-		// 		"navigationBarTitleText": "我的卡卷"
-		// 	}
-		// },
-		// {
-		// 	"path": "pages/user/scoreAccumulate",
-		// 	"style": {
-		// 		"navigationBarTitleText": "积分明细"
-		// 	}
-		// },
-		{
-			"path": "pages/order/order",
+		}]
+	},
+	{
+		"root": "pages/order",
+		"name": "order",
+		"pages": [{
+			"path": "order",
 			"style": {
 				"navigationBarTitleText": "我的订单",
 				"app-plus": {
@@ -396,13 +353,13 @@
 			}
 		},
 		{
-			"path": "pages/order/orderAfter",
+			"path": "orderAfter",
 			"style": {
 				"navigationBarTitleText": "售后管理"
 			}
 		},
 		{
-			"path": "pages/order/orderDetail",
+			"path": "orderDetail",
 			"style": {
 				"navigationBarTitleText": "订单详情",
 				"app-plus": {
@@ -410,165 +367,32 @@
 				}
 			}
 		},
-		// {
-		// 	"path": "pages/order/evaluate",
-		// 	"style": {
-		// 		"navigationBarTitleText": "评论"
-		// 	}
-		// },
-		{
-			"path": "pages/order/orderRefund",
-			"style": {
-				"navigationBarTitleText": "申请退款"
-			}
-		},
-		{
-			"path": "pages/order/createOrder",
-			"style": {
-				"navigationBarTitleText": "创建订单"
-			}
-		},
-		{
-			"path": "pages/user/money/pay",
-			"style": {
-				"navigationBarTitleText": "支付",
-				"navigationBarBackgroundColor": "#0BBB62",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/user/money/paySuccess",
-			"style": {
-				"navigationBarTitleText": "支付成功"
-			}
-		},
-		{
-			"path": "pages/user/money/wallet",
-			"style": {
-				"navigationBarTitleText": "我的钱包",
-				"navigationBarBackgroundColor": "#0BBB62",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/user/money/walletList",
-			"style": {
-				"navigationBarTitleText": "余额明细"
-			}
-		},
-		{
-			"path": "pages/user/award/account",
-			"style": {
-				"navigationBarTitleText": "提现账号"
-			}
-		},
-		{
-			"path": "pages/user/money/recharge",
-			"style": {
-				"navigationBarTitleText": "充值",
-				"navigationBarBackgroundColor": "#0BBB62",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/shop/cartAciton",
-			"style": {
-				"navigationBarTitleText": "车辆激活"
-			}
-		},
-		{
-			"path": "pages/shop/repair/clientRepair",
-			"style": {
-				"navigationBarTitleText": "客户报修"
-			}
-		},
-		{
-			"path": "pages/shop/repair/taskClientRepair",
-			"style": {
-				"navigationBarTitleText": "维修任务"
-			}
-		},
-		{
-			"path": "pages/shop/repair/clientReparirDetail",
-			"style": {
-				"navigationBarTitleText": "报修详情"
-			}
-		},
-		{
-			"path": "pages/shop/repair/repairHistory",
-			"style": {
-				"navigationBarTitleText": "维修历史"
-			}
-		},
-		{
-			"path": "pages/shop/shopOrder",
-			"style": {
-				"navigationBarTitleText": "店铺订单"
-			}
-		},
-		{
-			"path": "pages/shop/shopOrderDetail",
-			"style": {
-				"navigationBarTitleText": "店铺订单详情"
-			}
-		},
-		{
-			"path": "pages/shop/shopOrderAfter",
-			"style": {
-				"navigationBarTitleText": "售后订单"
-			}
-		},
-		{
-			"path": "pages/shop/shopIndex",
-			"style": {
-				"navigationBarTitleText": "店铺详情",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
 		{
-			"path": "pages/category/category",
+			"path": "evaluate",
 			"style": {
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				"app-plus": {
-					"bounce": "none",
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "商品搜索",
-							"disabled": true,
-							"placeholderColor": "#606266",
-							"align": "left"
-						}
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "分类"
+				"navigationBarTitleText": "评论"
 			}
 		},
 		{
-			"path": "pages/public/redirect",
+			"path": "orderRefund",
 			"style": {
-				"navigationBarTitleText": "微信登录跳转页面",
-				"app-plus": {
-					"titleNView": false
-				}
+				"navigationBarTitleText": "申请退款"
 			}
 		},
 		{
-			"path": "pages/user/shareQrCode",
+			"path": "createOrder",
 			"style": {
-				"navigationBarTitleText": "邀请好友"
+				"navigationBarTitleText": "创建订单"
 			}
-		}
-	],
+		}]
+	},
+	{
+		"root": "pages/product",
+		"name": "product",
+		"pages": [
+			
+		]
+	}],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
@@ -581,39 +405,37 @@
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{
-				"pagePath": "pages/index/index",
+				"pagePath": "pages/home/index",
 				"iconPath": "static/tabBar/tab-home.png",
 				"selectedIconPath": "static/tabBar/tab-home-current.png",
 				"text": "首页"
 			},
-			// {
-			// 	"pagePath": "pages/category/category",
-			// 	"iconPath": "static/tabBar/tab-cate.png",
-			// 	"selectedIconPath": "static/tabBar/tab-cate-current.png",
-			// 	"text": "分类"
-			// },
 			{
-				"pagePath": "pages/cart/cart",
+				"pagePath": "pages/home/category",
+				"iconPath": "static/tabBar/tab-cate.png",
+				"selectedIconPath": "static/tabBar/tab-cate-current.png",
+				"text": "分类"
+			},
+			{
+				"pagePath": "pages/home/cart",
 				"iconPath": "static/tabBar/tab-cart.png",
 				"selectedIconPath": "static/tabBar/tab-cart-current.png",
 				"text": "购物车"
 			},
 			{
-				"pagePath": "pages/user/user",
+				"pagePath": "pages/home/user",
 				"iconPath": "static/tabBar/tab-my.png",
 				"selectedIconPath": "static/tabBar/tab-my-current.png",
 				"text": "我的"
 			}
 		]
 	},
-	"condition" : { //模式配置,仅开发期间生效
+	"condition": { //模式配置,仅开发期间生效
 		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [
-			{
-				"name": "", //模式名称
-				"path": "", //启动页面,必选
-				"query": "" //启动参数,在页面的onLoad函数里面得到
-			}
-		]
+		"list": [{
+			"name": "", //模式名称
+			"path": "", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
 	}
-}
+}

+ 0 - 0
pages/cart/cart.vue → pages/home/cart.vue


+ 0 - 0
pages/category/category.vue → pages/home/category.vue


+ 4 - 7
pages/index/index.vue → pages/home/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="indexBox">
-		<view class="navbox" v-if="userOn!=1">
+		<view class="navbox">
 			<view class="flex topIconBox">
 				<image @click="navTo('/pages/index/shopTab?type=1')" class="topIcon" src="../../static/icon/shop.png"
 					mode="widthFix"></image>
@@ -14,10 +14,9 @@
 				</view>
 			</view>
 		</view>
-		<on-user :notify='notify' ref='onuser' v-if="userOn==1"></on-user>
-		<no-user ref='nouser' v-if="userOn==2"></no-user>
+		<no-user ref='nouser'></no-user>
 		<!-- 引导图 -->
-		<view class="alertMap" v-if='showAlertMap' @touchmove.stop.prevent="()=>{}">
+		<view class="alertMap" v-if='showAlertMap&&alertImgMapList.length>0' @touchmove.stop.prevent="()=>{}">
 			<swiper class="alertMapBox" :indicator-dots='true'>
 				<swiper-item v-for="(item,index) in alertImgMapList">
 					<image class="alertImgMap" :src="item.image" mode="heightFix">
@@ -61,8 +60,7 @@
 	import {
 		storeList,
 	} from '@/api/shop.js';
-	import onUser from "./indexComponents/onUser.vue"
-	import noUser from "./indexComponents/noUser.vue"
+	import noUser from "@/pages/index/indexComponents/noUser.vue"
 	// #ifdef MP-WEIXIN
 	import {
 		openGetAddress
@@ -70,7 +68,6 @@
 	// #endif
 	export default {
 		components: {
-			onUser,
 			noUser
 		},
 		data() {

+ 591 - 0
pages/home/user.vue

@@ -0,0 +1,591 @@
+<template>
+	<view class="container">
+		<view class="vheigh"></view>
+		<scroll-view class="content-box" scroll-y="true">
+			<view class="user-section">
+				<view class="user-info-box ">
+					<view class="detail flex">
+						<view class="portrait-box" @click="navTo('/pages/set/userinfo')">
+							<image class="portrait" :src="user.avatar || '/static/error/missing-face.png'"></image>
+						</view>
+						<view class="info-box">
+							<view class="username flex-start">
+								<text class="clamp padding-r-20">
+									{{ user.nickname || '游客' }}
+								</text>
+								<image v-if="user.level>0" class="tipLevel flex-shrink-false"
+									:src="`../../static/image/level${user.level-1}.png`" mode="heightFix"></image>
+							</view>
+							<view class="flex-start flex">
+								<view class="authentication"
+									@click="navTo('/pages/user/realName/realNameAuthentication')"
+									v-if="userInfo.is_real==0||!userInfo.is_real">未实名认证</view>
+								<view class="authentication success" v-else>已认证</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="cover-container">
+				<view class="tj-sction">
+					<view class="tj-item" @click="navTo('./money/wallet')">
+						<text class="num">{{ user.now_money || '0.00' }}</text>
+						<text>余额</text>
+					</view>
+					<view v-if="fx" class="tj-item" @click="navTo('/pages/user/award/award')">
+						<text class="num">{{ user.brokerage_price || '0.00' }}</text>
+						<text>佣金</text>
+					</view>
+					<!-- <view class="tj-item" @click="navTo('/pages/index/route')">
+						<text class="num">{{ user.record_sum || '0' }}</text>
+						<text>行程</text>
+					</view> -->
+					<view class="tj-item" @click="navTo('/pages/index/notice')">
+						<text class="num">{{ notic|| '0' }}</text>
+						<text>消息</text>
+					</view>
+				</view>
+				<!-- 订单 -->
+				<view class="item-box">
+					<view class="box-title flex">
+						<view class="title"><text>我的订单</text></view>
+						<!-- <view class="link" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover">
+							<text>全部订单</text>
+							<text class="iconfont iconenter"></text>
+						</view> -->
+					</view>
+					<view class="order-section">
+						<view class="order-item" @click="navTo('/pages/order/order?state=3')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconAll.png" mode="aspectFit">
+								</image>
+								<!-- <view class="corner" v-if="orderInfo.unshipped_count > 0">
+									<text>{{ orderInfo.unshipped_count }}</text>
+								</view> -->
+							</view>
+							<text>已完成</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconPay.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="user.unpaid_count > 0">
+									<text>{{ user.unpaid_count }}</text>
+								</view>
+							</view>
+							<text>待付款</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconGet.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="user.received_count > 0">
+									<text>{{ user.received_count }}</text>
+								</view>
+							</view>
+							<text>待收货</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/orderAfter?state=0')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconout.png" mode="aspectFit">
+								</image>
+								<!-- <view class="corner" v-if="orderInfo.complete_count > 0">
+									<text>{{ orderInfo.complete_count }}</text>
+								</view> -->
+							</view>
+							<text>售后</text>
+						</view>
+					</view>
+				</view>
+				<view class="listBox">
+					<view class="list">
+						<view class="flex listItem" @click="navTo('/pages/user/myCart/myCart')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myCart.png" mode="widthFix"></image>
+								<text class="title">我的车辆</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/user/repair/userRepair')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">维修历史</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" v-if="fx" @click="navTo('/pages/user/myteam')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">我的团队</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/set/address')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myAddress.png" mode="widthFix">
+								</image>
+								<text class="title">我的地址</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<!-- #ifndef APP -->
+						<view class="flex listItem" @click="navTo('/pages/user/shareQrCode')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">邀请好友</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifdef APP -->
+						<view class="flex listItem" @click="shareDomApp">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">邀请好友</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifndef MP -->
+						<view class="flex listItem" @click="navTo('/pages/public/workwork')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myServer.png" mode="widthFix"></image>
+								<text class="title">关于我们</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/mySet.png" mode="widthFix"></image>
+								<text class="title">设置</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="tapBottom" v-if='user.adminid' @click="changeTab">
+					前往商家界面
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		share
+	} from '@/api/wx';
+	import {
+		getUser
+	} from '@/api/user.js';
+	import {
+		articleList,
+		notify
+	} from '@/api/index.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		data() {
+			return {
+				user: {
+					avatar: '', //头像
+					nickname: '', //昵称
+					now_money: 0, //余额
+					brokerage_price: 0, //佣金
+					record_sum: 0, //行程
+					notice_sum: 0, //报警信息
+					question_sum: 0, //系统消息
+					// 订单数据类型
+					orderStatusNum: {
+						unpaid_count: 0, //待付款
+						received_count: 0, //待收货
+					},
+				},
+				shareData: {}
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState(['baseURL', 'urlFile']),
+			...mapState(['fx']),
+			// 总消息条数
+			notic() {
+				return this.user.question_sum + this.user.notice_sum;
+			},
+		},
+		onLoad() {
+			share().then((res) => {
+				this.shareData = res.data.data
+			}).catch((res) => {
+				console.log(res, '分享加载失败');
+			})
+
+		},
+		onShow() {
+			if (this.hasLogin) {
+				this.loadBaseData();
+				this.getUser();
+			}
+		},
+		// 创建时获取分享信息
+		methods: {
+			loadBaseData() {
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						this.setUserInfo(data);
+						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+						orderData({})
+							.then(({
+								data
+							}) => {
+								this.setOrderInfo(data);
+							})
+							.catch(e => {
+								this.setOrderInfo({
+									complete_count: 0, //完成
+									received_count: 0, //待收货
+									unshipped_count: 0, //待发货
+									order_count: 0, //订单总数
+									unpaid_count: 0 //待付款
+								});
+							});
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			//#ifdef APP
+			shareDomApp() {
+				uni.share({
+					provider: 'weixin',
+					type: 0,
+					title: '绿津智能电动车',
+					summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
+					imageUrl: this.shareData.img,
+					href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
+				})
+			},
+			//#endif
+			// 获取用户数据
+			getUser() {
+				const that = this;
+				getUser({}).then((e) => {
+					this.user = e.data;
+				}).catch((e) => {
+					console.log(e);
+				})
+				// 系统消息
+				articleList({}, 1).then((e) => {
+					that.user.question_sum = e.data.count
+					console.log(that, 1);
+				}).catch((e) => {
+					console.log(e);
+				})
+				// 报警消息
+				notify().then((e) => {
+					that.user.notice_sum = e.data.count
+				}).catch((e) => {
+					console.log(e);
+				})
+			},
+			changeTab() {
+				this.$emit('tab', true)
+			},
+			navTo(url) {
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url,
+						fail(e) {
+							console.log(e);
+						}
+					});
+				}
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.tapBottom {
+		margin: 0 50rpx;
+		text-align: center;
+		color: #FFFFFF;
+		border: 1px solid $color-red;
+		background-color: $color-red;
+		line-height: 1;
+		padding: 25rpx;
+		border-radius: 100rpx;
+		margin-top: 50rpx;
+	}
+
+	.listBox {
+		margin-top: 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.right {
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				padding-left: 20rpx;
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	%flex-center {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	%section {
+		display: flex;
+		justify-content: space-around;
+		align-content: center;
+		border-radius: 10rpx;
+	}
+
+	.container {
+		height: 100%;
+		background-color: $page-color-base;
+	}
+
+	.content-box {
+		height: 100%;
+	}
+
+	.vheigh {
+		height: var(--status-bar-height);
+	}
+
+	.user-section {
+		padding: 15rpx 30rpx 0;
+		position: relative;
+	}
+
+	.user-info-box {
+		height: 180rpx;
+		color: white;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		z-index: 1;
+
+		.detail {
+			height: 130rpx;
+			flex-grow: 1;
+			overflow: hidden;
+
+			.portrait-box {
+				height: 100%;
+
+				.portrait {
+					width: 130rpx;
+					height: 100%;
+					border: 5rpx solid #fff;
+					border-radius: 50%;
+				}
+			}
+
+			.info-box {
+				margin-left: 20rpx;
+				line-height: 1.5;
+				flex-grow: 1;
+				overflow: hidden;
+
+				.tipLevel {
+					height: 36rpx;
+					margin-right: 20rpx;
+				}
+
+				.username {
+					font-size: 40rpx;
+					color: $font-color-dark;
+					font-weight: bold;
+					height: 100%;
+				}
+
+				.authentication {
+					border: 2rpx solid #FF4241;
+					border-radius: 20px;
+					padding: 0 25rpx;
+					font-size: 24rpx;
+					color: #FF4241;
+					float: left;
+
+					&.success {
+						border: 2rpx solid $color-green;
+						color: $color-green;
+					}
+				}
+			}
+		}
+	}
+
+	.cover-container {
+		padding: 0 30rpx;
+		position: relative;
+		padding-bottom: 20rpx;
+	}
+
+	.tj-sction {
+		@extend %section;
+
+		.tj-item {
+			@extend %flex-center;
+			flex-direction: column;
+			height: 100rpx;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+
+		.num {
+			font-size: $font-base;
+			color: $font-color-dark;
+			margin-bottom: 8rpx;
+			font-weight: bold;
+		}
+	}
+
+	.item-box {
+		border-radius: 20rpx;
+		background-color: white;
+		margin-top: 20rpx;
+
+		.box-title {
+			line-height: 1;
+			padding: 30rpx;
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.link {
+				font-size: $font-base - 2rpx;
+				color: $font-color-light;
+			}
+		}
+
+		.order-section {
+			@extend %section;
+			padding: 28rpx 0;
+			padding-top: 0;
+
+			.order-item {
+				@extend %flex-center;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 10rpx;
+				font-size: $font-sm;
+				color: $font-color-dark;
+			}
+
+			.iconfont {
+				font-size: 48rpx;
+				margin-bottom: 18rpx;
+				color: #fa436a;
+			}
+
+			.icon-shouhoutuikuan {
+				font-size: 44rpx;
+			}
+
+			.icon {
+				height: 50rpx;
+				width: 48rpx;
+				margin-bottom: 18rpx;
+				background-size: 100%;
+				background-repeat: no-repeat;
+				background-position: center;
+
+				.icon-img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.history-section {
+		// padding: 30rpx 0 0;
+		margin-top: 20rpx;
+		background: #fff;
+		border-radius: 10rpx;
+
+		.h-list {
+			white-space: nowrap;
+			padding: 30rpx 30rpx 0;
+
+			.h-list-image {
+				display: inline-block;
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 10rpx;
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/index/indexComponents/noUser.vue

@@ -37,7 +37,7 @@
 				</view>
 				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id+'&type=1')">
 					<text>全部</text>
-					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
+					<image class="itemIcon" src="/static/icon/next1.png" mode="widthFix"></image>
 				</view>
 			</view>
 			<view class="flex cartList">

+ 0 - 1223
pages/index/indexComponents/onUser.vue

@@ -1,1223 +0,0 @@
-<template>
-	<view class="pageBox">
-		<view class="userOff" v-if="actionCartItem">
-			<view class="navBox">
-				<view class="flex topIconBox">
-					<image @click="navTo('/pages/index/shopTab?type=1')" class="topIcon"
-						src="../../../static/controller/witchShop.png" mode="widthFix"></image>
-					<view v-if="actionCartItem" class="clamp padding-l-10 padding-r-10">
-						{{actionCartItem.car_name||''}}
-					</view>
-					<image @click="navTo('/pages/index/notice')" class="topIcon"
-						src="../../../static/controller/witchMessage.png" mode="widthFix">
-					</image>
-					<view class="topIconNum flex" v-if="notify>0">
-						<text>
-							{{notify}}
-						</text>
-					</view>
-				</view>
-			</view>
-			<view class="actionBox">
-				<image class="cartImg" :src="actionCartItem.image" mode="aspectFit"></image>
-				<view class="timeBox" v-if="actionCartItem.day>0">
-					<view style="border-radius: 20rpx;"
-						class="rowContentBox flexCenter lineBorder padding-l-20 padding-r-20 padding-t-10 padding-b-10">
-						<view class="tipMen"></view>
-						<view class="dayBox" v-if="actionCartItem.car_operate">
-							<view>
-								{{actionCartItem.day}}
-							</view>
-							<view class="oldDay margin-t-10">
-								剩余天数
-							</view>
-						</view>
-						<view class="dayBox" v-else>
-							<view class="oldDay margin-t-10 font-color-red">
-								已欠费
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="leftNotify" v-if="fx">
-					<navigator url="/pages/index/share">
-						<image class="img" src="../../../static/image/redPage.png" mode="aspectFill"></image>
-					</navigator>
-				</view>
-			</view>
-			<view class="content">
-				<view class="contentButtom flexCenter">
-					<view class="buttomBox flex">
-						<view class="leftBox">
-							<view class="buttom buttomLg ">
-								<view @click="authSet" class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view class="centerTextBox">
-										<view>
-											<image class="tipIcon" src="../../../static/controller/shouquan.png"
-												mode="aspectFit"></image>
-										</view>
-										<view class="margin-t-10">
-											授权
-										</view>
-									</view>
-								</view>
-								<view class="rightPaddingBg">
-								</view>
-								<view class="buttomPaddingBg">
-								</view>
-							</view>
-							<view class="leftCenterButtom buttom" @click="navTo('/pages/user/money/recharge')">
-								<view class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view>
-										<view>
-											充
-										</view>
-										<view>
-											值
-										</view>
-									</view>
-								</view>
-								<view class="topBageBg"></view>
-								<view class="bottomBageBg"></view>
-							</view>
-							<view class="buttomLg buttom">
-								<view @click="navTo('/pages/user/reportForRepair/Report?id='+actionCartItem.car_number)"
-									class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view class="centerTextBox">
-										<view>
-											<image class="tipIcon" src="../../../static/controller/baoxiu.png"
-												mode="aspectFit"></image>
-										</view>
-										<view class="margin-t-10">
-											报修
-										</view>
-									</view>
-								</view>
-								<view class="topPaddingBg"></view>
-								<view class="rightPaddingBg"></view>
-							</view>
-						</view>
-						<view class="centerBgBox">
-							<view class="centerBg lineBorder borderRadiusAll">
-								<view class="borTopHide"></view>
-								<view class="borBottomHide"></view>
-							</view>
-							<view class="bgGray borderRadiusAll"></view>
-							<view class="contentOrg borderRadiusAll">
-								<view class="contentOrgBg borderRadiusAll centerBox lineBorder2 flexCenter">
-									<view class="centerBoxJb borderRadiusAll lineBorder2">
-										<view class="boxBgJb borderRadiusAll flexCenter">
-											<view class="flex-center">
-												<view class="iconButtomBox borderRadiusAll flexCenter"
-													:class="{greedBg:actionCartItem.status==1||actionCartItem.status==3||actionCartItem.status==4}"
-													@click="tabCarStatus('tab',actionCartItem)">
-													<view class="mr borderRadiusAll "></view>
-													<view class="iconButtomJb">
-														<view>
-															<image class="img"
-																src="../../../static/controller/qidong.png"
-																mode="aspectFit"></image>
-														</view>
-														<view class="margin-t-10"
-															v-if="actionCartItem.status==1||actionCartItem.status==3||actionCartItem.status==4">
-															启动
-														</view>
-														<view class="margin-t-10" v-else>
-															关闭
-														</view>
-													</view>
-												</view>
-											</view>
-										</view>
-									</view>
-									<view class="line left"></view>
-									<view class="line right"></view>
-									<view @click="alertCartList" class="topButtomTipBox posbuttom flexCenter">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/huanche.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												换车
-											</view>
-										</view>
-									</view>
-									<view class="rightButtomTipBox posbuttom flexCenter"
-										@click="tabCarStatus('seek',actionCartItem)">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/xunche.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												寻车
-											</view>
-										</view>
-									</view>
-									<view
-										@click="openMap(actionCartItem.cartInfo.latitude,actionCartItem.cartInfo.longitude)"
-										class="bottomButtomTipBox posbuttom flexCenter">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/dingwei.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												定位
-											</view>
-										</view>
-									</view>
-									<view class="leftButtomTipBox posbuttom flexCenter"
-										@click="tabCarStatus('unlock',actionCartItem)">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/kaisuo.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												开座垫
-											</view>
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="rightBox">
-							<view class="rightButtom buttom flex">
-
-								<view class="centerTextBox">
-									<view>
-										{{actionCartItem.bfb||0}}%
-									</view>
-									<view>
-										<image class="tipIcon" src="../../../static/controller/dianchi.png"
-											mode="aspectFit"></image>
-									</view>
-								</view>
-								<view class="rightElectric flexCenter">
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>91}"></view>
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>83}"></view>
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>75}"></view>
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>66}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>58}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>50}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>41}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>33}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>24}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>16}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>8}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>0}"></view>
-								</view>
-							</view>
-							<view class=" buttomLg buttom"  @click="navTo('/pages/index/route?id='+actionCartItem.car_number)">
-								<view class="topBageBg"></view>
-								<view class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view class="centerTextBox margin-l-40 padding-l-30">
-										<view>
-											<image class="tipIcon" src="../../../static/controller/xincheng.png"
-												mode="aspectFit"></image>
-										</view>
-										<view class="margin-t-10">
-											行程
-										</view>
-									</view>
-								</view>
-								<view class="topPaddingBg"></view>
-								<view class="leftPaddingBg"></view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<uni-popup ref="popup" type="bottom" v-if="actionCartItem">
-			<view class="cartListAlertButtom">
-				<view class="cartTitle flex">
-					<view>
-						请选择更换的车辆
-					</view>
-					<image @click="popupClose" class="exit" src="../../../static/icon/goodsExit.png" mode="scaleToFill">
-					</image>
-				</view>
-				<view class="actionCartBox">
-					<view class="itemCart flex" :class="{action:item.id==actionCartItem.id}"
-						v-for="(item,index) in myCartList" @click="changeCart(index)" :key='index'>
-						<image class="cartImg" :src="item.image" mode="scaleToFill"></image>
-						<view class="content">
-							<view class="title clamp2" :class="{action:item.id==actionCartItem.id}">
-								{{item.car_name||''}}
-							</view>
-							<view class="address margin-t-20" :class="{action:item.id==actionCartItem.id}">
-								{{item.address||"暂无定位信息"}}
-							</view>
-						</view>
-					</view>
-				</view>
-
-				<view style="height: 1px;"></view>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		mycar,
-		getCarInfo,
-		getcar_status,
-		car_switch,
-		getUserInfo
-	} from '@/api/user.js';
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	// #ifdef MP
-	import {
-		openGetAddress,
-	} from '@/utils/rocessor.js';
-	// #endif
-	// #ifdef H5
-	import weixinObj from "@/plugin/jweixin-module/index.js";
-	import {
-		weixindata
-	} from "@/utils/wxAuthorized.js"
-	// #endif
-	export default {
-		props: {
-			notify: {
-				type: Number,
-				default: 0
-			},
-		},
-		data() {
-			return {
-				chickedMyCart: 0, //默认选中的车辆
-				// 我的车辆
-				myCartList: [],
-				ladingCart: false, //判断是否已经加载过我的车辆
-				// #ifdef H5
-				iconPath: '../../static/image/location.png', //定位图标地址
-				// #endif
-				// #ifndef H5
-				iconPath: '../../../static/image/location.png', //定位图标地址
-				// #endif
-				timeOut: '', //用于存放调用定时获取对象数据
-				reachangeAlert:false,//判断是否已经提示过充值
-			};
-		},
-		watch: {
-			reachange(newValue, oldValue) {
-				if (newValue && (this.actionCartItem.auth_num != -1)) {
-					uni.showModal({
-						title: '错误',
-						content: '您的余额已不足三天支付是否马上充值',
-						cancelText: '关闭',
-						confirmText: '马上充值',
-						success: res => {
-							if (res.confirm) {
-								this.navTo('/pages/user/money/recharge');
-							}
-						},
-					});
-				}
-
-			}
-		},
-		computed: {
-			...mapState('user', ['address', 'userInfo']),
-			...mapState(['fx']),
-			actionCartItem() {
-				if (this.myCartList[this.chickedMyCart]) {
-					return this.myCartList[this.chickedMyCart]
-				} else {
-					return false
-				}
-			},
-			reachange() {
-				// 余额
-				const a1 = +this.userInfo.now_money;
-				if (!this.actionCartItem) {
-					return false
-				}
-				// 三天内应该付的金额
-				const a2 = this.actionCartItem.day_deducted * 3;
-				if (a1 < a2 && !this.reachangeAlert&&this.actionCartItem.day>0) {
-					// 处理已加载提示用户充值信息
-					this.reachangeAlert = true;
-					return (new Date()).getTime()
-				} else {
-					return false
-				}
-			}
-		},
-		created() {
-			this.getUserInfo();
-		},
-		beforeDestroy() {
-
-		},
-		methods: {
-			...mapMutations('user', ['setAddress', 'setUserInfo']),
-			// 加载初始数据
-			getUserInfo() {
-				getUserInfo({})
-					.then(({
-						data
-					}) => {
-						this.setUserInfo(data)
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			// 设置tabbar背景颜色
-			setTabbar() {
-				uni.setTabBarStyle({
-					backgroundColor: '#25273E'
-				})
-			},
-			// 父元素启动监听
-			onStartGetCartInfo() {
-				console.log('监听');
-				if (this.timeOut) {
-					this.outGetCartInfo();
-				}
-				this.onGetCartInfo()
-			},
-			// 关闭定时获取车辆信息
-			outGetCartInfo() {
-				clearInterval(this.timeOut)
-			},
-			onGetCartInfo() {
-				this.getCarInfo(this.myCartList[this.chickedMyCart]);
-				this.timeOut = setInterval((e) => {
-					this.getCarInfo(this.myCartList[this.chickedMyCart]);
-				}, 60000)
-			},
-			// tab改变事件
-			changetab(tab) {
-				this.myCartList[this.chickedMyCart].status = tab
-			},
-			// 关闭车辆选择弹窗
-			popupClose() {
-				this.$refs.popup.close();
-			},
-			// 显示车辆选择列表
-			alertCartList() {
-				// 打开选择弹窗
-				this.$refs.popup.open();
-			},
-			// 打开地图导航
-			openMap(lat, long) {
-				uni.openLocation({
-					latitude: +lat,
-					longitude: +long,
-					complete(e) {
-						console.log(e, '地图打开');
-					}
-				})
-			},
-			// 切换更新车辆信息
-			changeCart(index) {
-				this.$refs.popup.close();
-				this.chickedMyCart = index;
-				// 判断是否已经加载过车辆信息未加载则更新信息
-				// if(!this.myCartList[this.chickedMyCart].cartInfoLoading){
-				const cart = this.myCartList[this.chickedMyCart];
-				this.getCarInfo(cart);
-				this.$emit("changeCart", cart)
-				// }
-			},
-			// 载入我的车辆列表
-			loadCard() {
-				let that = this;
-				mycar({}).then((e) => {
-					// 判断数据是由有过更新
-					if (that.myCartList.length != e.data.data.length) {
-						that.myCartList = e.data.data.map((e) => {
-							// 保存百分比
-							e.bfb = 0;
-							// 保存车辆消息
-							e.cartInfo = {}
-							// 判断是否已经加载数据
-							e.cartInfoLoading = false
-							return e
-						});
-						// 初始化选中的车辆
-						that.chickedMyCart = 0;
-						that.getCarInfo(that.myCartList[that.chickedMyCart])
-					}
-				}).catch((e) => {
-					console.log();
-				})
-			},
-			// 加载车辆信息
-			getCarInfo(item) {
-				getcar_status({
-					car_number: item.car_number
-				}).then((e) => {
-					// console.log(e, '车辆');
-					if (e.data.id) {
-						// 保存车辆信息
-						item.cartInfo = e.data;
-						// 保存电量百分比
-						item.bfb = +e.data.residue
-						item.cartInfo.latitude = +item.cartInfo.latitude;
-						item.cartInfo.longitude = +item.cartInfo.longitude;
-						if (!item.cartInfoLoading) {
-							this.onStartGetCartInfo()
-						}
-						// item.day = e.data.day;
-						item.cartInfoLoading = true;
-					}
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			// 调用切换
-			tabCarStatus(type = 'tab', item) {
-				uni.showLoading({
-					title: '请求发送中',
-					mask: true
-				});
-				let that = this;
-				let data = {
-					car_number: item.car_number,
-				};
-				// 是否开关锁
-				if (type == 'tab') {
-					data.status = (item.status == 1) ? 2 : 1;
-				}
-				// 是否解锁
-				if (type == 'unlock') {
-					data.status = 7;
-				}
-				// 是否寻车
-				if (type == 'seek') {
-					data.status = 5;
-				}
-				// #ifdef H5
-				let bool = uni.getStorageSync('weichatBrowser') || '';
-				uni.showLoading({
-					title: '获取地址中',
-					mask: true
-				});
-				// 判断是否公众号
-				if (bool) {
-					weixindata().then(() => {
-						weixinObj.getLocation({
-							type: 'gcj02',
-							success: (e) => {
-								uni.hideLoading()
-								data.latitude = e.latitude;
-								data.longitude = e.longitude;
-								that.car_switch(data, type, item)
-							},
-							fail() {
-								uni.hideLoading()
-							}
-						});
-					})
-				} else {
-					uni.getLocation({
-						type: 'gcj02',
-						success(e) {
-							uni.hideLoading()
-							data.latitude = e.latitude;
-							data.longitude = e.longitude;
-							that.car_switch(data, type, item)
-						},
-						fail(e) {
-							uni.hideLoading()
-							console.log(e, 'cw');
-						}
-					})
-				}
-
-				// #endif
-
-				// #ifdef MP
-				// 判断是否已经有位置数据
-
-				if (!that.address.latitude || !that.address.longitude) {
-					// 判断是否已经获取授权
-					openGetAddress().then((e) => {
-						uni.showLoading({
-							title: '获取地址中',
-							mask: true
-						});
-						// 获取当前选中开锁的对象
-						wx.startLocationUpdateBackground({
-							type: 'gcj02',
-							success: (e) => {
-								uni.hideLoading()
-								// 调用鉴定位置变化事件
-								wx.onLocationChange((res) => {
-									console.log(res, '位置数据');
-									// 保存当前经纬度
-									that.setAddress({
-										latitude: res.latitude,
-										longitude: res.longitude
-									})
-									// 判断是否已经加载过最近商家信息
-									if (!that.loadShopData) {
-										data.latitude = res.latitude;
-										data.longitude = res.longitude;
-										that.car_switch(data, type, item)
-										that.loadShopData = true;
-									}
-								})
-							},
-							fail: () => {
-								uni.hideLoading()
-							}
-						})
-
-					})
-				} else {
-					data.latitude = that.address.latitude;
-					data.longitude = that.address.longitude;
-					that.car_switch(data, type, item)
-				}
-				// #endif
-				// #ifdef APP
-				uni.getLocation({
-					type:'gcj02',
-					success(res){
-						data.latitude =res.latitude;
-						data.longitude = res.longitude;
-						that.car_switch(data, type, item);
-					},fail(e) {
-						uni.showModal({
-							title: '授权失败',
-							content: '未授权定位权限无法开启仪表盘功能',
-							showCancel: false,
-						});
-						console.log(e);
-					}
-				})
-				// #endif
-			},
-			// 保存地址
-			car_switch(data, type, item) {
-				uni.showLoading({
-					title: '请求发送中',
-					mask: true
-				});
-				car_switch(data).then((e) => {
-					if (type == 'tab') {
-						item.status = (item.status == 1) ? 2 : 1;
-					}
-					uni.hideLoading()
-					uni.showToast({
-						title: e.msg
-					});
-				}).catch((e) => {
-					uni.hideLoading()
-					uni.showModal({
-						title: '错误',
-						content: e.msg,
-						showCancel: false,
-					});
-				})
-			},
-			// 判断是否有权限授权车辆
-			authSet(){
-				if(this.actionCartItem.auth_num!=-1){
-					this.navTo('/pages/user/myCart/authorization?id='+this.actionCartItem.car_number)
-				}else{
-					uni.showModal({
-						title: '提示',
-						content: '该车辆是他人授权给您的车辆您无权二次授权',
-						showCancel: false,
-					});
-				}
-			},
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			}
-		},
-
-	};
-</script>
-
-<style lang="scss">
-	$paddingJg:40rpx;
-	// 按钮黑色背景
-	$bgBlack:#161727;
-	// 底色
-	$contentBg:#373c5a;
-	// 按钮包裹框背景颜色
-	$maxBoxBg:#1f2136;
-
-	.pageBox {
-		height: 0;
-		min-height: 100%;
-	}
-
-	.flexCenter {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
-
-	.navBox {
-		/* #ifdef APP */
-		padding-top: var(--status-bar-height);
-		padding-bottom: 30rpx;
-		/* #endif */
-		/* #ifdef H5 || MP */
-		padding-top: 30rpx;
-		padding-bottom: 30rpx;
-		/* #endif */
-		background-color: $contentBg;
-		flex-shrink: 0;
-	}
-
-	.topIconBox {
-		padding: 0 $paddingJg;
-		position: relative;
-		color: #FFFFFF;
-		font-size: $font-base + 2rpx;
-
-		.topIconNum {
-			position: absolute;
-			top: -10rpx;
-			right: 20rpx;
-			font-size: $font-sm;
-			min-width: 30rpx;
-			min-height: 30rpx;
-			border-radius: 100rpx;
-			background-color: $color-red;
-			padding: 5rpx;
-			justify-content: center;
-		}
-
-		.topIcon {
-			transform: rotateZ(-90deg);
-			width: 45rpx;
-			height: 45rpx;
-			flex-shrink: 0;
-		}
-	}
-
-	.userOff {
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-
-		.actionBox {
-			background-color: #0f1025;
-			flex-shrink: 1;
-			flex-grow: 1;
-			text-align: center;
-			height: 400rpx;
-			position: relative;
-
-			.cartImg {
-				height: 100%;
-				width: 100%;
-			}
-
-			.leftNotify {
-				position: absolute;
-				top: 20rpx;
-				left: 30rpx;
-
-				.img {
-					width: 120rpx;
-					height: 120rpx;
-				}
-			}
-
-			.timeBox {
-				position: absolute;
-				color: #FFFFFF;
-				right: 30rpx;
-				top: 30rpx;
-				font-size: $font-base;
-				font-weight: bold;
-
-				.dayBox {
-					z-index: 1;
-					line-height: 1;
-				}
-
-				.oldDay {
-					font-size: $font-sm - 2rpx;
-					color: $font-color-disabled;
-				}
-
-				.tipMen {
-					transform-origin: top left;
-					margin-left: 0;
-				}
-			}
-		}
-
-		.content {
-			flex-shrink: 0;
-			flex-grow: 1;
-		}
-
-		.lineBorder {
-			border: 1px solid #aaaec7;
-		}
-
-		.lineBorder2 {
-			border: 1px solid #b7cbf2;
-		}
-
-		.rowContentBox {
-			overflow: hidden;
-			background-color: $contentBg;
-
-			.tipMen {
-				position: absolute;
-				top: 0;
-				left: 0;
-				transform-origin: top left;
-				margin-left: -40rpx;
-				transform: rotateZ(-45deg);
-				height: 100%;
-				width: 100%;
-				background-image: linear-gradient(to bottom, rgba(69, 75, 113, 1) 0%, transparent 100%);
-			}
-		}
-
-		.rowContentBox,
-		.centerBox {
-			height: 100%;
-			width: 100%;
-			position: relative;
-		}
-
-		.contentButtom {
-
-			width: 750rpx;
-			height: 100%;
-			background-color: $maxBoxBg;
-			font-size: $font-base;
-			line-height: 1;
-
-			.centerTextBox {
-				text-align: center;
-				margin-left: -70rpx;
-			}
-
-			.tipIcon {
-				width: 46rpx;
-				height: 46rpx;
-			}
-
-			.buttomBox {
-				width: 750rpx;
-				padding: 40rpx;
-				color: #B2B9D3;
-
-				.buttom {
-					padding: 10rpx;
-					background-color: $bgBlack;
-					position: relative;
-
-					.rightPaddingBg,
-					.topPaddingBg,
-					.leftPaddingBg,
-					.buttomPaddingBg {
-						position: absolute;
-						background-color: $bgBlack;
-						z-index: 11;
-					}
-
-					.topPaddingBg,
-					.buttomPaddingBg {
-						height: 12rpx;
-						width: 180rpx;
-						left: 0;
-					}
-
-					.rightPaddingBg,
-					.leftPaddingBg {
-						height: 180rpx;
-						width: 10rpx;
-						top: 0rpx;
-					}
-
-					.topPaddingBg {
-						top: -1px;
-					}
-
-					.buttomPaddingBg {
-						button: 0rpx;
-					}
-
-					.rightPaddingBg {
-						right: 0rpx;
-					}
-
-					.leftPaddingBg {
-						left: 0;
-					}
-
-					.topBageBg,
-					.bottomBageBg {
-						height: 30rpx;
-						width: 180rpx;
-						background-color: $maxBoxBg;
-						position: absolute;
-						z-index: 10;
-					}
-
-					.topBageBg {
-						top: -30rpx;
-					}
-
-					.bottomBageBg {
-						bottom: -30rpx;
-					}
-				}
-
-				.centerBox {
-					// background-image: linear-gradient(to bottom, #49548d 0%, transparent 100%);
-					background-color: rgba($color: #49548d, $alpha: 0.5);
-					box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5) inset;
-				}
-
-
-				.buttomLg {
-					width: 180rpx;
-					height: 180rpx;
-				}
-
-
-				.leftBox {
-					.leftCenterButtom {
-						margin: 30rpx 0;
-						width: 80rpx;
-						height: 120rpx;
-						background-size: 80rpx 120rpx;
-						z-index: 99;
-
-						.tipMen {
-							margin-left: 0rpx;
-						}
-					}
-				}
-
-				.centerBgBox {
-					flex-shrink: 1;
-					position: relative;
-
-					.borderRadiusAll {
-						border-radius: 1000rpx;
-					}
-
-					.bgGray {
-						position: absolute;
-						top: 0;
-						left: 0;
-						background-color: $maxBoxBg;
-						width: 530rpx;
-						height: 530rpx;
-						z-index: 20;
-						left: -265rpx;
-						top: -265rpx;
-					}
-
-					.contentOrg {
-						position: absolute;
-						background-color: $bgBlack;
-						width: 480rpx;
-						height: 480rpx;
-						left: -240rpx;
-						top: -240rpx;
-						z-index: 99;
-						padding: 20rpx;
-
-						.contentOrgBg {
-							width: 100%;
-							height: 100%;
-							position: relative;
-							background-color: $contentBg;
-							background-image: linear-gradient(to bottom, rgba($color: #454b71, $alpha: 1) 0%, transparent 25%, transparent 75%, rgba($color: #454b71, $alpha: 1) 100%);
-
-							.posbuttom {
-								position: absolute;
-
-								.centerTextBox {
-									margin: 0;
-								}
-							}
-
-							.topButtomTipBox {
-								top: 0;
-								padding-bottom: 20rpx;
-							}
-
-							.bottomButtomTipBox {
-								bottom: 0;
-								padding-top: 20rpx;
-							}
-
-							.bottomButtomTipBox,
-							.topButtomTipBox {
-								width: 200rpx;
-								height: 140rpx;
-								margin: 0 auto;
-							}
-
-							.rightButtomTipBox,
-							.leftButtomTipBox {
-								width: 140rpx;
-								height: 200rpx;
-							}
-
-							.rightButtomTipBox {
-								padding-left: 20rpx;
-								right: 0;
-							}
-
-							.leftButtomTipBox {
-								padding-right: 20rpx;
-								left: 0;
-							}
-
-							.line {
-								position: absolute;
-								width: calc(440rpx + 2px);
-								height: 20rpx;
-								border-top: 1px solid #b7cbf2;
-								border-bottom: 1px solid #b7cbf2;
-								border-left: 1px solid $bgBlack;
-								border-right: 1px solid $bgBlack;
-								background-color: $bgBlack;
-								box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5);
-
-								&.left {
-									transform: rotateZ(45deg);
-								}
-
-								&.right {
-									transform: rotateZ(-45deg);
-
-								}
-							}
-
-							.centerBoxJb {
-								width: 200rpx;
-								height: 200rpx;
-								background-color: $bgBlack;
-								box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5);
-								position: relative;
-
-								.boxBgJb {
-									background-color: $bgBlack;
-									width: 100%;
-									height: 100%;
-									position: absolute;
-									z-index: 1;
-
-									.iconButtomBox {
-										font-size: $font-base;
-										color: #FFFFFF;
-										font-weight: bold;
-										width: 160rpx;
-										height: 160rpx;
-										background-color: #DEDEDE;
-										text-align: center;
-										background-color: #F6C531;
-										position: relative;
-
-										&.greedBg {
-											background-color: $color-green;
-										}
-
-										.mr {
-											position: absolute;
-											height: 100%;
-											width: 100%;
-											background-image: linear-gradient(to bottom, rgba($color: #FFFFFF, $alpha: 0.2) 0%, rgba($color: #FFFFFF, $alpha: 0) 50%, rgba($color: #FFFFFF, $alpha: 0) 100%);
-											box-shadow: 0px 0px 20rpx rgba($color: #FFFFFF, $alpha: 0.5) inset;
-										}
-
-										.iconButtomJb {
-											.img {
-												width: 75rpx;
-												height: 75rpx;
-
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-
-					.centerBg {
-						position: absolute;
-						left: -280rpx;
-						top: -280rpx;
-						background-color: $bgBlack;
-						width: 560rpx;
-						height: 560rpx;
-						z-index: 10;
-
-						.borTopHide {
-							top: -10rpx;
-							left: 120rpx;
-						}
-
-						.borBottomHide,
-						.borTopHide {
-							position: absolute;
-							height: 100rpx;
-							width: 316rpx;
-							background-color: $maxBoxBg;
-						}
-
-
-						.borBottomHide {
-							left: 120rpx;
-							bottom: -10rpx;
-						}
-					}
-				}
-
-				.rightBox {
-					flex-shrink: 0;
-
-					.rightElectric {
-						flex-direction: column;
-						padding-right: 6rpx;
-
-						.electric {
-							width: 40rpx;
-							height: 10rpx;
-							// border-radius: 10rpx;
-							background-color: $maxBoxBg;
-							margin-bottom: 16rpx;
-
-							// &:last-child{
-							// 	border-bottom-left-radius: 10rpx;
-							// 	border-bottom-right-radius: 10rpx;
-							// }
-							// &:first-child{
-							// 	border-top-left-radius: 10rpx;
-							// 	border-top-right-radius: 10rpx;
-							// }
-							&.greedBg {
-								background-color: $color-green;
-							}
-
-							&.yellowBg {
-								background-color: #F6C531;
-							}
-
-							&.redGb {
-								background-color: #DE2C2C;
-							}
-						}
-					}
-
-					.rightButtom {
-						position: relative;
-						z-index: 11;
-						margin-bottom: 30rpx;
-						width: 180rpx;
-						height: 330rpx;
-						padding-left: 30rpx;
-						padding-top: 16rpx;
-						align-items: flex-start;
-
-						.centerTextBox {
-							text-align: right;
-							margin-left: 16rpx;
-
-						}
-					}
-				}
-
-			}
-		}
-	}
-
-	.cartListAlertButtom {
-		position: relative;
-		padding-top: 20rpx;
-		border-top-left-radius: 30rpx;
-		border-top-right-radius: 30rpx;
-		background-color: #FFFFFF;
-		z-index: 999;
-		/* #ifdef H5 */
-		padding-bottom: var(--window-bottom);
-
-		/* #endif */
-		.actionCartBox {
-			padding-bottom: 40rpx;
-
-			.itemCart {
-				background-color: #F3F6F8;
-				margin: 0 30rpx 30rpx;
-				padding: 0 30rpx;
-				border-radius: 20rpx;
-				height: 200rpx;
-				text-align: left;
-
-				&.action {
-					background-color: $color-green;
-				}
-
-				.cartImg {
-					width: 120rpx;
-					height: 120rpx;
-				}
-
-				.content {
-					flex-grow: 1;
-					padding-left: 20rpx;
-				}
-
-				.title {
-					font-size: $font-base;
-					font-weight: bold;
-					color: $font-color-base;
-
-					&.action {
-						color: #FFFFFF;
-					}
-				}
-
-				.address {
-					line-height: 1;
-					font-size: $font-sm - 2rpx;
-					color: $font-color-disabled;
-
-					&.action {
-						color: #FFFFFF;
-					}
-				}
-			}
-		}
-
-		.cartTitle {
-			margin: 0 30rpx;
-			margin-bottom: 30rpx;
-			font-size: $font-lg;
-			font-weight: bold;
-
-			.exit {
-				width: 50rpx;
-				height: 50rpx;
-			}
-		}
-
-	}
-</style>

+ 0 - 277
pages/index/route.vue

@@ -1,277 +0,0 @@
-<template>
-	<view class="content">
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content padding-t-30" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<!-- #ifdef H5 -->
-					<empty src="../../static/error/emptyList.png"
-						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					<!-- #endif -->
-					<!-- #ifndef H5 -->
-					<empty src="../static/error/emptyList.png"
-						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					<!-- #endif -->
-					<!-- 订单列表 -->
-					<view v-for="(item,index) in tabItem.orderList" @click="navTo('./routeDetail?id='+item.id)">
-						<!-- <view class="timeDay">
-							{{items.time}}
-						</view> -->
-						<view class="routeItemBox">
-							<view class="cartName flex">
-								<view class="flex">
-									<image class="cartImg" :src="item.car.image" mode="scaleToFill">
-									</image>
-									<text class="carName">
-										{{item.car.car_name}}
-									</text>
-								</view>
-								<image class="iconRight" src="../../static/icon/next1.png" mode="widthFix"></image>
-							</view>
-							<view class="routeItem flex">
-								<view class="leftTime">
-									<view>
-										{{item.add_time}}
-									</view>
-								</view>
-								<view class="rightRoute flex">
-									<view class="leftImg">
-										<image src="../../static/image/routeContent.png" mode="widthFix"></image>
-									</view>
-									<view class="rightConent">
-										<view class="statusTitle">
-											起点
-										</view>
-										<view class="routeName clamp2">
-											{{item.start_address}}
-										</view>
-										<view class="contentJg">
-
-										</view>
-										<view class="statusTitle">
-											终点
-										</view>
-										<view class="routeName clamp2 end">
-											{{item.last_address}}
-										</view>
-									</view>
-								</view>
-							</view>
-							<!-- <view class="detailRoute flex">
-								<view class="flex">
-									<image src="../../static/icon/cartRoute.png" mode="widthFix"></image>
-									<text class="margin-l-10">{{item.route}}</text>
-								</view>
-								<view class="flex">
-									<image src="../../static/icon/cartTime.png" mode="widthFix"></image>
-									<text class="margin-l-10">{{item.timeAll}}</text>
-								</view>
-								<view class="flex">
-									<image src="../../static/icon/cartSpeed.png" mode="widthFix"></image>
-									<text class="margin-l-10">{{item.speed}}</text>
-								</view>
-							</view> -->
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	import {
-		car_record
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				id: '', //保存车辆car_number
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}]
-			};
-		},
-
-		onLoad(options) {
-			this.id = options.id || ''
-			this.loadData();
-		},
-		methods: {
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			},
-			// 转换金额为数字
-			// 确认收货
-			//获取订单列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				console.log(navItem, '数据');
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				car_record({
-						car_number: this.id,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == arr.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.list-scroll-content,
-	.swiper-box {
-		height: 100%;
-	}
-
-	.timeDay {
-		font-size: 32rpx;
-		font-weight: 400;
-		padding: 30rpx;
-	}
-
-	.routeItemBox {
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		margin: 0 30rpx;
-		margin-bottom: 30rpx;
-		line-height: 1.5;
-		padding-bottom: 30rpx;
-		padding-top: 10rpx;
-
-		.cartName {
-			font-size: 32rpx;
-			font-weight: 400;
-			padding: 20rpx 30rpx;
-			border-bottom: 1px solid $page-color-light;
-
-			.carName {
-				padding-left: 20rpx;
-			}
-
-			.cartImg {
-				width: 60rpx;
-				height: 60rpx;
-			}
-
-			.iconRight {
-				width: 26rpx;
-			}
-		}
-
-		.detailRoute {
-			color: $font-color-base;
-			font-weight: 100;
-			margin: 0 30rpx;
-			background-color: #F3F6F8;
-			padding: 10rpx 30rpx;
-			border-radius: 20rpx;
-
-			image {
-				width: 36rpx;
-				font-size: 24rpx;
-			}
-		}
-
-		.routeItem {
-			align-items: flex-start;
-			padding-top: 20rpx;
-
-			.leftTime {
-				width: 70rpx;
-				margin: 50rpx;
-				flex-shrink: 0;
-				font-size: 24rpx;
-				font-weight: 100;
-			}
-
-			.rightRoute {
-				flex-grow: 1;
-				// height: 262rpx;
-				align-items: flex-start;
-
-				.leftImg {
-					image {
-						width: 36rpx;
-					}
-				}
-
-				.rightConent {
-					padding-left: 20rpx;
-					flex-grow: 1;
-
-					.statusTitle {
-						color: $font-color-light;
-						font-size: 22rpx;
-					}
-
-					.routeName {
-						color: $font-color-base;
-						font-size: 28rpx;
-						min-height: 2.5rem;
-						margin-bottom: 15rpx;
-
-						&.end {
-							min-height: 1.5rem;
-						}
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 85
pages/index/routeDetail.vue

@@ -1,85 +0,0 @@
-<template>
-	<map class="map" id="map" ref="map1" :polyline='carRouteList' :markers="markers"></map>
-</template>
-
-<script>
-	import {
-		record_info
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				// 路线图
-				carRouteList: [],
-				id: 0,
-				map: '',
-				markers:[],
-			};
-		},
-		onLoad: function(option) {
-			this.id = option.id
-		},
-		onReady() {
-			this.info()
-		},
-		methods: {
-			// 获取路径详细
-			info() {
-				record_info({
-					id: this.id
-				}).then((e) => {
-					let data = [{
-						points: [],
-						color: '#0BBB62',
-						width: 5,
-						arrowLine: true
-					}]
-					console.log(data[0]);
-					e.data.location.forEach((e) => {
-						const address = e.split(',');
-						data[0].points.push({
-							longitude: +address[0],
-							latitude: +address[1]
-						})
-					})
-					this.carRouteList = data;
-					const item0 = data[0].points[0];
-					const item1 = data[0].points[data[0].points.length-1];
-					this.markers = [
-						{
-							id:1,
-							longitude:item0.longitude,
-							latitude: item0.latitude,
-							iconPath:'../../static/image/stImg.png',
-							width:30,
-							height:30
-						},{
-							id:2,
-							longitude:item1.longitude,
-							latitude: item1.latitude,
-							iconPath:'../../static/image/endImg.png',
-							width:30,
-							height:30
-						}
-					]
-					this.map = uni.createMapContext("map", this);
-					this.map.includePoints({
-						padding: [100, 20, 300, 20],
-						points: data[0].points
-					})
-				})
-			}
-		}
-	};
-</script>
-
-<style>
-	page {
-		height: 100%;
-	}
-
-	.map {
-		height: 100%;
-		width: 750rpx;
-	}
-</style>

+ 8 - 2
pages/order/createOrder.vue

@@ -219,7 +219,10 @@
 			submit() {
 				let obj = this;
 				if (!this.addressData.real_name) {
-					this.$api.msg('请选择收货地址');
+					uni.showToast({
+						title: '请选择收货地址',
+						icon:'none'
+					});
 					return false;
 				}
 				// 判断是否余额不足
@@ -391,7 +394,10 @@
 							if (status == 200 && data.status == 'SUCCESS') {
 								obj.paySuccessTo();
 							} else {
-								obj.$api.msg(msg);
+								uni.showToast({
+									title: msg,
+									icon:'none'
+								});
 							}
 						} else {
 							// 立即支付

+ 2 - 6
pages/order/evaluate.vue

@@ -16,11 +16,11 @@
 			<view>
 				<view class="flex_item zhil">
 					<view>商品质量</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
+					<view><uni-rate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uni-rate></view>
 				</view>
 				<view class="flex_item zhil">
 					<view>服务态度</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
+					<view><uni-rate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uni-rate></view>
 				</view>
 				<view class="equity_box">
 					<view class="text-box uni-textarea">
@@ -46,11 +46,7 @@
 
 <script>
 import { product, upload, order_comment } from '@/api/order.js';
-import uniRate from '@/components/uni-rate/uni-rate.vue';
 export default {
-	components: {
-		uniRate
-	},
 	data() {
 		return {
 			list: '', //订单详情

+ 4 - 1
pages/order/orderDetail.vue

@@ -296,7 +296,10 @@
 						duration: 2000
 					});
 				} else {
-					this.$api.msg('复制失败');
+					uni.showToast({
+						title: '复制失败',
+						icon:'none'
+					});
 				}
 				// #endif
 			}

+ 20 - 5
pages/public/forget.vue

@@ -68,15 +68,24 @@
 			register() {
 				let obj = this;
 				if (obj.phone == '') {
-					obj.$api.msg('请输入电话号码');
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
 					return;
 				}
 				if (this.phone.length != 11) {
-					obj.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
 					return;
 				}
 				if (obj.password == '') {
-					obj.$api.msg('请输入密码');
+					uni.showToast({
+						title: "请输入密码",
+						icon:'none'
+					});
 					return;
 				}
 				registerReset({
@@ -102,11 +111,17 @@
 			verification() {
 				let obj = this;
 				if (this.phone == '') {
-					this.$api.msg('请输入电话号码');
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
 					return;
 				}
 				if (this.phone.length < 11) {
-					this.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
 					return;
 				}
 				// 判断是否在倒计时

+ 8 - 2
pages/public/login.vue

@@ -144,11 +144,17 @@
 				let obj = this;
 				
 				if (obj.username == '') {
-					obj.$api.msg('请输入手机号');
+					uni.showToast({
+						title: "请输入手机号",
+						icon:'none'
+					});
 					return;
 				}
 				if (obj.passward == '') {
-					obj.$api.msg('请输入密码');
+					uni.showToast({
+						title: "请输入密码",
+						icon:'none'
+					});
 					return;
 				}
 				if(!this.checked){

+ 20 - 5
pages/public/phoneLogin.vue

@@ -124,15 +124,24 @@
 				let obj = this;
 
 				if (obj.phone == '') {
-					obj.$api.msg('请输入电话号码');
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
 					return;
 				}
 				if (obj.phone.length!=11) {
-					obj.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
 					return;
 				}
 				if (obj.code == '') {
-					obj.$api.msg('请输入验证码');
+					uni.showToast({
+						title: "请输入验证码",
+						icon:'none'
+					});
 					return;
 				}
 				if (!obj.checked) {
@@ -165,11 +174,17 @@
 			verification() {
 				let obj = this;
 				if (this.phone == '') {
-					this.$api.msg('请输入电话号码');
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
 					return;
 				}
 				if (this.phone.length < 11) {
-					this.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
 					return;
 				}
 				// 判断是否在倒计时

+ 4 - 1
pages/public/redirect.vue

@@ -20,6 +20,9 @@
 		wechatMpAuth
 	} from '@/api/wx';
 	// #endif
+	import {
+		prePage
+	} from '@/utils/rocessor.js';
 	export default {
 		computed: {
 			...mapState(['urlFile'])
@@ -64,7 +67,7 @@
 			loadMp(option) {
 				let obj = this;
 				// 获取登录授权页数据
-				let user = obj.$api.prePage().userInfo;
+				let user = prePage().userInfo;
 				// #ifndef MP
 				// 获取推广人id
 				let spread_spid = uni.getStorageSync('spread') || '';

+ 28 - 7
pages/public/register.vue

@@ -89,23 +89,38 @@
 			register() {
 				let obj = this;
 				if (obj.phone == '') {
-					obj.$api.msg('请输入电话号码');
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
 					return;
 				}
 				if (this.phone.length != 11) {
-					obj.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
 					return;
 				}
 				if (obj.password == '') {
-					obj.$api.msg('请输入密码');
+					uni.showToast({
+						title:"请输入密码",
+						icon:"none"
+					})
 					return;
 				}
 				if (obj.repassword == '') {
-					obj.$api.msg('请再次输入密码');
+					uni.showToast({
+						title:"请再次输入密码",
+						icon:"none"
+					})
 					return;
 				}
 				if (obj.repassword != obj.password) {
-					obj.$api.msg('两次密码不正确');
+					uni.showToast({
+						title:"两次密码不正确",
+						icon:"none"
+					})
 					return;
 				}
 				register({
@@ -140,11 +155,17 @@
 			verification() {
 				let obj = this;
 				if (this.phone == '') {
-					this.$api.msg('请输入电话号码');
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
 					return;
 				}
 				if (this.phone.length < 11) {
-					this.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
 					return;
 				}
 				// 判断是否在倒计时

+ 4 - 1
pages/public/wxLogin.vue

@@ -264,7 +264,10 @@
 				obj.bindPhone(requestData).then((ar) => {
 
 					if (ar.data.is_bind == 1) {
-						obj.$api.msg(e.msg);
+						uni.showToast({
+							title:e.msg,
+							icon:"none"
+						})
 					} else {
 						obj.GetUser().then((data) => {
 							obj.setUserInfo(data);

+ 9 - 3
pages/set/address.vue

@@ -57,6 +57,9 @@
 	import {
 		weixindata
 	} from "../../utils/wxAuthorized.js"
+	import {
+		prePage
+	} from '@/utils/rocessor.js';
 	// #endif
 	export default {
 		data() {
@@ -105,7 +108,10 @@
 				}).then(({
 					data
 				}) => {
-					this.$api.msg('删除成功')
+					uni.showToast({
+						title:"删除成功",
+						icon:"none"
+					})
 				})
 				let s = this.addressList.indexOf(item);
 				this.addressList.splice(s, 1);
@@ -113,8 +119,8 @@
 			//选择地址
 			checkAddress(item) {
 				if (this.source == 1) {
-					//this.$api.prePage()获取上一页实例,在App.vue定义
-					this.$api.prePage().addressData = item;
+					//prePage()获取上一页实例,在App.vue定义
+					prePage().addressData = item;
 					uni.navigateBack();
 				}
 			},

+ 21 - 6
pages/set/addressManage.vue

@@ -60,6 +60,9 @@
 	import {
 		addressEdit
 	} from '@/api/user.js';
+	import {
+		prePage
+	} from '@/utils/rocessor.js';
 	export default {
 		components: {
 			pickerAddress,
@@ -137,23 +140,35 @@
 				let obj = this;
 				let data = this.addressData;
 				if (!data.name) {
-					this.$api.msg('请填写收货人姓名');
+					uni.showToast({
+						title:"请填写收货人姓名",
+						icon:"none"
+					})
 					return;
 				}
 				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)) {
-					this.$api.msg('请输入正确的手机号码');
+					uni.showToast({
+						title:"请输入正确的手机号码",
+						icon:"none"
+					})
 					return;
 				}
 				if (!data.address) {
-					this.$api.msg('请在地图选择所在位置');
+					uni.showToast({
+						title:"请在地图选择所在位置",
+						icon:"none"
+					})
 					return;
 				}
 				if (!data.area) {
-					this.$api.msg('请填写门牌号信息');
+					uni.showToast({
+						title:"请填写门牌号信息",
+						icon:"none"
+					})
 					return;
 				}
 
-				//this.$api.prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
+				//prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
 				addressEdit({
 					real_name: data.name,
 					phone: data.mobile,
@@ -167,7 +182,7 @@
 					id: data.id || "",
 					type: 1
 				}).then(function(e) {
-					obj.$api.prePage().refreshList();
+					prePage().refreshList();
 					uni.showToast({
 						title: '提交成功',
 						duration: 2000

+ 12 - 3
pages/set/password.vue

@@ -99,11 +99,17 @@
 			verification() {
 				let obj = this;
 				if (this.account == '') {
-					this.$api.msg('请输入电话号码');
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
 					return;
 				}
 				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
-					this.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
 					return;
 				}
 				// 判断是否在倒计时
@@ -147,7 +153,10 @@
 						data
 					}) => {
 						this.loding = false;
-						this.$api.msg('修改成功');
+						uni.showToast({
+							title:"修改成功",
+							icon:"success"
+						})
 					})
 					.catch(err => {
 						this.loding = false;

+ 12 - 3
pages/set/phone.vue

@@ -81,11 +81,17 @@
 			verification() {
 				let obj = this;
 				if (this.account == '') {
-					this.$api.msg('请输入电话号码');
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
 					return;
 				}
 				if (this.account.length != 11) {
-					this.$api.msg('请输入正确的手机号');
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
 					return;
 				}
 				// 判断是否在倒计时
@@ -119,7 +125,10 @@
 					.then(({
 						data
 					}) => {
-						obj.$api.msg('绑定成功!');
+						uni.showToast({
+							title:"绑定成功",
+							icon:"success"
+						})
 						setTimeout(function() {
 							obj.loding = false;
 							uni.switchTab({

+ 4 - 1
pages/set/userinfo.vue

@@ -79,7 +79,10 @@
 						nickname: this.userInfo.nickname
 					})
 					.then(e => {
-						this.$api.msg('修改成功');
+						uni.showToast({
+							title:"修改成功",
+							icon:"success"
+						})
 						setTimeout(() => {
 							uni.switchTab({
 								url: '/pages/user/user'

+ 0 - 312
pages/shop/cartAciton.vue

@@ -1,312 +0,0 @@
-<template>
-	<view class="content padding-t-30">
-		<view class="listBox">
-			<view class="list">
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">店铺名称</text>
-					</view>
-					<view class="right flex">
-						<text>{{shopAction.name}}</text>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">车辆品牌</text>
-					</view>
-					<view class="right flex">
-						<text>{{cartName}}</text>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">客户名称</text>
-					</view>
-					<view class="right flex">
-						<text>{{userName}}</text>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">客户手机</text>
-					</view>
-					<view class="right flex">
-						<text>{{userPhone}}</text>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">车架号</text>
-					</view>
-					<view class="right flex">
-						<input class="input" type="text" v-model="cartId" placeholder="请输入车架号"
-							placeholder-class="placeholder" />
-						<image @click="openScend" class="img margin-l-10" src="../../static/icon/scend.png"
-							mode="widthFix"></image>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">批次</text>
-					</view>
-					<view class="right flex">
-						<picker class="input" mode="selector" range-key='name' :range="pcList" @change="changePc">
-							<view class="flex items-right">
-								<view class="margin-r-10" v-if="pcList.length>0">
-									{{pcList[pcIndex].name}}
-								</view>
-								<image class="iconTip" src="../../static/icon/dom.png" mode="aspectFit"></image>
-							</view>
-						</picker>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">型号</text>
-					</view>
-					<view class="right flex">
-						<picker class="input" mode="selector" range-key='name' :range="typeList" @change="changeType">
-							<view class="flex items-right">
-								<view class="margin-r-10"  v-if="typeList.length>0">{{typeList[tpyeIndex].name}}</view>
-								<image class="iconTip" src="../../static/icon/dom.png" mode="aspectFit"></image>
-							</view>
-							
-						</picker>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view :class="{bgGray:loding}" class="add-btn" @click="confirm">提交</view>
-	</view>
-</template>
-
-<script>
-	import {
-		orderDetail,
-		set_car_number,
-		batch,
-		carType
-	} from '@/api/shop.js';
-	// #ifdef H5
-	import weixinObj from "@/plugin/jweixin-module/index.js";
-	import {
-		weixindata
-	} from "../../utils/wxAuthorized.js"
-	// #endif
-	import {
-		mapState
-	} from 'vuex';
-	export default {
-		computed: {
-			...mapState('shop', ['shopAction'])
-		},
-		watch: {
-			cartId(newValue, oldValue) {
-				for (let i = 0; i < this.pcList.length; i++) {
-					if(+this.pcList[i].lan == newValue.length){
-						this.changePc({
-							detail:{
-								value:i
-							}
-						})
-						break
-					}
-				}
-			}
-		},
-		data() {
-			return {
-				pcIndex: 0, //当前选中的批次
-				tpyeIndex: 0, //当前选中的类型
-				cartId: '', //车架号
-				userName: '',
-				userPhone: '',
-				cartName: '',
-				orderid: '', //保存订单id
-				loding: false, //啊判断是否上传中
-				pcList: [], //车辆批次列表
-				typeList: [] //车辆类型列表
-			}
-		},
-		onLoad(option) {
-			this.orderid = option.id;
-			this.getOrderDetail();
-			// 获取车辆批次
-			this.batch();
-			this.carType();
-		},
-		methods: {
-			batch() {
-				batch().then((e) => {
-					this.pcList = e.data;
-					console.log(e);
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			carType() {
-				carType().then((e) => {
-					this.typeList = e.data;
-					console.log(e);
-				})
-			},
-			// 车辆批次切换
-			changePc(e) {
-				this.pcIndex = e.detail.value;
-				console.log(e, '切换');
-			},
-			// 车辆类型切换
-			changeType(e) {
-				this.tpyeIndex = e.detail.value;
-				console.log(e, '切换');
-			},
-			// 提交事件
-			confirm() {
-				if (!this.cartId) {
-					uni.showModal({
-						title: '提示',
-						content: '请扫码或输入车架号',
-						showCancel: false,
-					});
-					return
-				}
-				if (this.loding) {
-					return
-				}
-				this.loding = true;
-				set_car_number({
-					order_id: this.orderid,
-					car_number: this.cartId,
-					car_batch: this.pcList[this.pcIndex].value,
-					car_type: this.typeList[this.tpyeIndex].value,
-				}).then((e) => {
-					this.loding = false;
-					uni.showModal({
-						title: '提示',
-						content: '车辆激活成功过!',
-						showCancel: false,
-						success: res => {
-							uni.navigateBack()
-						},
-					});
-
-					console.log(e);
-				}).catch((e) => {
-					this.loding = false;
-					console.log(e);
-				})
-
-			},
-			getOrderDetail() {
-				let that = this;
-				orderDetail({}, that.orderid).then(({
-					data
-				}) => {
-					that.userName = data.real_name;
-					that.userPhone = data.user_phone;
-					that.cartName = data._info[0].cart_info.productInfo.store_name
-					console.log(data, '数据');
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			openScend() {
-				let that = this;
-				// #ifdef H5
-				weixindata().then(() => {
-					weixinObj.scanQRCode({
-						needResult: 1,
-						success: (data) => {
-							that.cartId = data.resultStr;
-						}
-					});
-				})
-				// #endif
-				// #ifndef H5
-				uni.scanCode({
-					success: (e) => {
-						// 保存二维码
-						that.cartId = e.result;
-						console.log(e);
-					},
-					fail() {
-						console.log(e);
-					}
-				})
-				// #endif
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.listBox {
-		margin: $page-row-spacing;
-		border-radius: 20rpx;
-		overflow: hidden;
-		background-color: #FFFFFF;
-	}
-
-	.list {
-		.listItem {
-			padding: 35rpx 40rpx;
-			border-bottom: 1px solid $page-color-light;
-			.iconTip {
-				width: 36rpx;
-				height: 36rpx;
-			}
-		}
-
-		.listIconImg {
-			width: 36rpx;
-		}
-
-		.right {
-			color: $font-color-light;
-			font-size: $font-base;
-			flex-grow: 1;
-			justify-content: flex-end;
-			padding-left: 20rpx;
-
-			.img {
-				width: 36rpx;
-			}
-		}
-
-		.input {
-			flex-grow: 1;
-			text-align: right;
-			font-size: $font-base;
-			color: $color-gray;
-		}
-
-		.titleBox {
-			flex-shrink: 0;
-
-			.title {
-				color: $font-color-base;
-				font-size: $font-base;
-			}
-		}
-	}
-
-	.add-btn {
-		background-color: $color-green;
-		font-size: 28rpx;
-		padding: 30rpx;
-		color: #FFFFFF;
-		margin: 0 50rpx;
-		border-radius: 100rpx;
-		margin-top: 100rpx;
-		text-align: center;
-		position: fixed;
-		left: 30rpx;
-		right: 30rpx;
-		bottom: 30rpx;
-		z-index: 95;
-
-		&.bgGray {
-			background-color: $font-color-disabled;
-		}
-	}
-</style>

+ 0 - 301
pages/shop/repair/clientRepair.vue

@@ -1,301 +0,0 @@
-<template>
-	<view class="container ">
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view class="itemBox" v-for="(item,index) in tabItem.orderList">
-						<view class="flex item">
-							<view class="title">
-								报修车辆:
-							</view>
-							<view class="content">
-								{{item.car.car_name}}
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								维修单号:
-							</view>
-							<view class="content">
-								{{item.order_id}}
-							</view>
-						</view>
-						<view class="flex item" @click="openAddress(item)">
-							<view class="title">
-								维修地点:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopAddress.png" mode="widthFix"></image>
-								<text class="margin-l-10">{{item.address}}</text>
-							</view>
-						</view>
-						<view class="flex item" @click="openPhone(item.phone)">
-							<view class="title">
-								联系电话:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-								<text class="margin-l-10">
-									{{item.phone}}
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								申报时间:
-							</view>
-							<view class="content">
-								{{item.add_time}}
-							</view>
-						</view>
-						<view  @click="navDetail(item)" class="flex padding-t-20" v-if="navList[tabCurrentIndex].state==0">
-							<!-- <view class="boxButtom flex btn1" @click="">
-								联系不上
-							</view> -->
-								<view class="boxButtom flex btn2">
-									安排人员前往
-								</view>
-						</view>
-						<view  @click="navDetail(item)" class="flex padding-t-20" v-if="navList[tabCurrentIndex].state==1">
-							<view class="boxButtom flex btn1">
-								已安排{{item.processor_user.staff_name}}前往维修
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-<script>
-	import {
-		question
-	} from '@/api/shop.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '安排维修',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}, {
-					state: 1,
-					text: '正在维修',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}, ]
-			};
-		},
-		onLoad() {
-			this.loadData();
-		},
-		methods: {
-			// 跳转详细页面
-			navDetail(item){
-				uni.navigateTo({
-					url:'./clientReparirDetail?id='+item.order_id
-				})
-			},
-			// 打开地址
-			openAddress(res) {
-				console.log(res, '返回的位置数据');
-				uni.chooseLocation({
-					latitude: res.latitude,
-					longitude: res.longitude,
-					success(re) {
-						console.log(re, '当前位置');
-					},
-					fail(e) {
-						console.log(e, 'cw');
-					}
-				})
-			},
-			// 拨打电话
-			openPhone(item) {
-				uni.makePhoneCall({
-					phoneNumber:item //仅为示例
-				});
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-				this.loadData('tabChange');
-			},
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			// 加载数据
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				console.log('开始请求');
-				question({
-						status: state,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-<style lang="scss">
-	page,.container {
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: calc(100% - 40px);
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-	}
-
-	.navbar {
-
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.itemBox {
-		margin: 0 $page-row-spacing;
-		margin-bottom: $page-row-spacing;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		padding: 40rpx 0;
-
-		.boxButtom {
-			justify-content: center;
-			margin: 0 30rpx;
-			color: $color-green;
-			font-size: 24rpx;
-			height: 70rpx;
-			border-radius: 100rpx;
-			line-height: 1;
-			padding: 0 50rpx;
-			flex-grow: 1;
-
-			&.btn3 {
-				border: 1px solid $uni-color-warning;
-				color: $uni-color-warning;
-			}
-
-			&.btn1 {
-				border: 1px solid $font-color-light;
-				color: $font-color-light;
-			}
-
-			&.btn2 {
-				color: #FFFFFF;
-				background-color: $color-green;
-				padding: 0 120rpx;
-			}
-		}
-
-		.item {
-			justify-content: flex-start;
-			padding: 30rpx;
-			padding-top: 0;
-			font-size: $font-base;
-
-			.title {
-				flex-shrink: 0;
-				color: $font-color-base;
-			}
-
-			.content {
-				color: $font-color-light;
-
-				.icon {
-					width: 32rpx;
-				}
-			}
-
-		}
-	}
-</style>

+ 0 - 543
pages/shop/repair/clientReparirDetail.vue

@@ -1,543 +0,0 @@
-<template>
-	<view class="container padding-t-30">
-		<view class="itemBox">
-			<view v-if='item.car' class="flex item">
-				<view class="title">
-					报修车辆:
-				</view>
-				<view class="content">
-					{{item.car.car_name}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					维修单号:
-				</view>
-				<view class="content">
-					{{id}}
-				</view>
-			</view>
-			<view class="flex item" @click="openAddress(item)">
-				<view class="title">
-					维修地点:
-				</view>
-				<view class="content flex">
-					<image class="icon" src="../../../static/icon/shopAddress.png" mode="widthFix"></image>
-					<text class="margin-l-10">{{item.address}}</text>
-				</view>
-			</view>
-			<view class="flex item" @click="openPhone(item.phone)">
-				<view class="title">
-					联系电话:
-				</view>
-				<view class="content flex">
-					<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-					<text class="margin-l-10">
-						{{item.phone}}
-					</text>
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					申报时间:
-				</view>
-				<view class="content">
-					{{item.add_time}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					故障概述:
-				</view>
-				<view class="content">
-					{{item.content}}
-				</view>
-			</view>
-			<view class="flex item" v-if="item.status>1">
-				<view class="title">
-					维修师傅:
-				</view>
-				<view class="content">
-					{{item.processor_user.staff_name}}
-				</view>
-			</view>
-			<view class="flex item" @click="openPhone(item.processor_user.phone)" v-if="item.status>1">
-				<view class="title">
-					师傅电话:
-				</view>
-				<view class="content flex">
-					<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-					<text class="margin-l-10">
-						{{item.processor_user.phone}}
-					</text>
-				</view>
-			</view>
-			<view class="flex item" v-if="item.status>1">
-				<view class="title">
-					处理结果:
-				</view>
-				<view class="content">
-					{{item.processor_result}}
-				</view>
-			</view>
-			<view class="flex item" v-if="item.status>1">
-				<view class="title">
-					处理时间:
-				</view>
-				<view class="content">
-					{{item.processor_time}}
-				</view>
-			</view>
-			<view class="item ">
-				<view class="title">
-					已传图片:
-				</view>
-				<view class="content margin-t-20">
-					<image @click="showImage(ls)" v-for="(ls,ind) in item.images" class="img margin-r-20" :src="ls"
-						mode="scaleToFill">
-					</image>
-				</view>
-			</view>
-		</view>
-		<view class="order-item" v-if="item.status==3">
-			<view class="masterWorker flex">
-				<image class="imgUser" src="../../../static/error/missing-face.png" mode="scaleToFill"></image>
-				<view class="padding-l-30">
-					<view class="masterName">
-						{{item.processor_user.staff_name}}
-					</view>
-					<view class="masterTime margin-t-20">
-						完成时间: {{item.processor_time}}
-					</view>
-				</view>
-			</view>
-			<view class="flex_item zhil">
-				<view>响应速度:</view>
-				<view>
-					<uni-rate :readonly='true' text="1" size="20" margin="10" :value="item.response_score" >
-					</uni-rate>
-				</view>
-			</view>
-			<view class="flex_item zhil">
-				<view>技术评分:</view>
-				<view>
-					<uni-rate :readonly='true' text="1" size="20" margin="10" :value="item.skill_score" >
-					</uni-rate>
-				</view>
-			</view>
-			<view class="flex_item zhil">
-				<view>服务态度:</view>
-				<view>
-					<uni-rate :readonly='true' text="1" size="20" margin="10" :value="item.attitude_score" >
-					</uni-rate>
-				</view>
-			</view>
-		</view>
-		<view class="buttom flex" v-if="loadStatus==0">
-			<view v-if="item.type==0" class="btn  success" @click="showPopup">
-				安排人员前往
-			</view>
-			<view v-if="item.type==1&&item.processor_user" class="btn action" @click="showPopup">
-				已安排{{item.processor_user.staff_name}}前往维修
-			</view>
-		</view>
-		<view class="buttom flex" v-if="loadStatus==1&&item.status==1">
-			<view class="btn  success" @click="onSetRw">
-				处理任务
-			</view>
-		</view>
-		<view class="buttom flex" v-if="loadStatus==1&&item.status==2">
-			<view class="btn  action">
-				已处理完成
-			</view>
-		</view>
-		<uni-popup ref="popup" type="bottom">
-			<view class="alertBox">
-				<view class="popupTitle">
-					<text>安排维修人员</text>
-					<image @click="outPopup" class="exitIcon" src="../../../static/icon/goodsExit.png" mode="widthFix">
-					</image>
-				</view>
-				<scroll-view scroll-y="true" class="list">
-					<view class="flex" v-for="(item,index) in mastList">
-						<view class="avatarBox flex">
-							<image class="avatar" :src="item.avatar" mode="scaleToFill"></image>
-							<view class="padding-l-20 nameBox">
-								<view class="name">
-									{{item.staff_name}}
-								</view>
-								<view class="ordNum">
-									进行中任务:100
-								</view>
-							</view>
-						</view>
-						<view class="alertButtom bgGree" @click="setKfOrder(item)">
-							安排
-						</view>
-						<!-- <view class="alertButtom bgYellow"  v-if="item.type==0">
-							更换
-						</view> -->
-						<!-- <view class="alertButtom bgGray"  v-if="item.type==3">
-							取消
-						</view> -->
-					</view>
-				</scroll-view>
-			</view>
-		</uni-popup>
-		<uni-popup ref="popupImg" type="center">
-			<image @click="hideShowImg" class="actionImgShow" :src="actionImg" mode="aspectFit"></image>
-		</uni-popup>
-
-		<uni-popup ref="popupDialog" type="dialog">
-			<uni-popup-dialog mode="input" title='处理结果' confirmText='提交' placeholder="请输入处理结果" :duration="2000"
-				@confirm="confirmSet">
-
-			</uni-popup-dialog>
-		</uni-popup>
-	</view>
-</template>
-<script>
-	import {
-		questionInfo,
-		adminKf,
-		schedule_task,
-		tasksave
-	} from '@/api/shop.js';
-	export default {
-		data() {
-			return {
-				id: '', //保存orderid
-				item: {},
-				rateValue: [{
-					text: '响应速度',
-					value: 0,
-				}, {
-					text: '技术评分',
-					value: 0,
-				}, {
-					text: '服务态度',
-					value: 0,
-				}],
-				// 师父人数
-				mastList: [],
-				actionImg: '', //选中的图片
-				loadStatus: 0, //默认可以查看安排维修按钮
-			};
-		},
-		onLoad(opt) {
-			if (opt.type) {
-				this.loadStatus = opt.type;
-			}
-			this.id = opt.id;
-			this.loadData();
-			// 获取员工列表
-			this.adminKf();
-		},
-		methods: {
-			// 开始处理任务
-			onSetRw() {
-				this.$refs.popupDialog.open();
-			},
-			// 提交处理结果
-			confirmSet(data) {
-				if (!(data.trim())) {
-					uni.showModal({
-						title: '错误',
-						content: '请输入处理结果',
-						showCancel: false,
-					});
-					return
-				}
-				tasksave({
-					id: this.item.id,
-					processor_result: data,
-				}).then((e) => {
-					uni.showToast({
-						title: e.msg
-					})
-					this.loadData();
-					console.log(e);
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			// 拨打电话
-			openPhone(item) {
-				uni.makePhoneCall({
-					phoneNumber: item //仅为示例
-				});
-			},
-			// 显示图片弹窗
-			showImage(item) {
-				this.actionImg = item;
-				this.$refs.popupImg.open();
-			},
-			// 隐藏图片显示弹窗
-			hideShowImg() {
-				this.$refs.popupImg.close();
-			},
-			// 安排维修人员
-			setKfOrder(item) {
-				const that = this;
-				uni.showLoading({
-					title: '安排中',
-					mask: true
-				});
-				schedule_task({
-					id: this.item.id,
-					uid: item.uid
-				}).then((e) => {
-					uni.hideLoading()
-					uni.showToast({
-						title: e.msg
-					});
-					// 关闭弹窗
-					that.outPopup();
-					// 刷新页面
-					that.loadData();
-					console.log(e);
-				}).catch((e) => {
-					uni.hideLoading()
-					uni.hideToast();
-					uni.showModal({
-						title: '错误',
-						content: e.msg,
-						showCancel: false,
-					});
-					console.log(e);
-				})
-			},
-			// 员工列表
-			adminKf() {
-				adminKf().then((e) => {
-					this.mastList = e.data;
-					console.log(e);
-				}).catch(() => {
-					console.log(e);
-				})
-			},
-			// 关闭弹窗
-			outPopup() {
-				this.$refs.popup.close()
-			},
-			loadData() {
-				questionInfo({
-					order_id: this.id
-				}).then((e) => {
-					this.item = e.data;
-					this.item.images = this.item.images.split(',')
-					this.item.type = e.data.status;
-					console.log(e);
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			// 显示底部弹窗
-			showPopup() {
-				console.log('点击');
-				if (this.item.type == 0) {
-					this.$refs.popup.open()
-				}
-				if (this.item.type == 1) {
-					uni.showModal({
-						title: '提示',
-						content: '已安排了工作人员无法重新安排',
-						showCancel: false,
-					});
-				}
-			}
-		}
-	};
-</script>
-<style lang="scss">
-	.order-item {
-		display: flex;
-		flex-direction: column;
-		padding: 30rpx 0;
-		border-radius: 20rpx;
-		background: #fff;
-		margin: 0 $page-row-spacing;
-
-		.masterWorker {
-			padding: 0 30rpx;
-			border-bottom: 1px solid $page-color-light;
-			padding-bottom: 30rpx;
-			justify-content: flex-start;
-
-			.masterTime {
-				font-size: 22rpx;
-				color: $font-color-light;
-			}
-
-			.masterName {
-				color: $font-color-base;
-				font-size: 28rpx;
-				font-weight: bold;
-			}
-
-			.imgUser {
-				width: 120rpx;
-				height: 120rpx;
-				border-radius: 100rpx;
-			}
-		}
-
-		.flex_item {
-			margin: 0 30rpx;
-			color: $font-color-base;
-			font-size: $font-base;
-
-			&.zhil {
-				font-size: 28rpx !important;
-				padding: 15rpx 0;
-			}
-		}
-	}
-
-	.actionImgShow {
-		height: 100vh;
-		width: 750rpx;
-	}
-
-	.alertBox {
-		border-top-left-radius: 20rpx;
-		border-top-right-radius: 20rpx;
-		background-color: #FFF;
-		height: 1000rpx;
-
-		.popupTitle {
-			font-size: $font-lg;
-			position: relative;
-			font-weight: bold;
-			line-height: 1;
-			height: 130rpx;
-			line-height: 130rpx;
-			text-align: center;
-
-			.exitIcon {
-				width: 50rpx;
-				position: absolute;
-				top: 40rpx;
-				right: 50rpx;
-			}
-		}
-
-		.list {
-			height: 870rpx;
-			padding: 0 50rpx;
-
-			.avatar {
-				width: 100rpx;
-				height: 100rpx;
-				border-radius: 100rpx;
-			}
-
-			.alertButtom {
-				width: 160rpx;
-				height: 60rpx;
-				color: #FFFFFF;
-				border-radius: 100rpx;
-				font-size: 24rpx;
-				line-height: 60rpx;
-				text-align: center;
-
-				&.bgGree {
-					background-color: $color-green;
-				}
-
-				&.bgYellow {
-					background-color: $uni-color-warning;
-				}
-
-				&.bgGray {
-					background-color: $font-color-disabled;
-				}
-			}
-
-			.nameBox {
-				.name {
-					font-size: $font-base;
-					color: $font-base;
-				}
-
-				.ordNum {
-					font-size: 22rpx;
-					color: $font-color-light;
-				}
-			}
-		}
-	}
-
-	.itemBox {
-		margin: 0 $page-row-spacing;
-		margin-bottom: $page-row-spacing;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		padding-top: 30rpx;
-		padding-bottom: 10rpx;
-
-		.item {
-			justify-content: flex-start;
-			padding: 30rpx;
-			padding-top: 0;
-			font-size: $font-base;
-
-			.title {
-				flex-shrink: 0;
-				color: $font-color-base;
-			}
-
-			.content {
-				color: $font-color-light;
-
-				.img {
-					width: 120rpx;
-					height: 120rpx;
-					border-radius: 20rpx;
-				}
-
-				.icon {
-					width: 32rpx;
-				}
-			}
-
-		}
-	}
-
-	.buttom {
-		justify-content: space-around;
-		padding-top: 50rpx;
-
-		.btn {
-			height: 80rpx;
-			line-height: 80rpx;
-			text-align: center;
-			border-radius: 99rpx;
-			color: #FFFFFF;
-			flex-grow: 1;
-			margin: 0 30rpx;
-
-			&.success {
-				background-color: $color-green;
-			}
-
-			&.action {
-				background-color: $font-color-disabled;
-			}
-
-			// &.warning {
-			// 	background-color: $uni-color-warning;
-			// }
-		}
-
-		.borderGray {
-			border: 1px solid $font-color-disabled;
-			color: $font-color-disabled;
-		}
-
-		.borderGreed {
-			border: 1px solid $color-green;
-			color: $color-green;
-		}
-	}
-</style>

+ 0 - 328
pages/shop/repair/repairHistory.vue

@@ -1,328 +0,0 @@
-<template>
-	<view class="container ">
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view class="itemBox" v-for="(item,index) in tabItem.orderList">
-						<view class="flex item">
-							<view class="title">
-								订单状态:
-							</view>
-							<view class="content">
-								<text v-if='item.status==3' class="font-color-greed">
-								已完成
-								</text>
-								<text  v-if='item.status==-1' class="font-color-gray">
-								已取消
-								</text>
-								<text v-if='item.status==2'  class="font-color-yellow">
-								待评价
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								报修车辆:
-							</view>
-							<view class="content">
-								{{item.car.car_name}}
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								维修单号:
-							</view>
-							<view class="content">
-								{{item.order_id}}
-							</view>
-						</view>
-						<view class="flex item" @click="openAddress(item)">
-							<view class="title">
-								维修地点:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopAddress.png" mode="widthFix"></image>
-								<text class="margin-l-10">{{item.address}}</text>
-							</view>
-						</view>
-						<view class="flex item" @click="openPhone(item.phone)">
-							<view class="title">
-								联系电话:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-								<text class="margin-l-10">
-									{{item.phone}}
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								维修师傅:
-							</view>
-							<view class="content">
-								{{item.processor_user.staff_name}}
-							</view>
-						</view>
-						<view class="flex item" @click="openPhone(item.processor_user.phone)">
-							<view class="title">
-								师傅电话:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-								<text class="margin-l-10">
-									{{item.processor_user.phone}}
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								申报时间:
-							</view>
-							<view class="content">
-								{{item.add_time}}
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								结束时间:
-							</view>
-							<view class="content">
-								{{item.processor_time}}
-							</view>
-						</view>
-						<view class="flex padding-t-20" v-if="navList[tabCurrentIndex].state==0">
-							<view @click="navDetail(item)" class="boxButtom flex btn1">
-								查看详情
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-<script>
-	import {
-		question
-	} from '@/api/shop.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '维修历史',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}]
-			};
-		},
-		onLoad() {
-			this.loadData();
-		},
-		methods: {
-			// 跳转详细页面
-			navDetail(item) {
-				uni.navigateTo({
-					url: './clientReparirDetail?id=' + item.order_id + '&type=2'
-				})
-			},
-			// 打开地址
-			openAddress(res) {
-				console.log(res, '返回的位置数据');
-				uni.chooseLocation({
-					latitude: res.latitude,
-					longitude: res.longitude,
-					success(re) {
-						console.log(re, '当前位置');
-					},
-					fail(e) {
-						console.log(e, 'cw');
-					}
-				})
-			},
-			// 拨打电话
-			openPhone(item) {
-				uni.makePhoneCall({
-					phoneNumber: item //仅为示例
-				});
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-				this.loadData('tabChange');
-			},
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			// 加载数据
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				console.log('开始请求');
-				question({
-						history: 1,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							e.status = +e.status;
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-<style lang="scss">
-	page,
-	.container {
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-	}
-
-	.navbar {
-
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.itemBox {
-		margin: 0 $page-row-spacing;
-		margin-bottom: $page-row-spacing;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		padding: 40rpx 0;
-
-		.boxButtom {
-			justify-content: center;
-			margin: 0 30rpx;
-			color: $color-green;
-			font-size: 24rpx;
-			height: 70rpx;
-			border-radius: 100rpx;
-			line-height: 1;
-			padding: 0 50rpx;
-			flex-grow: 1;
-
-			&.btn3 {
-				border: 1px solid $uni-color-warning;
-				color: $uni-color-warning;
-			}
-
-			&.btn1 {
-				border: 1px solid $font-color-light;
-				color: $font-color-light;
-			}
-
-			&.btn2 {
-				color: #FFFFFF;
-				background-color: $color-green;
-				padding: 0 120rpx;
-			}
-		}
-
-		.item {
-			justify-content: flex-start;
-			padding: 30rpx;
-			padding-top: 0;
-			font-size: $font-base;
-
-			.title {
-				flex-shrink: 0;
-				color: $font-color-base;
-			}
-
-			.content {
-				color: $font-color-light;
-
-				.icon {
-					width: 32rpx;
-				}
-			}
-
-		}
-	}
-</style>

+ 0 - 284
pages/shop/repair/taskClientRepair.vue

@@ -1,284 +0,0 @@
-<template>
-	<view class="container ">
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view class="itemBox" v-for="(item,index) in tabItem.orderList">
-						<view class="flex item">
-							<view class="title">
-								报修车辆:
-							</view>
-							<view class="content">
-								{{item.car.car_name}}
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								维修单号:
-							</view>
-							<view class="content">
-								{{item.order_id}}
-							</view>
-						</view>
-						<view class="flex item" @click="openAddress(item)">
-							<view class="title">
-								维修地点:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopAddress.png" mode="widthFix"></image>
-								<text class="margin-l-10">{{item.address}}</text>
-							</view>
-						</view>
-						<view class="flex item" @click="openPhone(item.phone)">
-							<view class="title">
-								联系电话:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-								<text class="margin-l-10">
-									{{item.phone}}
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								申报时间:
-							</view>
-							<view class="content">
-								{{item.add_time}}
-							</view>
-						</view>
-						<view  class="flex padding-t-20"
-							v-if="navList[tabCurrentIndex].state==0">
-							<view @click="navDetail(item)" class="boxButtom flex btn1">
-								查看详情
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-<script>
-	import {
-		task
-	} from '@/api/shop.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '安排维修',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}]
-			};
-		},
-		onLoad() {
-			this.loadData();
-		},
-		methods: {
-			// 跳转详细页面
-			navDetail(item) {
-				uni.navigateTo({
-					url: './clientReparirDetail?id=' + item.order_id+'&type=1'
-				})
-			},
-			// 打开地址
-			openAddress(res) {
-				console.log(res, '返回的位置数据');
-				uni.chooseLocation({
-					latitude: res.latitude,
-					longitude: res.longitude,
-					success(re) {
-						console.log(re, '当前位置');
-					},
-					fail(e) {
-						console.log(e, 'cw');
-					}
-				})
-			},
-			// 拨打电话
-			openPhone(item) {
-				uni.makePhoneCall({
-					phoneNumber: item //仅为示例
-				});
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-				this.loadData('tabChange');
-			},
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			// 加载数据
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				console.log('开始请求');
-				task({
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-<style lang="scss">
-	page,
-	.container {
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-	}
-
-	.navbar {
-
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.itemBox {
-		margin: 0 $page-row-spacing;
-		margin-bottom: $page-row-spacing;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		padding: 40rpx 0;
-
-		.boxButtom {
-			justify-content: center;
-			margin: 0 30rpx;
-			color: $color-green;
-			font-size: $font-sm;
-			height: 70rpx;
-			border-radius: 100rpx;
-			line-height: 1;
-			padding: 0 50rpx;
-			flex-grow: 1;
-
-			&.btn3 {
-				border: 1px solid $uni-color-warning;
-				color: $uni-color-warning;
-			}
-
-			&.btn1 {
-				border: 1px solid $font-color-light;
-				color: $font-color-light;
-			}
-
-			&.btn2 {
-				color: #FFFFFF;
-				background-color: $color-green;
-				padding: 0 120rpx;
-			}
-		}
-
-		.item {
-			justify-content: flex-start;
-			padding: 30rpx;
-			padding-top: 0;
-			font-size: $font-base;
-
-			.title {
-				flex-shrink: 0;
-				color: $font-color-base;
-			}
-
-			.content {
-				color: $font-color-light;
-
-				.icon {
-					width: 32rpx;
-				}
-			}
-
-		}
-	}
-</style>

+ 0 - 373
pages/shop/shopIndex.vue

@@ -1,373 +0,0 @@
-<template>
-	<view class="content">
-		<view class="shopBg">
-			<image class="shopBgImg" src="../../static/image/shopBg.png" mode="widthFix"></image>
-			<view class="mask">
-
-			</view>
-		</view>
-		<view class="shopIndex">
-			<view class="shopName">
-				{{shopDetail.name}}
-			</view>
-			<view class="shopitem flex" @click="shopLi">
-				<image class="iconShop" src="../../static/icon/shopPhone.png" mode="widthFix"></image>
-				<text>
-					{{shopDetail.phone}}
-				</text>
-			</view>
-			<view class="shopitem flex" @click="openAddress">
-				<image class="iconShop" src="../../static/icon/shopAddress.png" mode="widthFix"></image>
-				<text>
-					{{shopDetail.address+shopDetail.detailed_address}}
-				</text>
-			</view>
-			<image class="shopLogo" :src="shopDetail.image" mode="widthFix"></image>
-		</view>
-		<view class="tab flex">
-			<view class="tabItem" v-for="(item,index) in tagArray" :class="{action:tabCurrentIndex==index}"
-				@click="tabGoods(index)">
-				{{item.text}}
-				<view v-if='tabCurrentIndex==index' class="iconAction">
-
-				</view>
-			</view>
-		</view>
-		<view class="listItem">
-			<view class="item flex" v-for="(item,index) in tagArray[tabCurrentIndex].orderList" @click="navTo('/pages/product/product?id='+item.id+'&shopId='+shopId)">
-				<view class="imgBox">
-					<image class="imgBox" :src="item.image" mode="scaleToFill"></image>
-				</view>
-				<view class="contentDetail">
-					<view class="cartName clamp2">
-						{{item.store_name}}
-					</view>
-					<view class="tip clamp2" >
-						{{item.store_info}}
-					</view>
-					<view class="moneyBox flex">
-						<view class="money">
-							<text class="font-size-base">¥</text>
-							<text>{{item.price}}</text>
-						</view>
-						<view class="numPp">
-							{{item.sales|getNum}}+付款
-						</view>
-					</view>
-				</view>
-			</view>
-			<uni-load-more :status="tagArray[tabCurrentIndex].loadingType"></uni-load-more>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		loadIndexs,
-	} from '@/api/index.js';
-	import {
-		getProducts
-	} from '@/api/product.js';
-	export default {
-		data() {
-			return {
-				shopId: '',
-				shopDetail: {
-					name: '',
-					phone: '',
-					address: '',
-					detailed_address: ''
-				},
-				tabCurrentIndex: 0, //当前选中的对象
-				tagArray: [{
-						state: 2,
-						text: '国标',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 5,
-						text: '电摩',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},{
-						state: 6,
-						text: '电轻摩',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					}
-				],
-			}
-		},
-		filters: {
-			getNum(num) {
-				// 转为字符串
-				num += '';
-				let nu = num.slice(0, 1);
-				for (let i = 0; i < num.length - 1; i++) {
-					nu += 0
-				}
-				return nu
-			}
-		},
-		onLoad(opeion) {
-			if (opeion) {
-				this.shopId = opeion.id
-			}
-			// 判断是否有选中的对象
-			if(opeion.type){
-				this.tabCurrentIndex = (+opeion.type)-1
-			}
-			this.loadIndexs();
-			this.loadData();
-		},
-		methods: {
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			},
-			// 联系商家
-			shopLi() {
-				uni.makePhoneCall({
-					phoneNumber: this.shopDetail.phone //仅为示例
-				});
-			},
-			// 打开地址
-			openAddress() {
-				uni.openLocation({
-					latitude: +this.shopDetail.latitude,
-					longitude: +this.shopDetail.longitude,
-					complete(e) {
-						console.log(e);
-					}
-				})
-			},
-			// 加载商店数据
-			loadIndexs() {
-				loadIndexs({
-					store_id: this.shopId
-				}).then((e) => {
-					this.shopDetail = e.data.store;
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			// 切换
-			tabGoods(index) {
-				this.tabCurrentIndex = index;
-				this.loadData('tabChange');
-			},
-			// 加载商品数据
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.tagArray[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				let requestData = {
-					page: navItem.page,
-					limit: navItem.limit,
-					store_id: this.shopId,
-					is_car: 1,
-					sid:navItem.state
-				}
-				// // 热门
-				// if (index == 0) {
-				// 	requestData.salesOrder = 1
-				// }
-				// // 新品
-				// if (index == 1) {
-				// 	requestData.news = 1
-				// }
-
-				getProducts(requestData)
-					.then(({
-						data
-					}) => {
-						let arr = data.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		height: 100%;
-	}
-
-	.shopBg {
-		position: relative;
-		overflow: hidden;
-		height: 300rpx;
-		.mask {
-			position: absolute;
-			top: 0;
-			bottom: 0;
-			left: 0;
-			right: 0;
-			background-color: rgba($color: #000000, $alpha: 0.15);
-		}
-	}
-
-	.shopBg {
-		.shopBgImg {
-			width: 750rpx;
-		}
-	}
-
-	.tab {
-		padding: 0 50rpx;
-		height: 100rpx;
-		justify-content: flex-start;
-		color: $page-color-base;
-
-		.tabItem {
-			position: relative;
-			font-size: 28rpx;
-			margin-right: 90rpx;
-			color: $font-color-light;
-
-			&.action {
-				font-weight: bold;
-				color: $font-color-dark;
-			}
-
-			.iconAction {
-				width: 100%;
-				position: absolute;
-				bottom: -15rpx;
-				left: 0rpx;
-				height: 3px;
-				background-color: $color-green;
-			}
-		}
-
-	}
-
-	.shopIndex {
-		padding: 50rpx;
-		position: relative;
-		border-top-right-radius: 50rpx;
-		border-top-left-radius: 50rpx;
-		background-color: #FFFFFF;
-		margin-top: -50RPX;
-
-		.shopitem {
-			justify-content: flex-start;
-			font-size: 22rpx;
-			color: $font-color-light;
-			margin-top: 20rpx;
-		}
-
-		.shopName {
-			font-size: 36rpx;
-			font-weight: bold;
-			color: $font-color-dark;
-		}
-
-		.shopLogo {
-			position: absolute;
-			top: -30rpx;
-			right: 70rpx;
-			border-radius: 20rpx;
-			width: 160rpx;
-			height: 160rpx;
-		}
-
-		.iconShop {
-			width: 20rpx;
-			margin-right: 10rpx;
-		}
-	}
-
-	.listItem {
-		padding: $page-row-spacing;
-		padding-top: 0;
-		background-color: #FFFFFF;
-
-		.item {
-			height: 240rpx;
-			border-bottom: 1px solid $page-color-light;
-			.imgBox {
-				border: 1px solid $page-color-light;
-				width: 200rpx;
-				height: 200rpx;
-				border-radius: 20rpx;
-			}
-		}
-
-		.contentDetail {
-			padding-left: 20rpx;
-			height: 200rpx;
-			position: relative;
-			flex-grow: 1;
-			.tip {
-				font-size: 24rpx;
-				color: $font-color-light;
-			}
-
-			.cartName {
-				font-size: $font-base;
-				color: $font-color-dark;
-			}
-
-			.moneyBox {
-				position: absolute;
-				bottom: 5rpx;
-				left: 20rpx;
-				right: 0;
-
-				.money {
-					color: $color-green;
-					font-size: 44rpx;
-				}
-
-				.numPp {
-					color: $font-color-light;
-					font-size: 24rpx;
-
-				}
-			}
-		}
-	}
-</style>

+ 0 - 692
pages/shop/shopOrder.vue

@@ -1,692 +0,0 @@
-<template>
-	<view class="content">
-		<view class="topNav flex">
-			<image @click="backIndex" class="back" src="../../static/icon/back.png" mode="widthFix"></image>
-			<view class="inputbox flex">
-				<image class="search" src="../../static/icon/search.png" mode="widthFix"></image>
-				<input class="input" confirm-type='搜索' @confirm='searchData' placeholder="请输入姓名/电话/订单号" type="text"
-					v-model="search" />
-			</view>
-		</view>
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index"
-						class="order-item">
-						<view class="i-top b-b">
-							<text class="time">{{ item.add_time }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item.status_name }}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete"
-								@click="deleteOrder(index)"></text>
-						</view>
-
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item._info"
-							:key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.cart_info.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex flextop" >
-									<text class="title clamp2">{{ goodsItem.cart_info.productInfo.store_name }}</text>
-									<text class="price">{{ moneyNum(goodsItem.cart_info.productInfo.price) }}</text>
-								</view>
-								<view class="row flex">
-									<text class="row_title">{{ goodsItem.cart_info.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
-									<text class="attr-box"> x {{ goodsItem.cart_info.cart_num }}</text>
-								</view>
-								<view class="row flex">
-									<text class="attr-box">( 服务费:{{goodsItem.cart_info.day_deducted}} 服务天数:{{goodsItem.cart_info.day}} )</text>
-								</view>
-							</view>
-						</view>
-						<view class="action-box b-t" v-if="item.status_name == '未领车'">
-							<button  class="action-btn btn-greed" @click.stop="navTo('/pages/shop/cartAciton?id='+item.order_id)">车辆激活</button>
-						</view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	import {
-		shopOrderList,
-	} from '@/api/shop.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				search:'',//搜索内容
-				navList: [{
-						state: 0,
-						text: '待付款',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 1,
-						text: '待发货',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '待收货',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 4,
-						text: '已完成',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					}
-				]
-			};
-		},
-
-		onLoad(options) {
-			/**
-			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-			 * 替换onLoad下代码即可
-			 */
-			this.tabCurrentIndex = +options.state;
-			// #ifndef MP
-			this.loadData();
-			// #endif
-			// #ifdef MP
-			if (options.state == 0) {
-				this.loadData();
-			}
-			// #endif
-		},
-		// #ifdef APP-PLUS || H5
-		onBackPress(e) {
-			uni.switchTab({
-				url: '/pages/user/user',
-			});
-			return true;
-		},
-		// #endif
-		methods: {
-			// 查询订单
-			searchData(){
-				// 初始化数据
-				this.navList = this.navList.map((e) => {
-					e.page= 1;
-					e.loadingType='more';
-					e.loaded = false;
-					e.orderList=[];
-					return e
-				})
-				// 重新加载数据
-				this.loadData();
-			},
-			
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
-			//跳转到订单详情
-			goToOrderDetail(e) {
-				uni.navigateTo({
-					url: '/pages/shop/shopOrderDetail?id=' + e.order_id
-				});
-			},
-			navTo(url){
-				uni.navigateTo({
-					url
-				});
-			},
-			// 后退
-			backIndex(){
-				uni.navigateBack();
-			},
-			//获取订单列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				shopOrderList({
-						status: state,
-						page: navItem.page,
-						limit: navItem.limit,
-						real_name:this.search
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							let b = this.orderStateExp(e.status);
-							e.stateTip = b.stateTip;
-							e.stateTipColor = b.stateTipColor;
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == arr.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-			},
-			//删除订单
-			deleteOrder(index) {
-				uni.showLoading({
-					title: '请稍后',
-					mask:true
-				});
-				setTimeout(() => {
-					this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-					uni.hideLoading();
-				}, 600);
-			},
-			//订单状态文字和颜色
-			orderStateExp(state) {
-				let stateTip = '',
-					stateTipColor = '#fa436a';
-				switch (+state) {
-					case 0:
-						stateTip = '待付款';
-						break;
-					case 1:
-						stateTip = '待发货';
-						break;
-					case 2:
-						stateTip = '待收货';
-						break;
-					case 3:
-						stateTip = '待评价';
-						break;
-					case 4:
-						stateTip = '已完成';
-						stateTipColor = '#5dbc7c';
-						break;
-					case 9:
-						stateTip = '订单已关闭';
-						stateTipColor = '#909399';
-						break;
-
-						//更多自定义
-				}
-				return {
-					stateTip,
-					stateTipColor
-				};
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: calc(100% - 84px);
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-	}
-
-	.navbar {
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-		position: relative;
-		z-index: 10;
-	
-	.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.uni-swiper-item {
-		height: auto;
-	}
-
-	.order-item {
-		display: flex;
-		flex-direction: column;
-		padding-left: 30rpx;
-		background: #fff;
-		margin: 0 $page-row-spacing;
-		margin-bottom: 30rpx;
-		border-radius: 20rpx;
-		padding-bottom: 10rpx;
-		.i-top {
-			display: flex;
-			align-items: center;
-			height: 80rpx;
-			padding-right: 30rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-			position: relative;
-
-			.time {
-				flex: 1;
-			}
-
-			.state {
-				color: $base-color;
-			}
-
-			.del-btn {
-				padding: 10rpx 0 10rpx 36rpx;
-				font-size: $font-lg;
-				color: $font-color-light;
-				position: relative;
-
-				&:after {
-					content: '';
-					width: 0;
-					height: 30rpx;
-					border-left: 1px solid $border-color-dark;
-					position: absolute;
-					left: 20rpx;
-					top: 50%;
-					transform: translateY(-50%);
-				}
-			}
-		}
-
-		/* 多条商品 */
-		.goods-box {
-			height: 160rpx;
-			padding: 20rpx 0;
-			white-space: nowrap;
-
-			.goods-item {
-				width: 120rpx;
-				height: 120rpx;
-				display: inline-block;
-				margin-right: 24rpx;
-			}
-
-			.goods-img {
-				display: block;
-				width: 100%;
-				height: 100%;
-			}
-		}
-	
-	/* 单条商品 */
-		.goods-box-single {
-			display: flex;
-			padding: 20rpx 0;
-
-			.goods-img {
-				display: block;
-				width: 170rpx;
-				height: 170rpx;
-				border-radius: 20rpx;
-			}
-
-			.right {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				padding: 0 30rpx 0 24rpx;
-				overflow: hidden;
-				.flextop{
-					align-items: flex-start;
-					line-height: 1.3;
-				}
-				.row {
-					margin-top: 10rpx;
-				}
-
-				.row_title {
-					padding: 5rpx 10rpx;
-					background-color: #dddddd;
-					border-radius: 10rpx;
-					font-size: 22rpx;
-					color: #ffffff;
-				}
-
-				.title {
-					font-size: $font-base + 2rpx;
-					color: $font-color-dark;
-					width: 80%;
-					min-height: 2.5rem;
-				}
-
-				.attr-box {
-					display: flex;
-					justify-content: flex-end;
-					font-size: $font-sm + 2rpx;
-					color: $font-color-light;
-				}
-
-				.price {
-					display: inline;
-					font-size: $font-base + 2rpx;
-					color: $font-color-light;
-
-					&:before {
-						content: '¥';
-						font-size: $font-sm;
-
-					}
-				}
-			}
-		}
-
-		.price-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: baseline;
-			padding: 20rpx 30rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-
-			.num {
-				margin: 0 8rpx;
-				color: $font-color-dark;
-			}
-
-			.price {
-				font-size: $font-lg;
-				color: $font-color-dark;
-
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-
-		.action-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: center;
-			height: 100rpx;
-			position: relative;
-			padding-right: 30rpx;
-		}
-
-		.action-btn {
-			width: 160rpx;
-			height: 60rpx;
-			margin: 0;
-			margin-left: 24rpx;
-			padding: 0;
-			text-align: center;
-			line-height: 60rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-dark;
-			background: #fff;
-			border-radius: 100px;
-			&.btn-greed{
-				color: $color-green;
-				border: 1px solid $color-green;
-			}
-			&:after {
-				border-radius: 100px;
-			}
-
-			&.recom {
-				color: $base-color;
-
-				&:after {
-					border-color: $base-color;
-				}
-			}
-
-			&.evaluate {
-				color: $color-yellow;
-
-				&:after {
-					border-color: $color-yellow;
-				}
-			}
-		}
-	}
-
-	/* load-more */
-	.uni-load-more {
-		display: flex;
-		flex-direction: row;
-		height: 80rpx;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-load-more__text {
-		font-size: 28rpx;
-		color: #999;
-	}
-
-	.uni-load-more__img {
-		height: 24px;
-		width: 24px;
-		margin-right: 10px;
-	}
-
-	.uni-load-more__img>view {
-		position: absolute;
-	}
-
-	.uni-load-more__img>view view {
-		width: 6px;
-		height: 2px;
-		border-top-left-radius: 1px;
-		border-bottom-left-radius: 1px;
-		background: #999;
-		position: absolute;
-		opacity: 0.2;
-		transform-origin: 50%;
-		animation: load 1.56s ease infinite;
-	}
-
-	.uni-load-more__img>view view:nth-child(1) {
-		transform: rotate(90deg);
-		top: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(2) {
-		transform: rotate(180deg);
-		top: 11px;
-		right: 0;
-	}
-
-	.uni-load-more__img>view view:nth-child(3) {
-		transform: rotate(270deg);
-		bottom: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(4) {
-		top: 11px;
-		left: 0;
-	}
-
-	.load1,
-	.load2,
-	.load3 {
-		height: 24px;
-		width: 24px;
-	}
-
-	.load2 {
-		transform: rotate(30deg);
-	}
-
-	.load3 {
-		transform: rotate(60deg);
-	}
-
-	.load1 view:nth-child(1) {
-		animation-delay: 0s;
-	}
-
-	.load2 view:nth-child(1) {
-		animation-delay: 0.13s;
-	}
-
-	.load3 view:nth-child(1) {
-		animation-delay: 0.26s;
-	}
-
-	.load1 view:nth-child(2) {
-		animation-delay: 0.39s;
-	}
-
-	.load2 view:nth-child(2) {
-		animation-delay: 0.52s;
-	}
-
-	.load3 view:nth-child(2) {
-		animation-delay: 0.65s;
-	}
-
-	.load1 view:nth-child(3) {
-		animation-delay: 0.78s;
-	}
-
-	.load2 view:nth-child(3) {
-		animation-delay: 0.91s;
-	}
-
-	.load3 view:nth-child(3) {
-		animation-delay: 1.04s;
-	}
-
-	.load1 view:nth-child(4) {
-		animation-delay: 1.17s;
-	}
-
-	.load2 view:nth-child(4) {
-		animation-delay: 1.3s;
-	}
-
-	.load3 view:nth-child(4) {
-		animation-delay: 1.43s;
-	}
-
-	@-webkit-keyframes load {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0.2;
-		}
-	}
-	.topNav {
-		height: 44px;
-		background-color: #FFFFFF;
-		padding: 0 15px;
-		padding-top: var(--status-bar-height);
-		.back {
-			width: 13px;
-		}
-	
-		.inputbox {
-			background-color: $page-color-base;
-			height: 15px;
-			flex-grow: 1;
-			margin-left: 15px;
-			border-radius: 50px;
-			height: 30px;
-			padding-left: 20px;
-	
-			.search {
-				width: 18px;
-			}
-	
-			.input {
-				height: 100%;
-				width: 100%;
-				text-align: left;
-				padding-left: 10px;
-	
-			}
-		}
-	}
-</style>

+ 0 - 631
pages/shop/shopOrderAfter.vue

@@ -1,631 +0,0 @@
-<template>
-	<view class="content">
-		<!-- <view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view> -->
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index"
-						class="order-item">
-						<view class="i-top b-b">
-							<text class="time">{{ item._add_time }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
-						</view>
-						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view>
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo"
-							:key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex flextop">
-									<text class="title clamp2">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ moneyNum(goodsItem.productInfo.price) }}</text>
-								</view>
-								<view class="row flex">
-									<text
-										class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
-									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
-								</view>
-								<view class="row flex">
-									<text class="attr-box">( 服务费:{{goodsItem.day_deducted}} 服务天数:{{goodsItem.day}}
-										)</text>
-								</view>
-							</view>
-						</view>
-						<view class="action-box b-t">
-							<button v-if="item._status._title == '已退款'" @click.stop="deleteOrder(item,index)"
-								class="action-btn recom">删除订单</button>
-							<button @click.stop="goToOrderDetail(item)" class="action-btn evaluate">查看详情</button>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	import {
-		orderList,
-		orderDel
-	} from '@/api/order.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [
-					// {
-					// 	state: -1,
-					// 	text: '退款中',
-					// 	loadingType: 'more',
-					// 	orderList: [],
-					// 	page: 1, //当前页数
-					// 	limit: 10 //每次信息条数
-					// },
-					// {
-					// 	state: -2,
-					// 	text: '已退款',
-					// 	loadingType: 'more',
-					// 	orderList: [],
-					// 	page: 1, //当前页数
-					// 	limit: 10 //每次信息条数
-					// },
-					{
-						state: -3,
-						text: '全部',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					}
-				]
-			};
-		},
-
-		onLoad(options) {
-			/**
-			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-			 * 替换onLoad下代码即可
-			 */
-			this.tabCurrentIndex = +options.state;
-			// #ifndef MP
-			this.loadData();
-			// #endif
-			// #ifdef MP
-			if (options.state == 0) {
-				this.loadData();
-			}
-			// #endif
-		},
-		// #ifdef APP-PLUS || H5
-		onBackPress(e) {
-			uni.switchTab({
-				url: '/pages/user/user',
-			});
-			return true;
-		},
-		// #endif
-		methods: {
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
-			// 确认收货
-			//跳转到订单详情
-			goToOrderDetail(e) {
-				uni.navigateTo({
-					url: '/pages/order/orderDetail?id=' + e.order_id
-				});
-			},
-			//获取订单列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				orderList({
-						type: state,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.map(e => {
-							let b = this.orderStateExp(e.status);
-							e.stateTip = b.stateTip;
-							e.stateTipColor = b.stateTipColor;
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-			},
-			//删除订单
-			deleteOrder(item, index) {
-				let that = this;
-				uni.showModal({
-					title: '删除订单',
-					content: '删除订单后不可恢复,是否删除?',
-					success: res => {
-						uni.showLoading({
-							title: '请稍后',
-							mask:true
-						});
-						if (res.confirm) {
-							orderDel({
-								uni: item.order_id
-							}).then(() => {
-								that.navList[that.tabCurrentIndex].orderList.splice(index, 1);
-								uni.hideLoading();
-							}).catch((e) => {
-								uni.hideLoading();
-								console.log(e);
-							})
-						}
-					},
-				});
-			},
-			//订单状态文字和颜色
-			orderStateExp(state) {
-				let stateTip = '',
-					stateTipColor = '#fa436a';
-				switch (+state) {
-					case 0:
-						stateTip = '待付款';
-						break;
-					case 1:
-						stateTip = '待发货';
-						break;
-					case 2:
-						stateTip = '待收货';
-						break;
-					case 3:
-						stateTip = '待评价';
-						break;
-					case 4:
-						stateTip = '已完成';
-						stateTipColor = '#5dbc7c';
-						break;
-					case 9:
-						stateTip = '订单已关闭';
-						stateTipColor = '#909399';
-						break;
-
-						//更多自定义
-				}
-				return {
-					stateTip,
-					stateTipColor
-				};
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-	}
-
-	.navbar {
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-		position: relative;
-		z-index: 10;
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.uni-swiper-item {
-		height: auto;
-	}
-
-	.order-item {
-		display: flex;
-		flex-direction: column;
-		padding-left: 30rpx;
-		background: #fff;
-		margin: 0 $page-row-spacing;
-		margin-bottom: 30rpx;
-		border-radius: 20rpx;
-		padding-bottom: 10rpx;
-
-		.i-top {
-			display: flex;
-			align-items: center;
-			height: 80rpx;
-			padding-right: 30rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-			position: relative;
-
-			.time {
-				flex: 1;
-			}
-
-			.state {
-				color: $base-color;
-			}
-
-			.del-btn {
-				padding: 10rpx 0 10rpx 36rpx;
-				font-size: $font-lg;
-				color: $font-color-light;
-				position: relative;
-
-				&:after {
-					content: '';
-					width: 0;
-					height: 30rpx;
-					border-left: 1px solid $border-color-dark;
-					position: absolute;
-					left: 20rpx;
-					top: 50%;
-					transform: translateY(-50%);
-				}
-			}
-		}
-
-		/* 多条商品 */
-		.goods-box {
-			height: 160rpx;
-			padding: 20rpx 0;
-			white-space: nowrap;
-
-			.goods-item {
-				width: 120rpx;
-				height: 120rpx;
-				display: inline-block;
-				margin-right: 24rpx;
-			}
-
-			.goods-img {
-				display: block;
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		/* 单条商品 */
-		.goods-box-single {
-			display: flex;
-			padding: 20rpx 0;
-
-			.goods-img {
-				display: block;
-				width: 170rpx;
-				height: 170rpx;
-				border-radius: 20rpx;
-			}
-
-			.right {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				padding: 0 30rpx 0 24rpx;
-				overflow: hidden;
-
-				.flextop {
-					align-items: flex-start;
-					line-height: 1.3;
-				}
-
-				.row {
-					margin-top: 10rpx;
-				}
-
-				.row_title {
-					padding: 5rpx 10rpx;
-					background-color: #dddddd;
-					border-radius: 10rpx;
-					font-size: 22rpx;
-					color: #ffffff;
-				}
-
-				.title {
-					font-size: $font-base + 2rpx;
-					color: $font-color-dark;
-					width: 80%;
-					min-height: 2.5rem;
-				}
-
-				.attr-box {
-					display: flex;
-					justify-content: flex-end;
-					font-size: $font-sm + 2rpx;
-					color: $font-color-light;
-				}
-
-				.price {
-					display: inline;
-					font-size: $font-base + 2rpx;
-					color: $font-color-light;
-
-					&:before {
-						content: '¥';
-						font-size: $font-sm;
-
-					}
-				}
-			}
-		}
-
-		.price-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: baseline;
-			padding: 20rpx 30rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-
-			.num {
-				margin: 0 8rpx;
-				color: $font-color-dark;
-			}
-
-			.price {
-				font-size: $font-lg;
-				color: $font-color-dark;
-
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-
-		.action-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: center;
-			height: 100rpx;
-			position: relative;
-			padding-right: 30rpx;
-		}
-
-		.action-btn {
-			width: 160rpx;
-			height: 60rpx;
-			margin: 0;
-			margin-left: 24rpx;
-			padding: 0;
-			text-align: center;
-			line-height: 60rpx;
-			font-size: $font-sm + 2rpx;
-			color: $color-red;
-			border-radius: 100px;
-			border: 1px solid $color-red;
-			background-color: #FFFFFF;
-
-			&.recom {
-				color: $font-color-light;
-				border: 1px solid $font-color-light;
-			}
-
-			&.evaluate {
-				color: $color-yellow;
-				border: 1px solid $color-yellow;
-			}
-		}
-	}
-
-	/* load-more */
-	.uni-load-more {
-		display: flex;
-		flex-direction: row;
-		height: 80rpx;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-load-more__text {
-		font-size: 28rpx;
-		color: #999;
-	}
-
-	.uni-load-more__img {
-		height: 24px;
-		width: 24px;
-		margin-right: 10px;
-	}
-
-	.uni-load-more__img>view {
-		position: absolute;
-	}
-
-	.uni-load-more__img>view view {
-		width: 6px;
-		height: 2px;
-		border-top-left-radius: 1px;
-		border-bottom-left-radius: 1px;
-		background: #999;
-		position: absolute;
-		opacity: 0.2;
-		transform-origin: 50%;
-		animation: load 1.56s ease infinite;
-	}
-
-	.uni-load-more__img>view view:nth-child(1) {
-		transform: rotate(90deg);
-		top: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(2) {
-		transform: rotate(180deg);
-		top: 11px;
-		right: 0;
-	}
-
-	.uni-load-more__img>view view:nth-child(3) {
-		transform: rotate(270deg);
-		bottom: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(4) {
-		top: 11px;
-		left: 0;
-	}
-
-	.load1,
-	.load2,
-	.load3 {
-		height: 24px;
-		width: 24px;
-	}
-
-	.load2 {
-		transform: rotate(30deg);
-	}
-
-	.load3 {
-		transform: rotate(60deg);
-	}
-
-	.load1 view:nth-child(1) {
-		animation-delay: 0s;
-	}
-
-	.load2 view:nth-child(1) {
-		animation-delay: 0.13s;
-	}
-
-	.load3 view:nth-child(1) {
-		animation-delay: 0.26s;
-	}
-
-	.load1 view:nth-child(2) {
-		animation-delay: 0.39s;
-	}
-
-	.load2 view:nth-child(2) {
-		animation-delay: 0.52s;
-	}
-
-	.load3 view:nth-child(2) {
-		animation-delay: 0.65s;
-	}
-
-	.load1 view:nth-child(3) {
-		animation-delay: 0.78s;
-	}
-
-	.load2 view:nth-child(3) {
-		animation-delay: 0.91s;
-	}
-
-	.load3 view:nth-child(3) {
-		animation-delay: 1.04s;
-	}
-
-	.load1 view:nth-child(4) {
-		animation-delay: 1.17s;
-	}
-
-	.load2 view:nth-child(4) {
-		animation-delay: 1.3s;
-	}
-
-	.load3 view:nth-child(4) {
-		animation-delay: 1.43s;
-	}
-
-	@-webkit-keyframes load {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0.2;
-		}
-	}
-</style>

File diff ditekan karena terlalu besar
+ 0 - 185
pages/shop/shopOrderDetail.vue


+ 5 - 2
pages/user/award/account.vue

@@ -27,6 +27,9 @@
 
 <script>
 import { aliInfo, bankInfo, setAliInfo, setBankInfo } from '@/api/wallet.js';
+import {
+		prePage
+	} from '@/utils/rocessor.js';
 export default {
 	data() {
 		return {
@@ -119,7 +122,7 @@ export default {
 						duration: 2000,
 						position: 'top'
 					});
-					this.$api.prePage().dataUp()
+					prePage().dataUp()
 					setTimeout(() => {
 						uni.navigateBack()
 					},1500)
@@ -137,7 +140,7 @@ export default {
 						duration: 2000,
 						position: 'top'
 					});
-					this.$api.prePage().dataUp()
+					prePage().dataUp()
 					setTimeout(() => {
 						uni.navigateBack()
 					},1500)

+ 4 - 1
pages/user/money/pay.vue

@@ -116,7 +116,10 @@
 							if (e.status == 200) {
 								obj.paySuccessTo();
 							} else {
-								obj.$api.msg(msg);
+								uni.showToast({
+									title:msg,
+									icon:"none"
+								})
 							}
 						}
 						if (obj.payType == 'weixin') {

+ 0 - 366
pages/user/myCart/Prepayment.vue

@@ -1,366 +0,0 @@
-<template>
-	<view class="app">
-		<view class="bg">
-		</view>
-		<view class="moneyBox">
-			<view class="price-box">
-				<text>提前还款金额</text>
-			</view>
-			<view class="moneyNumBox flex">
-				<text class="fh">¥</text>
-				<input class="moneyValue" type="text" v-model="money" />
-			</view>
-			<view class="day">
-				服务天数剩余{{day}}天
-			</view>
-		</view>
-		<view class="moneyBox margin-t-30 padding-t-30">
-			<view class="yt-list">
-				<view class="yt-list-cell" @click="payType='yue'">
-					<view class="cell-tit flex">
-						<image class="orderIcon" src="../../../static/icon/ye.png" mode="widthFix"></image>
-						<text class="margin-l-10">余额({{now_money}})</text>
-					</view>
-					<image class="checked" v-if="payType=='yue'" src="../../../static/icon/addressIconXz.png"
-						mode="widthFix">
-					</image>
-					<view v-else class="noChecked"></view>
-				</view>
-			</view>
-		</view>
-		<view class="base-buttom" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</view>
-	</view>
-</template>
-
-<script>
-	import {
-		balance
-	} from '@/api/wallet.js';
-	import {
-		getCarInfo,
-		prepayment
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				payType: 'yue',
-				money: 0, //订单金额
-				allMoney: 0, //总的还款金额
-				now_money: 0.0, //余额
-				car_number: '', //保存订单id
-				payLoding: false, //判断是否支付中
-				minMoney: 0, //最低还款金额
-			};
-		},
-		onLoad(options) {
-			this.car_number = options.id;
-			// 载入余额
-			balance({}).then(({
-				data
-			}) => {
-				// 获取余额
-				this.now_money = data.now_money;
-			});
-			getCarInfo({
-				car_number: this.car_number
-			}).then((e) => {
-				this.money = e.data.surplus;
-				this.allMoney = e.data.surplus;
-				this.minMoney = +e.data.day_deducted
-				this.day = e.data.day
-			})
-		},
-		methods: {
-			// 支付成功跳转
-			paySuccessTo() {
-				uni.hideLoading();
-				uni.redirectTo({
-					url: '/pages/user/money/paySuccess?type=1'
-				});
-			},
-			//确认支付
-			confirm: async function() {
-				let obj = this;
-				// 判断是否余额不足
-				if (obj.payType == 'yue' && +obj.now_money < obj.money) {
-					uni.showModal({
-						title: '提示',
-						content: '账户余额不足!',
-						showCancel: false,
-					});
-					return;
-				}
-				// 判断是否为未支付订单中跳转进入
-				if (this.money < this.minMoney) {
-					uni.showModal({
-						title: '提示',
-						content: '还款金额不可低于' + this.minMoney + '元',
-						showCancel: false,
-					});
-					return
-				}
-				if (this.money % this.minMoney != 0 && this.money < this.allMoney) {
-					uni.showModal({
-						title: '提示',
-						content: '还款金额必须为' + this.minMoney + '的倍数',
-						showCancel: false,
-					});
-					return
-				}
-
-				// 支付中
-				uni.showLoading({
-					title: '支付中',
-					mask: true
-				})
-				obj.payLoding = true;
-				prepayment({
-					'car_number': this.car_number,
-					money: this.money
-				}).then((e) => {
-					uni.hideLoading()
-					uni.showToast({
-						title: e.msg
-					});
-					obj.payLoding = false;
-					uni.showModal({
-						title: '提示',
-						content: e.msg,
-						showCancel: false,
-						cancelText: '取消',
-						confirmText: '返回',
-						success: res => {
-							if(res.confirm){
-								uni.navigateBack()
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					});
-				}).catch((e) => {
-					obj.payLoding = false;
-					uni.hideLoading()
-					console.log(e);
-				})
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.app {
-		width: 100%;
-		padding-top: 30rpx;
-	}
-
-	.moneyBox {
-		position: relative;
-		margin: 0 $page-row-spacing;
-		border-radius: 20rpx;
-		overflow: hidden;
-		background-color: #FFFFFF;
-		padding: 50rpx 30rpx 30rpx;
-
-		.moneyNumBox {
-			color: $font-color-base;
-			border-bottom: 1px solid $page-color-light;
-
-			.fh {
-				font-size: $font-base + 2rpx;
-
-			}
-
-			.moneyValue {
-				font-size: $font-lg + 16rpx;
-			}
-		}
-
-		.day {
-			padding-top: 30RPX;
-			font-size: $font-sm - 2rpx;
-			color: $font-color-light;
-		}
-	}
-
-	.bg {
-		background-color: $color-green;
-		width: 950rpx;
-		position: absolute;
-		left: -100rpx;
-		border-bottom-left-radius: 1000rpx;
-		border-bottom-right-radius: 1000rpx;
-		top: 0rpx;
-		height: 300rpx;
-	}
-
-	.price-box {
-		background-color: #fff;
-		padding-bottom: 60rpx;
-		font-size: $font-base;
-		color: $font-color-base;
-		font-weight: bold;
-
-		.price {
-			font-size: 50upx;
-			color: #303133;
-			margin-top: 12upx;
-
-			&:before {
-				content: '¥';
-				font-size: 40upx;
-			}
-		}
-	}
-
-	.pay-type-list {
-		margin-top: 20upx;
-		background-color: #fff;
-		padding-left: 60upx;
-
-		.type-item {
-			height: 120upx;
-			padding: 20upx 0;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding-right: 60upx;
-			font-size: 30upx;
-			position: relative;
-		}
-
-		.icon {
-			width: 100upx;
-			font-size: 52upx;
-		}
-
-		.iconyue {
-			color: #fe8e2e;
-		}
-
-		.iconweixin {
-			color: #36cb59;
-		}
-
-		.iconzhifubao {
-			color: #01aaef;
-		}
-
-		.tit {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			margin-bottom: 4upx;
-		}
-
-		.con {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			font-size: $font-sm;
-			color: $font-color-light;
-		}
-	}
-
-	.clickbg {
-		background-color: $color-gray !important;
-	}
-
-	.yt-list {
-		background: #fff;
-		border-radius: 20rpx;
-		width: 100%;
-	}
-
-	.yt-list-cell {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		line-height: 70rpx;
-		position: relative;
-
-		.checked,
-		.noChecked {
-			width: 36rpx;
-			height: 36rpx;
-		}
-
-		.noChecked {
-			border: 1px solid $font-color-light;
-			border-radius: 100rpx;
-		}
-
-		&.cell-hover {
-			background: #fafafa;
-		}
-
-		&.b-b:after {
-			left: 30rpx;
-		}
-
-		.cell-icon {
-			height: 32rpx;
-			width: 32rpx;
-			font-size: 22rpx;
-			color: #fff;
-			text-align: center;
-			line-height: 32rpx;
-			background: #f85e52;
-			border-radius: 4rpx;
-			margin-right: 12rpx;
-
-			&.hb {
-				background: #ffaa0e;
-			}
-
-			&.lpk {
-				background: #3ab54a;
-			}
-		}
-
-		.cell-more {
-			align-self: center;
-			font-size: 24rpx;
-			color: $font-color-light;
-			margin-left: 8rpx;
-			margin-right: -10rpx;
-		}
-
-		.cell-tit {
-			font-size: 26rpx;
-			color: $font-color-light;
-			margin-right: 10rpx;
-
-			.orderIcon {
-				width: 48rpx;
-			}
-		}
-
-		.cell-tip {
-			font-size: 26rpx;
-			color: $font-color-dark;
-
-			&.disabled {
-				color: $font-color-light;
-			}
-
-			&.active {
-				color: $base-color;
-			}
-
-			&.red {
-				color: $base-color;
-			}
-		}
-
-		&.desc-cell {
-			.cell-tit {
-				max-width: 90rpx;
-			}
-		}
-
-		.desc {
-			text-align: right;
-			font-size: $font-base;
-			color: $font-color-light;
-		}
-	}
-</style>

+ 0 - 193
pages/user/myCart/authorization.vue

@@ -1,193 +0,0 @@
-<template>
-	<view class="container">
-		<view class="listBox">
-			<view class="list">
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">授权手机号</text>
-					</view>
-					<view class="right flex">
-						<input class="input" placeholder="请输入用户手机" type="text" v-model="phone"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">授权时长</text>
-					</view>
-					<view class="right flex">
-						<picker class="input" mode="selector" range-key='text' :range="timeList" @change="changeTime">
-							<view>{{time}}</view>
-						</picker>
-						<image class="img" src="../../../static/icon/dom.png" mode="widthFix"></image>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">对其备注</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="mask" type="text" placeholder="请输入备注信息"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="base-buttom" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">授权</view>
-	</view>
-</template>
-
-<script>
-	import {
-		add_auth_car
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				phone: '',
-				id: '',
-				time: '授权时长',
-				mask: '',
-				timeList: [{
-						type: 0,
-						text: '长期'
-					},
-					{
-						type: 1,
-						text: '1天'
-					},
-					{
-						type: 3,
-						text: '3天'
-					},
-					{
-						type: 7,
-						text: '7天'
-					},
-					{
-						type: 30,
-						text: '30天'
-					}
-				],
-				indexTime: 0, //选中的时间对象
-				loding: false
-			};
-		},
-		onLoad: function(option) {
-			this.id = option.id
-		},
-		methods: {
-			changeTime(e) {
-				this.time = this.timeList[e.detail.value].text
-				this.indexTime = e.detail.value;
-			},
-			confirm(e) {
-				let obj = this;
-				if(!obj.phone){
-					uni.showToast({
-						title:'请输入授权用户手机号',
-						icon:'none'
-					})
-					return
-				}
-				if(obj.time=='授权时长'){
-					uni.showToast({
-						title:'请选择授权时长',
-						icon:'none'
-					})
-					return
-				}
-				obj.loding = true;
-				add_auth_car({
-						to_phone: obj.phone,
-						car_number: obj.id,
-						day: obj.indexTime,
-						nickname: obj.mask
-					})
-					.then(({
-						data
-					}) => {
-						uni.showToast({
-							title:'授权成功',
-							icon:'success'
-						})
-						setTimeout(function() {
-							obj.loding = false;
-							uni.navigateBack();
-						}, 1000);
-					})
-					.catch(err => {
-						obj.loding = false;
-						console.log(err);
-					});
-			}
-		},
-
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.bg-gray {
-		background-color: $color-gray;
-	}
-	.base-buttom{
-		position: relative;
-		bottom: auto;
-		left: auto;
-		right: auto;
-	}
-	.content {
-		padding-top: 30rpx;
-	}
-
-	.listBox {
-		margin: $page-row-spacing;
-		margin-top: 30rpx;
-		border-radius: 20rpx;
-		overflow: hidden;
-		background-color: #FFFFFF;
-	}
-
-	.list {
-		.input {
-			text-align: right;
-			font-size: $font-base;
-			color: $color-gray;
-			min-height: 28rpx;
-			flex-grow: 1;
-		}
-
-		.listItem {
-			padding: 35rpx 40rpx;
-			border-bottom: 1px solid $page-color-light;
-		}
-
-		.listIconImg {
-			width: 36rpx;
-		}
-
-		.right {
-			color: $font-color-light;
-			font-size: $font-base;
-			flex-grow: 1;
-
-			.img {
-				width: 26rpx;
-				margin-left: 10rpx;
-			}
-		}
-
-		.titleBox {
-			.title {
-				color: $font-color-base;
-				font-size: $font-base;
-			}
-		}
-	}
-</style>

+ 0 - 188
pages/user/myCart/authorizationList.vue

@@ -1,188 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-			<!-- 空白页 -->
-			<empty v-if="navList[0].loaded === true && navList[0].orderList.length === 0"></empty>
-			<!-- 订单列表 -->
-			<view class="listItem flex" v-for="(item, index) in navList[0].orderList">
-				<view>
-					<image class="avatar" :src="item.to_user.avatar" mode="scaleToFill"></image>
-				</view>
-				<view class="conetnt">
-					<view class="name">
-						{{item.nickname}}
-					</view>
-					<view class="user">
-						手机号:{{item.to_user.phone}}
-					</view>
-				</view>
-				<view class="rightButtom" @click="outAuth(item)">
-					解除
-				</view>
-			</view>
-			<uni-load-more :status=" navList[0].loadingType"></uni-load-more>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import {
-		del_auth_car,
-		get_auth
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '授权用户',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}],
-				id: '',
-			};
-		},
-
-		onLoad(options) {
-			this.id = options.id || '';
-			this.loadData();
-		},
-		methods: {
-			// 是否取消授权
-			outAuth(item) {
-				uni.showModal({
-					title: '提示',
-					content: `是否取消${item.nickname}授权?`,
-					success: res => {
-						if (res.confirm) {
-							uni.showLoading({
-								title: '取消授权中',
-								mask:true
-							});
-							del_auth_car({
-								id:item.id
-							}).then((e) => {
-								uni.hideLoading()
-								
-							}).catch((e) => {
-								console.log(e);
-								uni.hideLoading()
-							})
-							console.log('取消授权');
-						}
-						
-					},
-				});
-			},
-			//获取列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				get_auth({
-						car_number: this.id,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == arr.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			//订单状态文字和颜色
-		}
-	}
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		padding-top: 30rpx;
-		height: 100%;
-	}
-
-	.listItem {
-		padding: $page-row-spacing;
-		margin: $page-row-spacing;
-		margin-top: 0;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-
-		.avatar {
-			border-radius: 100rpx;
-			width: 120rpx;
-			height: 120rpx;
-
-		}
-
-		.rightButtom {
-			padding: 20rpx 0;
-			text-align: center;
-			color: $color-red;
-			border-radius: 100rpx;
-			border: 1px solid $color-red;
-			width: 200rpx;
-
-		}
-
-		.conetnt {
-			padding-left: 20rpx;
-			flex-grow: 1;
-
-			.name {
-				font-size: 32rpx;
-				color: $font-color-dark;
-			}
-
-			.user {
-				font-size: 24rpx;
-				color: $font-color-disabled;
-				margin-top: 30rpx;
-			}
-
-
-		}
-	}
-</style>

+ 0 - 269
pages/user/myCart/cartConfing.vue

@@ -1,269 +0,0 @@
-<template>
-	<view>
-		<view class="iconList flex">
-			<navigator :url="'/pages/user/myCart/authorization?id='+item.car_number" v-if="item.auth_num!=-1">
-				<view class="iconItem">
-					<view class="iconImgItem">
-						<image src="../../../static/icon/iconAuthorization.png" mode="widthFix"></image>
-					</view>
-					<view class="iconName">
-						授权
-					</view>
-				</view>
-			</navigator>
-			<navigator :url="'/pages/user/reportForRepair/Report?id='+item.car_number">
-				<view class="iconItem">
-					<view class="iconImgItem">
-						<image src="../../../static/icon/iconBaoxiu.png" mode="widthFix"></image>
-					</view>
-					<view class="iconName">
-						报修
-					</view>
-				</view>
-			</navigator>
-			<!-- <view class="iconItem">
-			<view class="iconImgItem">
-				<image src="../../../static/icon/iconSet.png" mode="widthFix"></image>
-			</view>
-		</view> -->
-			<view class="iconItem" @click="tabCarStatus('seek',item)">
-				<view class="iconImgItem">
-					<image src="../../../static/icon/iconAlarm.png" mode="widthFix"></image>
-				</view>
-				<view class="iconName">
-					寻车
-				</view>
-			</view>
-			<view class="iconItem" @click="tabCarStatus('tab',item)">
-				<view class="iconImgItem">
-					<image v-if="item.status==1||item.status==3||item.status==4" src="../../../static/icon/lockGreen.png" mode="widthFix">
-					</image>
-					<image v-else src="../../../static/icon/lockRed.png" mode="widthFix"></image>
-				</view>
-				<view class="iconName">
-					<view class="greed" v-if="item.status==1||item.status==3||item.status==4">
-						启动
-					</view>
-					<view class="red" v-else>
-						关闭
-					</view>
-				</view>
-			</view>
-			<view class="iconItem" @click="tabCarStatus('unlock',item)">
-				<view class="iconImgItem">
-					<image src="../../../static/icon/lockGray.png" mode="widthFix"></image>
-				</view>
-				<view class="iconName">
-					解锁
-				</view>
-			</view>
-		</view>
-		<uni-popup ref="message" type="message">
-			<uni-popup-message type="error" message="错误消息" :duration="0">
-			</uni-popup-message>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		car_switch
-	} from '@/api/user.js';
-	// #ifdef MP
-	import {
-		openGetAddress,
-	} from '@/utils/rocessor.js';
-	// #endif
-	// #ifdef H5
-	import weixinObj from "@/plugin/jweixin-module/index.js";
-	import {
-		weixindata
-	} from "@/utils/wxAuthorized.js"
-	// #endif
-
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	export default {
-		props: {
-			item: {
-				type: Object,
-				default () {
-					return {
-
-					}
-				}
-			},
-		},
-		data() {
-			return {
-				loadShopData: false, //判断是否已经开启监听
-			}
-		},
-		computed: {
-			auth_num() {
-				return this.item ? +this.item.auth_num : 0
-			},
-			...mapState('user', ['address']),
-		},
-		methods: {
-			...mapMutations('user', ['setAddress']),
-			// 数据加载中
-			// 保存地址
-			car_switch(data, type, item) {
-				car_switch(data).then(() => {
-					if (type == 'tab') {
-						const status = (item.status == 1) ? 2 : 1;
-						this.$emit("tab", status)
-					}
-					uni.hideLoading()
-					uni.showToast({
-						title: '发送成功'
-					});
-				}).catch((e) => {
-					uni.hideLoading()
-					// this.$refs.message.open();
-					uni.showModal({
-						title: '错误',
-						content: e.msg,
-						showCancel: false,
-					});
-				})
-			},
-			// 调用切换
-			tabCarStatus(type = 'tab', item) {
-				let that = this;
-				let data = {
-					car_number: item.car_number,
-				};
-				// 是否开关锁
-				if (type == 'tab') {
-					data.status = (item.status == 1) ? 2 : 1;
-				}
-				// 是否解锁
-				if (type == 'unlock') {
-					data.status = 6;
-				}
-				// 是否寻车
-				if (type == 'seek') {
-					data.status = 5;
-				}
-				// #ifdef H5
-				let bool = uni.getStorageSync('weichatBrowser') || '';
-				// 判断是否公众号
-				if (bool) {
-					weixindata().then(() => {
-						weixinObj.getLocation({
-							type: 'gcj02',
-							success: (e) => {
-								data.latitude = e.latitude;
-								data.longitude = e.longitude;
-								that.car_switch(data, type, item)
-							}
-						});
-					})
-				} else {
-					uni.getLocation({
-						type: 'gcj02',
-						success(e) {
-							data.latitude = e.latitude;
-							data.longitude = e.longitude;
-							that.car_switch(data, type, item)
-						},
-						fail(e) {
-							console.log(e, 'cw');
-						}
-					})
-				}
-
-				// #endif
-
-				// #ifdef MP
-				// 判断是否已经有位置数据
-
-				if (!that.address.latitude || !that.address.longitude) {
-					// 判断是否已经获取授权
-					openGetAddress().then((e) => {
-						// 获取当前选中开锁的对象
-						uni.showLoading({
-							title: '请求发送中',
-							mask: true
-						});
-						console.log("授权");
-						wx.startLocationUpdateBackground({
-							type: 'gcj02',
-							success: (e) => {
-								console.log(e);
-								// 调用鉴定位置变化事件
-								wx.onLocationChange((res) => {
-									console.log(res, '位置数据');
-									// 保存当前经纬度
-									that.setAddress({
-										latitude: res.latitude,
-										longitude: res.longitude
-									})
-									// 判断是否已经加载过最近商家信息
-									if (!that.loadShopData) {
-										data.latitude = res.latitude;
-										data.longitude = res.longitude;
-										that.car_switch(data, type, item)
-										that.loadShopData = true;
-									}
-								})
-							},
-							fail: () => {
-								uni.hideLoading()
-							}
-						})
-
-					})
-				} else {
-					uni.showLoading({
-						title: '请求发送中',
-						mask: true
-					});
-					data.latitude = that.address.latitude;
-					data.longitude = that.address.longitude;
-					that.car_switch(data, type, item)
-				}
-				// #endif
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.iconList {
-		padding: 30rpx;
-		padding-bottom: 0;
-
-		.iconItem {
-			.iconImgItem {
-				width: 62rpx;
-				margin: 0 auto;
-
-				image {
-					width: 100%;
-					height: 62rpx;
-				}
-			}
-
-			.iconName {
-				color: $font-color-base;
-				font-size: 22rpx;
-				text-align: center;
-				padding: 15rpx 0;
-				font-weight: 100;
-
-				.greed {
-					color: $color-green;
-				}
-
-				.red {
-					color: $color-red;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 299
pages/user/myCart/myCart.vue

@@ -1,299 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-			<!-- 空白页 -->
-			<!-- #ifdef H5 -->
-			<empty src="../../../static/error/emptyMyCart.png" v-if="navList[0].loaded === true && navList[0].orderList.length === 0"></empty>
-			<!-- #endif -->
-			<!-- #ifndef H5 -->
-			<empty src="../static/error/emptyMyCart.png" v-if="navList[0].loaded === true && navList[0].orderList.length === 0"></empty>
-			<!-- #endif -->
-			<!-- 订单列表 -->
-			<view class="listItem" v-for="(item, index) in navList[0].orderList" :key='index'>
-				<view v-if="item.day>0" class="topRightTip" @click="navTo('./Prepayment?id='+item.car_number)">
-					<image src="../../../static/image/moneyPay.png" mode="widthFix"></image>
-				</view>
-				<view class="flex">
-					<view class="imgbox">
-						<image :src="item.image" mode="widthFix"></image>
-					</view>
-					<view class="contentDetail flex">
-						<view class="goodsName">
-							<view class="topName">
-								{{item.car_name}}
-							</view>
-							<view class="goodsType">
-								{{item.car_sku}}
-							</view>
-							<view class="goodsTime margin-t-10">
-								激活时间:{{item.bind_time}}
-							</view>
-						</view>
-						<view class="goodsRight">
-							<view class="status">
-								已授权
-							</view>
-							<navigator :url="'./authorizationList?id='+item.car_number">
-								<view class="numR">
-									{{item.auth_num}}
-								</view>
-							</navigator>
-						</view>
-					</view>
-				</view>
-				<view class="address">
-					当前位置:{{item.address}}
-				</view>
-				<map @click="openMap(item.latitude,item.longitude)"  class="map" :enable-zoom='false' :enable-scroll='false' :latitude="item.latitude" :longitude="item.longitude" :markers="[{
-						latitude: item.latitude,
-						longitude:item.longitude,
-						iconPath: '../../../static/image/location.png',
-						width:35,
-						height:35
-					}]"></map>
-				<view class="detail flex">
-					<view class="item">
-						<view class="type">
-							剩余电量
-						</view>
-						<view class="num">
-							{{item.residue}}%
-						</view>
-					</view>
-					<view class="item">
-						<view class="type">
-							剩余天数
-						</view>
-						<view class="num">
-							{{item.day}}
-						</view>
-					</view>
-					<!-- <view class="item">
-						<view class="type">
-							总里程数
-						</view>
-						<view class="num">
-							200
-						</view>
-					</view> -->
-				</view>
-				<cartConfing @tab="changetab($event,item)" :item='item'></cartConfing>
-			</view>
-
-			<uni-load-more :status=" navList[0].loadingType"></uni-load-more>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import cartConfing from './cartConfing.vue';
-	import {
-		carList,
-	} from '@/api/user.js';
-	export default {
-		components: {
-			cartConfing
-		},
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '待付款',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}]
-			};
-		},
-
-		onLoad(options) {
-			this.loadData();
-		},
-		methods: {
-			// tab改变事件
-			changetab(tab,item){
-				item.status = tab
-			},
-			// 打开地图导航
-			openMap(lat, long) {
-				uni.openLocation({
-					latitude: +lat,
-					longitude: +long,
-					complete(e){
-						console.log(e,'地图打开');
-					}
-				})
-			},
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			},
-			//获取列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return; 
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				carList({
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						navItem.page++;
-						if (navItem.limit == arr.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		padding-top: 30rpx;
-		height: 100%;
-	}
-
-	.listItem {
-		margin: 0rpx 20rpx 30rpx;
-		border-radius: 20rpx;
-		padding: 30rpx;
-		background-color: #FFFFFF;
-		position: relative;
-		overflow: hidden;
-
-		.topRightTip {
-			position: absolute;
-			top: 0;
-			right: 0;
-
-			image {
-				width: 80rpx;
-			}
-		}
-
-		.imgbox {
-			width: 160rpx;
-			height: 160rpx;
-			border-radius: 20rpx;
-
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		.contentDetail {
-			padding-left: 30rpx;
-			flex-grow: 1;
-
-			.goodsName {
-				.topName {
-					color: $font-color-dark;
-					font-size: 32rpx;
-					font-weight: bold;
-					margin-bottom: 30rpx;
-				}
-
-				.goodsType,
-				.goodsTime {
-					color: $font-color-light;
-					font-size: 24rpx;
-				}
-			}
-		}
-
-		.map {
-			width: 630rpx;
-			height: 200rpx;
-			font-size: 35rpx;
-		}
-
-		.goodsRight {
-			flex-shrink: 0;
-			.status {
-				color: $font-color-light;
-				font-size: 24rpx;
-			}
-
-			.numR {
-				height: 60rpx;
-				width: 60rpx;
-				border-radius: 10rpx;
-				border: 1px solid $color-green;
-				line-height: 60rpx;
-				font-size: 32rpx;
-				color: $color-green;
-				text-align: center;
-				margin: 0 auto;
-				margin-top: 20rpx;
-			}
-		}
-
-		.address {
-			color: $font-color-light;
-			font-size: 24rpx;
-			line-height: 1;
-			padding: 30rpx 0;
-		}
-
-		.detail {
-			margin-top: 30rpx;
-			padding: 0 20rpx;
-			justify-content: space-around;
-			.item {
-				color: $font-color-light;
-				text-align: center;
-				line-height: 1.5;
-
-				.type {
-					font-size: 24rpx;
-				}
-
-				.num {
-					font-size: 32rpx;
-
-				}
-			}
-		}
-	}
-</style>

+ 4 - 1
pages/user/realName/realNameAuthentication.vue

@@ -312,7 +312,10 @@
 								}
 							});
 						} else {
-							this.$api.msg('认证失败');
+							uni.showToast({
+								title: '认证失败' ,
+								icon:"none"
+							})
 						}
 					})
 					.catch(err => {

+ 0 - 154
pages/user/repair/repairDetail.vue

@@ -1,154 +0,0 @@
-<template>
-	<view class="container padding-t-30">
-		<view class="itemBox">
-			<view class="flex item">
-				<view class="title">
-					保修车辆:
-				</view>
-				<view class="content">
-					{{item.shop}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					维修单号:
-				</view>
-				<view class="content">
-					{{item.shop}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					维修地点:
-				</view>
-				<view class="content">
-					{{item.mast}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					完成时间:
-				</view>
-				<view class="content">
-					{{item.addTime}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					申报时间:
-				</view>
-				<view class="content">
-					{{item.delTime}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					联系电话:
-				</view>
-				<view class="content">
-					{{item.delTime}}
-				</view>
-			</view>
-			<view class="flex item">
-				<view class="title">
-					故障概述:
-				</view>
-				<view class="content">
-					{{item.delTime}}
-				</view>
-			</view>
-			<view class="item ">
-				<view class="title">
-					已传图片:
-				</view>
-				<view class="content margin-t-20">
-					<image class="img margin-r-20" src="../../../static/error/errorImage.jpg" mode="scaleToFill"></image>
-					<image class="img margin-r-20" src="../../../static/error/errorImage.jpg" mode="scaleToFill"></image>
-				</view>
-			</view>
-		</view>
-		
-		
-		
-		<view class="buttom flex">
-			<view class="borderGray btn">
-				上一个申请
-			</view>
-			<view class="borderGreed btn">
-				下一个申请
-			</view>
-		</view>
-	</view>
-</template>
-<script>
-	export default {
-		data() {
-			return {
-				item: {
-					shop: '绿津路桥加盟商一',
-					mast: '戴师傅',
-					address: '国际塑料城',
-					addTime: '2022-08-08 18:00',
-					delTime: '2022-08-08 19:00',
-
-				}
-			};
-		},
-		methods: {
-			loadData(source) {
-
-			},
-		}
-	};
-</script>
-<style lang="scss">
-	.itemBox {
-		margin: 0 $page-row-spacing;
-		margin-bottom: $page-row-spacing;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		padding-top: 40rpx;
-
-		.item {
-			justify-content: flex-start;
-			padding: 30rpx;
-			padding-top: 0;
-			font-size: $font-base;
-
-			.title {
-				flex-shrink: 0;
-				color: $font-color-base;
-			}
-
-			.content {
-				color: $font-color-light;
-				.img{
-					width: 120rpx;
-					height: 120rpx;
-					border-radius: 20rpx;
-				}
-			}
-
-		}
-	}
-	
-	.buttom{
-		justify-content: space-around;
-		padding-top: 50rpx;
-		.btn{
-			width: 300rpx;
-			height: 80rpx;
-			line-height: 80rpx;
-			text-align: center;
-			border-radius: 99rpx;
-		}
-		.borderGray{
-			border:1px solid $font-color-disabled;
-			color: $font-color-disabled;
-		}
-		.borderGreed{
-			border: 1px solid $color-green;
-			color: $color-green;
-		}
-	}
-</style>

+ 0 - 327
pages/user/repair/userRepair.vue

@@ -1,327 +0,0 @@
-<template>
-	<view class="container ">
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view class="itemBox" v-for="(item,index) in tabItem.orderList">
-						<view class="flex item">
-							<view class="title">
-								订单状态:
-							</view>
-							<view class="content">
-								<text v-if='item.status==3' class="font-color-greed">
-								已完成
-								</text>
-								<text  v-if='item.status==-1' class="font-color-gray">
-								已取消
-								</text>
-								<text v-if='item.status==2'  class="font-color-yellow">
-								待评价
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								报修车辆:
-							</view>
-							<view class="content">
-								{{item.car.car_name}}
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								维修单号:
-							</view>
-							<view class="content">
-								{{item.order_id}}
-							</view>
-						</view>
-						<view class="flex item" @click="openAddress(item)">
-							<view class="title">
-								维修地点:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopAddress.png" mode="widthFix"></image>
-								<text class="margin-l-10">{{item.address}}</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								维修师傅:
-							</view>
-							<view class="content flex">
-								<text class="margin-l-10">
-									{{item.processor_user.staff_name}}
-								</text>
-							</view>
-						</view>
-						<view class="flex item" @click="openPhone(item.processor_user.phone)">
-							<view class="title">
-								师傅电话:
-							</view>
-							<view class="content flex">
-								<image class="icon" src="../../../static/icon/shopPhone.png" mode="widthFix"></image>
-								<text class="margin-l-10">
-									{{item.processor_user.phone}}
-								</text>
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								申报时间:
-							</view>
-							<view class="content">
-								{{item.add_time}}
-							</view>
-						</view>
-						<view class="flex item">
-							<view class="title">
-								结束时间:
-							</view>
-							<view class="content">
-								{{item.processor_time}}
-							</view>
-						</view>
-						<view class="flex padding-t-20" v-if="navList[tabCurrentIndex].state==0">
-							<view @click="navDetail(item)" class="boxButtom flex btn1">
-								查看详情
-							</view>
-							<view v-if='item.status==2' @click="navPj(item)" class="boxButtom flex btn2">
-								去评价
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-<script>
-	import {
-		question
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-					state: 0,
-					text: '维修历史',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}]
-			};
-		},
-		onLoad() {
-			this.loadData();
-		},
-		methods: {
-			// 跳转详细页面
-			navDetail(item) {
-				uni.navigateTo({
-					url: '/pages/shop/repair/clientReparirDetail?id=' + item.order_id + '&type=2'
-				})
-			},
-			navPj(item){
-				uni.navigateTo({
-					url: '/pages/user/reportForRepair/Report?id=' + item.car_number
-				})
-			},
-			// 打开地址
-			openAddress(res) {
-				console.log(res, '返回的位置数据');
-				uni.chooseLocation({
-					latitude: res.latitude,
-					longitude: res.longitude,
-					success(re) {
-						console.log(re, '当前位置');
-					},
-					fail(e) {
-						console.log(e, 'cw');
-					}
-				})
-			},
-			// 拨打电话
-			openPhone(item) {
-				uni.makePhoneCall({
-					phoneNumber: item //仅为示例
-				});
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-				this.loadData('tabChange');
-			},
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			// 加载数据
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				console.log('开始请求');
-				question({
-						history: 1,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.data.map(e => {
-							e.status = +e.status;
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-<style lang="scss">
-	page,
-	.container {
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		height: 100%;
-		padding-top: 30rpx;
-	}
-
-	.navbar {
-
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.itemBox {
-		margin: 0 $page-row-spacing;
-		margin-bottom: $page-row-spacing;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		padding: 40rpx 0;
-
-		.boxButtom {
-			justify-content: center;
-			margin: 0 30rpx;
-			color: $color-green;
-			font-size: 24rpx;
-			height: 70rpx;
-			border-radius: 100rpx;
-			line-height: 1;
-			padding: 0 50rpx;
-			flex-grow: 1;
-
-			&.btn3 {
-				border: 1px solid $uni-color-warning;
-				color: $uni-color-warning;
-			}
-
-			&.btn1 {
-				border: 1px solid $font-color-light;
-				color: $font-color-light;
-			}
-
-			&.btn2 {
-				color: #FFFFFF;
-				background-color: $color-green;
-				padding: 0 120rpx;
-			}
-		}
-
-		.item {
-			justify-content: flex-start;
-			padding: 30rpx;
-			padding-top: 0;
-			font-size: $font-base;
-
-			.title {
-				flex-shrink: 0;
-				color: $font-color-base;
-			}
-
-			.content {
-				color: $font-color-light;
-
-				.icon {
-					width: 32rpx;
-				}
-			}
-
-		}
-	}
-</style>

+ 0 - 151
pages/user/reportForRepair/Report.vue

@@ -1,151 +0,0 @@
-<template>
-	<view class="content">
-		<view class="navStatus">
-			<view class="flex margin-l-20 margin-r-20">
-				<view class="itemNum" :class="{action:type>0}">
-					1
-				</view>
-				<view class="content flex" :class="{action:type>1}">
-				</view>
-				<view class="itemNum" :class="{action:type>1}">
-					2
-				</view>
-				<view class="content flex" :class="{action:type>2}">
-				</view>
-				<view class="itemNum" :class="{action:type>2}">
-					3
-				</view>
-			</view>
-			<view class="titleBox flex">
-				<view class="title">
-					报修申请
-				</view>
-				<view class="title">
-					等待维修
-				</view>
-				<view class="title">
-					维修完成
-				</view>
-			</view>
-		</view>
-		<status1 :cartInfo='cartInfo' v-if="type==1" @request='changeType(2)'></status1>
-		<status2 :reportDeatil='reportDeatil' :cartInfo='cartInfo' v-if="type==2" @request='changeType(3)'></status2>
-		<status3 :reportDeatil='reportDeatil' v-if="type==3"></status3>
-	</view>
-</template>
-
-<script>
-	import status1 from "./status1.vue"
-	import status2 from "./status2.vue"
-	import status3 from "./status3.vue"
-	import {
-		getCarInfo,
-		question_info
-	} from "../../../api/user.js"
-	export default {
-		components: {
-			status1,
-			status2,
-			status3
-		},
-		data() {
-			return {
-				cartInfo: {},//车辆信息
-				type: 1, //显示当前进度
-				id: '', //车辆id
-				loading: false, //是否提交中
-				reportDeatil:{}//报修信息
-			};
-		},
-		onLoad(options) {
-			this.id = options.id;
-			this.getCarInfo();
-			// 初始化加载报修信息
-			this.question_info();
-		},
-		methods: {
-			// 报修信息
-			getCarInfo() {
-				getCarInfo({
-					car_number: this.id,
-				}).then((e) => {
-					this.cartInfo = e.data;
-					// console.log(e);
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			changeType(type) {
-				this.type = type
-				if(type==2){
-					this.question_info()
-				}
-			},
-			// 获取报修详情
-			question_info() {
-				question_info({
-					car_number: this.id
-				}).then((e) => {
-					if (e.data) {
-						this.reportDeatil = e.data;
-						if(e.data.status==2){
-							this.type=3
-						}else if(e.data.status==0||e.data.status==1){
-							this.type=2
-						}
-						
-					}
-					// console.log(e);
-				}).catch((e) => {
-					uni.hideToast();
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	page {
-		height: 100%;
-	}
-
-	.navStatus {
-		padding: 60rpx 80rpx;
-
-		.item {
-			.itemGree {}
-		}
-
-		.itemNum {
-			width: 60rpx;
-			height: 60rpx;
-			line-height: 60rpx;
-			font-size: 28rpx;
-			text-align: center;
-			color: #FFFFFF;
-			background-color: $font-color-light;
-			border-radius: 99rpx;
-
-			&.action {
-				background-color: $color-green;
-			}
-		}
-
-		.title {
-			margin-top: 30rpx;
-			font-size: 24rpx;
-			color: $font-color-light;
-		}
-
-		.content {
-			flex-grow: 1;
-			border-bottom: 8rpx dotted $font-color-light;
-			margin: 0 10rpx;
-
-			&.action {
-				margin: 0;
-				border-bottom: 8rpx solid $color-green;
-			}
-		}
-	}
-</style>

+ 0 - 283
pages/user/reportForRepair/status1.vue

@@ -1,283 +0,0 @@
-<template>
-	<view class="content">
-		<view class="listBox">
-			<view class="list">
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">当前车辆</text>
-					</view>
-					<view class="right flex">
-						{{cartInfo.car_name}}
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">维修地点</text>
-					</view>
-					<view class="right flex" @click="getAddress">
-						<view class="input">
-							{{address}}
-						</view>
-						<image class="img" src="../../../static/icon/location.png" mode="widthFix"></image>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">联系电话</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="phone" type="text" placeholder="请填写联系电话"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="listItem">
-					<view class="flex titleBox">
-						<text class="title">故障简述</text>
-					</view>
-					<view class="right flex">
-						<textarea class="textarea_text" placeholder="简单的描述下故障。" v-model="content" maxlength='300'
-							name="" id="" cols="30" rows="10"></textarea>
-						<view class="maxShow">
-							{{content.length}}/300
-						</view>
-					</view>
-				</view>
-				<view class="listItem">
-					<view class="flex titleBox">
-						<text class="title">图片上传</text>
-					</view>
-					<view class="right flex imgList">
-						<view class="position-relative margin-r-20" v-if="imgList.length>0"
-							v-for="(item,index) in imgList">
-							<image class="upImg" :src="item" mode="scaleToFill"></image>
-							<image class="topExit" src="../../../static/icon/goodsExit.png" mode="scaleToFill"
-								@click="delImg(index)"></image>
-						</view>
-						<view class="position-relative margin-r-20">
-							<image class="upImg" src="../../../static/image/upImg.png" mode="scaleToFill"
-								@click="upImg()"></image>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="base-buttom" @click="confirm">
-			申请报修
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		create_question
-	} from '@/api/user.js';
-	import {
-		upload
-	} from '@/api/order.js';
-	export default {
-		props: {
-			cartInfo: {
-				type: Object,
-				default: function() {
-					return {}
-				}
-			}
-		},
-		data() {
-			return {
-				content: '', //提交内容
-				cartName: '车辆编号asdsfqdqwew',
-				phone: '', //手机号
-				address: '', //定位
-				lat: '', //经度
-				lon: '', //纬度
-				imgList: [],
-			};
-		},
-		created() {
-			// console.log('调用方法1');
-		},
-		methods: {
-			// 提交审核
-			confirm() {
-				if (!this.phone || this.phone.length != 11) {
-					uni.showModal({
-						title: '提示',
-						content: '请填写正确的手机号',
-						showCancel: false,
-					});
-
-					return
-				}
-				if (!this.content || !(this.content.trim())) {
-					uni.showModal({
-						title: '提示',
-						content: '请填写故障描述',
-						showCancel: false,
-					});
-				}
-				if (this.imgList.length < 1) {
-					uni.showModal({
-						title: '提示',
-						content: '请上传故障图片',
-						showCancel: false,
-					});
-				}
-				uni.showLoading({
-					title: '提交中',
-					mask: true
-				});
-
-				create_question({
-					car_number: this.cartInfo.car_number,
-					phone: this.phone,
-					content: this.content,
-					images: this.imgList.join(','),
-					longitude: this.lon,
-					'latitude': this.lat,
-					address: this.address
-				}).then((e) => {
-					uni.showModal({
-						title: '提示',
-						content: e.msg,
-						showCancel: false,
-					});
-					this.$emit("request");
-					uni.hideLoading()
-				}).catch((e) => {
-					uni.hideLoading()
-				})
-			},
-
-			// 上传修理图片
-			upImg(type = 'add', index) {
-				// console.log(type,index,'上传');
-				let that = this;
-				upload({
-					filename: ''
-				}).then(data => {
-					// console.log(type == 'add');
-					if (type == 'add') {
-						that.imgList = that.imgList.concat([data[0].url]);
-					}
-					if (type == "edit") {
-						that.imgList[index] = data[0].url;
-					}
-				})
-			},
-			// 获取用户地址信息
-			getAddress() {
-				let that = this;
-				uni.getLocation({
-					type:'gcj02',
-					success(res) {
-						// console.log(res, '返回的位置数据');
-						uni.chooseLocation({
-							latitude: res.latitude,
-							longitude: res.longitude,
-							success(re) {
-								that.lat = re.latitude;
-								that.lon = re.longitude;
-								that.address = re.address;
-								// console.log(re, '当前位置');
-							},
-							fail(e) {
-								console.log(e, 'cw');
-							}
-						})
-					}
-				})
-			},
-			// 删除上传图片
-			delImg(index) {
-				this.imgList.splice(index, 1)
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	page {
-		height: 100%;
-	}
-
-	.listBox {
-		margin: $page-row-spacing;
-		margin-top: 30rpx;
-		border-radius: 20rpx;
-		overflow: hidden;
-		background-color: #FFFFFF;
-	}
-
-	.list {
-		.input {
-			text-align: right;
-			font-size: $font-base;
-			color: $color-gray;
-			width: 100%;
-		}
-
-		.listItem {
-			padding: 35rpx 40rpx;
-			border-bottom: 1px solid $page-color-light;
-
-			.imgList {
-				margin-top: 30rpx;
-				justify-content: flex-start;
-
-				.topExit {
-					width: 30rpx;
-					height: 30rpx;
-					position: absolute;
-					top: -10rpx;
-					right: -10rpx;
-				}
-			}
-		}
-
-		.listIconImg {
-			width: 36rpx;
-		}
-
-		.right {
-			color: $font-color-light;
-			font-size: $font-base;
-			flex-grow: 1;
-			justify-content: flex-end;
-			position: relative;
-
-			.img {
-				width: 26rpx;
-			}
-
-			.upImg {
-				width: 120rpx;
-				height: 120rpx;
-				border-radius: 20rpx;
-			}
-
-			.textarea_text {
-				background-color: $page-color-base;
-				width: 100%;
-				margin-top: 30rpx;
-				border-radius: 20rpx;
-				padding: 30rpx;
-			}
-
-			.maxShow {
-				position: absolute;
-				bottom: 10rpx;
-				right: 20rpx;
-				font-size: 24rpx;
-			}
-
-		}
-
-		.titleBox {
-			.title {
-				color: $font-color-base;
-				font-size: $font-base;
-			}
-		}
-	}
-</style>

+ 0 - 328
pages/user/reportForRepair/status2.vue

@@ -1,328 +0,0 @@
-<template>
-	<view class="content">
-		<view class="shopContent flex">
-			<view class="shoplogo">
-				<image class="logo" :src="reportDeatil.store.image" mode="scaleToFill"></image>
-			</view>
-			<view class="shopDetail">
-				<view class="shopName clamp">
-					{{reportDeatil.store.name}}
-				</view>
-				<view class="shopDetailText clamp2" v-if="reportDeatil.processor_uid==0">
-					{{reportDeatil.store.detailed_address}}
-				</view>
-				<view class="shopDetailText" v-if="reportDeatil.processor_uid!=0">
-					<view>
-						已安排:{{reportDeatil.processor_user.staff_name}}
-					</view>
-					<!-- <view>
-						预计{{detail.time}}小时到达维修地点
-					</view> -->
-				</view>
-			</view>
-			<view class="buttomShop" @click="payShopPhonw">
-				联系商家
-			</view>
-		</view>
-		<view class="listBox">
-			<view class="list">
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">当前车辆</text>
-					</view>
-					<view class="right flex">
-						{{cartInfo.car_name}}
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">维修单号</text>
-					</view>
-					<view class="right flex">
-						{{reportDeatil.order_id}}
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">维修地点</text>
-					</view>
-					<view class="right flex">
-						{{reportDeatil.address}}
-					</view>
-				</view>
-				<!-- <view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">联系电话</text>
-					</view>
-					<view class="right flex" @click="edit">
-						<text class="margin-r-10">
-							{{reportDeatil.phone}}
-						</text>
-						<image class="img" src="../../../static/icon/addressIcon1.png" mode="widthFix"></image>
-					</view>
-				</view> -->
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">申报时间</text>
-					</view>
-					<view class="right flex">
-						{{reportDeatil.add_time}}
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">故障简述</text>
-					</view>
-					<view class="right flex">
-						{{reportDeatil.content}}
-					</view>
-				</view>
-
-				<view class="listItem" v-if="imglist.length>0">
-					<view class="flex titleBox">
-						<text class="title">已传图片</text>
-					</view>
-					<view class="right flex imgList">
-						<view v-if="" class="position-relative margin-r-20" v-for="(item,index) in imglist">
-							<image class="upImg" :src="item" mode="scaleToFill"></image>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="base-buttom" @click="outBxiu">
-			撤销报修
-		</view>
-
-
-		<uni-popup ref="popup" type="dialog">
-			<uni-popup-dialog mode="input" title="请输入修改手机号" @confirm="editPhone">
-			</uni-popup-dialog>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		cancel_question
-	} from '@/api/user.js';
-	export default {
-		props: {
-			cartInfo: {
-				type: Object,
-				default: function() {
-					return {}
-				}
-			},
-			reportDeatil: {
-				type: Object,
-				default: function() {
-					return {}
-				}
-			}
-		},
-		computed: {
-			imglist() {
-				return this.reportDeatil.images.split(',')
-			}
-		},
-		data() {
-			return {};
-		},
-		created() {
-			// console.log('调用方法2');
-		},
-		methods: {
-			// 撤销报修
-			outBxiu() {
-				uni.showModal({
-					title: '提示',
-					content: '是否撤销报修?',
-					success: res => {
-						if (res.confirm) {
-							uni.showLoading({
-								title: '提交中...',
-								mask: true
-							});
-							cancel_question({
-								id: this.reportDeatil.id
-							}).then((e) => {
-								uni.hideLoading()
-								uni.showModal({
-									title: '提示',
-									content: '撤销成功',
-									showCancel: false,
-									success: res => {
-										uni.navigateBack()
-									},
-								});
-							}).catch((e) => {
-								uni.hideLoading()
-							})
-						}
-					},
-				});
-			},
-			// 打开修改弹窗
-			edit() {
-				this.$refs.popup.open();
-			},
-			editPhone(e) {
-				console.log(e, '修改手机号');
-			},
-			payShopPhonw() {
-				uni.makePhoneCall({
-					phoneNumber: this.reportDeatil.store.phone //仅为示例
-				});
-			}
-
-		}
-	}
-</script>
-
-<style lang="scss">
-	.content{
-		padding-bottom: 30rpx;
-	}
-	.base-buttom{
-		margin-top: 30rpx;
-	}
-	.base-buttom {
-		color: $color-red;
-		border: 1px solid $color-red;
-		background-color: $page-color-base;
-	}
-
-	.shopContent {
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		height: 160rpx;
-		padding: 20rpx;
-		margin: 0 $page-row-spacing;
-		margin-bottom: 20rpx;
-
-		.buttomShop {
-			border-radius: 99rpx;
-			border: 1px solid $color-green;
-			color: $color-green;
-			font-size: 24rpx;
-			padding: 20rpx 50rpx;
-			line-height: 1;
-			flex-shrink: 0;
-		}
-
-		.shoplogo {
-			flex-shrink: 0;
-			background-color: $font-color-white;
-			width: 120rpx;
-			height: 120rpx;
-			border-radius: 20rpx;
-
-			.logo {
-				height: 100%;
-				width: 100%;
-				border-radius: 20rpx;
-			}
-		}
-
-		.shopDetail {
-			padding-left: 30rpx;
-			flex-grow: 1;
-
-			.shopName {
-				line-height: 1;
-				margin-bottom: 15rpx;
-				font-size: 28rpx;
-				color: $font-base;
-			}
-
-			.shopDetailText {
-				font-size: 22rpx;
-				color: $font-color-light;
-			}
-		}
-	}
-
-	.listBox {
-		margin: $page-row-spacing;
-		margin-top: 30rpx;
-		border-radius: 20rpx;
-		overflow: hidden;
-		background-color: #FFFFFF;
-	}
-
-	.list {
-		.input {
-			text-align: right;
-			font-size: $font-base;
-			color: $color-gray;
-			width: 100%;
-		}
-
-		.listItem {
-			padding: 35rpx 40rpx;
-			border-bottom: 1px solid $page-color-light;
-
-			.imgList {
-				margin-top: 30rpx;
-				justify-content: flex-start;
-
-				.topExit {
-					width: 30rpx;
-					height: 30rpx;
-					position: absolute;
-					top: -10rpx;
-					right: -10rpx;
-				}
-			}
-		}
-
-		.listIconImg {
-			width: 36rpx;
-		}
-
-		.right {
-			color: $font-color-light;
-			font-size: $font-base;
-			justify-content: flex-end;
-			position: relative;
-			padding-left: 10rpx;
-
-			.img {
-				width: 26rpx;
-			}
-
-			.upImg {
-				width: 120rpx;
-				height: 120rpx;
-				border-radius: 20rpx;
-				background-color: $font-color-disabled;
-			}
-
-			.textarea_text {
-				background-color: $page-color-base;
-				width: 100%;
-				margin-top: 30rpx;
-				border-radius: 20rpx;
-				padding: 30rpx;
-			}
-
-			.maxShow {
-				position: absolute;
-				bottom: 10rpx;
-				right: 20rpx;
-				font-size: 24rpx;
-			}
-
-		}
-
-		.titleBox {
-			flex-shrink: 0;
-
-			.title {
-				color: $font-color-base;
-				font-size: $font-base;
-			}
-		}
-	}
-</style>

+ 0 - 192
pages/user/reportForRepair/status3.vue

@@ -1,192 +0,0 @@
-<template>
-	<view class="content">
-		<view class="order-item">
-			<view class="masterWorker flex" v-if="reportDeatil.processor_user">
-				<image class="imgUser" src="../../../static/error/missing-face.png" mode="scaleToFill"></image>
-				<view class="padding-l-30">
-					<view class="masterName">
-						{{reportDeatil.processor_user.staff_name}}
-					</view>
-					<view class="masterTime margin-t-20">
-						完成时间:{{reportDeatil.processor_time}}
-					</view>
-				</view>
-			</view>
-			<view class="flex_item zhil" v-for="(item,index) in rateValue">
-				<view>{{item.text}}:</view>
-				<view>
-					<uni-rate text="1" size="20" margin="10" :value="item.value" @change="rateChange($event,index)">
-					</uni-rate>
-				</view>
-			</view>
-		</view>
-		<view @click.stop="submit" class="base-buttom">
-			提交并结束报修
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		question_score,
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				rateValue: [{
-					text: '响应速度',
-					value: 0,
-				}, {
-					text: '技术评分',
-					value: 0,
-				}, {
-					text: '服务态度',
-					value: 0,
-				}],
-			};
-		},
-		props: {
-			reportDeatil: {
-				type: Object,
-				default: function() {
-					return {
-
-					}
-				}
-			},
-		},
-		methods: {
-			// 评分
-			rateChange(val, index) {
-				console.log(val, index);
-				this.rateValue[index].value = val.value
-			},
-			//提交评论
-			submit(e) {
-				let obj = this;
-				if (this.rateValue[0].value == 0 || this.rateValue[1].value == 0 || this.rateValue[2].value == 0) {
-					uni.showModal({
-						title: '错误',
-						content: '最低评分为一颗星,请重新选择',
-						showCancel: false,
-					});
-					return
-				}
-				uni.showLoading({
-					title: '提交中',
-					mask: true
-				});
-				question_score({
-						id: this.reportDeatil.id,
-						response_score: this.rateValue[0].value, //响应频分
-						skill_score: this.rateValue[1].value, //技术评分
-						attitude_score: this.rateValue[2].value, //服务评分
-					})
-					.then(e => {
-						uni.hideLoading();
-						uni.showModal({
-							title: '提示',
-							content: e.msg,
-							showCancel: false,
-							success: res => {
-								uni.navigateBack()
-							},
-						});
-					})
-					.catch(e => {
-						uni.showToast({
-							title: e.msg,
-							icon: 'error'
-						});
-						uni.hideLoading()
-					});
-			},
-			// 页面跳转
-			navto(e) {
-				uni.navigateTo({
-					url: e
-				});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.content {
-		padding: 0 $page-row-spacing;
-	}
-
-	.order-item {
-		display: flex;
-		flex-direction: column;
-		padding: 30rpx 0;
-		border-radius: 20rpx;
-		background: #fff;
-		margin-top: 20rpx;
-
-		.masterWorker {
-			padding: 0 30rpx;
-			border-bottom: 1px solid $page-color-light;
-			padding-bottom: 30rpx;
-			justify-content: flex-start;
-
-			.masterTime {
-				font-size: 22rpx;
-				color: $font-color-light;
-			}
-
-			.masterName {
-				color: $font-color-base;
-				font-size: 28rpx;
-				font-weight: bold;
-			}
-
-			.imgUser {
-				width: 120rpx;
-				height: 120rpx;
-				border-radius: 100rpx;
-			}
-		}
-
-		.flex_item {
-			margin: 0 30rpx;
-			color: $font-color-base;
-			font-size: $font-base;
-		}
-	}
-
-	.zhil {
-		font-size: 28rpx !important;
-		padding: 15rpx 15rpx;
-	}
-
-	.submit-box {
-		bottom: 0;
-		left: 0;
-		width: 750rpx;
-	}
-
-	.submit-btn {
-		margin-top: 10px;
-		display: inline-block;
-		width: 670rpx;
-		height: 96rpx;
-		line-height: 96rpx;
-		text-align: center;
-		background-color: #1BCC26 !important;
-		opacity: 1;
-		border-radius: 32rpx;
-		border-width: 8rpx;
-		border-color: rgba(255, 255, 255, 1);
-		box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
-		border-radius: 56rpx;
-		font-size: 39rpx;
-		font-weight: bold;
-		color: rgba(255, 255, 255, 1);
-	}
-
-	.address-box {
-		padding: 15rpx 40rpx;
-		margin-bottom: 10px;
-	}
-</style>

+ 348 - 0
pages/user/scoreAccumulate.vue

@@ -0,0 +1,348 @@
+<template>
+	<view class="content">
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box">
+							<view class="title">
+								<text>{{ item.mark }}</text>
+							</view>
+							<view class="time">
+								<text>{{ item.add_time }}</text>
+							</view>
+						</view>
+						<view class="money">
+							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		<view class="bottom-box">
+			<button class="add-btn up" @click="confirmShow">积分转佣金</button>
+			<navigator url="./setintegral">
+			<button class="add-btn yue" >积分转账</button>
+			</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	
+import { integrallist } from '@/api/functionalUnit.js';
+import empty from '@/components/empty/empty.vue';
+import {
+		getUserInfo
+	} from '@/api/user.js';
+import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+export default {
+	components: {
+		empty
+	},
+	computed: {
+		...mapState('user', ['userInfo'])
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+			],
+		};
+	},
+	onShow() {
+		// 载入积分数据
+		this.loadData();
+		this.loadBaseData();
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo']),
+		// 重新获取用户数据
+		loadBaseData() {
+			getUserInfo({})
+				.then(({
+					data
+				}) => {
+					console.log(data.nickname)
+					this.setUserInfo(data);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		confirmShow(){
+			uni.showModal({
+				title: '积分转佣金',
+				editable: true,
+				placeholderText:'请输入要转换的积分',
+				success: res => {
+					if(res.confirm){
+						// setMoney({
+						// 	brokerage:+res.content/10
+						// }).then((e)=>{
+						// 	uni.showToast({
+						// 		title: '积分转佣金完成'
+						// 	});
+						// }).catch((err)=>{
+						// 	console.log(err);
+						// })
+					}
+				},
+				fail: () => {},
+				complete: () => {}
+			});
+		},
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			integrallist(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+}
+.navbar {
+	display: flex;
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+// 列表
+
+.swiper-box {
+	height: calc(100% - 44px);
+	padding-top: 10rpx;
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #fd5b23;
+			font-size: $font-lg;
+		}
+	}
+}
+.list-scroll-content {
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+.bottom-box{
+	position: absolute;
+	bottom: 0;
+	left:0;
+	right:0;
+	padding-bottom: 30rpx;
+}
+.add-btn {
+		color:#FFF;
+		&.yue{
+			background-color: #FFF;
+			color: #6B4216;
+		}
+		&.up {
+			background: linear-gradient(-90deg, #FAC545, #FFE000);
+		}
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 604rpx;
+		height: 90rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+
+	}
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+		.title{
+			text-align: center;
+		}
+		.mian {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 32rpx 32rpx;
+			background-color: #ffffff;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+	
+			.delivery {
+				font-size: 40rpx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+	
+				image {
+					margin-top: 48rpx;
+					width: 172rpx;
+					height: 160rpx;
+				}
+			}
+	
+			.nocancel {
+				font-size: 32rpx;
+				color: #333333;
+				margin-top: 14rpx;
+			}
+	
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+	
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					border: 1px solid #dcc786;
+					border-radius: 38rpx;
+	
+					font-size: 32rpx;
+					color: #605128;
+				}
+	
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
+					border-radius: 38px;
+					font-size: 32rpx;
+					color: #605128;
+				}
+			}
+		}
+	}
+</style>

+ 35 - 7
pages/user/shareQrCode.vue

@@ -126,10 +126,18 @@ export default {
 											uni.saveImageToPhotosAlbum({
 												filePath: resFile.tempFilePath,
 												success: function(res) {
-													return that.$api.msg( '保存成功' );
+													uni.showToast({
+														title: '保存成功' ,
+														icon:"success"
+													})
+													return 
 												},
 												fail: function(res) {
-													return that.$api.msg( res.errMsg );
+													uni.showToast({
+														title: res.errMsg ,
+														icon:"none"
+													})
+													return
 												},
 												complete: function(res) {},
 											})
@@ -146,7 +154,11 @@ export default {
 															}
 														});
 													} else if (res.cancel) {
-														return that.$api.msg( '已取消!' );
+														uni.showToast({
+															title: '已取消!' ,
+															icon:"none"
+														})
+														return ;
 													}
 												}
 											})
@@ -156,10 +168,18 @@ export default {
 									uni.saveImageToPhotosAlbum({
 										filePath: resFile.tempFilePath,
 										success: function(res) {
-											return that.$api.msg( '保存成功' );
+											uni.showToast({
+												title: '保存成功' ,
+												icon:"success"
+											})
+											return;
 										},
 										fail: function(res) {
-											return that.$api.msg( res.errMsg );
+											uni.showToast({
+												title:  res.errMsg ,
+												icon:"none"
+											})
+											return ;
 										},
 										complete: function(res) {},
 									})
@@ -170,11 +190,19 @@ export default {
 							}
 						})
 					} else {
-						return that.$api.msg( resFile.errMsg );
+						uni.showToast({
+							title:  resFile.errMsg  ,
+							icon:"none"
+						})
+						return 
 					}
 				},
 				fail(res) {
-					return that.$api.msg( res.errMsg );
+					uni.showToast({
+						title:  res.errMsg  ,
+						icon:"none"
+					})
+					return 
 				}
 			})
 		},

+ 0 - 106
pages/user/user.vue

@@ -1,106 +0,0 @@
-<template>
-	<view class="content">
-		<user-page ref='userPage' v-show="isUserPage" @tab='changeTab'>
-		</user-page>
-		<shop-page ref='shopPage' v-show="!isUserPage" @tab='changeTab'>
-		</shop-page>
-	</view>
-</template>
-<script>
-	import userPage from "./userPage.vue"
-	import shopPage from "./shopPage.vue"
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import {
-		orderData,
-		getUserInfo
-	} from '@/api/user.js';
-	export default {
-		components: {
-			userPage,
-			shopPage
-		},
-		data() {
-			return {
-				isUserPage: true //默认用户页面
-			};
-		},
-		computed: {
-			...mapState('user', [ 'hasLogin']),
-		},
-		onShow() {
-			uni.setTabBarStyle({
-				backgroundColor: '#FFFFFF'
-			})
-			// 判断是否已经登录
-			this.loadBaseData();
-			// 判断是否用户页面
-			if (this.isUserPage&&this.hasLogin) {
-				this.$nextTick(() => {
-					this.$refs.userPage.getUser();
-				})
-			} else if(this.hasLogin){
-				this.$nextTick(() => {
-					this.$refs.shopPage.getInit();
-				})
-			}
-		},
-		methods: {
-			toJSON(){
-				return this;
-			},
-			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-			changeTab(bool) {
-				if (bool) {
-					this.$refs.shopPage.getInit();
-				}
-				if (!bool) {
-					this.$refs.userPage.getUser();
-				}
-				// 判断 是否切换为商家
-				this.isUserPage = !bool;
-			},
-			// 加载初始数据
-			loadBaseData() {
-				getUserInfo({})
-					.then(({
-						data
-					}) => {
-						this.setUserInfo(data);
-						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
-						orderData({})
-							.then(({
-								data
-							}) => {
-								this.setOrderInfo(data);
-							})
-							.catch(e => {
-								this.setOrderInfo({
-									complete_count: 0, //完成
-									received_count: 0, //待收货
-									unshipped_count: 0, //待发货
-									order_count: 0, //订单总数
-									unpaid_count: 0 //待付款
-								});
-							});
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			/**
-			 * 统一跳转接口,拦截未登录路由
-			 * navigator标签现在默认没有转场动画,所以用view
-			 */
-		}
-	};
-</script>
-<style lang="scss">
-	.content {
-		/* #ifdef H5 */
-		padding-bottom: 150rpx;
-		/* #endif */
-	}
-</style>

+ 15 - 0
uni_modules/ksp-cropper/changelog.md

@@ -1,3 +1,18 @@
+## 1.1.12(2023-06-27)
+修护vue3小程序下报错的bug
+## 1.1.11(2023-05-29)
+修护了在vue3下报错的bug
+## 1.1.10(2023-05-26)
+修改了已知bug
+暂时取消了vue3的支持
+## 1.1.9(2023-03-24)
+修护bug
+## 1.1.8(2023-03-24)
+修护bug
+## 1.1.7(2022-12-08)
+修护bug
+## 1.1.6(2022-11-18)
+修好app无法拖动问题
 ## 1.1.5(2022-06-14)
 填新版HBuilderX的坑,简单测试是没问题了。
 ## 1.1.4(2022-02-15)

+ 33 - 9
uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue

@@ -289,8 +289,8 @@ export default {
 			context.restore();
 			wx.canvasToTempFilePath({
 				canvas: canvas,
-				destWidth: mx.tw,
-				destHeight: mx.th,
+				// destWidth: mx.tw,
+				// destHeight: mx.th,
 				success: (rst) => {
 					var path = rst.tempFilePath;
 					this.$emit("ok", {
@@ -312,7 +312,9 @@ export default {
 				title: "处理中"
 			});
 			await new Promise((resolve) => {
-				setTimeout(resolve, 200);
+				setTimeout(() => {
+                    resolve();
+                }, 200);
 			});
 			var context = uni.createCanvasContext(this.canvasId, this);
 			context.save();
@@ -320,9 +322,11 @@ export default {
 			context.drawImage(this.url, mx.sx, mx.sy, mx.sw, mx.sh, mx.dx, mx.dy, mx.dw, mx.dh);
 			context.restore();
 			await new Promise((resolve) => {
-				context.draw(false, resolve);
+				context.draw(false, () => {
+                    resolve();
+                });
 			});
-			uni.canvasToTempFilePath({ 
+			uni.canvasToTempFilePath({
 				canvasId: this.canvasId,
 				destWidth: mx.tw,
 				destHeight: mx.th,
@@ -485,17 +489,29 @@ export default {
 		}
 	};
 	function changeMode(value) {
+        if (null == value) {
+            return;
+        }
 		mode = value;
 	}
 	function changeRotate(value, old, oi, instance) {
+        if (null == value) {
+            return;
+        }
 		rotate = value;
 		delayUpdateStyle(oi);
 	}
 	function changeImage(value, old, oi, instance) {
+        if (null == value) {
+            return;
+        }
 		image = value;
 		delayUpdateStyle(oi);
 	}
 	function changeFrame(value, old, oi, instance) {
+        if (null == value) {
+            return;
+        }
 		frame = value;
 		delayUpdateStyle(oi);
 	}
@@ -511,8 +527,12 @@ export default {
     }
 	function touchstart(event, oi) {
 		// #ifdef APP-PLUS || H5
-		event.preventDefault();
-		event.stopPropagation();
+        if (event.preventDefault) {
+            event.preventDefault();
+        }
+        if (event.stopPropagation) {
+            event.stopPropagation();
+        }
 		// #endif
 		touches = event.touches;
 		var instance = event.instance;
@@ -539,8 +559,12 @@ export default {
 	}
 	function touchmove(event, oi) {
 		// #ifdef APP-PLUS || H5
-		event.preventDefault();
-		event.stopPropagation();
+		if (event.preventDefault) {
+		    event.preventDefault();
+		}
+		if (event.stopPropagation) {
+		    event.stopPropagation();
+		}
 		// #endif
 		var instance = event.instance;
 		if (touches.length == 1) {

+ 4 - 7
uni_modules/ksp-cropper/package.json

@@ -1,7 +1,7 @@
 {
   "id": "ksp-cropper",
   "displayName": "ksp-cropper",
-  "version": "1.1.5",
+  "version": "1.1.12",
   "description": "高性能图片裁剪工具",
   "keywords": [
     "头像",
@@ -12,11 +12,7 @@
   "engines": {
     "HBuilderX": "^3.1.0"
   },
-  "dcloudext": {
-    "category": [
-        "前端组件",
-        "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -33,7 +29,8 @@
       "data": "插件不采集任何数据",
       "permissions": "无"
     },
-    "npmurl": ""
+    "npmurl": "",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": [],

+ 6 - 1
uni_modules/ksp-cropper/readme.md

@@ -70,4 +70,9 @@
 		}
 	}
 </script>
-```
+```
+
+### 注意
+1.微信小程序从基础库 2.21.0 开始, wx.chooseImage 停止维护,请使用 uni.chooseMedia 代替。<br/>
+2.微信小程序真机调试会报错,但正常运行是不会有问题的。<br/>
+3.uni-app版本不断更新,插件有时无法适应新版本,感谢大家及时提交bug,但希望大家手下留情,不要轻易给差评。

+ 10 - 0
utils/rocessor.js

@@ -188,3 +188,13 @@ export function getTime(time) {
 	const sec = date.getSeconds();
 	return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
 }
+// 获取前面一个页面
+export function prePage(){
+	// 获取当前页面
+	let pages = getCurrentPages();
+	let prePage = pages[pages.length - 2];
+	// #ifdef H5
+	return prePage;
+	// #endif
+	return prePage.$vm;
+}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini