Commit fa8ed8ef authored by linwenqing's avatar linwenqing

Merge branch 'dev' into test

parents 2568eb05 f1442ebc
...@@ -2,8 +2,10 @@ const globalUrl = process.uniEnv || {} ...@@ -2,8 +2,10 @@ const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let certApiFun = function(vm){ let certApiFun = function(vm){
let getCertList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params); let getCertList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params);
let submitCert = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/submit-cert', params);
const certApi = { const certApi = {
getCertList getCertList,
submitCert
} }
return certApi return certApi
} }
......
<template> <template>
<view class="cus-wrap-component"> <view class="cus-wrap-component">
<image class="top-image" mode="widthFix" :src="minekefutuImage"></image> <image class="top-image" mode="widthFix" v-if="!isPop" :src="minekefutuImage"></image>
<view class="content-view"> <view class="content-view">
<view class="title-view" v-if="!isPop"> <view :class="['title-view', {'is-mine': isMine}]">
<text class="title-text">客服微信</text> <text :class="['title-text', {'is-mine': isMine}]">{{titleText[typeIndex]}}</text>
<text v-if="isMine">下载二维码添加官方客服微信</text> <text>{{tipText[typeIndex]}}</text>
</view> </view>
<u-image :class="['qrcode', {'is-pop': isPop}]" :src="cusQrcode" mode="widthFix" :fade="true" <u-image :class="['qrcode', {'is-mine': isMine}]" :src="cusQrcode" mode="widthFix" :fade="true"
duration="450"> duration="450">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
<view v-if="isPop" class="pop-tip-view"> <u-button class="settle-button" type="primary" :open-type="openTypes[typeIndex]" show-message-card send-message-title="点击下方客服会话添加订单助手" shape="circle" @click="download" :custom-style="buttonStyle">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text> {{buttonText[typeIndex]}}
</view>
<u-button class="settle-button" type="primary" shape="circle" @click="download" :custom-style="buttonStyle">
点击下载
</u-button> </u-button>
<view class="bottom-view" v-if="isMine"> <view class="bottom-view" v-if="isMine">
<view class="line-view"></view> <view class="line-view"></view>
...@@ -28,9 +25,6 @@ ...@@ -28,9 +25,6 @@
</u-image> </u-image>
</view> </view>
</view> </view>
<view v-else-if="isExclusive" class="tip-view">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -38,7 +32,7 @@ ...@@ -38,7 +32,7 @@
<script> <script>
export default { export default {
props: { props: {
type: { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服 type: { // exclusive:专属; mine:我的页面客服; pop:弹窗;
type: String, type: String,
default: 'mine' default: 'mine'
} }
...@@ -49,7 +43,7 @@ ...@@ -49,7 +43,7 @@
}, },
computed: { computed: {
cusQrcode() { cusQrcode() {
return process.uniEnv.qn_base_url + (this.isMine ? 'erweima-rk.png' : 'erweima-bn.png') return process.uniEnv.qn_base_url + (this.isMine ? 'erweima-rk.png' : 'dingdanzhushou.png')
}, },
minekefutuImage() { minekefutuImage() {
return process.uniEnv.qn_base_url + this.imageName return process.uniEnv.qn_base_url + this.imageName
...@@ -57,28 +51,51 @@ ...@@ -57,28 +51,51 @@
imageName() { imageName() {
return this.isMine ? 'kefufuwu-n.png' : 'kefutuzs.png' return this.isMine ? 'kefufuwu-n.png' : 'kefutuzs.png'
}, },
isMine() { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服 isMine() { // exclusive:专属; mine:我的页面客服; pop:弹窗;
return this.type == 'mine' return this.type == 'mine'
}, },
isPop() { isExclusive() {
return this.type == 'pop' return this.type == 'exclusive'
}, },
isExclusive() { isPop() {
return this.type == 'exclusive' return this.type == 'pop'
}, },
phoneIcon() { phoneIcon() {
return process.uniEnv.qn_base_url + 'dianhua.png' return process.uniEnv.qn_base_url + 'dianhua.png'
}, },
buttonStyle() { buttonStyle() {
return { return this.isMine ? {
width: "300rpx", 'width': "300rpx",
height: "80rpx", 'height': "80rpx",
"font-size": "32rpx", "font-size": "32rpx",
"font-weight": "bold",
} : {
'width': "400rpx",
'height': "100rpx",
"font-size": "32rpx",
"font-weight": "bold", "font-weight": "bold",
}; };
},
types() {
return ['exclusive', 'pop', 'mine']
},
typeIndex() {
return this.types.indexOf(this.type)
}, },
phone() { phone() {
return '18124099271' return '18124099271'
},
openTypes() {
return ['contact', 'contact', '']
},
buttonText() {
return ['追加','追加','点击下载']
},
titleText() {
return ['添加订单助手', '添加订单助手', '客服微信']
},
tipText() {
return ['在对话框输入“加入”,即可获取二维码,添加订单助手', '在对话框输入“加入”,即可获取二维码,添加订单助手', '下载二维码添加官方客服微信']
} }
}, },
methods: { methods: {
...@@ -89,6 +106,10 @@ ...@@ -89,6 +106,10 @@
}); });
}, },
download() { download() {
if (!this.isMine) {
this.$emit('click')
return
}
let self = this let self = this
uni.downloadFile({ //获得二维码的临时地址 uni.downloadFile({ //获得二维码的临时地址
url: self.cusQrcode, url: self.cusQrcode,
...@@ -145,33 +166,47 @@ ...@@ -145,33 +166,47 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.title-view { .title-view {
font-size: 24rpx; text-align: center;
color: #666666; display: flex;
width: 100%; justify-content: center;
margin-top: 10rpx; align-items: center;
flex-direction: column;
color: #999999;
font-size: 28rpx;
padding-left: 40rpx;
padding-right: 60rpx;
margin-top: 20rpx;
&.is-mine {
display: inline;
font-size: 24rpx;
color: #666666;
width: 100%;
margin-top: 10rpx;
}
.title-text { .title-text {
font-weight: bold; font-weight: bold;
font-size: 32rpx; color: #333333;
color: #333333; font-size: 40rpx;
margin-right: 30rpx; margin: 0 0 30rpx 0;
&.is-mine {
font-size: 32rpx;
margin-right: 30rpx;
}
} }
} }
.qrcode { .qrcode {
margin-top: 60rpx; width: 600rpx;
margin-bottom: 60rpx; height: 440rpx;
width: 400rpx; margin-top: 30rpx;
height: 400rpx; margin-bottom: 40rpx;
&.is-pop {
width: 248rpx; &.is-mine {
height: 248rpx; margin-top: 60rpx;
padding: 24rpx; margin-bottom: 60rpx;
border: 6rpx solid #2272FF; width: 400rpx;
border-radius: 32rpx; height: 400rpx;
margin-top: 10rpx;
margin-bottom: 40rpx;
} }
} }
......
...@@ -216,6 +216,13 @@ ...@@ -216,6 +216,13 @@
"navigationBarTitleText": "",//证件详情 "navigationBarTitleText": "",//证件详情
"navigationStyle":"custom" "navigationStyle":"custom"
} }
},
{
"path": "cert/upload",
"style": {
"navigationBarTitleText": "",//证件上传
"navigationStyle":"custom"
}
}, },
{ {
"path":"contract/index", "path":"contract/index",
......
...@@ -71,12 +71,6 @@ ...@@ -71,12 +71,6 @@
<!-- </TabBarPage> --> <!-- </TabBarPage> -->
</scroll-view> </scroll-view>
</view> </view>
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx" closeable
:mask-close-able="false" close-icon-color="#FFFFFF">
<view class="order-pop-view">
<Customer type="pop" @click="handleDownload"></Customer>
</view>
</u-popup>
</TabBarPage> </TabBarPage>
</template> </template>
...@@ -86,14 +80,12 @@ ...@@ -86,14 +80,12 @@
import NoOrder from "@/components/order/noOrder.vue" import NoOrder from "@/components/order/noOrder.vue"
const app = getApp(); const app = getApp();
import OrderCell from "@/components/order/index.vue"; import OrderCell from "@/components/order/index.vue";
import Customer from "@/components/mine/customer.vue"
export default { export default {
components: { components: {
OrderCell, OrderCell,
TabBarPage, TabBarPage,
NoOrder, NoOrder,
Customer
}, },
data() { data() {
return { return {
...@@ -116,7 +108,6 @@ ...@@ -116,7 +108,6 @@
waitInit: false, // 当token为空时,等待自动登录结束 waitInit: false, // 当token为空时,等待自动登录结束
triggered: false, triggered: false,
_freshing: false, _freshing: false,
visible: false,
scrollTop: 0, scrollTop: 0,
old: { old: {
scrollTop: 0 scrollTop: 0
...@@ -163,10 +154,6 @@ ...@@ -163,10 +154,6 @@
} else { } else {
this.waitInit = true this.waitInit = true
} }
// 第一次入驻成功弹出客服弹窗
if (e && e.visible) {
this.visible = e.visible
}
}, },
onShow() { onShow() {
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
...@@ -403,9 +390,6 @@ ...@@ -403,9 +390,6 @@
url: "/pages/mine/customer/index" + '?type=exclusive', url: "/pages/mine/customer/index" + '?type=exclusive',
}); });
}, },
handleDownload() {
this.visible = false
}
}, },
}; };
</script> </script>
......
<template> <template>
<view class=""> <view class="">
<view class="backView"> <view class="backView">
<view class="login-block" v-if="needAuth"> <view class="login-block" v-if="needAuth">
<u-image class="u-flex u-row-center logo" :src="logo" width="200" height="200"> <u-image class="u-flex u-row-center logo" :src="logo" width="200" height="200">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
<u-image class="u-flex u-row-center logo2" :src="logo2" width="214" height="60"> <u-image class="u-flex u-row-center logo2" :src="logo2" width="214" height="60">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
</view> </view>
<view class="bind-block" v-else> <view class="bind-block" v-else>
<u-image class="u-flex u-row-between logo" :src="logo" width="148" height="148"> <u-image class="u-flex u-row-between logo" :src="logo" width="148" height="148">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view> <view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image> </u-image>
<view class="bind-phone">{{ bindPhone }}</view> <view class="bind-phone">{{ bindPhone }}</view>
<view class="bind-tips">{{ bindTips }}</view> <view class="bind-tips">{{ bindTips }}</view>
</view> </view>
<u-gap height="570"></u-gap> <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">{{ loginTitle }}</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">{{ bindTitle }}</text> <text class="u-font-32 white">{{ bindTitle }}</text>
</button> </button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import util from '@/utils/util.js' import util from '@/utils/util.js'
import login from '@/utils/login.js' import login from '@/utils/login.js'
const app = getApp() const app = getApp()
export default { export default {
data() { data() {
return { return {
qnPath: process.uniEnv.qn_base_url, qnPath: process.uniEnv.qn_base_url,
needAuth: true, needAuth: true,
TimeID: -1, TimeID: -1,
loginTitle: '用户登录', loginTitle: '用户登录',
bindTitle: '立即绑定', bindTitle: '立即绑定',
bindPhone: '绑定手机', bindPhone: '绑定手机',
bindTips: '首次登录的用户需绑定手机才可接单', bindTips: '首次登录的用户需绑定手机才可接单',
} code: ''
}, }
computed: { },
logo() { computed: {
return this.qnPath + 'logo.png' logo() {
}, return this.qnPath + 'logo.png'
logo2() { },
return this.qnPath + 'logo-2.png' logo2() {
}, return this.qnPath + 'logo-2.png'
}, },
onLoad(e) { },
app.trackPage('授权登录页') onLoad(e) {
}, app.trackPage('授权登录页')
onShow() { },
// 微信授权过用户信息,则无需重复授权 onShow() {
if (app.globalData.authUserInfo) { // 微信授权过用户信息,则无需重复授权
this.needAuth = false if (app.globalData.authUserInfo) {
} this.needAuth = false
}, }
methods: { this.getCode()
// 微信授权用户信息 },
getUserProfile() { methods: {
var that = this async getCode() {
if(uni.getUserProfile) { login.appLogin().then(res => {
// 每次触发 uni.getUserProfile 均会弹出授权窗口,用户授权后可成功获取用户信息 this.code = res.code
uni.getUserProfile({ })
desc: '用于授权登录', },
success: function (res) { // 微信授权用户信息
const userInfo = res.userInfo; getUserProfile() {
app.globalData.authUserInfo = userInfo var that = this
app.globalData.authUserInfo.nickName = app.globalData.authUserInfo.nickName || '' if(uni.getUserProfile) {
app.globalData.authUserInfo.avatarUrl = app.globalData.authUserInfo.avatarUrl || '' // 每次触发 uni.getUserProfile 均会弹出授权窗口,用户授权后可成功获取用户信息
uni.showLoading({ uni.getUserProfile({
title: '授权中..', desc: '用于授权登录',
mask: true success: function (res) {
}); const userInfo = res.userInfo;
if (getApp().globalData.logout) { app.globalData.authUserInfo = userInfo
uni.hideLoading() app.globalData.authUserInfo.nickName = app.globalData.authUserInfo.nickName || ''
that.setLoginStatus() app.globalData.authUserInfo.avatarUrl = app.globalData.authUserInfo.avatarUrl || ''
} else { uni.showLoading({
that.authLogin() title: '授权中..',
} mask: true
}, });
fail: function (res) { if (getApp().globalData.logout) {
uni.showModal({ uni.hideLoading()
title: '授权失败', that.setLoginStatus()
content: '请允许获取用户信息的授权', } else {
showCancel: false that.authLogin()
}); }
} },
}) fail: function (res) {
} else { uni.showModal({
// 可能由于账号配置,或者其他原因导致无法调起微信用户授权 title: '授权失败',
uni.showModal({ content: '请允许获取用户信息的授权',
title: '授权失败', showCancel: false
content: '请确认你的用户授权是否可用', });
showCancel: false }
}); })
} } else {
}, // 可能由于账号配置,或者其他原因导致无法调起微信用户授权
authLogin() { uni.showModal({
var that = this title: '授权失败',
let params = { content: '请确认你的用户授权是否可用',
nickname: app.globalData.authUserInfo.nickName, showCancel: false
avatar: app.globalData.authUserInfo.avatarUrl, });
} }
login.appLogin().then(res => { },
params.code = res.code authLogin() {
return login.authorization(params); var that = this
}).then(res => { let params = {
uni.hideLoading(); nickname: app.globalData.authUserInfo.nickName,
if (res && res.code == 200 && res.data && res.data.token) { avatar: app.globalData.authUserInfo.avatarUrl,
app.setUserData(res.data, that) }
that.goBackPage() login.appLogin().then(res => {
} else { params.code = res.code
that.setLoginStatus() return login.authorization(params);
} }).then(res => {
}).catch(res => { uni.hideLoading();
uni.hideLoading() if (res && res.code == 200 && res.data && res.data.token) {
that.setLoginStatus() app.setUserData(res.data, that)
}) that.goBackPage()
}, } else {
that.setLoginStatus()
signupLogin(e) { }
var that = this }).catch(res => {
if(e && e.detail) { uni.hideLoading()
if(e.detail.errMsg.indexOf('user deny') > -1) { that.setLoginStatus()
uni.showModal({ })
title: '提示', },
showCancel: false,
content: '用户未授权不能完成注册' signupLogin(e) {
}); var that = this
} else if(e.detail.encryptedData && e.detail.iv) { if(e && e.detail) {
let params = { if(e.detail.errMsg.indexOf('user deny') > -1) {
nickname: app.globalData.authUserInfo.nickName, uni.showModal({
avatar: app.globalData.authUserInfo.avatarUrl, title: '提示',
encryptedData: e.detail.encryptedData, showCancel: false,
iv: e.detail.iv, content: '用户未授权不能完成注册'
} });
login.appLogin().then(res => { } else if(e.detail.encryptedData && e.detail.iv) {
params.code = res.code let params = {
return login.signup(params); nickname: app.globalData.authUserInfo.nickName,
}).then(res => { avatar: app.globalData.authUserInfo.avatarUrl,
uni.hideLoading() encryptedData: e.detail.encryptedData,
if (res) { iv: e.detail.iv,
app.setUserData(res.data, that) }
app.getBaseInfo(that) if (that.code) {
that.goBackPage() uni.checkSession({
} else { success () {
uni.showToast({ //session_key 未过期,并且在本生命周期一直有效
title: '授权失败,请重新授权', params.code = that.code
icon: 'none' login.signup(params).then(res => {
}); uni.hideLoading()
this.setLoginStatus(false) if (res) {
} app.setUserData(res.data, that)
}).catch(res => { app.getBaseInfo(that)
uni.hideLoading() that.goBackPage()
this.setLoginStatus(false) } else {
}) uni.showToast({
} else { title: '授权失败,请重新授权',
uni.showModal({ icon: 'none'
title: '提示', });
showCancel: false, this.setLoginStatus(false)
content: e.detail.errMsg }
}); }).catch(res => {
} uni.hideLoading()
} else { this.setLoginStatus(false)
uni.showModal({ })
title: '提示', },
showCancel: false, fail () {
content: '授权失败,请重新授权' // session_key 已经失效,需要重新执行登录流程
}); that.toLogin(params)
} }
}, })
} else {
goBackPage() { this.toLogin(params)
let pages = getCurrentPages(); }
if(pages.length) { } else {
let index = pages.length - 1; uni.showModal({
if(index) { title: '提示',
let prevPage = pages[index]; //上一个页面 showCancel: false,
if (prevPage && prevPage.$vm) { content: e.detail.errMsg
prevPage.$vm.isRefresh = true; });
} }
uni.navigateBack({ } else {
delta: 1 uni.showModal({
}) title: '提示',
} else { showCancel: false,
uni.redirectTo({ content: '授权失败,请重新授权'
url:'pages/index/index' });
}) }
} },
} else { toLogin(params) {
uni.reLaunch({ login.appLogin().then(res => {
url: "pages/index/mine" params.code = res.code
}) console.log("params3", params)
} return login.signup(params);
}).then(res => {
}, uni.hideLoading()
setLoginStatus(authed = true) { if (res) {
getApp().globalData.logout = false app.setUserData(res.data, this)
if (authed) { app.getBaseInfo(this)
this.needAuth = false this.goBackPage()
uni.setNavigationBarTitle({ } else {
title: '登录页' uni.showToast({
}); title: '授权失败,请重新授权',
} else { icon: 'none'
if(!app.globalData.authUserInfo) { });
this.needAuth = true this.setLoginStatus(false)
uni.setNavigationBarTitle({ }
title: '授权页' }).catch(res => {
}); uni.hideLoading()
} this.setLoginStatus(false)
} })
}, },
goBackPage() {
//取消点击 let pages = getCurrentPages();
cancelClick: function () { if(pages.length) {
uni.navigateBack({}) let index = pages.length - 1;
}, if(index) {
} let prevPage = pages[index]; //上一个页面
} if (prevPage && prevPage.$vm) {
</script> prevPage.$vm.isRefresh = true;
}
<style lang="scss" scoped> uni.navigateBack({
.backView { delta: 1
background-color: #FFFFFF; })
position: absolute; } else {
top: 0; uni.redirectTo({
left: 0; url:'pages/index/index'
width: 100%; })
height: 100%; }
} else {
.login-block { uni.reLaunch({
margin-top: 240rpx; url: "pages/index/mine"
} })
.bind-block { }
margin-top: 202rpx;
margin-left: 50rpx; },
.bind-phone { setLoginStatus(authed = true) {
font-size: 52rpx; getApp().globalData.logout = false
margin-top: 48rpx; this.code = ''
font-weight: bold; if (authed) {
color: #333333; this.needAuth = false
line-height: 52rpx; uni.setNavigationBarTitle({
margin-left: 10rpx; title: '登录页'
} });
.bind-tips { } else {
margin: 24rpx 60rpx 14rpx 10rpx; if(!app.globalData.authUserInfo) {
font-size: 28rpx; this.needAuth = true
font-weight: 400; uni.setNavigationBarTitle({
color: #999999; title: '授权页'
line-height: 40rpx; });
} }
} }
} },
.logo2 {
margin-top: 28rpx; //取消点击
} cancelClick: function () {
uni.navigateBack({})
.noticeView { },
background-color: #FFFFFF; }
width: 100%; }
height: 470rpx; </script>
display: flex;
flex-direction: column; <style lang="scss" scoped>
align-items: center; .backView {
} background-color: #FFFFFF;
position: absolute;
.noticeImage { top: 0;
background-color: #FFFFFF; left: 0;
width: 386rpx; width: 100%;
height: 270rpx; height: 100%;
margin-top: 180rpx;
} .login-block {
margin-top: 240rpx;
.noticeTitleView { }
margin-top: 80rpx; .bind-block {
width: 100%; margin-top: 202rpx;
display: flex; margin-left: 50rpx;
align-items: center; .bind-phone {
justify-content: center; font-size: 52rpx;
} margin-top: 48rpx;
font-weight: bold;
.noticeTitle { color: #333333;
width: 60%; line-height: 52rpx;
font-size: 24rpx; margin-left: 10rpx;
color: #999999; }
text-align: center; .bind-tips {
line-height: 40rpx; margin: 24rpx 60rpx 14rpx 10rpx;
} font-size: 28rpx;
font-weight: 400;
.loginBtn { color: #999999;
background-color: #2272FF; line-height: 40rpx;
font-size: 32rpx; }
font-weight: 600; }
color: #FFFFFF; }
line-height: 104px; .logo2 {
width: 600rpx; margin-top: 28rpx;
height: 104rpx; }
border-radius: 52rpx;
display: flex; .noticeView {
align-items: center; background-color: #FFFFFF;
justify-content: center; width: 100%;
} height: 470rpx;
display: flex;
.cancelView { flex-direction: column;
width: 100%; align-items: center;
margin-top: 30rpx; }
display: flex;
align-items: center; .noticeImage {
justify-content: center; background-color: #FFFFFF;
} width: 386rpx;
height: 270rpx;
.cancelText { margin-top: 180rpx;
color: #666666; }
font-size: 32rpx;
} .noticeTitleView {
margin-top: 80rpx;
.white { width: 100%;
color: #FFFFFF; display: flex;
} align-items: center;
justify-content: center;
</style> }
.noticeTitle {
width: 60%;
font-size: 24rpx;
color: #999999;
text-align: center;
line-height: 40rpx;
}
.loginBtn {
background-color: #2272FF;
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;
}
.cancelView {
width: 100%;
margin-top: 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
.cancelText {
color: #666666;
font-size: 32rpx;
}
.white {
color: #FFFFFF;
}
</style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
></u-navbar> ></u-navbar>
<view class="content-cody"> <view class="content-cody">
<view class="title">{{ info.type }}</view> <view class="title">{{ info.type }}</view>
<view class="content" v-for="item in info.url"><image :src="item" mode=""></image></view> <view class="content" v-for="item in info.url"><image :src="item" mode="aspectFit"></image></view>
</view> </view>
</view> </view>
</template> </template>
......
...@@ -102,10 +102,7 @@ ...@@ -102,10 +102,7 @@
this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999"; this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999";
this.list[key].data = getData; this.list[key].data = getData;
} }
console.log(this.list);
console.log(res);
}).catch((err) => { }).catch((err) => {
console.log(err);
}); });
}, },
methods: { methods: {
...@@ -115,14 +112,17 @@ ...@@ -115,14 +112,17 @@
toDetail(key) { toDetail(key) {
let data = this.list[key].data; let data = this.list[key].data;
if(data.status != 1){ if(data.status != 1){
return; wx.navigateTo({
url: '/pages/mine/cert/upload?type=' + data.type_key
});
}else{
wx.navigateTo({
url: '/pages/mine/cert/detail',
success: function(res) {
res.eventChannel.emit('acceptDataFromCert', data)
}
});
} }
wx.navigateTo({
url: '/pages/mine/cert/detail',
success: function(res) {
res.eventChannel.emit('acceptDataFromCert', data)
}
});
} }
} }
} }
......
<template>
<view class="cert-page">
<view>
<u-navbar back-icon-color="#000000" :background="background" title-color="#000" :border-bottom="false"
title="证件上传" title-bold="true"></u-navbar>
</view>
<view class="content-body">
<view class="notice-top">
请上传您的:<text class="right">{{ imgList[key].typeName }}</text>
</view>
<view class="notice-two">
请点击上传图片,图片大小不大于3M
</view>
<view class="upload-container">
<view class="img-container" v-for="(item, index) in imgList[key].desc"
:class="{'u-margin-left-30': index>0}" :key="index">
<image class="upload-img" @click="handleClick(type, index)" :src="imgs[index]" mode="aspectFill">
</image>
<text class="img-desc">{{ item }}</text>
</view>
</view>
<view class="notice-bottom">
<image :src="icon" class="icon"></image>
<text class="u-padding-left-10">若无需上传证件反面照,则点击上传正面照即可</text>
</view>
<view class="button-container">
<view class="submit-button" :class="{'is-ok': isOk}" @click="submitCert()">提交</view>
</view>
</view>
</view>
</template>
<script>
import base from '@/components/upload/index';
export default {
mixins: [base],
data() {
return {
icon: process.uniEnv.qn_base_url + "tishi.png",
categories: [],
param: {
url: []
},
key: null,
type: null,
isOk: false,
imgs: [
process.uniEnv.qn_base_url + "sahgnchuanzhaopian.png",
process.uniEnv.qn_base_url + "sahgnchuanzhaopian.png",
],
imgList: [{
typeKey: 'id_card',
typeName: '身份证',
desc: ['上传身份证人像面', '上传身份证国徽面'],
maxImgs: 2
},
{
typeKey: 'electrician_certificate',
typeName: '电工证',
desc: ['上传电工证照片', '无需上传反面照'],
maxImgs: 1
},
{
typeKey: 'driver_license',
typeName: '驾驶证',
desc: ['上传驾驶证照片', '无需上传反面照'],
maxImgs: 1
},
{
typeKey: 'driving_license',
typeName: '行驶证',
desc: ['上传行驶证照片', '无需上传反面照'],
maxImgs: 1
},
{
typeKey: 'vehicle',
typeName: '车辆照',
desc: ['车辆正面/看到车牌', '车辆侧面/看到外观'],
maxImgs: 2
},
{
typeKey: 'high_sky_license',
typeName: '高空证',
desc: ['上传高空证照片', '无需上传反面照'],
maxImgs: 1
},
{
typeKey: 'refrigeration_license',
typeName: '制冷证',
desc: ['上传制冷证照片', '无需上传反面照'],
maxImgs: 1
},
{
typeKey: 'business_license',
typeName: '营业执照',
desc: ['上传营业执照照片', '无需上传反面照'],
maxImgs: 1
}
],
}
},
onLoad(param) {
this.type = param.type
this.key = this.getListKey(this.type);
},
methods: {
getListKey(typeKey) {
let length = this.imgList.length
for (let i = 0; i < length; i++) {
if (this.imgList[i].typeKey == typeKey) {
return i
}
}
},
async handleClick(certType, key) {
if (this.imgList[this.key].desc[key] == '无需上传反面照') {
uni.showToast({
icon: "none",
title: this.imgList[this.key].desc[key],
});
return
}
let self = this
self.uploadType = certType || ''
let attr = {
category: self.categories[1]
}
if (certType == 'id_card_front') {
attr = {
category: self.categories[2]
}
}
let src = await self.chooseImg({
count: 1
})
self.imgs[key] = src[0].path;
self.param.url[key] = src[0].key;
if(self.param.url.length == this.imgList[this.key].maxImgs){
this.isOk = true;
}else{
this.isOk = false;
}
},
submitCert() {
if(!this.isOk){
return;
}
this.param.url = this.param.url.toString();
this.param.type = this.type;
this.$u.api.submitCert(this.param)
.then((res) => {
if(res.status != 200){
uni.showToast({
icon: "none",
title: res.message,
});
}
wx.redirectTo({
url: '/pages/mine/cert/index'
});
})
.catch((err) => {
console.log(err);
});
}
}
}
</script>
<style>
page {
background: #F4F5F7;
}
.cert-page {
height: 70vh;
margin: 20rpx 30rpx 0rpx;
}
.content-body {
padding: 40rpx 30rpx 60rpx;
background-color: #FFF;
border-radius: 12rpx;
}
.notice-top {
width: 290rpx;
height: 32rpx;
font-size: 32rpx;
font-family: PingFang-SC-Bold, PingFang-SC;
font-weight: bold;
color: #333333;
line-height: 32rpx;
}
.right {
color: #2272FF;
}
.notice-two {
height: 28rpx;
font-size: 24rpx;
font-family: PingFang-SC-Regular, PingFang-SC;
font-weight: 400;
color: #666666;
line-height: 28rpx;
margin-top: 18rpx;
}
.notice-bottom {
height: 20rpx;
font-size: 20rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999999;
line-height: 20rpx;
margin-top: 30rpx;
display: flex;
}
.submit-button {
width: 400rpx;
height: 104rpx;
background: #D1D4D4;
border-radius: 52rpx;
margin-top: 250rpx;
text-align: center;
line-height: 104rpx;
display: inline-block;
color: #FFFFFF;
font-weight: bold;
font-size: 32rpx;
}
.is-ok {
background: #2272FF;
}
.button-container {
text-align: center;
}
.upload-container {
display: flex;
}
.upload-img {
margin-top: 30rpx;
width: 300rpx;
height: 226rpx;
}
.two {
margin-left: 30rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
}
.img-container {
position: relative;
}
.img-desc {
position: absolute;
bottom: 10rpx;
left: 0;
font-size: 20rpx;
color: #c5bfbf;
font-weight: 400;
line-height: 28px;
text-align: center;
width: 100%;
}
</style>
...@@ -7,17 +7,23 @@ ...@@ -7,17 +7,23 @@
:border-bottom="false" :border-bottom="false"
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<text class="title">合同清单</text> <view v-if="res.length > 0">
<view <text class="title">合同清单</text>
class="jf-currency-class" <view
v-for="item in res" class="jf-currency-class"
:key="item.id" v-for="item in res"
@click="goBaidu(item.url)" :key="item.id"
> @click="goBaidu(item.url)"
<view class="left">{{ item.name }}</view> >
<view class="text1">《{{ item.name }}》</view> <view class="left">{{ item.name }}</view>
<view class="text2">下载时间: {{ item.create_at }}</view> <view class="text1">《{{ item.name }}》</view>
</view> <view class="text2">下载时间: {{ item.create_at }}</view>
</view>
</view>
<view v-else class="no-contract">
<image :src="zanwuhetonImage" class="no-contract-image"></image>
<text>当前暂无合同</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -37,7 +43,11 @@ export default { ...@@ -37,7 +43,11 @@ export default {
getApp().trackPage('我的合同列表页') getApp().trackPage('我的合同列表页')
this.getContract(this.type); this.getContract(this.type);
}, },
computed: {}, computed: {
zanwuhetonImage() {
return process.uniEnv.qn_base_url + 'zanwuheton.png'
},
},
methods: { methods: {
getContract(params) { getContract(params) {
this.$u.api.Mycontract(params).then((res) => { this.$u.api.Mycontract(params).then((res) => {
...@@ -141,4 +151,20 @@ export default { ...@@ -141,4 +151,20 @@ export default {
height: 100%; height: 100%;
position: absolute; position: absolute;
} }
.no-contract {
color: #999999;
text-align: center;
margin-top: 240rpx;
font-weight: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.no-contract-image {
width: 374rpx;
height: 254rpx;
margin-bottom: 50rpx;
}
}
</style> </style>
\ No newline at end of file
...@@ -167,7 +167,10 @@ ...@@ -167,7 +167,10 @@
async loadStatement() { async loadStatement() {
let self = this let self = this
self.loading = true self.loading = true
let res = await self.$u.api.listStatement() let res = await self.$u.api.listStatement({
starDate: this.moment(new Date()).startOf('month').format('YYYY-MM-DD'),
endDate:this.moment(new Date()).endOf('month').format('YYYY-MM-DD')
})
self.loading = false self.loading = false
if(res && res.code == 200) { if(res && res.code == 200) {
let data = res.data && res.data.orderList || [] let data = res.data && res.data.orderList || []
......
...@@ -181,7 +181,13 @@ ...@@ -181,7 +181,13 @@
</view> </view>
</view> </view>
<take-photo type="test" v-if="takeStatus" @close="closeTake" :upload="false" :num="1"></take-photo> <take-photo type="test" v-if="takeStatus" @close="closeTake" :upload="false" :num="1"></take-photo>
<PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visibale" @click="handleClick"/> <!-- <PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visible" @click="handleClick"/> -->
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx"
:mask-close-able="false" close-icon-color="#FFFFFF">
<view class="order-pop-view">
<Customer type="pop" @click="handleDownload"></Customer>
</view>
</u-popup>
</template> </template>
</view> </view>
</template> </template>
...@@ -189,14 +195,17 @@ ...@@ -189,14 +195,17 @@
<script> <script>
import appointTime from '@/components/appoint/appoint-time.vue' import appointTime from '@/components/appoint/appoint-time.vue'
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue" // import PopView from "@/components/popView/index.vue"
import baseFile from '@/components/upload/index' import baseFile from '@/components/upload/index'
import Customer from "@/components/mine/customer.vue"
let now = new Date(new Date().toLocaleDateString()).getTime(); let now = new Date(new Date().toLocaleDateString()).getTime();
export default { export default {
components: { components: {
appointTime, appointTime,
'take-photo': takePhoto, 'take-photo': takePhoto,
PopView // PopView,
Customer
}, },
mixins: [baseFile], mixins: [baseFile],
data() { data() {
...@@ -232,7 +241,7 @@ ...@@ -232,7 +241,7 @@
// backgroundSize: 'cover', // backgroundSize: 'cover',
// 渐变色 // 渐变色
}, },
visibale: false, visible: false,
orderId: null, orderId: null,
order: {}, order: {},
allowRejection: false, // 允许拒单 allowRejection: false, // 允许拒单
...@@ -440,7 +449,7 @@ ...@@ -440,7 +449,7 @@
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
} }
if(self.order.isFirstOrder){ if(self.order.isFirstOrder){
this.visibale = true this.visible = true
} }
// 格式化时间 // 格式化时间
this.settlementInfo.formatTime = this.order.settleCenterSyncDatetime ? this.$u.timeFormat(this.order.settleCenterSyncDatetime, 'yyyy.mm.dd hh:MM:ss') : '-' this.settlementInfo.formatTime = this.order.settleCenterSyncDatetime ? this.$u.timeFormat(this.order.settleCenterSyncDatetime, 'yyyy.mm.dd hh:MM:ss') : '-'
...@@ -845,12 +854,16 @@ ...@@ -845,12 +854,16 @@
this.$refs['uCountDown'].seconds += 2 this.$refs['uCountDown'].seconds += 2
} }
}, },
handleClick(){ // handleClick(){
this.visibale = false // this.visible = false
// 交互规范 // // 交互规范
uni.switchTab({ // uni.switchTab({
url: 'pages/index/learn' // url: 'pages/index/learn'
}) // })
// },
handleDownload() {
this.visible = false
// 添加客服
}, },
threeDays() { threeDays() {
return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3 return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
statusName: '已支付保证金', statusName: '已支付保证金',
txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"], txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"],
btnTxt: '去首页', btnTxt: '去首页',
url: '/pages/index/index?visible=1' url: '/pages/index/index'
}], }],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: '', status: '',
......
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