Commit 0019c1fa authored by 李超鹏's avatar 李超鹏

Merge remote-tracking branch 'origin/master'

parents d7074877 3462a90b
...@@ -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 order = '/wxh-worker-rest/rest/order/'
let settle = '/wxh-worker-rest/rest/settle/'
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);
/** /**
* 工单数量查询接口 * 工单数量查询接口
...@@ -29,7 +36,7 @@ let orderApiFun = function(vm){ ...@@ -29,7 +36,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(prefix + vm.vuex_token + '/order/'+orderId+'/maintainWorkerCheckin', params,formType);
/** /**
* 订单详情查询 * 订单详情查询
*/ */
...@@ -53,12 +60,12 @@ let orderApiFun = function(vm){ ...@@ -53,12 +60,12 @@ 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(prefix + vm.vuex_token+'/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);
/** /**
* 获取拍照标准 * 获取拍照标准
...@@ -108,7 +115,7 @@ let orderApiFun = function(vm){ ...@@ -108,7 +115,7 @@ 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(prefix + vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/** /**
* 查询措施 * 查询措施
...@@ -123,16 +130,16 @@ let orderApiFun = function(vm){ ...@@ -123,16 +130,16 @@ let orderApiFun = function(vm){
/** /**
* 保存售后记录 * 保存售后记录
*/ */
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(prefix + vm.vuex_token+'/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(prefix + vm.vuex_token+'/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(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, formType);
/** /**
...@@ -143,13 +150,20 @@ let orderApiFun = function(vm){ ...@@ -143,13 +150,20 @@ let orderApiFun = function(vm){
/** /**
* 我的库存明细(物料) * 我的库存明细(物料)
*/ */
let listBystock= async () => await vm.$u.get(prefix + vm.vuex_token +'/myinfo/stock', {}, {'content-type': 'application/json'}); let listBystock= async () => await vm.$u.get(prefix + vm.vuex_token +'/myinfo/stock', {}, jsonType);
/** /**
* 我的出入库流水 * 我的出入库流水
*/ */
let listAccessHistory= async (params = {}) => await vm.$u.get(prefix + vm.vuex_token +'/myinfo/access/history', params, {'content-type': 'application/json'}); let listAccessHistory= async (params = {}) => await vm.$u.get(prefix + vm.vuex_token +'/myinfo/access/history', params, jsonType);
// 获取我的钱包-资产信息
let getAssets = async (params = {}) => await vm.$u.get(settle + vm.vuex_token + '/v2/total', params);
// 获取我的钱包-结算明细
let listStatement = async (params = {}) => await vm.$u.get(settle + vm.vuex_token + '/v2/statement', params);
// 获取我的钱包-支付单一览
let payableRecord = async (params = {}) => await vm.$u.get(settle + vm.vuex_token + '/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,
...@@ -182,7 +196,11 @@ let orderApiFun = function(vm){ ...@@ -182,7 +196,11 @@ let orderApiFun = function(vm){
outOrderFinish, outOrderFinish,
addressToCoordinate, addressToCoordinate,
listBystock, listBystock,
listAccessHistory 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,
} }
<!-- ******************* 文件上传 ******************* --> <!-- ******************* 文件上传 ******************* -->
<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>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</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" :currentItem="currentItemDate"></take-photo> <take-photo v-if="takeStatus" @close="closeTake" :currentItem="currentItemDate"></take-photo>
</view> </view>
</template> </template>
......
...@@ -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,32 +34,36 @@ ...@@ -24,32 +34,36 @@
}, },
data() { data() {
return { return {
maxlength: 140, inputType: 'text',
// type: 'text'
} }
}, },
computed: { computed: {
type() { // type() {
if (this.item) { // if (this.item) {
let ty = this.item.fieldsType.toLocaleLowerCase() // let ty = this.item.fieldsType.toLocaleLowerCase()
switch (ty) { // switch (ty) {
case 'text': // case 'text':
return 'textarea' // return 'textarea'
case 'password': // case 'password':
return this.item.fieldsType // return this.item.fieldsType
case 'decimal': // case 'decimal':
case 'number': // case 'number':
case 'double': // case 'double':
case 'integer': // case 'integer':
this.maxlength = 9 // this.maxlength = 9
return 'digit' // return 'digit'
case 'textarea': // case 'textarea':
default: // default:
return 'text' // return 'text'
} // }
} else { // } else {
return 'text' // 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%'
...@@ -71,7 +85,7 @@ ...@@ -71,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'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view> <view>
<view class="list u-flex u-row-between"> <view class="list u-flex u-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20">{{item.fieldsTitle}}</view> <view class="u-m-r-20 title-text">{{item.fieldsTitle}}</view>
<view class="u-flex-1 location-name" >{{valueTxt}}</view> <view class="u-flex-1 location-name" >{{valueTxt}}</view>
</view> </view>
</view> </view>
...@@ -55,13 +55,18 @@ ...@@ -55,13 +55,18 @@
line-height: 40rpx; line-height: 40rpx;
color: #fa3534; color: #fa3534;
} }
.title-text {
font-size: 26rpx;
color: #333333;
}
.item-image { .item-image {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.location-name { .location-name {
color: #2272FF; color: #333333;
font-size: 26rpx;
text-align: right; text-align: right;
} }
.location { .location {
......
<!-- ******************* 输入框 ******************* --> <!-- ******************* 输入框 ******************* -->
<template> <template>
<view> <view>
<view class="list u-flex u-row-between"> <view class="list u-flex item-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <view class="item-title">
<view class="u-m-r-20">{{item.fieldsTitle}}</view> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-flex-1 location-name" @click="toMaterialPage"> <view class="u-m-r-20">{{item.fieldsTitle}}</view>
<u-icon name="map" color="#2979ff" size="30"></u-icon>请选择 </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> </view>
<!-- <view class="u-flex-1 location">{{valueTxt || '正在获取中...'}}</view> --> <!-- <view class="u-flex-1 location">{{valueTxt || '正在获取中...'}}</view> -->
...@@ -36,6 +39,9 @@ ...@@ -36,6 +39,9 @@
computed: { computed: {
mixingImage() { mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png' return process.uniEnv.qn_base_url + 'mixing.png'
},
arrowText() {
return false ? '已选择' : '请选择'
} }
}, },
watch: {}, watch: {},
...@@ -57,7 +63,7 @@ ...@@ -57,7 +63,7 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.required { .required {
padding-right: 10rpx; padding-right: 10rpx;
font-size: 28rpx; font-size: 28rpx;
...@@ -69,10 +75,29 @@ ...@@ -69,10 +75,29 @@
height: 24rpx; height: 24rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.location-name { .item-row-between {
color: #2272FF; display: flex;
text-align: right; 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 { .location {
background: #F4F5F7; background: #F4F5F7;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<view class="line-view"></view> <view class="line-view"></view>
<view class="reason-view" v-if="showReason"> <view class="reason-view" v-if="showReason">
<view><text class="reason-title">未通过原因:</text></view> <view class="reason-title"><text>未通过原因:</text></view>
<view class="reason-text"><text v-for="(item, index) in orderData.auditResults" :key="index">{{item}}</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">
......
<template> <template>
<view> <view>
<view class="topView" :style="{'height':navHeight/2 + 'px'}"></view>
<view class="contentView"> <view class="contentView">
<!-- <u-image class="pic" :src="files[0]" bg-color="transparent" @click="showPreviewFn"></u-image> --> <!-- <u-image class="pic" :src="files[0]" bg-color="transparent" @click="showPreviewFn"></u-image> -->
<image class="pic" :src="files[0]" v-lazy mode="aspectFit" @click="showPreviewFn"></image> <image class="pic" :src="files[0]" v-lazy mode="aspectFit" @click="showPreviewFn"></image>
...@@ -29,12 +30,13 @@ ...@@ -29,12 +30,13 @@
keys: [], keys: [],
token: '', token: '',
product: '', product: '',
allImages: [] allImages: [],
navHeight: 130
} }
}, },
created(e) { created(e) {
// 获取照片选项对象 // 获取照片选项对象
console.log(getApp().globalData.photo.currentItem) this.navHeight = getApp().globalData.navHeight
const product = app.globalData.photo.product const product = app.globalData.photo.product
this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}` this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}`
if(app.globalData.photo.currentItem) { if(app.globalData.photo.currentItem) {
...@@ -73,17 +75,7 @@ ...@@ -73,17 +75,7 @@
}) })
} }
} }
// if(photo.currentItem){
// photo.currentItem.imageList.unshift(photo.tempPath.mixWater)
// }
// if(photo.productList && photo.productList[photo.topIndex]){
// const topArr = photo.productList[photo.topIndex]
// if(topArr[photo.itemIndex]){
// topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater)
// }
// }
// photo.
if(photo.tempPath.mixWater){ if(photo.tempPath.mixWater){
// 保存水印处理图片到本地 // 保存水印处理图片到本地
path = photo.tempPath.mixWater path = photo.tempPath.mixWater
...@@ -122,6 +114,7 @@ ...@@ -122,6 +114,7 @@
}, },
finishPhoto(){ finishPhoto(){
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
if (photo.currentItemLength === 10) return
photo.currentItemLength = 10 photo.currentItemLength = 10
this.continuePhoto() this.continuePhoto()
// 完成本项 // 完成本项
...@@ -149,29 +142,18 @@ ...@@ -149,29 +142,18 @@
}else{ }else{
this.$emit('finish') this.$emit('finish')
} }
}, }
downloadImages() {
let self = this;
for (let url of this.images) {
uni.downloadFile({
url: url, //仅为示例,并非真实的资源
success(res) {
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
if (res.statusCode === 200) {
self.files.push(res.tempFilePath)
}
},
fail(e) {
}
})
}
},
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.topView {
background: #000;
width: 100%;
position: fixed;
top: 0;
}
.contentView { .contentView {
background-color: #333333; background-color: #333333;
/* padding-top: 120rpx; */ /* padding-top: 120rpx; */
...@@ -181,7 +163,7 @@ ...@@ -181,7 +163,7 @@
flex-direction: column; flex-direction: column;
} }
/deep/ .u-image{ /deep/ .u-image{
height:100%!important; height:100% !important;
} }
/deep/ .u-image__loading{ /deep/ .u-image__loading{
background-color: transparent!important; background-color: transparent!important;
...@@ -192,8 +174,8 @@ ...@@ -192,8 +174,8 @@
.pic { .pic {
flex:1; flex:1;
width: 100%; width: 100%;
height: 100%;
/* height:auto */ // height:auto;
/* height: 760rpx; */ /* height: 760rpx; */
} }
......
...@@ -265,6 +265,7 @@ ...@@ -265,6 +265,7 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
markImage: 'https://qn-static.banshouhui.com/live_mark.png' markImage: 'https://qn-static.banshouhui.com/live_mark.png'
}, },
tempImgs: { tempImgs: {
'markImage': '', // 拍照水印 'markImage': 'https://qn-static.banshouhui.com/live_mark.png', // 拍照水印
'origin': '', // 无水印照片 'origin': '', // 无水印照片
'mixWater': '', // 有水印照片 'mixWater': '', // 有水印照片
}, },
...@@ -206,10 +206,6 @@ ...@@ -206,10 +206,6 @@
}, },
updateTime() { updateTime() {
this.waterInfo.date = this.getTime() this.waterInfo.date = this.getTime()
// let timer = setTimeout(() => {
// clearTimeout(timer);
// this.updateTime()
// }, 1000)
}, },
setCameraInfo(type) { setCameraInfo(type) {
// 设置相机前置后置、闪关灯等 // 设置相机前置后置、闪关灯等
...@@ -261,7 +257,6 @@ ...@@ -261,7 +257,6 @@
const { const {
errMsg errMsg
} = e.detail } = e.detail
// console.log(e.detail, 'e.detail')
if (errMsg !== 'insertCamera:fail auth deny') { if (errMsg !== 'insertCamera:fail auth deny') {
return return
} }
...@@ -431,10 +426,10 @@ ...@@ -431,10 +426,10 @@
} }
canvas.fillText(title.substr(0, 14), 10, canvasHeight - txtHeight * h++ - titleHeight / 2 + 10); canvas.fillText(title.substr(0, 14), 10, canvasHeight - txtHeight * h++ - titleHeight / 2 + 10);
} }
if (this.waterSetting && this.waterSetting.mid_text) { // if (this.waterSetting && this.waterSetting.mid_text) {
//加入 水印图片 //加入 水印图片
canvas.drawImage(this.tempImgs.markImage, canvasWidth / 2 - 100, canvasHeight / 2 - 25, 200, 50) canvas.drawImage(this.tempImgs.markImage, canvasWidth / 2 - 100, canvasHeight / 2 - 25, 200, 50)
} // }
// canvas.drawImage(this.tempImgs.markImage, canvasWidth / 2 - 100, canvasHeight / 2 - 25, 200, 50) // canvas.drawImage(this.tempImgs.markImage, canvasWidth / 2 - 100, canvasHeight / 2 - 25, 200, 50)
canvas.draw(false, canvas.draw(false,
setTimeout(() => { setTimeout(() => {
......
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
"navigationBarTitleText": "授权登录" "navigationBarTitleText": "授权登录",
"navigationStyle": "custom" ,
"disableScroll": true
} }
} }
], ],
...@@ -92,14 +94,14 @@ ...@@ -92,14 +94,14 @@
"path": "news-details", "path": "news-details",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle":"default" "navigationStyle":"custom"
} }
}, },
{ {
"path":"section", "path":"section",
"style" :{ "style" :{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle":"default" "navigationStyle":"custom"
} }
}, },
{ {
...@@ -219,6 +221,13 @@ ...@@ -219,6 +221,13 @@
} }
}, },
{ {
"path":"contract/out",
"style":{
"navigationBarTitleText":""
}
},
{
"path": "customer/index", "path": "customer/index",
"style": { "style": {
"navigationStyle":"custom", "navigationStyle":"custom",
...@@ -253,7 +262,7 @@ ...@@ -253,7 +262,7 @@
{ {
"path": "complete", "path": "complete",
"style": { "style": {
"navigationBarTitleText": "订单-完工配置", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
...@@ -261,7 +270,7 @@ ...@@ -261,7 +270,7 @@
{ {
"path": "feedback", "path": "feedback",
"style": { "style": {
"navigationBarTitleText": "订单-过程反馈", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true "disableScroll": true
...@@ -270,27 +279,26 @@ ...@@ -270,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"
} }
...@@ -324,9 +332,6 @@ ...@@ -324,9 +332,6 @@
"navigationBarTitleText": "水印设置", "navigationBarTitleText": "水印设置",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor":"#FFFFFF",
"backgroundColor":"#F4F5F7" "backgroundColor":"#F4F5F7"
// "navigationBarBackgroundColor": "#333333",
// "navigationBarTextStyle": "#FFFFFF",
// "disableScroll": true
} }
}, },
{ {
...@@ -436,7 +441,7 @@ ...@@ -436,7 +441,7 @@
}, },
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F4F5F7" "backgroundColor": "#F4F5F7"
}, },
...@@ -472,47 +477,19 @@ ...@@ -472,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
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</view> </view>
<view class="bottomRightView"> <view class="bottomRightView">
<view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' " <view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' "
@click="handleClick()"> @click="$u.throttle(handleClick, 500)">
<text class="bottomTitle">{{bottomTitle}}</text> <text class="bottomTitle">{{bottomTitle}}</text>
</view> </view>
</view> </view>
......
...@@ -230,50 +230,17 @@ ...@@ -230,50 +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: '安装', // 服务类型:安装、维修
// categoryName: '充电桩', // 品类:充电桩
// orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池
// orderNumber: 'OR2021041809827', // 工单编号
// 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.orderList.push(...res.data.list);
console.log('this.orderlist;', this.orderList) }
self.currentLoadStatus = res.data.total > self.orderList.length && res.data.list.length == self.search.pageSize ? 'loadmore' : 'nomore' console.log('this.orderlist;', this.orderList)
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, "初始化订单列表异常");
} }
......
This diff is collapsed.
...@@ -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', 'warehouse', '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>
......
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
+ "&categoryId=" + item.categoryId + "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType + "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod + "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[0]:'') + "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'')
}) })
}, },
handleAction(item) { handleAction(item) {
......
This diff is collapsed.
<template> <template>
<view> <view>
<u-navbar
back-icon-color="#000000"
:background="background"
title-color="#000000"
:border-bottom="false">
</u-navbar>
<view class="title"> <view class="title">
{{ title }} {{ title }}
</view> </view>
...@@ -25,7 +31,7 @@ ...@@ -25,7 +31,7 @@
that.body = data.body; that.body = data.body;
}) })
this.$u.mpShare.path = '' this.$u.mpShare.path = ''
}, },
} }
</script> </script>
......
<template> <template>
<view class=""> <view class="">
<view class="learn-vedio" v-if="isShowVideo"> <view class="learn-vedio" v-if="isShowVideo">
<u-navbar
back-icon-color="#000000"
:background="background"
title-color="#000000"
:border-bottom="false">
</u-navbar>
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc" <view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
:options="playerOptions" :playsinline="true" @play="playCourse" @error="videoErrorCallback" :options="playerOptions" :playsinline="true" @play="playCourse" @error="videoErrorCallback"
...@@ -137,9 +143,9 @@ ...@@ -137,9 +143,9 @@
}, },
gklog: '', gklog: '',
videoTotalTime: 0, videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5, //设置几秒提交一次状态 howTimeToUpdateLearnedStatus: 10, //设置几秒提交一次状态
status: 1, //是否已学习默认1已学习 status: 1, //是否已学习默认1已学习
howLongIsLearned: this.videoTotalTime / 2, //默认设置观看1/2就是已学 isLearned: false, //默认设置观看1/2就是已学
}; };
}, },
computed: { computed: {
...@@ -185,19 +191,21 @@ ...@@ -185,19 +191,21 @@
this.videoContext = uni.createVideoContext("courseVideo"); this.videoContext = uni.createVideoContext("courseVideo");
// #endif // #endif
}, },
onUnload() {
wx.reLaunch({
url: '/pages/index/learn?tabs=2'
});
},
methods: { methods: {
goNext(info) { goNext(info) {
uni.navigateTo({ uni.navigateTo({
url: "./section?section_id=" + info.id + "&course_id=" + info.course_id url: "/pages/learn/section?section_id=" + info.id + "&course_id=" + info.course_id
}); });
}, },
onPlayerTimeupdate(player) { onPlayerTimeupdate(player) {
console.log('-----onplay----');
console.log(player);
let intCurrentTime = parseInt(player.detail.currentTime); let intCurrentTime = parseInt(player.detail.currentTime);
this.updateLearnedStatus(intCurrentTime); this.updateLearnedStatus(intCurrentTime);
this.gklog = intCurrentTime; this.gklog = intCurrentTime;
console.log(' onPlayerTimeupdate!', this.gklog)
}, },
videoErrorCallback: function(e) { videoErrorCallback: function(e) {
uni.showModal({ uni.showModal({
...@@ -220,7 +228,6 @@ ...@@ -220,7 +228,6 @@
} }
}, },
playerReadied(player) { playerReadied(player) {
console.log('i go to playerReadied gklog:' + this.gklog)
player.currentTime(this.gklog) player.currentTime(this.gklog)
}, },
getCourseSection(param) { getCourseSection(param) {
...@@ -240,7 +247,7 @@ ...@@ -240,7 +247,7 @@
this.section_content = res.data.content; this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name; this.teacher.name = res.data.teachers[0].name;
this.teacherImage = res.data.teachers[0].avatar; this.teacherImage = res.data.teachers[0].avatar;
this.teacherIntro = res.data.teachers[0].intro.replace(/<p.*?>|<\/p>/ig, ""); this.teacherIntro = res.data.teachers[0].intro.replace(/<.*?>|<\/.*?>/ig, "");
this.params.course_id = res.data.course_id; this.params.course_id = res.data.course_id;
if (this.isShowVideo) { if (this.isShowVideo) {
let coureWareList = res.data.courseware; let coureWareList = res.data.courseware;
...@@ -254,8 +261,6 @@ ...@@ -254,8 +261,6 @@
} }
}) })
.catch((err) => { .catch((err) => {
console.log('--------settttt---------');
console.log(err);
uni.showToast({ uni.showToast({
title: err, title: err,
icon: "none", icon: "none",
...@@ -272,10 +277,7 @@ ...@@ -272,10 +277,7 @@
status: 1, status: 1,
}; };
this.$u.api.updateLearnCourses(param).then((res) => { this.$u.api.updateLearnCourses(param).then((res) => {
// console.log('--' + this.howTimeToUpdateLearnedStatus + '更新一次观看状态--time:' + nowTime);
}).catch((err) => { }).catch((err) => {
console.log('--------updateLearnedStatusForText---------');
console.log(err);
uni.showToast({ uni.showToast({
title: err, title: err,
icon: "none", icon: "none",
...@@ -284,11 +286,13 @@ ...@@ -284,11 +286,13 @@
}, },
updateLearnedStatus(nowTime) { updateLearnedStatus(nowTime) {
if (this.gklog != nowTime && nowTime % this.howTimeToUpdateLearnedStatus == 0) { if (this.gklog != nowTime && nowTime % this.howTimeToUpdateLearnedStatus == 0) {
if (nowTime < this.howLongIsLearned) { let howLongIsLearned = parseInt(this.videoTotalTime / 2);
if (nowTime < howLongIsLearned) {
this.status = 0; this.status = 0;
} else if(this.isLearned){
return;
} else { } else {
this.status = 1; this.status = 1;
console.log('--大于规定时间标记为已学习--');
} }
let param = { let param = {
...@@ -297,20 +301,13 @@ ...@@ -297,20 +301,13 @@
status: this.status, status: this.status,
}; };
this.$u.api.updateLearnCourses(param).then((res) => { this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--' + this.howTimeToUpdateLearnedStatus + '更新一次观看状态--time:' + nowTime);
}).catch((err) => { }).catch((err) => {
console.log('--------updateLearnedStatus---------');
console.log(err); console.log(err);
uni.showToast({
title: err,
icon: "none",
});
}); });
} }
}, },
//获取章节详情 //获取章节详情
getCapterDetails() { getCapterDetails() {
console.log('获取章节详情')
this.$u.api this.$u.api
.ChapterDetails(this.params) .ChapterDetails(this.params)
.then((res) => { .then((res) => {
...@@ -325,8 +322,6 @@ ...@@ -325,8 +322,6 @@
this.list[i].isActive = this.active_section_id == this.list[i].id ? true : this.list[i].isActive = this.active_section_id == this.list[i].id ? true :
false; false;
} }
console.log('--select-list--')
console.log(this.list)
} }
} else { } else {
//接口请求失败的处理 //接口请求失败的处理
...@@ -493,7 +488,7 @@ ...@@ -493,7 +488,7 @@
} }
.color-teacher { .color-teacher {
color: #999999; color: #000000;
} }
.catalogue { .catalogue {
......
<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
...@@ -211,7 +223,7 @@ export default { ...@@ -211,7 +223,7 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scoped>
.backView { .backView {
background-color: #FFFFFF; background-color: #FFFFFF;
position: absolute; position: absolute;
...@@ -219,8 +231,32 @@ export default { ...@@ -219,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 {
...@@ -257,10 +293,13 @@ export default { ...@@ -257,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;
...@@ -282,4 +321,5 @@ export default { ...@@ -282,4 +321,5 @@ export default {
.white { .white {
color: #FFFFFF; color: #FFFFFF;
} }
</style> </style>
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<text class="title">合同清单</text> <text class="title">合同清单</text>
<view class="jf-currency-class" v-for="item in res" :key="item.id"> <view
class="jf-currency-class"
v-for="item in res"
:key="item.id"
@click="goBaidu(item.url)"
>
<view class="left">{{ item.name }}</view> <view class="left">{{ item.name }}</view>
<view class="text1">《{{ item.name }}》</view> <view class="text1">《{{ item.name }}》</view>
<view class="text2">下载时间: {{ item.create_at }}</view> <view class="text2">下载时间: {{ item.create_at }}</view>
</view> </view>
<!-- <view class="jf-currency-class">
<view class="left">新风机技工入驻签约合同</view>
<view class="text1">《新风机技工入驻签约合同》</view>
<view class="text2">下载时间: 2021.05.06 15:01:48</view>
</view> -->
</view> </view>
</view> </view>
</template> </template>
...@@ -28,14 +28,6 @@ export default { ...@@ -28,14 +28,6 @@ export default {
return { return {
background: { background: {
backgroundColor: "#F4F5F7", backgroundColor: "#F4F5F7",
// 导航栏背景图
// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
// 还可以设置背景图size属性
// backgroundSize: 'cover',
// 渐变色
// backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
}, },
res: [], res: [],
type: "充电桩", type: "充电桩",
...@@ -52,50 +44,37 @@ export default { ...@@ -52,50 +44,37 @@ export default {
if (res.data) { if (res.data) {
let length = res.data.length; let length = res.data.length;
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
var re = /[^\u4e00-\u9fa5]/gi;
// res.data.name = res.data.name.replace(re, "");
let data = new Date( let data = new Date(
Number(res.data[i].create_at) * 1000 Number(res.data[i].create_at) * 1000
); );
res.data[i].create_at = moment(data).format( res.data[i].create_at = moment(data).format(
"yyyy.MM.DD HH:mm:ss" "yyyy.MM.DD HH:mm:ss"
); );
res.data[i].name = res.data[i].name.replace(re, "");
} }
this.res = this.res.concat(res.data); this.res = this.res.concat(res.data);
console.log(this.res); console.log(this.res);
} }
} else { } else {
console.log(res.code); //接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
} }
}); });
}, },
add0(m) { goBaidu(a) {
return m < 10 ? "0" + m : m; getApp().globalData.contractUrl = a;
wx.navigateTo({
url: "./out",
success: function () {}, //成功回调
fail: function () {},
complete: function () {},
});
}, },
// format(shijianchuo) {
// //shijianchuo是整数,否则要parseInt转换
// var time = new Date(shijianchuo * 1000);
// var y = time.getFullYear();
// var m = time.getMonth() + 1;
// var d = time.getDate();
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
// return (
// y +
// "." +
// this.add0(m) +
// "." +
// this.add0(d) +
// " " +
// this.add0(h) +
// ":" +
// this.add0(mm) +
// ":" +
// this.add0(s)
// );
// // },
// gettime(time) {
// moment(new Date(time).format("yyyy.MM.DD HH:mm:ss"));
// },
}, },
}; };
</script> </script>
...@@ -122,7 +101,6 @@ export default { ...@@ -122,7 +101,6 @@ export default {
} }
.jf-currency-class { .jf-currency-class {
width: 100%; width: 100%;
height: 180rpx;
border-radius: 12rpx; border-radius: 12rpx;
padding-top: 40rpx; padding-top: 40rpx;
margin-top: 74rpx; margin-top: 74rpx;
......
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: "",
};
},
onLoad(option) {
this.url = option.url;
var app = getApp();
this.url = app.globalData.contractUrl;
console.log(app.globalData, "这是个标识符");
},
methods: {},
};
</script>
<style>
</style>
\ No newline at end of file
...@@ -106,16 +106,23 @@ ...@@ -106,16 +106,23 @@
} }
}, },
created() { created() {
var item = { // var item = {
paymentTime: new Date().getTime(), // paymentTime: new Date().getTime(),
payableRecordStatusText: '预结', // payableRecordStatusText: '预结',
orderNumber: 'EE999777', // orderNumber: 'EE999777',
orderServiceType: '安装', // orderServiceType: '安装',
inGuaranteePeriod: false, // true 保内;false 保外 // inGuaranteePeriod: false, // true 保内;false 保外
payableAmount: 9899, // payableAmount: 9899,
orderId: 12313, // orderId: 12313,
// }
// this.statementList = [item, item, item, item, item]
},
onLoad() {
if(!this.vuex_token) {
this.$u.route({url: 'pages/login/index'})
} }
this.statementList = [item, item, item, item, item] this.loadAssets()
this.loadStatement()
}, },
methods: { methods: {
// 提现 // 提现
...@@ -133,7 +140,28 @@ ...@@ -133,7 +140,28 @@
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/detail?id=' + orderId url: 'pages/order/detail?id=' + orderId
}) })
} },
async loadAssets() {
let self = this
let res = await self.$u.api.getAssets()
if(res && res.code == 200) {
self.info = res.data || self.info
}
},
async loadStatement() {
let self = this
let res = await self.$u.api.listStatement()
if(res && res.code == 200) {
self.statementList = res.data && res.data.orderList || []
}
},
async loadPayRecord() {
let self = this
let res = await self.$u.api.payableRecord()
// if(res && res.code == 200) {
// self.info = res.data || self.info
// }
},
} }
} }
</script> </script>
......
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
}, },
methods: { methods: {
handleClick() { handleClick() {
let self = this
self.$u.api.workerApplyPay()
} }
} }
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<view class="com-content"> <view class="com-content">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check> <complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check>
<view class="u-wrap"> <view class="u-wrap">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" back-text=" " ></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar>
<u-tabs-swiper class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs-swiper> <u-tabs class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs>
<view class="u-menu-wrap"> <view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1"> <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1">
<view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item" <view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
<template v-if="item.fieldsType"> <template v-if="item.fieldsType">
<xh-input v-if="typeToComponentType(item.fieldsType)==='input'" :groupIndex="groupIndex" <xh-input v-if="typeToComponentType(item.fieldsType)==='input'" :groupIndex="groupIndex" :type="inputType(item.fieldsType)"
:itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""' @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""' @value-change="fieldValueChange">
</xh-input> </xh-input>
<xh-multi-input v-else-if="typeToComponentType(item.fieldsType)==='multiinput'" <xh-multi-input v-else-if="typeToComponentType(item.fieldsType)==='multiinput'"
...@@ -264,6 +264,12 @@ ...@@ -264,6 +264,12 @@
if (res.code == 200) { if (res.code == 200) {
self.list = res.data.config self.list = res.data.config
self.form = res.data.value || {} self.form = res.data.value || {}
uni.showLoading({
title: '加载中'
})
setTimeout(() => {
uni.hideLoading()
}, 1000)
// 异常单处理 // 异常单处理
if (self.auditResultsId) self.checkCompleteError() if (self.auditResultsId) self.checkCompleteError()
} else { } else {
...@@ -459,10 +465,12 @@ ...@@ -459,10 +465,12 @@
this.$set(this.form,innerItem.fieldsName,data.value) this.$set(this.form,innerItem.fieldsName,data.value)
} }
if (innerItem.fieldsId == 199) { // 选不需要收款的时候,收款金额修改为非必选 if (innerItem.fieldsId == 199) { // 选不需要收款的时候,收款金额修改为非必选
for (var item of this.list[0].items) { for (var list of this.list) { // 同时修改基本信息和完工信息
for (var i of item.items) { for (var item of list.items) {
if (i.fieldsId == 200) { for (var i of item.items) {
i.required = data.value !='03' if (i.fieldsId == 200) {
i.required = data.value !='03'
}
} }
} }
} }
...@@ -479,6 +487,30 @@ ...@@ -479,6 +487,30 @@
}) })
} }
}, },
inputType(type) {
var inputType = ''
let ty = type.toLocaleLowerCase()
switch (ty) {
case 'text':
inputType = 'textarea'
break
case 'password':
inputType = ty
break
case 'decimal':
case 'number':
case 'double':
case 'integer':
inputType = 'digit'
break
case 'textarea':
default:
inputType = 'text'
break
}
return inputType
},
typeToComponentType(type) { typeToComponentType(type) {
// 将fieldType类型统一转换为公共组件判定类型 // 将fieldType类型统一转换为公共组件判定类型
let formType = '' let formType = ''
......
<template> <template>
<view class="order-wrap"> <view class="order-wrap">
<u-navbar back-icon-color="#FFFFFF" back-text=" " :background="background" :border-bottom="false"></u-navbar> <u-navbar back-icon-color="#FFFFFF" :background="background" :border-bottom="false"></u-navbar>
<view class="header"> <view class="header">
<view class="title">订单信息</view> <view class="title">订单信息</view>
<view v-show="allowRejection" class="button" @click="rejectOrder">拒单</view> <view v-show="allowRejection" class="button" @click="rejectOrder">拒单</view>
...@@ -290,48 +290,48 @@ ...@@ -290,48 +290,48 @@
methods: { methods: {
openLocation(address){ openLocation(address){
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.getLocation({ // uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度 // type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) { // success: function (res) {
const latitude = res.latitude; debugger
const longitude = res.longitude; const latitude = this.contactAddressLatitud //res.latitude;
const longitude =this.contactAddressLongitud //res.longitude;
uni.openLocation({ uni.openLocation({
latitude: latitude, latitude: Number(this.contactAddressLatitud),
longitude: longitude, longitude: Number(this.contactAddressLongitud),
success: function () { success: function () {
console.log('success'); console.log('success');
} }
}); });
}, // }
complete: function(res) { // ,
console.log('-------complete-----', res) // complete: function(res) {
if (res.errMsg.indexOf('auth') != -1) { // console.log('-------complete-----', res)
uni.showModal({ // if (res.errMsg.indexOf('auth') != -1) {
title: '提示', // uni.showModal({
content: '获取权限失败,请到设置页面开启权限', // title: '提示',
confirmText: '好的', // content: '获取权限失败,请到设置页面开启权限',
success(res) { // confirmText: '好的',
if (res.confirm) { // success(res) {
uni.openSetting({ // if (res.confirm) {
success(res) { // uni.openSetting({
console.log(res.authSetting) // success(res) {
} // console.log(res.authSetting)
}); // }
} // });
// }
} // }
}) // })
} else if (res.errMsg) { // } else if (res.errMsg) {
// uni.setClipboardData({ // // uni.setClipboardData({
// data: address, // // data: address,
// success: function () { // // success: function () {
// console.log('success'); // // console.log('success');
// } // // }
// }); // // });
} // }
} // }
});
} }
}, },
phoneToCustomer(phone){ // 联系客户 phoneToCustomer(phone){ // 联系客户
...@@ -566,6 +566,7 @@ ...@@ -566,6 +566,7 @@
} }
}, },
handleBtn() { handleBtn() {
console.log('click button')
if(!this.submitType){ if(!this.submitType){
return; return;
} }
...@@ -617,7 +618,7 @@ ...@@ -617,7 +618,7 @@
this.clicking = true this.clicking = true
this.$u.api[this.submitType](data, this.order.orderId).then(res => { this.$u.api[this.submitType](data, this.order.orderId).then(res => {
let self = this let self = this
this.clicking = false
if ((res.data.code!==undefined && res.data.code === 200) if ((res.data.code!==undefined && res.data.code === 200)
|| (res.code!==undefined && res.code === 200) ) { || (res.code!==undefined && res.code === 200) ) {
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -629,6 +630,7 @@ ...@@ -629,6 +630,7 @@
// id: this.order.orderId // id: this.order.orderId
// } // }
callback : function(){ callback : function(){
this.clicking = false
uni.redirectTo({ uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId url: 'pages/order/detail?id='+self.order.orderId
}); });
...@@ -639,7 +641,10 @@ ...@@ -639,7 +641,10 @@
title: res.data.message!==undefined ? res.data.message:res.message, title: res.data.message!==undefined ? res.data.message:res.message,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default' // 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'warning', type: 'warning',
callback: res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():'' callback: function() {
this.clicking = false
res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():''
}
}) })
} }
}) })
......
...@@ -173,18 +173,7 @@ export default { ...@@ -173,18 +173,7 @@ export default {
let params = { categoryId: self.categoryId }; let params = { categoryId: self.categoryId };
let res = await self.$u.api.feedbackConfig(params); let res = await self.$u.api.feedbackConfig(params);
if (res && res.code == 200) { if (res && res.code == 200) {
self.feedback = res.data || {};
if (!self.showGY) {
delete res.code['改约']
}
var data = {}
for (var item in res.data) {
if (item != '改约' || self.showGY) {
data[item] = res.data[item]
}
}
self.feedback = data;
self.buildConfig(); self.buildConfig();
} }
uni.hideLoading(); uni.hideLoading();
...@@ -211,6 +200,22 @@ export default { ...@@ -211,6 +200,22 @@ export default {
}); });
}); });
configs.map((item, key) => {
if(item.name == '报备') {
configs.splice(key, 1);
configs.unshift(item);
// 更新时间标题
let title = self.appoint[key]
self.appoint.splice(key, 1);
self.appoint.unshift(title);
} else if (item.name == '改约' && !self.showGY) {
configs.splice(key, 1);
// 更新时间标题
self.appoint.splice(key, 1);
}
})
// 数组改写需要刷新绑定数据 // 数组改写需要刷新绑定数据
self.options = configs; self.options = configs;
this.initParams() this.initParams()
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
<view class="line-view"></view> <view class="line-view"></view>
<u-tr class="u-tr" v-for="(item, index) in list" :key="index"> <u-tr class="u-tr" v-for="(item, index) in list" :key="index">
<u-td class="u-td" v-for="(value, key) in titles" :key="key"> <u-td class="u-td" v-for="(value, key) in titles" :key="key">
<text :class="['tab-th-txt', {'left': key == firstKey}]">{{item[key]}}</text> <u-input v-if="key == 'useLength'" @blur="handleBlur(item)" @focus="handleFocus(item)" type="digit" :placeholder="null" v-model="item[key]" placeholder-style="color: #999999;font-size:26rpx" input-align="center" :clearable="false"><u-icon name="edit"></u-icon></u-input>
<text v-else :class="['tab-th-txt', {'left': key == firstKey}]">{{item[key]}}</text>
</u-td> </u-td>
</u-tr> </u-tr>
</u-table> </u-table>
...@@ -80,22 +81,12 @@ ...@@ -80,22 +81,12 @@
}; };
}, },
titles() { titles() {
if(this.isMaterial){ return {
return { matName: this.isMaterial ? '工艺名称' : '材料名称',
matName: '材料名称', matUnit: '单位',
matUnit: '单位', freeLength: '免费量',
freeLength: '免费量', unitAmt: '单价/元',
unitAmt: '单价/元', useLength: '用量'
useLength: '用量'
}
}else{
return {
matName: '工艺名称',
matUnit: '单位',
freeLength: '免费量',
unitAmt: '单价/元',
useLength: '用量'
}
} }
}, },
thStyle() { thStyle() {
...@@ -148,6 +139,15 @@ ...@@ -148,6 +139,15 @@
self.formatServiceMoreList(data) self.formatServiceMoreList(data)
} }
}); });
/*
// 测试数据
var item = {matName: '碳纤维',
matUnit: '米',
freeLength: 4,
unitAmt: '2',
useLength: 6}
this.list = [{...item}, {...item}, {...item}, {...item}]
*/
}, },
created() { created() {
}, },
...@@ -174,6 +174,16 @@ ...@@ -174,6 +174,16 @@
} }
}) })
}, },
handleBlur(item) { // 失去焦点如果没输入用原先的值
if (!item.useLength) {
item.useLength = item.temp
}
},
handleFocus(item) { // 点击清空
item.temp = item.useLength;
item.useLength = ''
},
/* 其他添加新的 */ /* 其他添加新的 */
handleAdd() { handleAdd() {
this.other.push({ this.other.push({
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
loading: true, loading: true,
isPopShow: false, isPopShow: false,
userWatermark:{}, userWatermark:{},
title: '规范展示' title: '全部'
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
} }
if (e && e.brand) { if (e && e.brand) {
this.brand = decodeURIComponent(e.brand) this.brand = decodeURIComponent(e.brand)
this.title = this.brand // this.title = this.brand
} }
if (e && e.orderId) { if (e && e.orderId) {
......
This diff is collapsed.
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
// 初始化入驻信息 // 初始化入驻信息
async initSettledInfo() { async initSettledInfo() {
let self = this let self = this
let settledInfo = app.globalData.settledInfo let settledInfo = self.vuex_settled
if(settledInfo && settledInfo.length) { if(settledInfo && settledInfo.length) {
self.fileInfo.id = settledInfo.id self.fileInfo.id = settledInfo.id
} else { } else {
...@@ -267,7 +267,7 @@ export default { ...@@ -267,7 +267,7 @@ export default {
vm.settledInfo = result.record vm.settledInfo = result.record
vm.fileInfo.id = result.record.id vm.fileInfo.id = result.record.id
} }
settledInfo = await app.getBaseInfo(this, callBack) settledInfo = await app.getBaseInfo(self, callBack)
uni.hideLoading() uni.hideLoading()
} }
}, },
......
...@@ -83,16 +83,17 @@ ...@@ -83,16 +83,17 @@
}) })
}, },
async getBaseInfo() { async getBaseInfo() {
let self = this
const app = getApp() const app = getApp()
const callBack = (vm, result) => { const callBack = (vm, result) => {
vm.settledInfo = result vm.settledInfo = result
} }
let settledInfo = app.globalData.settledInfo let settledInfo = self.vuex_settled
if (settledInfo) { if (settledInfo) {
callBack(this, settledInfo) callBack(self, settledInfo)
return return
} }
await app.getBaseInfo(this, callBack) await app.getBaseInfo(self, callBack)
}, },
async pending() { async pending() {
......
...@@ -291,6 +291,7 @@ ...@@ -291,6 +291,7 @@
this.baseInfo.bank_site = '' this.baseInfo.bank_site = ''
}, },
async getBaseInfo() { async getBaseInfo() {
let self = this
const app = getApp() const app = getApp()
const callBack = (vm, result) => { const callBack = (vm, result) => {
vm.settledInfo = result vm.settledInfo = result
...@@ -298,12 +299,12 @@ ...@@ -298,12 +299,12 @@
vm.baseInfo.name = record.id_card_name vm.baseInfo.name = record.id_card_name
vm.baseInfo.id = record.id vm.baseInfo.id = record.id
} }
let settledInfo = app.globalData.settledInfo let settledInfo = self.vuex_settled
if (settledInfo) { if (settledInfo) {
callBack(this, settledInfo) callBack(self, settledInfo)
return return
} }
await app.getBaseInfo(this, callBack) await app.getBaseInfo(self, callBack)
}, },
async submitInfo() { async submitInfo() {
// checkSettleSignInfo // checkSettleSignInfo
......
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