Commit 3c4e45ee authored by Morson's avatar Morson

我的模块接口对接

parent 0e6b5eff
......@@ -36,6 +36,28 @@ npm run build:mp-weixin // 运行生产环境
查看 [配置参考](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)
......@@ -86,3 +108,4 @@ npm run build:mp-weixin // 运行生产环境
PS: 当前项目使用了:方式一,具体情况可以参考state目录下代码
vm.vuex_token
......@@ -5,7 +5,6 @@ import util from "@/utils/util.js";
import login from "@/utils/login.js";
export default {
globalData: {
jumpLoginStatus: true,
// 开发环境
uniEnv: process.uniEnv,
// 微信小程序平台编号,空--家维广场,1--自营平台
......
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 getUserWatermark = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark', params);
......@@ -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);
const commonApi = {
loginWxByUser,
loginWxByPhone,
loginWechatAuth,
getUserWatermark,
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";
import { orderApiFun } from "@/common/api/order.js";
import {assessmentApiFun} from"@/common/api/assessment.js"
import {certApiFun} from"@/common/api/cert.js"
import {contractApiFun} from "@/common/api/contract.js"
let apiFun = function(vm) {
let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm)
......@@ -20,7 +19,6 @@ let apiFun = function(vm) {
let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm)
let certApi=certApiFun(vm)
let contractApi=contractApiFun(vm)
let apiUrl = {
...commonApi,
...settledApi,
......@@ -29,7 +27,6 @@ let apiFun = function(vm) {
...orderApi,
...assessmentApi,
...certApi,
...contractApi
}
return apiUrl
}
......
import util from '@/utils/util.js'
// 接口公共前缀
const prefix = '/wxh-worker-rest/rest/'
const jsonType = {'content-type': 'application/json'}
const formType = {'content-type': 'application/x-www-form-urlencoded'}
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 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){
/**
* 获取师傅的预约日历
*/
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){
/**
* 师傅签到接口
*/
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){
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,41 +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(prefix + vm.vuex_token+'/photo/standard/only', 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 默认水印
*/
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);
/**
* 联系时间接口
......@@ -108,7 +116,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(prefix2+'/order/'+ orderId +'/maintain/info');
/**
* 查询措施
......@@ -123,16 +131,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(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);
/**
......@@ -143,13 +151,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(prefix2 +'/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(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 = {
listByRecommendOrder,
......@@ -182,7 +197,11 @@ let orderApiFun = function(vm){
outOrderFinish,
addressToCoordinate,
listBystock,
listAccessHistory
listAccessHistory,
getAssets,
listStatement,
payableRecord,
workerApplyPay,
}
return orderApi
}
......
......@@ -8,43 +8,33 @@ let settledApiFun = function(vm){
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 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 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 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 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 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 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 Mycontract = async (params)=>await vm.$u.get(ucenterApiUrl+'/v1/settled-contract/info'+'?Authorization='+ vm.vuex_token + params)
const settledApi = {
getSettleBaseInfo,
......@@ -62,6 +52,7 @@ let settledApiFun = function(vm){
saveCourseRate,
listByNotice,
syncAddress,
Mycontract,
}
return settledApi
}
......
function strlen(value) {
//中文、中文标点、全角字符按1长度,英文、英文符号、数字按0.5长度计算
let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/g;
......@@ -184,5 +183,5 @@ export {
setDb,
getDb,
getDateTime,
randStr
randStr,
}
......@@ -41,7 +41,9 @@
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "授权登录"
"navigationBarTitleText": "授权登录",
"navigationStyle": "custom" ,
"disableScroll": true
}
}
],
......@@ -277,20 +279,19 @@
}
},
{
// 订单详情页
"path" : "detail",
"style" :
{
"navigationStyle": "custom"// 隐藏系统导航栏
"navigationBarTitleText": "订单详情",
"navigationStyle": "custom"
}
},
{
// 订单搜索页
"path" : "search",
"style" :
{
"navigationBarTitleText": "",
"navigationBarTitleText": "订单搜索",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor":"#F4F5F7"
}
......@@ -324,9 +325,6 @@
"navigationBarTitleText": "水印设置",
"navigationBarBackgroundColor":"#FFFFFF",
"backgroundColor":"#F4F5F7"
// "navigationBarBackgroundColor": "#333333",
// "navigationBarTextStyle": "#FFFFFF",
// "disableScroll": true
}
},
{
......@@ -472,47 +470,19 @@
}
]
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"condition": {
"current": 0,
"list": [
{
"name": "拍照小工具", //模式名称
"path": "pages/photo/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
"name": "拍照小工具",
"path": "pages/photo/index",
"query": {}
},
{
// gaomingbo
"name": "工单-过程反馈",
"path": "pages/order/feedback",
"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
......@@ -667,7 +667,6 @@
url: "/pages/learn/answer?examId=" + examInfo.id,
});
} else if (examInfo.examStatus == 1) {
// debugger;return;
// examInfo.status = '通过';
if (examInfo.status == '通过') {
wx.navigateTo({
......
......@@ -6,12 +6,12 @@
</u-navbar>
<view class="mine-content">
<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>
</view>
<view class="header-content">
<view class="name-view" @click="handleClickName">{{name}}</view>
<view :class="['tel-view', {'active': info.tel}]" @click="handleClickTel">
<view class="name-view" @click="handleClickName">{{name || "点击登录"}}</view>
<view :class="['tel-view', {'active': mobile}]" @click="handleClickTel">
<text>{{telTip}}</text>
<u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon>
</view>
......@@ -22,7 +22,7 @@
<u-cell-group :border="false">
<view v-for="(item, index) in items" :key="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="value" class="item-value">{{value}}</view>
</u-cell-item>
......@@ -30,13 +30,7 @@
</view>
</u-cell-group>
</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>
<!-- <take-photo v-if="takeStatus" :currentItem="testData" @close="closeTake"></take-photo> -->
</view>
</template>
......@@ -48,26 +42,21 @@
},
data() {
return {
qnPath: process.uniEnv.qn_base_url,
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: {
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() {
return [{
title: '我的钱包',
......@@ -113,29 +102,23 @@
}
]
},
name() {
return this.info.name || '点击登录'
},
telTip() {
return this.info.tel ? '已绑定手机号' : '绑定手机号'
},
imageUrl() {
return process.uniEnv.qn_base_url
return this.mobile && '已绑定手机'|| '绑定手机号'
},
pages() {
return ['wallet', 'deposit', 'contract', 'cert', 'address', 'warehouse', 'customer']
},
headImageUrl() {
return this.info.headImage || this.placeholderImage
return this.avatar || this.placeholderImage
},
wodebeijingImage() {
return this.imageUrl + 'wodebeijing.png'
return this.qnPath + 'wodebeijing.png'
},
placeholderImage() {
return this.imageUrl + 'touxiang.png'
return this.qnPath + 'touxiang.png'
},
headSize() {
return this.info.headImage ? 136 : 144
return this.avatar ? 136 : 144
}
},
onLoad() {
......@@ -143,25 +126,22 @@
},
methods: {
handleClick(index) {
console.log('clicked:', index)
uni.navigateTo({
url: 'pages/mine/' + this.pages[index] + '/index'
})
},
handleClickName() {
console.log('click name')
if(this.vuex_token && this.vuex_settled) {
return false
}
this.$u.route({url: "pages/login/index"})
},
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>
......
<template>
<view class="">
<view class="backView">
<view class="noticeView">
<image class="noticeImage" :src="icon_auth_notice_new" mode=""></image>
<view class="login-block" v-if="needAuth">
<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 class="noticeTitleView">
<text class="noticeTitle" v-if="needAuth">{{ authNoticeTitle }}</text>
<text class="noticeTitle" v-else>{{ suginNoticeTitle }}</text>
<view class="bind-block" v-else>
<u-image class="u-flex u-row-between logo" :src="logo" width="148" height="148">
<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>
<u-gap height="570"></u-gap>
<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 class="loginBtn" v-else open-type="getPhoneNumber" throttle-time="1000"
@getphonenumber="signupLogin">
<text class="u-font-32 white">授权登录</text>
<text class="u-font-32 white">{{ bindTitle }}</text>
</button>
<view class="cancelView">
<text class="cancelText" @click="cancelClick()">取消</text>
</view>
</view>
</view>
</template>
......@@ -29,24 +38,27 @@ const app = getApp()
export default {
data() {
return {
isNewUser: false,
qnPath: process.uniEnv.qn_base_url,
needAuth: true,
unionID: '',
openID: '',
icon_notice: '',
TimeID: -1,
icon_auth_notice_new: '',
authNoticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务',
suginNoticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务',
loginTitle: '用户登录',
bindTitle: '立即绑定',
bindPhone: '绑定手机',
bindTips: '首次登录的用户需绑定手机才可接单',
}
},
onLoad() {
computed: {
logo() {
return this.qnPath + 'logo.png'
},
logo2() {
return this.qnPath + 'logo-2.png'
},
},
onLoad(e) {
app.trackPage('授权登录页')
this.icon_notice = app.globalData.icon_auth_notice
this.icon_auth_notice_new = app.globalData.icon_auth_notice_new
},
onShow() {
app.globalData.jumpLoginStatus = true
// 微信授权过用户信息,则无需重复授权
if (app.globalData.authUserInfo) {
this.needAuth = false
......@@ -211,7 +223,7 @@ export default {
}
</script>
<style>
<style lang="scss" scoped>
.backView {
background-color: #FFFFFF;
position: absolute;
......@@ -219,8 +231,32 @@ export default {
left: 0;
width: 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 {
......@@ -257,10 +293,13 @@ export default {
.loginBtn {
background-color: #2272FF;
width: 390rpx;
height: 80rpx;
border-radius: 40rpx;
margin-top: 334rpx;
font-size: 32rpx;
font-weight: 600;
color: #FFFFFF;
line-height: 104px;
width: 600rpx;
height: 104rpx;
border-radius: 52rpx;
display: flex;
align-items: center;
justify-content: center;
......@@ -282,4 +321,5 @@ export default {
.white {
color: #FFFFFF;
}
</style>
......@@ -106,16 +106,23 @@
}
},
created() {
var item = {
paymentTime: new Date().getTime(),
payableRecordStatusText: '预结',
orderNumber: 'EE999777',
orderServiceType: '安装',
inGuaranteePeriod: false, // true 保内;false 保外
payableAmount: 9899,
orderId: 12313,
// var item = {
// paymentTime: new Date().getTime(),
// payableRecordStatusText: '预结',
// orderNumber: 'EE999777',
// orderServiceType: '安装',
// inGuaranteePeriod: false, // true 保内;false 保外
// payableAmount: 9899,
// 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: {
// 提现
......@@ -133,7 +140,28 @@
uni.navigateTo({
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>
......
......@@ -36,7 +36,8 @@
},
methods: {
handleClick() {
let self = this
self.$u.api.workerApplyPay()
}
}
}
......
......@@ -173,18 +173,7 @@ export default {
let params = { categoryId: self.categoryId };
let res = await self.$u.api.feedbackConfig(params);
if (res && res.code == 200) {
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.feedback = res.data || {};
self.buildConfig();
}
uni.hideLoading();
......@@ -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;
this.initParams()
......
......@@ -258,7 +258,7 @@ export default {
// 初始化入驻信息
async initSettledInfo() {
let self = this
let settledInfo = app.globalData.settledInfo
let settledInfo = self.vuex_settled
if(settledInfo && settledInfo.length) {
self.fileInfo.id = settledInfo.id
} else {
......@@ -267,7 +267,7 @@ export default {
vm.settledInfo = result.record
vm.fileInfo.id = result.record.id
}
settledInfo = await app.getBaseInfo(this, callBack)
settledInfo = await app.getBaseInfo(self, callBack)
uni.hideLoading()
}
},
......
......@@ -83,16 +83,17 @@
})
},
async getBaseInfo() {
let self = this
const app = getApp()
const callBack = (vm, result) => {
vm.settledInfo = result
}
let settledInfo = app.globalData.settledInfo
let settledInfo = self.vuex_settled
if (settledInfo) {
callBack(this, settledInfo)
callBack(self, settledInfo)
return
}
await app.getBaseInfo(this, callBack)
await app.getBaseInfo(self, callBack)
},
async pending() {
......
......@@ -291,6 +291,7 @@
this.baseInfo.bank_site = ''
},
async getBaseInfo() {
let self = this
const app = getApp()
const callBack = (vm, result) => {
vm.settledInfo = result
......@@ -298,12 +299,12 @@
vm.baseInfo.name = record.id_card_name
vm.baseInfo.id = record.id
}
let settledInfo = app.globalData.settledInfo
let settledInfo = self.vuex_settled
if (settledInfo) {
callBack(this, settledInfo)
callBack(self, settledInfo)
return
}
await app.getBaseInfo(this, callBack)
await app.getBaseInfo(self, callBack)
},
async submitInfo() {
// 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