Commit 8982de7c authored by zhengzy's avatar zhengzy
parents c75257bf 3f723232
...@@ -36,6 +36,28 @@ npm run build:mp-weixin // 运行生产环境 ...@@ -36,6 +36,28 @@ npm run build:mp-weixin // 运行生产环境
查看 [配置参考](https://cli.vuejs.org/config/) 查看 [配置参考](https://cli.vuejs.org/config/)
#### pages配置说明
##### 启动页配置,只作用于开发环境
current--当前启动页
list--可选启动页列表
name--启动页标题
path--启动页路径
query--启动页参数,页面onLoad中获取
```json
{
"condition": {
"current": 0,
"list": [
{
"name": "拍照小工具",
"path": "pages/photo/index",
"query": {}
}
]
}
}
```
### Easycom [组件模式](https://uniapp.dcloud.io/collocation/pages?id=easycom) ### Easycom [组件模式](https://uniapp.dcloud.io/collocation/pages?id=easycom)
...@@ -86,3 +108,4 @@ npm run build:mp-weixin // 运行生产环境 ...@@ -86,3 +108,4 @@ npm run build:mp-weixin // 运行生产环境
PS: 当前项目使用了:方式一,具体情况可以参考state目录下代码 PS: 当前项目使用了:方式一,具体情况可以参考state目录下代码
vm.vuex_token vm.vuex_token
...@@ -5,7 +5,6 @@ import util from "@/utils/util.js"; ...@@ -5,7 +5,6 @@ import util from "@/utils/util.js";
import login from "@/utils/login.js"; import login from "@/utils/login.js";
export default { export default {
globalData: { globalData: {
jumpLoginStatus: true,
// 开发环境 // 开发环境
uniEnv: process.uniEnv, uniEnv: process.uniEnv,
// 微信小程序平台编号,空--家维广场,1--自营平台 // 微信小程序平台编号,空--家维广场,1--自营平台
......
let commonApiFun = function(vm){ let commonApiFun = function(vm){
let loginWxByUser = async (params = {}) => await vm.$u.get('/wxh-support-rest/rest/ssoinfo/v3/getUsersByCode', params);
let loginWxByPhone = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/v3/findByMobile', params,{'content-type': 'application/x-www-form-urlencoded'});
let loginWechatAuth = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization', params, {'content-type': 'application/x-www-form-urlencoded'}); let loginWechatAuth = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization', params, {'content-type': 'application/x-www-form-urlencoded'});
// 水印-查询用户自定义设置 // 水印-查询用户自定义设置
let getUserWatermark = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark', params); let getUserWatermark = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark', params);
...@@ -10,8 +8,6 @@ let commonApiFun = function(vm){ ...@@ -10,8 +8,6 @@ let commonApiFun = function(vm){
let saveImage = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/saveImage', params); let saveImage = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/saveImage', params);
const commonApi = { const commonApi = {
loginWxByUser,
loginWxByPhone,
loginWechatAuth, loginWechatAuth,
getUserWatermark, getUserWatermark,
saveUserWatermark, saveUserWatermark,
......
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
const collegeApiUrl = globalUrl.ucenterUrl.xueUrl
const testApiUrl = globalUrl.systemUrl.apiUrl
let contractApiFun = function(vm){
//我的合同//
Mycontract = async (params)=>await vm.$u.get(ucenterApiUrl+'/v1/settled-contract/info'+'?Authorization='+ vm.vuex_token + params)
const contract = {
Mycontract
}
return contract
}
module.exports = {
contractApiFun
}
...@@ -11,7 +11,6 @@ import {learnApiFun} from "@/common/api/learn.js"; ...@@ -11,7 +11,6 @@ import {learnApiFun} from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js"; import { orderApiFun } from "@/common/api/order.js";
import {assessmentApiFun} from"@/common/api/assessment.js" import {assessmentApiFun} from"@/common/api/assessment.js"
import {certApiFun} from"@/common/api/cert.js" import {certApiFun} from"@/common/api/cert.js"
import {contractApiFun} from "@/common/api/contract.js"
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
...@@ -20,7 +19,6 @@ let apiFun = function(vm) { ...@@ -20,7 +19,6 @@ let apiFun = function(vm) {
let assessmentApi = assessmentApiFun(vm) let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm) let orderApi=orderApiFun(vm)
let certApi=certApiFun(vm) let certApi=certApiFun(vm)
let contractApi=contractApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...@@ -29,7 +27,6 @@ let apiFun = function(vm) { ...@@ -29,7 +27,6 @@ let apiFun = function(vm) {
...orderApi, ...orderApi,
...assessmentApi, ...assessmentApi,
...certApi, ...certApi,
...contractApi
} }
return apiUrl return apiUrl
} }
......
import util from '@/utils/util.js' import util from '@/utils/util.js'
// 接口公共前缀 const jsonType = {'content-type': 'application/json'}
const prefix = '/wxh-worker-rest/rest/' const formType = {'content-type': 'application/x-www-form-urlencoded'}
let orderApiFun = function(vm){ let orderApiFun = function(vm){
// 接口公共前缀
const prefix = '/wxh-worker-rest/rest/'
let prefix2 = '/wxh-worker-rest/rest/' + vm.vuex_token
let order = '/wxh-worker-rest/rest/order/'
let settle = '/wxh-worker-rest/rest/settle/' + vm.vuex_token
let token = vm.vuex_token
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params); let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
/** /**
* 工单数量查询接口 * 工单数量查询接口
*/ */
let listOrderCount = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/queryOrdersCount/V2', params); let listOrderCount = async (params = {}) => await vm.$u.get(prefix2 + '/wokerOrder/queryOrdersCount/V2', params);
/** /**
* 工单列表接口 * 工单列表接口
...@@ -17,7 +25,7 @@ let orderApiFun = function(vm){ ...@@ -17,7 +25,7 @@ let orderApiFun = function(vm){
/** /**
* 获取师傅的预约日历 * 获取师傅的预约日历
*/ */
let workerCalendar = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/calendar', params); let workerCalendar = async (params = {}) => await vm.$u.get(prefix2 + '/wokerOrder/appointment/calendar', params);
/** /**
* 师傅预约 * 师傅预约
...@@ -29,7 +37,7 @@ let orderApiFun = function(vm){ ...@@ -29,7 +37,7 @@ let orderApiFun = function(vm){
/** /**
* 师傅签到接口 * 师傅签到接口
*/ */
let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'}); let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix2 + '/order/'+orderId+'/maintainWorkerCheckin', params,formType);
/** /**
* 订单详情查询 * 订单详情查询
*/ */
...@@ -42,7 +50,7 @@ let orderApiFun = function(vm){ ...@@ -42,7 +50,7 @@ let orderApiFun = function(vm){
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + `/`+orderId, params) let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + `/`+orderId, params)
/* 师傅拒单 */ /* 师傅拒单 */
let rejectOrder = async (params = {}, orderId) => await vm.$u.get(prefix + vm.vuex_token + `/order/${orderId}/workerReject/V2`, params) let rejectOrder = async (params = {}, orderId) => await vm.$u.get(prefix2 + `/order/${orderId}/workerReject/V2`, params)
/** /**
...@@ -53,37 +61,41 @@ let orderApiFun = function(vm){ ...@@ -53,37 +61,41 @@ let orderApiFun = function(vm){
/** /**
* 接单 * 接单
*/ */
let orderAccept = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+orderId+'/accept', params, {'content-type': 'application/x-www-form-urlencoded'}); let orderAccept = async (params = {},orderId) => await vm.$u.post(prefix2+'/order/'+orderId+'/accept', params, formType);
/** /**
* 抢单 * 抢单
*/ */
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'}); let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,formType);
/** /**
* 获取拍照标准 * 获取拍照标准
*/ */
let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params); let orderStandard = async (params = {}) => await vm.$u.get(prefix2+'/photo/standard', params);
/**
* 获取拍照标准单独项目
*/
let orderStandardItem = async (params = {}) => await vm.$u.get(prefix2+'/photo/standard/only', params);
/** /**
* 保存图片信息 * 保存图片信息
*/ */
let saveImage = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintain/saveImage', params); let saveImage = async (params = {},orderId) => await vm.$u.post(prefix2 + '/order/'+orderId+'/maintain/saveImage', params);
/** /**
* 获取师傅水印 or 默认水印 * 获取师傅水印 or 默认水印
*/ */
let getWatermark = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/photo/watermark', params); let getWatermark = async (params = {}) => await vm.$u.get(prefix2 + '/photo/watermark', params);
/** /**
* 保存师傅水印 * 保存师傅水印
*/ */
let saveWatermark = async (params = {}) => await vm.$u.post(prefix + vm.vuex_token + '/photo/watermark', params); let saveWatermark = async (params = {}) => await vm.$u.post(prefix2 + '/photo/watermark', params);
/** /**
* 获取师傅开放可选时间段 * 获取师傅开放可选时间段
*/ */
let openTimerange = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/timerange', params); let openTimerange = async (params = {}) => await vm.$u.get(prefix2 + '/wokerOrder/appointment/timerange', params);
/** /**
* 联系时间接口 * 联系时间接口
...@@ -104,26 +116,31 @@ let orderApiFun = function(vm){ ...@@ -104,26 +116,31 @@ let orderApiFun = function(vm){
/** /**
* 获取订单的完工项目(配置+数据) * 获取订单的完工项目(配置+数据)
*/ */
let getCompleteConfigAndData= async (orderId) => await vm.$u.get(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/info'); let getCompleteConfigAndData= async (orderId) => await vm.$u.get(prefix2+'/order/'+ orderId +'/maintain/info');
/** /**
* 查询措施 * 查询措施
*/ */
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params); let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/**
* 查询工单材信息
*/
let getOrderMaterial= async (orderId) => await vm.$u.get('/wxh-cloud-rest/rest/thirdparty/shzhida/material/' + orderId);
/** /**
* 保存售后记录 * 保存售后记录
*/ */
let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params); let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix2+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
/** /**
* 保内工单完工 * 保内工单完工
*/ */
let inOrderFinish = async (orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/finishedAndConfirm',{}, {'content-type': 'application/x-www-form-urlencoded'}); let inOrderFinish = async (orderId) => await vm.$u.post(prefix2+'/order/'+ orderId +'/finishedAndConfirm',{}, formType);
/** /**
* 保外工单完工 * 保外工单完工
*/ */
let outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, {'content-type': 'application/x-www-form-urlencoded'}); let outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix2+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, formType);
/** /**
...@@ -131,6 +148,23 @@ let orderApiFun = function(vm){ ...@@ -131,6 +148,23 @@ let orderApiFun = function(vm){
*/ */
let addressToCoordinate= async (orderId) => await vm.$u.get(prefix+'order/specialfee/'+ vm.vuex_token +'/address/coordinate/'+orderId); let addressToCoordinate= async (orderId) => await vm.$u.get(prefix+'order/specialfee/'+ vm.vuex_token +'/address/coordinate/'+orderId);
/**
* 我的库存明细(物料)
*/
let listBystock= async () => await vm.$u.get(prefix2 +'/myinfo/stock', {}, jsonType);
/**
* 我的出入库流水
*/
let listAccessHistory= async (params = {}) => await vm.$u.get(prefix2 +'/myinfo/access/history', params, jsonType);
// 获取我的钱包-资产信息
let getAssets = async (params = {}) => await vm.$u.get(settle + '/v2/total', params);
// 获取我的钱包-结算明细
let listStatement = async (params = {}) => await vm.$u.get(settle + '/v2/statement', params);
// 获取我的钱包-支付单一览
let payableRecord = async (params = {}) => await vm.$u.get(settle + '/payable/v2/queryPayableRecord', params);
// 获取我的钱包-师傅提现
let workerApplyPay = async (params = {}, payableRecordId) => await vm.$u.post(`/wxh-worker-rest/rest/${token}/applypay/${payableRecordId}/workerApplyPay`, params);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
...@@ -147,6 +181,7 @@ let orderApiFun = function(vm){ ...@@ -147,6 +181,7 @@ let orderApiFun = function(vm){
traceAndAppointment, traceAndAppointment,
rejectOrder, rejectOrder,
orderStandard, orderStandard,
orderStandardItem,
saveImage, saveImage,
getWatermark, getWatermark,
saveWatermark, saveWatermark,
...@@ -156,10 +191,17 @@ let orderApiFun = function(vm){ ...@@ -156,10 +191,17 @@ let orderApiFun = function(vm){
getSignDistance, getSignDistance,
getCompleteConfigAndData, getCompleteConfigAndData,
getMeasure, getMeasure,
getOrderMaterial,
saveCompleteData, saveCompleteData,
inOrderFinish, inOrderFinish,
outOrderFinish, outOrderFinish,
addressToCoordinate addressToCoordinate,
listBystock,
listAccessHistory,
getAssets,
listStatement,
payableRecord,
workerApplyPay,
} }
return orderApi return orderApi
} }
......
...@@ -8,43 +8,33 @@ let settledApiFun = function(vm){ ...@@ -8,43 +8,33 @@ let settledApiFun = function(vm){
let getSettleArea = async (params = {}) => await vm.$u.get(ucenterApiUrl + '/v1/settled/area', params); let getSettleArea = async (params = {}) => await vm.$u.get(ucenterApiUrl + '/v1/settled/area', params);
/* 提交用户基本信息 */ /* 提交用户基本信息 */
let submitSettleBaseInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-info', params); let submitSettleBaseInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-info', params);
/* 校验身份证正面 */ /* 校验身份证正面 */
let checkSettleIDCardFront = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/card-front', params); let checkSettleIDCardFront = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/card-front', params);
/* 校验身份证反面 */ /* 校验身份证反面 */
let checkSettleIDCardBack = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/card-back', params); let checkSettleIDCardBack = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/card-back', params);
/* 提交用户资料 */ /* 提交用户资料 */
let submitSettleFileInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/submit-info', params); let submitSettleFileInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/submit-info', params);
/* 缴纳保证金 */ /* 缴纳保证金 */
let paySettleDeposit = async (params = {}) => await vm.$u.post(ucenterApiUrl + '/v2/settled/pay-deposit' , params,{'content-type': 'application/x-www-form-urlencoded'}); let paySettleDeposit = async (params = {}) => await vm.$u.post(ucenterApiUrl + '/v2/settled/pay-deposit' , params,{'content-type': 'application/x-www-form-urlencoded'});
let getSettleDepositResult = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/check-oid', params,{'content-type': 'application/x-www-form-urlencoded'}); let getSettleDepositResult = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/check-oid', params,{'content-type': 'application/x-www-form-urlencoded'});
/* 校验银行卡 */ /* 校验银行卡 */
// let checkSettleBank = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyBankCard', params); // let checkSettleBank = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyBankCard', params);
/* 校验支付宝 */ /* 校验支付宝 */
// let checkSettleAlipay = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyAlipayAccount', params); // let checkSettleAlipay = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyAlipayAccount', params);
/* 提交认证资料 */ /* 提交认证资料 */
let checkSettleSignInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/check-sign-info', params,{'content-type': 'application/x-www-form-urlencoded'}); let checkSettleSignInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/check-sign-info', params,{'content-type': 'application/x-www-form-urlencoded'});
/* 获取接单教程列表 */ /* 获取接单教程列表 */
let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params); let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params);
/* 更新接单教程状态 */ /* 更新接单教程状态 */
let saveCourseRate = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-course-rate', params); let saveCourseRate = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-course-rate', params);
/* 获取消息内容列表 */ /* 获取消息内容列表 */
let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/home-list', params); let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/home-list', params);
/** 我的-更新收货地址 */
/**
* 我的-更新收货地址
*/
let syncAddress = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/sync-address', params); let syncAddress = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/sync-address', params);
//我的合同//
let Mycontract = async (params)=>await vm.$u.get(ucenterApiUrl+'/v1/settled-contract/info'+'?Authorization='+ vm.vuex_token + params)
const settledApi = { const settledApi = {
getSettleBaseInfo, getSettleBaseInfo,
...@@ -62,6 +52,7 @@ let settledApiFun = function(vm){ ...@@ -62,6 +52,7 @@ let settledApiFun = function(vm){
saveCourseRate, saveCourseRate,
listByNotice, listByNotice,
syncAddress, syncAddress,
Mycontract,
} }
return settledApi return settledApi
} }
......
function strlen(value) { function strlen(value) {
//中文、中文标点、全角字符按1长度,英文、英文符号、数字按0.5长度计算 //中文、中文标点、全角字符按1长度,英文、英文符号、数字按0.5长度计算
let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/g; let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/g;
...@@ -184,5 +183,5 @@ export { ...@@ -184,5 +183,5 @@ export {
setDb, setDb,
getDb, getDb,
getDateTime, getDateTime,
randStr randStr,
} }
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
:class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList" :class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList"
:key="item.pkey"> :key="item.pkey">
<button class="time" :plain="true" <button class="time" :plain="true"
:disabled="item.disabled" :hair-line="false" :disabled="item.disabled || (currentDayIndex == 0 && item.pkey <= currentPkey)" :hair-line="false"
@click="timeChange(item,index,timeList)"> @click="timeChange(item,index,timeList)">
{{item.name}} {{item.name}}
</button> </button>
...@@ -101,7 +101,9 @@ ...@@ -101,7 +101,9 @@
appointRange: null, appointRange: null,
appointRangeText: '', appointRangeText: '',
num: 0, num: 0,
hasLast: false hasLast: false,
currentPkey: 'appointment_range_' + new Date().getHours(),
currentDayIndex: -1,
} }
}, },
watch: { watch: {
...@@ -125,6 +127,7 @@ ...@@ -125,6 +127,7 @@
this.appointTime = item.day this.appointTime = item.day
this.appointRange = null this.appointRange = null
this.appointRangeText = '' this.appointRangeText = ''
this.currentDayIndex = index
this.$emit('date-change', data) this.$emit('date-change', data)
}, },
timeChange(item, index, list) { timeChange(item, index, list) {
......
<!-- ******************* 文件上传 ******************* --> <!-- ******************* 文件上传 ******************* -->
<template> <template>
<view> <view>
<view class="file-box" v-if="!takeStatus"> <view class="file-box">
<!-- <view class="u-flex"> <!-- <view class="u-flex">
<view class="txt u-flex-1">{{item.fieldsTitle}}</view> <view class="txt u-flex-1">{{item.fieldsTitle}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon> <u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view> --> </view> -->
<view class="pics u-flex u-flex-wrap"> <view class="pics u-flex u-flex-wrap">
<view class="img-list" v-for="(item,index) in imgList" :key="index"> <view class="img-list" v-for="(item,index) in imgList" :key="index">
<u-image class="pic" width="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image> <u-image class="pic" width="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image>
<view class="icon-del-box" @click.stop="delFile(index)"> <view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view> <view class="icon-del"></view>
<view class="icon-del rotate"></view> <view class="icon-del rotate"></view>
</view> </view>
</view> </view>
<view class="img-list"> <view class="img-list">
<u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image> <u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image>
</view> </view>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> --> <!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
</view> </view>
<u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet> <u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet>
</view> </view>
<take-photo v-else @close="closeTake"></take-photo> <take-photo v-if="takeStatus" @close="closeTake" :currentItem="currentItemDate"></take-photo>
</view> </view>
</template> </template>
<script> <script>
import arrMixin from './arrMixin' import arrMixin from './arrMixin'
import baseFile from '@/components/upload/index'; import baseFile from '@/components/upload/index';
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
export default { export default {
name: 'XhFiles', name: 'XhFiles',
components: { components: {
'take-photo': takePhoto 'take-photo': takePhoto
}, },
mixins: [arrMixin,baseFile], mixins: [arrMixin,baseFile],
props: { props: {
files: { files: {
type: Array, type: Array,
} },
partnerCompanyId: {
type: String,
default: ''
},
categoryId: {
type: String,
default: ''
},
brandId: {
type: String,
default: ''
},
}, },
filters:{}, filters:{},
data() { data() {
return { return {
maskShow:false, maskShow:false,
list: [ list: [
{ {
...@@ -53,14 +65,15 @@ ...@@ -53,14 +65,15 @@
} }
], ],
takeStatus: false, takeStatus: false,
currentItemDate:{},
} }
}, },
computed: { computed: {
settings() { settings() {
return this.item.settings || [] return this.item.settings || []
}, },
uploadImage() { uploadImage() {
return process.uniEnv.qn_base_url + 'upload-file.png' return process.uniEnv.qn_base_url + 'upload-file.png'
}, },
}, },
mounted() { mounted() {
...@@ -72,12 +85,12 @@ ...@@ -72,12 +85,12 @@
} }
}, },
methods: { methods: {
selectUpload(){ selectUpload(){
if (this.imgList.length === 10) { if (this.imgList.length === 10) {
return this.$refs.uToast.show({ return this.$refs.uToast.show({
title: '图片已超出最大数量', title: '图片已超出最大数量',
type: 'error', type: 'error',
}) })
} }
// 弹窗展示 // 弹窗展示
this.maskShow = true this.maskShow = true
...@@ -106,23 +119,26 @@ ...@@ -106,23 +119,26 @@
} }
// 使用拍照工具拍摄 // 使用拍照工具拍摄
this.takeStatus = true this.takeStatus = true
this.getWatermark()
this.getPhotoStander()
}, },
setValue() { setValue() {
const dataValue = [] const dataValue = []
this.imgList.map(item=>{ this.imgList.map(item=>{
dataValue.push(item.path) dataValue.push(item.src)
}) })
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
closeTake(val) { closeTake(val) {
if(val && val.length > 0){ if(val && val.length > 0){
val.forEach((item,index,array)=>{ val.forEach((item,index,array)=>{
item.path = item.key item.path = item.key
this.imgList.push(item) item.src = item.key
}) this.imgList.push(item)
this.setValue() })
} this.setValue()
this.takeStatus = false }
this.takeStatus = false
}, },
prviewImage(url, index) { prviewImage(url, index) {
uni.previewImage({ uni.previewImage({
...@@ -133,27 +149,54 @@ ...@@ -133,27 +149,54 @@
delFile(index) { delFile(index) {
this.imgList.splice(index, 1) this.imgList.splice(index, 1)
this.setValue() this.setValue()
},
getPhotoStander(){// 获取拍照规范接口
let self = this
let param = {"partnerCompanyId":self.partnerCompanyId,
"categoryId":self.categoryId,
"brandId":self.brandId,
"fieldName":self.item.fieldsName}
this.$u.api.orderStandardItem(param).then((res)=>{
if (res.code == 200 && res.data.length>0) {
self.currentItemDate = res.data[0]
}else{
console.log("获取完工项的拍照标准异常",res.data.message)
}
})
},
getWatermark(){
if(getApp().globalData.photo.waterSetting){
return
}
var data={partnerCompanyId:this.partnerCompanyId}
this.$u.api.getWatermark(data).then((res) => {
if (res.code == 200) {
getApp().globalData.photo.waterSetting = res.data
} else {
console.log("获取水印备注异常",res.data.message)
}
});
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.img-list { .img-list {
position: relative; position: relative;
margin: 8rpx; margin: 8rpx;
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
.pic{ .pic{
// margin-right: 15rpx; // margin-right: 15rpx;
// margin-bottom: 15rpx; // margin-bottom: 15rpx;
&:nth-child(3n){ &:nth-child(3n){
margin-right: 0; margin-right: 0;
} }
} }
.icon-del-box { .icon-del-box {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
...@@ -170,14 +213,14 @@ ...@@ -170,14 +213,14 @@
z-index: 2; z-index: 2;
transform: rotate(-45deg); transform: rotate(-45deg);
} }
.icon-del { .icon-del {
width: 30rpx; width: 30rpx;
height: 4rpx; height: 4rpx;
background-color: #fff; background-color: #fff;
border-radius: 2px; border-radius: 2px;
} }
.rotate { .rotate {
position: absolute; position: absolute;
transform: rotate(90deg); transform: rotate(90deg);
......
...@@ -17,6 +17,16 @@ ...@@ -17,6 +17,16 @@
type: String, type: String,
default: '请输入' default: '请输入'
}, },
item: {
type: Object,
default() {
return {}
}
},
type: {
type: String,
default: 'text'
}
// width: { // 例如:454rpx // width: { // 例如:454rpx
// type: String, // type: String,
// default: '100%' // default: '100%'
...@@ -24,25 +34,36 @@ ...@@ -24,25 +34,36 @@
}, },
data() { data() {
return { return {
maxlength: 140, inputType: 'text',
// type: 'text'
} }
}, },
computed: { computed: {
type() { // type() {
let ty = this.item.fieldsType.toLocaleLowerCase() // if (this.item) {
if (this.item.fieldsId == 200) { // let ty = this.item.fieldsType.toLocaleLowerCase()
this.maxlength = 9 // switch (ty) {
return 'digit' // case 'text':
} else { // return 'textarea'
if (this.item && ty == 'password') { // case 'password':
return this.item.fieldsType // return this.item.fieldsType
}else if (this.item && ty == 'text') { // case 'decimal':
return 'textarea' // case 'number':
} else { // case 'double':
return 'text' // case 'integer':
} // this.maxlength = 9
} // return 'digit'
// case 'textarea':
// default:
// return 'text'
// }
// } else {
// return 'text'
// }
// },
maxlength() {
return this.type == 'digit' ? 9 : 140
}, },
fieldsWidth() { fieldsWidth() {
return this.item.fieldsWidth ? (this.item.fieldsWidth + 'rpx') : '100%' return this.item.fieldsWidth ? (this.item.fieldsWidth + 'rpx') : '100%'
...@@ -64,7 +85,7 @@ ...@@ -64,7 +85,7 @@
return this.textarea return this.textarea
}, },
textarea() { textarea() {
return this.type == 'textarea' return this.inputType == 'textarea'
}, },
backgroundColor() { backgroundColor() {
return this.textarea ? 'transparent' : '#F4F5F7' return this.textarea ? 'transparent' : '#F4F5F7'
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<view class="list u-flex u-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20 title-text">{{item.fieldsTitle}}</view>
<view class="u-flex-1 location-name" >{{valueTxt}}</view>
</view>
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [stringMixin],
props: {
placeholder: {
type: String,
default: '请输入'
},
},
data() {
return {
maxlength: 140,
}
},
computed: {
valueTxt() {
let str = '元'
const dataValue = this.dataValue
if(dataValue > 0){
str = dataValue + str
}
return str
},
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
}
},
watch: {},
mounted() {
},
methods: {
}
}
</script>
<style scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
.title-text {
font-size: 26rpx;
color: #333333;
}
.item-image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
.location-name {
color: #333333;
font-size: 26rpx;
text-align: right;
}
.location {
background: #F4F5F7;
padding: 10rpx 20rpx;
border-radius: 12rpx;
}
</style>
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<view class="list u-flex item-row-between">
<view class="item-title">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20">{{item.fieldsTitle}}</view>
</view>
<view class="location-name" @click="toMaterialPage">
<text class="arrow-text">{{arrowText}}</text>
<u-icon name="arrow-right" color="#2979ff" size="30"></u-icon>
</view>
</view>
<!-- <view class="u-flex-1 location">{{valueTxt || '正在获取中...'}}</view> -->
</view>
</template>
<script>
import arrMixin from './arrMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [arrMixin],
props: {
placeholder: {
type: String,
default: '请输入'
},
orderId: {
type: String,
default: '请输入'
},
},
data() {
return {
maxlength: 140,
}
},
computed: {
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
},
arrowText() {
return false ? '已选择' : '请选择'
}
},
watch: {},
mounted() {},
methods: {
toMaterialPage(){
let self = this
uni.navigateTo({
url: 'pages/order/material?orderId='+this.orderId + '&fieldName='+ this.item.fieldsName,
// 接口调用成功的回调函数,即跳转到B页面 test.vue 后的回调函数
success: function(res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('showMaterialData', self.dataValue);
}
})
},
}
}
</script>
<style lang="scss" scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
.item-image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
.item-row-between {
display: flex;
align-items: center;
justify-content: space-between;
.item-title {
display: flex;
font-size: 26rpx;
color: #333333;
align-items: center;
}
.location-name {
color: #2272FF;
text-align: right;
font-size: 26rpx;
display: flex;
align-items: center;
.arrow-text {
margin-right: 6rpx;
}
}
}
.location {
background: #F4F5F7;
padding: 10rpx 20rpx;
border-radius: 12rpx;
}
</style>
<template> <template>
<view class="settlement-view"> <view class="settlement-view">
<view class="settlement-com-view"> <view class="settlement-com-view" @click="$u.throttle(handleClick, 500)">
<view class="left-view"> <view class="left-view">
<view class="time-view">{{timeText}}</view> <view class="time-view">{{timeText}}</view>
<view class="order-view"> <view class="order-view">
...@@ -55,13 +55,19 @@ ...@@ -55,13 +55,19 @@
timeText() { timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd') return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
} }
},
methods: {
handleClick() {
this.$emit('click', this.data.orderId)
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.settlement-view { .settlement-view {
height: 212rpx; height: 212rpx;
.settlement-com-view { .settlement-com-view {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
<template> <template>
<view class="statement-view"> <view class="statement-view">
<view class="statement-com-view"> <view class="statement-com-view" @click="$u.throttle(handleClick, 500)">
<view class="left-view"> <view class="left-view">
<view class="time-view">{{timeText}}</view> <view class="time-view">{{timeText}}</view>
<view class="order-view"> <view class="order-view">
...@@ -58,6 +58,11 @@ ...@@ -58,6 +58,11 @@
timeText() { timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd') return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
} }
},
methods:{
handleClick() {
this.$emit('click', this.data.orderId)
}
} }
} }
</script> </script>
......
...@@ -19,15 +19,16 @@ ...@@ -19,15 +19,16 @@
<image class="address-image" :src="dizhiImage" mode="widthFix"></image> <image class="address-image" :src="dizhiImage" mode="widthFix"></image>
<text>{{ formatAddress(orderData) }}</text> <text>{{ formatAddress(orderData) }}</text>
</view> </view>
<view v-if="showDistance"> <view v-if="showDistance" class="address-right-view">
{{orderDistance}}km {{orderDistance}}km
</view> </view>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="reason-view" v-if="showReason"><text class="reason-text">未通过原因:</text> <view class="reason-view" v-if="showReason">
<text v-for="(item, index) in orderData.auditResults" :key="index">{{item}}</text> <view><text class="reason-title">未通过原因:</text></view>
<view class="reason-text"><text v-for="(item, index) in orderData.auditResults" :key="index">{{item}}</text></view>
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<view> <view>
...@@ -187,8 +188,8 @@ ...@@ -187,8 +188,8 @@
return this.timeout ? '超' : '剩' return this.timeout ? '超' : '剩'
}, },
timeText() { timeText() {
let time = this.orderType == 4 ? this.orderData.orderFinishDatetime : this.orderData.auditDatetime let time = this.orderType == 4 ? this.orderData.orderFinishDatetime : this.orderData.auditDatetime
return this.$u.timeFormat(time, 'yyyy.mm.dd hh:MM:ss') return time ? this.$u.timeFormat(time, 'yyyy.mm.dd hh:MM:ss') : ''
}, },
timeTitle() { timeTitle() {
return this.orderType == 4 ? '提交时间:' : '审核时间:' return this.orderType == 4 ? '提交时间:' : '审核时间:'
...@@ -215,6 +216,7 @@ ...@@ -215,6 +216,7 @@
} }
}, },
created() { created() {
console.log('+++++++++++')
/* /*
orderStatus: orderStatus:
待接单 orderStatus<31 工单状态小于31 待接单 orderStatus<31 工单状态小于31
...@@ -230,11 +232,11 @@ ...@@ -230,11 +232,11 @@
this.orderType = 0 this.orderType = 0
} else if (this.orderData.orderStatus == 31) { } else if (this.orderData.orderStatus == 31) {
if (this.orderData.appointmentDatetime) { if (this.orderData.appointmentDatetime) {
return this.orderType = 2 this.orderType = 2
} else { } else {
this.orderType = 1 this.orderType = 1
} }
} else if (this.orderData.orderStatus > 31 || this.orderData.orderStatus < 80) { } else if (this.orderData.orderStatus > 31 && this.orderData.orderStatus < 80) {
this.orderType = 3 this.orderType = 3
} else if (this.orderData.orderStatus == 85 || this.orderData.orderStatus == 87) { } else if (this.orderData.orderStatus == 85 || this.orderData.orderStatus == 87) {
this.orderType = 4 this.orderType = 4
...@@ -248,9 +250,9 @@ ...@@ -248,9 +250,9 @@
} else { } else {
this.orderType = this.types[this.type] this.orderType = this.types[this.type]
} }
this.timeout = this.orderData.currentOverTime < new Date().getTime() this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000) this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
console.log('++++++', this.timestamp)
}, },
methods: { methods: {
handleClick() { handleClick() {
...@@ -380,17 +382,20 @@ ...@@ -380,17 +382,20 @@
display: flex; display: flex;
align-items: center; align-items: center;
align-items: flex-start; align-items: flex-start;
text-align: left; text-align: left;
.address-image { .address-image {
width: 26rpx; width: 26rpx;
height: 28rpx; height: 28rpx;
margin-right: 8rpx; margin-right: 8rpx;
flex-shrink: 0; flex-shrink: 0;
margin-top: 4rpx; margin-top: 4rpx;
} }
} }
.address-right-view {} .address-right-view {
margin-left: 30rpx;
}
} }
} }
...@@ -407,10 +412,15 @@ ...@@ -407,10 +412,15 @@
font-size: 26rpx; font-size: 26rpx;
color: #FA5A49; color: #FA5A49;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
.reason-text { display: flex;
.reason-title {
flex-shrink: 0; flex-shrink: 0;
color: #666666; color: #666666;
}
.reason-text {
display: flex;
flex-direction: column;
} }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
"navigationBarTitleText": "授权登录" "navigationBarTitleText": "授权登录",
"navigationStyle": "custom" ,
"disableScroll": true
} }
} }
], ],
...@@ -240,6 +242,14 @@ ...@@ -240,6 +242,14 @@
"navigationBarTitleText": "配件押金", "navigationBarTitleText": "配件押金",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "warehouse/index",
"style": {
"navigationStyle":"custom",
"navigationBarTitleText": "我的仓库",
"enablePullDownRefresh": false
}
} }
...@@ -252,7 +262,7 @@ ...@@ -252,7 +262,7 @@
{ {
"path": "complete", "path": "complete",
"style": { "style": {
"navigationBarTitleText": "订单-完工配置", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
...@@ -260,7 +270,7 @@ ...@@ -260,7 +270,7 @@
{ {
"path": "feedback", "path": "feedback",
"style": { "style": {
"navigationBarTitleText": "订单-过程反馈", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true "disableScroll": true
...@@ -269,27 +279,26 @@ ...@@ -269,27 +279,26 @@
{ {
"path": "refuse", "path": "refuse",
"style": { "style": {
"navigationBarTitleText": "订单-拒单", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true "disableScroll": true
} }
}, },
{ {
// 订单详情页
"path" : "detail", "path" : "detail",
"style" : "style" :
{ {
"navigationStyle": "custom"// 隐藏系统导航栏 "navigationBarTitleText": "订单详情",
"navigationStyle": "custom"
} }
}, },
{ {
// 订单搜索页
"path" : "search", "path" : "search",
"style" : "style" :
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "订单搜索",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor":"#F4F5F7" "navigationBarBackgroundColor":"#F4F5F7"
} }
...@@ -323,9 +332,6 @@ ...@@ -323,9 +332,6 @@
"navigationBarTitleText": "水印设置", "navigationBarTitleText": "水印设置",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor":"#FFFFFF",
"backgroundColor":"#F4F5F7" "backgroundColor":"#F4F5F7"
// "navigationBarBackgroundColor": "#333333",
// "navigationBarTextStyle": "#FFFFFF",
// "disableScroll": true
} }
}, },
{ {
...@@ -435,7 +441,7 @@ ...@@ -435,7 +441,7 @@
}, },
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F4F5F7" "backgroundColor": "#F4F5F7"
}, },
...@@ -471,47 +477,19 @@ ...@@ -471,47 +477,19 @@
} }
] ]
}, },
"condition": { //模式配置,仅开发期间生效 "condition": {
"current": 0, //当前激活的模式(list 的索引项) "current": 0,
"list": [ "list": [
{ {
"name": "拍照小工具", //模式名称 "name": "拍照小工具",
"path": "pages/photo/index", //启动页面,必选 "path": "pages/photo/index",
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": {}
}, },
{ {
// gaomingbo
"name": "工单-过程反馈", "name": "工单-过程反馈",
"path": "pages/order/feedback", "path": "pages/order/feedback",
"query": "" "query": ""
}, }
{
"name": "在线考试", //模式名称
"path": "pages/learn/exam", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "入驻考试", //模式名称
"path": "pages/exam/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
"query": {
"id":11880091
} //启动参数,在页面的onLoad函数里面得到
},
{
"name": "学习 - 首页", //模式名称
"path": "pages/index/learn", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "我的 - 我的证件 - 列表", //模式名称
"path": "pages/mine/cert/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
] ]
} }
} }
\ No newline at end of file
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<!-- 入驻前--> <!-- 入驻前-->
<view v-if="needSettled" class="tip-view"> <view v-if="needSettled" class="tip-view">
<image :src="weiruzhuImage" class="tip-view-image"></image> <image :src="weiruzhuImage" class="tip-view-image"></image>
<view class="tip-other">入驻通过后平台将向您推荐订单</view> <view class="tip-other">入驻后平台将向您分配或推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle"> :custom-style="buttonStyle">
立即入驻 立即入驻
...@@ -100,16 +100,17 @@ ...@@ -100,16 +100,17 @@
token: "", token: "",
pageNumber: 0, pageNumber: 0,
pageSize: 100, pageSize: 100,
}, },
waitInit: false, // 当token为空时,等待自动登录结束
triggered: false, triggered: false,
_freshing: false, _freshing: false,
}; };
}, },
watch: { watch: {
// vuex_token(val, oldVal) { vuex_token(val, oldVal) {
// // 监听token变化,如果更新则重新加载页面数据 // 监听token变化,如果更新则重新加载页面数据
// val && this.initSettleInfo() val && this.waitInit && this.getData()
// } }
}, },
computed: { computed: {
buttonStyle() { buttonStyle() {
...@@ -139,7 +140,11 @@ ...@@ -139,7 +140,11 @@
}, },
onLoad() { onLoad() {
this._freshing = false; this._freshing = false;
this.getOrderCount() if(this.vuex_token) {
this.getOrderCount()
} else {
this.waitInit = true
}
}, },
onShow() { onShow() {
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
...@@ -164,6 +169,10 @@ ...@@ -164,6 +169,10 @@
// console.log('---------scroll---------', obj) // console.log('---------scroll---------', obj)
// }, // },
methods: { methods: {
getData() {
this.getOrderCount()
this.initSettleInfo();
},
handleClick(orderId) { // 点击了cell handleClick(orderId) { // 点击了cell
console.log('点击了cell') console.log('点击了cell')
this.viewOderItem(orderId) this.viewOderItem(orderId)
...@@ -221,49 +230,17 @@ ...@@ -221,49 +230,17 @@
uni.stopPullDownRefresh() // 结束下拉刷新 uni.stopPullDownRefresh() // 结束下拉刷新
self.loadedOrder = true self.loadedOrder = true
self.triggered = false; self.triggered = false;
self._freshing = false; self._freshing = false;
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/ if (res.code == 200 && res.data) {
// if (res.data.list) { if (self.search.pageNumber == 1) {
// if (res.data.list.length == 0 && res.data.total > 0) { self.orderList = []
// res.data.total = 15 }
// res.data.list = [{ if (res.data.list) {
// orderServiceType: '安装', // 服务类型:安装、维修 self.orderList.push(...res.data.list);
// categoryName: '充电桩', // 品类:充电桩 }
// orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池 console.log('this.orderlist;', this.orderList)
// orderNumber: 'OR2021041809827', // 工单编号 self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list || []).length == self.search.pageSize ? 'loadmore' : 'nomore'
// contactName: '郭小清', // 客户信息
// contactPhone: '13631612077', // 联系方式
// contactAddress: '湾街道荔枝花园D座125号', // 详细地址
// contactAddressLatitud: '116.3896', // 联系人地址经度
// contactAddressLongitud: '39.91917', // 联系人地址纬度
// orderStatus: 0, // 工单状态
// appointmentDatetime: '', // 预约时间
// currentWillOverTime: 10000, // 剩余时间
// currentOverTime: new Date().getTime() + 10000, // 超过时间点
// auditDatetime: '2021.04.19 12:45:09', // 审核时间
// submissionTime: '2021.04.19 16:24:48', // 提交时间
// auditResults: {}, // 审核结果
// orderBusinessType: 'R', // 业务类型 R 为抢单
// orderId: '1100000216'
// }]
// res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
// .list,
// ...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...
// res
// .data.list, ...res.data.list
// ]
// }
// }
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
if (res.code == 200) {
if (res.data && res.data.list && res.data.list.length > 0) {
if (self.search.pageNumber == 1) {
self.orderList = []
}
self.orderList.push(...res.data.list);
self.currentLoadStatus = res.data.total > self.orderList.length && res.data.list.length == self.search.pageSize ? 'loadmore' : 'nomore'
}
} else { } else {
console.log(res.message, "初始化订单列表异常"); console.log(res.message, "初始化订单列表异常");
} }
......
...@@ -667,7 +667,6 @@ ...@@ -667,7 +667,6 @@
url: "/pages/learn/answer?examId=" + examInfo.id, url: "/pages/learn/answer?examId=" + examInfo.id,
}); });
} else if (examInfo.examStatus == 1) { } else if (examInfo.examStatus == 1) {
// debugger;return;
// examInfo.status = '通过'; // examInfo.status = '通过';
if (examInfo.status == '通过') { if (examInfo.status == '通过') {
wx.navigateTo({ wx.navigateTo({
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
</u-navbar> </u-navbar>
<view class="mine-content"> <view class="mine-content">
<view class="header-view"> <view class="header-view">
<view :class="['head-image', {'has-image': info.headImage}]"> <view :class="['head-image', {'has-image': avatar}]">
<u-avatar :src="headImageUrl" :size="headSize" mode="circle"></u-avatar> <u-avatar :src="headImageUrl" :size="headSize" mode="circle"></u-avatar>
</view> </view>
<view class="header-content"> <view class="header-content">
<view class="name-view" @click="handleClickName">{{name}}</view> <view class="name-view" @click="handleClickName">{{name || "点击登录"}}</view>
<view :class="['tel-view', {'active': info.tel}]" @click="handleClickTel"> <view :class="['tel-view', {'active': mobile}]" @click="handleClickTel">
<text>{{telTip}}</text> <text>{{telTip}}</text>
<u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon> <u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon>
</view> </view>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<u-cell-group :border="false"> <u-cell-group :border="false">
<view v-for="(item, index) in items" :key="index"> <view v-for="(item, index) in items" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(index)"> <u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(index)">
<image slot="icon" :src="imageUrl + item.icon" :style="item.imageStyle"></image> <image slot="icon" :src="qnPath + item.icon" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view> <view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view> <view slot="value" class="item-value">{{value}}</view>
</u-cell-item> </u-cell-item>
...@@ -30,13 +30,7 @@ ...@@ -30,13 +30,7 @@
</view> </view>
</u-cell-group> </u-cell-group>
</view> </view>
<!-- <view class="u-m-t-20" @click="take">
<u-cell-group>
<u-cell-item icon="setting" title="相机组件测试"></u-cell-item>
</u-cell-group>
</view> -->
</view> </view>
<!-- <take-photo v-if="takeStatus" :currentItem="testData" @close="closeTake"></take-photo> -->
</view> </view>
</template> </template>
...@@ -48,26 +42,21 @@ ...@@ -48,26 +42,21 @@
}, },
data() { data() {
return { return {
qnPath: process.uniEnv.qn_base_url,
serviceTel: '0755-81773817', serviceTel: '0755-81773817',
info: {},
// pic: 'https://uviewui.com/common/logo.png',
// show: true,
// takeStatus: false,
// testData: {
// _id: '1', // 规格ID
// system_id: '2', // 系统ID
// brand_id: '3', // 品牌ID
// classify_id: '4', // 分类ID
// images: [ // 拍照要求示意图
// 'https://qn-static.banshouhui.com/live_mark.png',
// 'https://qn-static.banshouhui.com/live_mark.png',
// 'https://qn-static.banshouhui.com/live_mark.png'
// ],
// main_point: [] // 要点
// }
} }
}, },
computed: { computed: {
avatar() {
return this.vuex_settled && this.vuex_settled.avatar || ''
},
name() {
return this.vuex_settled && this.vuex_settled.id_card_name
|| this.vuex_settled.nickname || this.vuex_settled.name || ''
},
mobile() {
return this.vuex_settled && this.vuex_settled.mobile || ''
},
items() { items() {
return [{ return [{
title: '我的钱包', title: '我的钱包',
...@@ -113,29 +102,23 @@ ...@@ -113,29 +102,23 @@
} }
] ]
}, },
name() {
return this.info.name || '点击登录'
},
telTip() { telTip() {
return this.info.tel ? '已绑定手机号' : '绑定手机号' return this.mobile && '已绑定手机'|| '绑定手机号'
},
imageUrl() {
return process.uniEnv.qn_base_url
}, },
pages() { pages() {
return ['wallet', 'deposit', 'contract', 'cert', 'address', '', 'customer'] return ['wallet', 'deposit', 'contract', 'cert', 'address', 'warehouse', 'customer']
}, },
headImageUrl() { headImageUrl() {
return this.info.headImage || this.placeholderImage return this.avatar || this.placeholderImage
}, },
wodebeijingImage() { wodebeijingImage() {
return this.imageUrl + 'wodebeijing.png' return this.qnPath + 'wodebeijing.png'
}, },
placeholderImage() { placeholderImage() {
return this.imageUrl + 'touxiang.png' return this.qnPath + 'touxiang.png'
}, },
headSize() { headSize() {
return this.info.headImage ? 136 : 144 return this.avatar ? 136 : 144
} }
}, },
onLoad() { onLoad() {
...@@ -143,25 +126,22 @@ ...@@ -143,25 +126,22 @@
}, },
methods: { methods: {
handleClick(index) { handleClick(index) {
console.log('clicked:', index)
uni.navigateTo({ uni.navigateTo({
url: 'pages/mine/' + this.pages[index] + '/index' url: 'pages/mine/' + this.pages[index] + '/index'
}) })
}, },
handleClickName() { handleClickName() {
console.log('click name') if(this.vuex_token && this.vuex_settled) {
return false
}
this.$u.route({url: "pages/login/index"})
}, },
handleClickTel() { handleClickTel() {
console.log('click tel') if(this.vuex_token && this.vuex_settled && this.mobile) {
return false
}
this.$u.route({url: "pages/login/index"})
}, },
// take() {
// uni.hideTabBar()
// this.takeStatus = true
// },
// closeTake(img) {
// console.log(img)
// this.takeStatus = false
// }
} }
} }
</script> </script>
......
...@@ -328,14 +328,14 @@ ...@@ -328,14 +328,14 @@
console.log('click cell') console.log('click cell')
this.viewOderItem(item.orderId) this.viewOderItem(item.orderId)
}, },
filish(item){ filish(item){
// 去完工 // 去完工
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/complete?orderId='+item.orderId url: 'pages/order/complete?orderId='+item.orderId
+ "&categoryId=" + item.categoryId + "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType + "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod + "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&auditResultsId=" + Object.keys(item.auditResults)[0] + "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'')
}) })
}, },
handleAction(item) { handleAction(item) {
......
<template> <template>
<view class=""> <view class="">
<view class="backView"> <view class="backView">
<view class="noticeView"> <view class="login-block" v-if="needAuth">
<image class="noticeImage" :src="icon_auth_notice_new" mode=""></image> <u-image class="u-flex u-row-center logo" :src="logo" width="200" height="200">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<u-image class="u-flex u-row-center logo2" :src="logo2" width="214" height="60">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
</view> </view>
<view class="noticeTitleView"> <view class="bind-block" v-else>
<text class="noticeTitle" v-if="needAuth">{{ authNoticeTitle }}</text> <u-image class="u-flex u-row-between logo" :src="logo" width="148" height="148">
<text class="noticeTitle" v-else>{{ suginNoticeTitle }}</text> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<view class="bind-phone">{{ bindPhone }}</view>
<view class="bind-tips">{{ bindTips }}</view>
</view> </view>
<u-gap height="570"></u-gap>
<button class="loginBtn" v-if="needAuth" lang="zh_CN" @tap="getUserProfile"> <button class="loginBtn" v-if="needAuth" lang="zh_CN" @tap="getUserProfile">
<text class="u-font-32 white">立即登录</text> <text class="u-font-32 white">{{ loginTitle }}</text>
</button> </button>
<button class="loginBtn" v-else open-type="getPhoneNumber" throttle-time="1000" <button class="loginBtn" v-else open-type="getPhoneNumber" throttle-time="1000"
@getphonenumber="signupLogin"> @getphonenumber="signupLogin">
<text class="u-font-32 white">授权登录</text> <text class="u-font-32 white">{{ bindTitle }}</text>
</button> </button>
<view class="cancelView">
<text class="cancelText" @click="cancelClick()">取消</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -29,24 +38,27 @@ const app = getApp() ...@@ -29,24 +38,27 @@ const app = getApp()
export default { export default {
data() { data() {
return { return {
isNewUser: false, qnPath: process.uniEnv.qn_base_url,
needAuth: true, needAuth: true,
unionID: '',
openID: '',
icon_notice: '',
TimeID: -1, TimeID: -1,
icon_auth_notice_new: '', loginTitle: '用户登录',
authNoticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务', bindTitle: '立即绑定',
suginNoticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务', bindPhone: '绑定手机',
bindTips: '首次登录的用户需绑定手机才可接单',
} }
}, },
onLoad() { computed: {
logo() {
return this.qnPath + 'logo.png'
},
logo2() {
return this.qnPath + 'logo-2.png'
},
},
onLoad(e) {
app.trackPage('授权登录页') app.trackPage('授权登录页')
this.icon_notice = app.globalData.icon_auth_notice
this.icon_auth_notice_new = app.globalData.icon_auth_notice_new
}, },
onShow() { onShow() {
app.globalData.jumpLoginStatus = true
// 微信授权过用户信息,则无需重复授权 // 微信授权过用户信息,则无需重复授权
if (app.globalData.authUserInfo) { if (app.globalData.authUserInfo) {
this.needAuth = false this.needAuth = false
...@@ -154,7 +166,6 @@ export default { ...@@ -154,7 +166,6 @@ export default {
goBackPage() { goBackPage() {
let pages = getCurrentPages(); let pages = getCurrentPages();
debugger
if(pages.length) { if(pages.length) {
let index = pages.length - 1; let index = pages.length - 1;
if(index) { if(index) {
...@@ -212,7 +223,7 @@ export default { ...@@ -212,7 +223,7 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scoped>
.backView { .backView {
background-color: #FFFFFF; background-color: #FFFFFF;
position: absolute; position: absolute;
...@@ -220,8 +231,32 @@ export default { ...@@ -220,8 +231,32 @@ export default {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex;
flex-direction: column; .login-block {
margin-top: 240rpx;
}
.bind-block {
margin-top: 202rpx;
margin-left: 50rpx;
.bind-phone {
font-size: 52rpx;
margin-top: 48rpx;
font-weight: bold;
color: #333333;
line-height: 52rpx;
margin-left: 10rpx;
}
.bind-tips {
margin: 24rpx 60rpx 14rpx 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 40rpx;
}
}
}
.logo2 {
margin-top: 28rpx;
} }
.noticeView { .noticeView {
...@@ -258,10 +293,13 @@ export default { ...@@ -258,10 +293,13 @@ export default {
.loginBtn { .loginBtn {
background-color: #2272FF; background-color: #2272FF;
width: 390rpx; font-size: 32rpx;
height: 80rpx; font-weight: 600;
border-radius: 40rpx; color: #FFFFFF;
margin-top: 334rpx; line-height: 104px;
width: 600rpx;
height: 104rpx;
border-radius: 52rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -283,4 +321,5 @@ export default { ...@@ -283,4 +321,5 @@ export default {
.white { .white {
color: #FFFFFF; color: #FFFFFF;
} }
</style> </style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
></u-navbar> ></u-navbar>
<view class="content-cody"> <view class="content-cody">
<u-cell-group :border="false"> <u-cell-group :border="false">
<u-cell-item v-for="item in list" :title="item.name" :value="item.isUploadName" :arrow="true" <u-cell-item v-for="(item, index) in list" :title="item.name" :value="item.isUploadName" :arrow="true" :key="index"
:value-style="{'color': item.color}" @click="toDetail(item.keyName)" :title-style="{'padding-left':'20rpx'}"> :value-style="{'color': item.color}" @click="toDetail(item.keyName)" :title-style="{'padding-left':'20rpx'}">
<u-icon slot="icon" size="32" name="checkmark-circle" :color="item.iconColor"></u-icon> <u-icon slot="icon" size="32" name="checkmark-circle" :color="item.iconColor"></u-icon>
</u-cell-item> </u-cell-item>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
}, },
toDetail(key) { toDetail(key) {
let data = this.list[key].data; let data = this.list[key].data;
if(data.status != 1){ if(!data.isUpload){
return; return;
} }
wx.navigateTo({ wx.navigateTo({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="cus-wrap"> <view class="cus-wrap">
<w-navbar title="联系客服"></w-navbar> <w-navbar title="联系客服"></w-navbar>
<view class="content"> <view class="content">
<u-image class="qrcode" :src="cusQrcode" width="400" mode="widthFix" @longtap="download"> <u-image class="qrcode" :src="cusQrcode" width="400" height="400" mode="widthFix" @longtap="download" :fade="true" duration="450">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image> <image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image>
<view class="list-view"> <view class="list-view">
<view v-for="(item, index) in info.payableRecordExtendDtos" :key="index"> <view v-for="(item, index) in info.payableRecordExtendDtos" :key="index">
<Settlement :data="item"></Settlement> <Settlement :data="item" @click="handleClickCell"></Settlement>
</view> </view>
</view> </view>
</view> </view>
...@@ -66,8 +66,13 @@ ...@@ -66,8 +66,13 @@
}, },
methods: { methods: {
bindDateChange: function(e) { bindDateChange: function(e) {
this.date = e.target.value this.date = e.target.value
}, },
handleClickCell(orderId) {
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
})
}
} }
} }
</script> </script>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image> <image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image>
<view class="list-view"> <view class="list-view">
<view v-for="(item, index) in data.statementList" :key="index"> <view v-for="(item, index) in data.statementList" :key="index">
<Statement :data="item"></Statement> <Statement :data="item" @click="handleClickCell"></Statement>
</view> </view>
</view> </view>
</view> </view>
...@@ -82,8 +82,13 @@ ...@@ -82,8 +82,13 @@
}, },
methods: { methods: {
bindDateChange: function(e) { bindDateChange: function(e) {
this.date = e.target.value this.date = e.target.value
}, },
handleClickCell(orderId) {
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
})
}
} }
} }
</script> </script>
......
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
}, },
methods: { methods: {
handleClick() { handleClick() {
let self = this
self.$u.api.workerApplyPay()
} }
} }
} }
......
<template>
<view class="ware-wrap">
<w-navbar title="我的仓库" :background="{backgroundColor: '#F4F5F7'}"></w-navbar>
<view class="content">
<view class="panel">
<view class="title">物料明细</view>
<view class="item-table">
<view class="item-header">
<view>物料名称</view>
<view>库存数量</view>
</view>
<u-divider half-width="315" border-color="#F4F5F7" height="2"></u-divider>
<view class="item-row" v-for="(item, index) in details" :key="index">
<view class="width-504 break">{{ item.skuName }}</view>
<view class="width-106 center">{{ item.systemStock }}</view>
</view>
</view>
</view>
<view class="panel">
<view class="title">操作记录</view>
<view class="item-table">
<view class="item-header">
<view class="width-132">订单编号</view>
<view class="width-210">物料名称</view>
<view class="width-80">出库量</view>
<view class="width-140 right">操作时间</view>
</view>
<u-divider half-width="315" border-color="#F4F5F7" height="2"></u-divider>
<view class="item-row" v-for="(item, index) in record" :key="index">
<view class="width-132 break">{{ item.businessNumber }}</view>
<view class="width-210 break">{{ item.skuName }}</view>
<view class="width-80 center">{{ item.outAmount }}</view>
<view class="width-140 break">{{ item.createTime | datefmt('YYYY.MM.DD HH:mm:ss')}}</view>
</view>
<u-loadmore :status="status" @loadmore="loadRecord" />
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
status: 'loadmore',
details: [],
record: [],
total: 100,
search: {
pageNumber: 0,
pageSize: 20,
},
};
},
onReachBottom() {
if(this.status == 'nomore') return ;
this.status = 'loading';
this.search.pageNumber = ++ this.search.pageNumber;
this.loadAccess()
},
computed: {},
onLoad() {
this.getData();
},
methods: {
getData() {
let self = this
self.initDetails()
self.search.pageNumber = ++ self.search.pageNumber;
self.loadAccess()
},
async initDetails() {
let self = this
let res = await self.$u.api.listBystock()
if(res && res.code == 200) {
self.details = res.data.list
}
// 测试数据
self.details = [
{skuName: '广汽新能源立柱-特来电', systemStock: 1},
{skuName: '广汽新能源-星星', systemStock: 14}
]
},
loadRecord() {
if(this.status == 'nomore') return ;
this.status = 'loading';
this.search.pageNumber = ++ this.search.pageNumber;
this.loadAccess()
},
async loadAccess() {
let self = this
/*
/wxh-worker-rest/rest/{token}/myinfo/access/history
路径参数:
token=xxxx
Headers:
Content-Type: application/json
Query:
pageNumber=0
pageSize=10
*/
let res = await self.$u.api.listAccessHistory(self.search)
if(res && res.code == 200) {
self.total = res.data && res.data.total || self.total
let list = res.data && res.data.list && self.$u.deepClone(res.data.list) || [];
// 测试数据
list = [
{businessNumber: 'OR20210507332669', skuName: '广汽新能源立柱红红火火恍恍惚惚', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332775', skuName: '广汽新能源星星点灯', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332020', skuName: '广汽新能源星星点灯', outAmount: 6, createTime: Date.now()},
{businessNumber: 'OR20210507332333', skuName: '广汽新能源立柱啦啦啦啦啦啦啦', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507334689', skuName: '广汽新能源立柱', outAmount: 12, createTime: Date.now()},
{businessNumber: 'OR20210507339991', skuName: '广汽新能源立柱啦啦啦啦啦啦啦', outAmount: 12, createTime: Date.now()},
{businessNumber: 'OR20210507332660', skuName: '广汽新能源立柱', outAmount: 12, createTime: Date.now()},
{businessNumber: 'OR20210507332669', skuName: '广汽新能源立柱红红火火恍恍惚惚', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332775', skuName: '广汽新能源星星点灯', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332333', skuName: '广汽新能源立柱啦啦啦啦啦啦啦', outAmount: 1, createTime: Date.now()},
]
if(list && list.length) {
self.record.push(...list)
if(self.total > self.record.length) {
self.status = "loadmore"
} else {
self.status = "nomore"
}
} else {
self.status = "nomore"
}
} else {
}
},
}
}
</script>
<style lang="scss" scoped>
.ware-wrap {
background-color: #F4F5F7;
.content {
padding: 34rpx 30rpx;
display: flex;
flex-direction: column;
align-items: center;
.panel {
.title {
margin-bottom: 30rpx;
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 44rpx;
}
.item-table {
margin-bottom: 46rpx;
padding: 34rpx 30rpx;
width: 690rpx;
background: #FFFFFF;
border-radius: 12rpx;
.item-header {
margin-bottom: 24rpx;
font-size: 26rpx;
font-weight: bold;
color: #333333;
line-height: 38rpx;
display: flex;
justify-content: space-between;
}
.item-row {
margin: 24rpx 0;
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 38rpx;
display: flex;
justify-content: space-between;
}
}
}
}
}
.width-504 {
width: 504rpx;
}
.width-106 {
width: 106rpx;
}
.width-132 {
width: 132rpx;
}
.width-210 {
width: 210rpx;
}
.width-80 {
width: 80rpx;
}
.width-140 {
width: 140rpx;
}
.center {
text-align: center;
}
.right {
text-align: right;
}
.break {
word-break:break-all;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment