Commit 99704795 authored by 郭晓清's avatar 郭晓清
parents cfbe9215 dba883c7
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.16.0",
"appid": "wx402a711597dddbaf",
"projectname": "miniprogram-1",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"isGameTourist": false,
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
}
}
......@@ -145,8 +145,12 @@ export default {
wxAppNo: that.globalData.wxAppNo, // 自营平台小程序
};
let result = await that.$u.api.loginWechatAuth(params)
if (result && result.code == 200 && result.data) {
if (result && result.code == 200 && result.data && result.data.token) {
that.setUserData(result.data);
} else {
uni.navigateTo({
url: "pages/login/index"
})
}
} else {
uni.showModal({
......@@ -159,8 +163,8 @@ export default {
setUserData(userInfo) {
if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息
this.$u.vuex('vuex_token',userInfo.token);
this.$u.vuex('vuex_token',"RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5");
this.$u.vuex('vuex_token',userInfo.token);
this.$u.vuex('vuex_token',"RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5");
this.$u.vuex('vuex_user', userInfo);
this.$u.vuex('vuex_wx_uid', userInfo.wxopenid);
} else {
......
......@@ -110,6 +110,15 @@ let orderApiFun = function(vm){
* 保存售后记录
*/
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 outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, {'content-type': 'application/x-www-form-urlencoded'});
const orderApi = {
listByRecommendOrder,
......@@ -134,7 +143,9 @@ let orderApiFun = function(vm){
getSignDistance,
getCompleteConfigAndData,
getMeasure,
saveCompleteData
saveCompleteData,
inOrderFinish,
outOrderFinish
}
return orderApi
}
......
<!-- 完工校验弹窗 -->
<template>
<view>
<u-popup
v-model="open"
:mask-close-able="false"
border-radius="12"
ref="checkPopup"
mode="center"
width="690rpx">
<view class="slot-content">
<view class="check-status">
<u-image width="224rpx" height="224rpx" :src="statusImage"></u-image>
<text :class="['status-txt', { 'pass-color': pass }]">{{statusTxt}}</text>
</view>
<view class="check-list">
<view class="u-flex u-row-between list-title">
<view class="left-txt">验证项</view>
<view>已提交/需提交</view>
<view class="right-txt">结果</view>
</view>
<view class="u-flex u-row-between list-item"
v-for="(item, index) in listData" :key="index">
<view class="item-txt left-txt" style="width: 160rpx;text-align: left;">
<u-icon
:name="item.pass ? passIcon : noPassIcon"
:label="item.label"
margin-left="12"
label-color="#333333"
label-size="28"
size="32"></u-icon>
</view>
<view class="item-txt">{{item.submitted}}/{{item.required}}</view>
<view
:class="['item-txt', 'right-txt', item.pass ? 'pass-color' : 'no-pass-color']"
style="width: 160rpx;text-align: right;">
{{item.pass ? "通过" : "未通过"}}
</view>
</view>
</view>
<view class="check-bottom">
<view class="button cancel" v-show="!pass" @tap="cancel">取消</view>
<view class="button confirm" @tap="confirm">{{confirmText}}</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
/**
* modal 完工校验模态框
* @description 完工校验模态框,用于完工信息检查和提醒
* @property {Boolean} show 是否显示模态框
* @property {Boolean} pass 是否通过校验
* @property {Array} listData 完工信息项
* @event {Function} close 取消按钮被点击
* @event {Function} handle 去处理按钮被点击
* @event {Function} confirm 确认按钮被点击
* @example <u-modal :src="title" :content="content"></u-modal>
*/
export default {
name:"complete-check",
props: {
show: {
type: Boolean,
default: false
},
pass: {
type: Boolean,
default: false
},
listData: {
type: Array,
default(){
return [
{label: '基本信息', submitted: 3, required: 3, pass: true},
{label: '勘察信息', submitted: 20, required: 20, pass: true},
{label: '安装信息', submitted: 15, required: 20, pass: false}
]
}
}
},
data() {
return {
open: this.show
};
},
watch: {
// 如果是异步关闭时,外部修改v-model的值为false时,重置内部的loading状态
// 避免下次打开的时候,状态混乱
show(n) {
this.open = n
}
},
computed: {
statusImage() {
if(this.pass) {
return process.uniEnv.qn_base_url + 'successful.png'
} else {
return process.uniEnv.qn_base_url + 'failure.png'
}
},
statusTxt() {
return this.pass ? "完工校验已通过" : "完工校验未通过"
},
confirmText() {
return this.pass ? "确定" : "去处理"
},
passIcon() { return process.uniEnv.qn_base_url + 'icon/pass.png'},
noPassIcon() { return process.uniEnv.qn_base_url + 'icon/no-pass.png'},
},
methods: {
cancel() {
this.$emit('close')
},
confirm() {
if(this.pass) {
this.$emit('confirm')
} else {
let data = this.listData.find((item, index) => {
return item.pass == false;
})
this.$emit('handle', data)
}
}
},
}
</script>
<style lang="scss">
.slot-content {
padding: 40rpx 30rpx 0rpx 30rpx;
.check-status {
margin-bottom: 50rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.status-txt {
height: 46rpx;
font-size: 40rpx;
font-weight: bold;
color: #FA5A49;
line-height: 46rpx;
}
}
.check-list {
padding-top: 40rpx;
border-top: 2rpx solid #F4F5F7;
.list-title {
height: 28rpx;
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 28rpx;
margin-bottom: 42rpx;
}
.list-item {
margin-bottom: 40rpx;
}
}
.check-bottom {
display: flex;
justify-content: center;
align-items: center;
.button {
text-align: center;
height: 104rpx;
width: 300rpx;
border-radius: 52rpx;
font-size: 32rpx;
font-weight: 600;
line-height: 104rpx;
}
.cancel {
margin: 36rpx 15rpx 52rpx 30rpx;
border: 2px solid #2272FF;
color: #2272FF;
}
.confirm {
margin: 36rpx 30rpx 52rpx 15rpx;
background: #2272FF;
color: #FFFFFF;
}
}
}
.item-txt {
height: 32rpx;
font-size: 28rpx;
font-weight: 500;
color: #333333;
line-height: 32rpx;
}
.left-txt {
width: 160rpx;
text-align: left;
}
.right-txt {
width: 160rpx;
text-align: right;
}
.pass-color {
color: #2272FF !important;
}
.no-pass-color {
color: #FA5A49 !important;;
}
</style>
......@@ -7,14 +7,14 @@
</view> -->
<view class="pics u-flex u-flex-wrap">
<view class="img-list" v-for="(item,index) in imgList" :key="index">
<u-image class="pic" width="170" height="170" :src="item.path" @click.stop="prviewImage(item.path,index)"></u-image>
<u-image class="pic" width="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image>
<view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view>
<view class="icon-del rotate"></view>
</view>
</view>
<view class="img-list">
<u-image class="pic" width="170rpx" height="170" @click="selectUpload" src="https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"></u-image>
<u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image>
</view>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
</view>
......@@ -36,7 +36,7 @@
},
filters:{},
data() {
return {
return {
maskShow:false,
list: [
{
......@@ -52,7 +52,10 @@
computed: {
settings() {
return this.item.settings || []
}
},
uploadImage() {
return process.uniEnv.qn_base_url + 'upload-file.png'
},
},
watch: {
'takeStatus': function(val, oldVal){
......@@ -135,20 +138,22 @@
}
</script>
<style lang="scss" scoped>
.pic{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
.img-list {
position: relative;
margin: 8rpx;
border: 1px solid #eee;
width: 170rpx;
height: 170rpx;
width: 160rpx;
height: 160rpx;
.pic{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
.icon-del-box {
/* #ifndef APP-NVUE */
display: flex;
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :border="true" placeholder="请输入" />
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false" :border="border"/>
</view>
</template>
......@@ -11,7 +12,16 @@
name: 'XhInput', // 新建 input
components: {},
mixins: [stringMixin],
props: {},
props: {
placeholder: {
type: String,
default: '请输入'
},
width: { // 例如:454rpx
type: String,
default: '100%'
}
},
data() {
return {}
},
......@@ -22,6 +32,29 @@
} else {
return 'text'
}
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx'
},
customStyle() {
return {
'background-color': this.backgroundColor,
'border-radius': '12rpx',
'color': '#333333',
'padding-left': this.textarea ? '0rpx' : '20rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
}
},
border() {
return this.textarea
},
textarea() {
return this.type == 'textarea'
},
backgroundColor() {
return this.textarea ? '#FFFFFF' : '#F4F5F7'
}
},
watch: {},
......
......@@ -80,6 +80,7 @@
}
.location {
background: #F4F5F7;
padding: 10rpx;
padding: 10rpx 20rpx;
border-radius: 12rpx;
}
</style>
<!-- ******************* 单个下拉选择 ******************* -->
<template>
<view>
<u-input :value="text" readOnly @click="show=true" type="select" />
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback"></u-action-sheet>
<view class="xh-select">
<u-input :value="text" readOnly @click="show=true" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false"></u-input>
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback" safe-area-inset-bottom></u-action-sheet>
<u-icon class="input-icon" :name="show ? 'arrow-up' : 'arrow-down'"></u-icon>
</view>
</template>
......@@ -12,7 +15,16 @@
name: 'XhSelect',
components: {},
mixins: [stringMixin],
props: {},
props: {
placeholder: {
type: String,
default: '请选择'
},
width: { // 例如:454rpx
type: String,
default: '100%'
}
},
data() {
return {
show: false
......@@ -32,7 +44,9 @@
result = settings.map(item => {
return {
text: item.label,
id: item.key
id: item.key,
color: '#333333',
fontSize: 26
}
})
return result
......@@ -40,6 +54,21 @@
text(){
let option = this.item.fieldsOptions.find(a=>{return a.key === this.dataValue})
return option?option.label:''
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx'
},
customStyle() {
return {
'background-color': '#F4F5F7',
'border-radius': '12rpx',
'color': '#333333',
'padding-left': '20rpx',
'padding-right': '60rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
}
}
},
watch: {},
......@@ -54,5 +83,15 @@
}
</script>
<style>
<style lang="scss" scoped>
.xh-select {
position: relative;
.input-icon {
position: absolute;
right: 20rpx;
top: 26rpx;
color: #2272FF;
}
}
</style>
......@@ -125,8 +125,8 @@
}
},
showCountTime() {
return [1, 2, 3].indexOf(this.orderType) != -1 || (this.orderType == 0 && this.orderData
.orderBusinessType != 'R')
return ([1, 2, 3].indexOf(this.orderType) != -1 || (this.orderType == 0 && this.orderData
.orderBusinessType != 'R')) && this.orderData.currentOverTime
},
showTime() {
return [4, 5, 6].indexOf(this.orderType) != -1
......@@ -309,7 +309,8 @@
color: #FFFFFF;
border-radius: 8rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
font-size: 22rpx;
line-height: 42rpx;
&.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF);
}
......
......@@ -36,7 +36,7 @@
.no-order-image {
width: 374rpx;
height: 218rpx;
margin-top: 60rpx;
margin-top: 50rpx;
margin-bottom: 20rpx;
}
}
......
......@@ -162,7 +162,6 @@
}
},
fail(e) {
debugger
}
})
}
......
......@@ -32,10 +32,10 @@
<style lang="scss" scoped>
.content {
height: 100vh;
// height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
overflow-y: auto;
// overflow-y: auto;
&.fixed {
height: 100vh;
display: flex;
......
<template>
<TabBarPage title="充电桩自营平台">
<scroll-view scroll-y style="margin-bottom: 20rpx;height: 100vh;" @scrolltolower="reachBottom"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort">
<TabBarPage title="充电桩自营平台">
<image class="banner-image" :src="bannerImage"></image>
<view class="msg-view">
......@@ -62,7 +66,8 @@
<view class="bottom-text">我也是有底线哒</view>
<view class="bottom-line-view"></view>
</view>
</TabBarPage>
</TabBarPage>
</scroll-view>
</template>
<script>
......@@ -95,7 +100,9 @@
token: "",
pageNumber: 0,
pageSize: 100,
},
},
triggered: false,
_freshing: false,
};
},
watch: {
......@@ -131,7 +138,8 @@
return process.uniEnv.qn_base_url + 'weiruzhu.png'
},
},
onLoad() {
onLoad() {
this._freshing = false;
this.getOrderCount()
},
onShow() {
......@@ -140,17 +148,17 @@
this.initSettleInfo();
}
},
onPullDownRefresh() {
console.log('------下拉刷新------')
// 下拉刷洗
this.initSettleInfo()
},
onReachBottom() {
console.log('----------底部-------------', this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
},
// onPullDownRefresh() {
// console.log('------下拉刷新------')
// // 下拉刷洗
// this.initSettleInfo()
// },
// onReachBottom() {
// console.log('----------底部-------------', this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
// onPageScroll(obj) {
// console.log('---------scroll---------', obj)
// },
......@@ -212,6 +220,8 @@
self.$u.api.listByRecommendOrder(self.search).then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新
self.loadedOrder = true
self.triggered = false;
self._freshing = false;
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
// if (res.data.list) {
// if (res.data.list.length == 0 && res.data.total > 0) {
......@@ -262,12 +272,27 @@
onRestore() {
this.triggered = "restore";
},
// reachBottom() {
// console.log(this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
reachBottom() {
console.log(this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
},
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
this.initSettleInfo()
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
},
// clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
......@@ -342,7 +367,7 @@
.banner-image {
width: 730rpx;
height: 280rpx;
margin-left: -14rpx;
margin-left: -16rpx;
}
.msg-view {
......@@ -468,7 +493,6 @@
.order-item-view {
background-color: #F4F5F7;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
}
}
......
......@@ -9,13 +9,26 @@
:current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"
style="height: 755rpx;">
style="height: 755rpx;padding-top: 30rpx;">
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="standard" @click="goToPrint">
<text>充电桩交付规范</text>
<text>></text>
<view class="currency-class" :style="{'background-image':'url(/static/photo/jianbian@3x.png)'}">
<view class="class1" @click=ccc(courselist[0].id)>
<image class="img" :src="rule.pic" mode=""></image>
<view class="right u-margin-left-30 u-padding-top-10 u-padding-bottom-14 width-360">
<view class="u-font-32 font-bold">
充电桩交付规范
</view>
<view class="u-font-24">
请点击学习
</view>
</view>
<view class="line-percent">
<text class="font-default-color">去查看</text>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
......@@ -199,6 +212,9 @@
start: 0,
},
list: [],
rule: {
pic: process.uniEnv.qn_base_url + "guifan1@3x.png"
},
courselist: [{
title: '服务规范',
desc: '为用户提供更好服务,自己赚更多钱',
......@@ -473,14 +489,12 @@
console.log(that.exam);
if (res.data.examStatus == 2) {
console.log("examStatus " + i + " 2");
that.applyExam();
return;
}
if (res.data.examStatus == 1) {
console.log("examStatus " + i + " 1");
that.examList[i].isComplete = true;
that.examScore = res.data.examScore;
that.postResult();
return;
}
if (res.data.examStatus == 0) {
......@@ -532,12 +546,17 @@
/* //交付规范 */
.standard {
width: 656rpx;
width: 690rpx;
height: 180rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #82848a;
padding: 0 34rpx;
margin: 72rpx auto;
/* border-bottom: 1rpx solid #82848a; */
/* padding: 0 34rpx; */
/* margin: 72rpx auto; */
border-radius: 12rpx;
padding: 30rpx;
margin-top: 30rpx;
background-color: #FFFFFF;
}
/* //培训通知 */
......@@ -549,18 +568,22 @@
overflow: hidden;
background-color: #ffffff;
border-radius: 12rpx;
padding: 30rpx;
}
.n-head {
text-align: left;
/* margin: 30rpx 30rpx 0 30rpx;
*/ margin-left: 30rpx;
}
.news {
height: 168rpx;
overflow: hidden;
/* margin: 30rpx 30rpx 0 30rpx; */
margin-top: 30rpx;
/* margin-top: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 0; */
}
/* //在线学习 */
......@@ -665,4 +688,47 @@
.content-line {
margin-top: 30rpx;
}
.standard {
}
.standard-img {
width: 160rpx;
height: 120rpx;
}
.standard-body {
height: 120rpx;
display: flex;
}
.standard-body-title {
font-size: 32rpx;
font-weight: bold;
}
.width-360 {
width: 360rpx;
}
.rule-back {
background-image: process.uniEnv.qn_base_url + "banner-xx@3x.png";
}
/* <view class="standard" @click="goToPrint">
<!-- <text>充电桩交付规范</text>
<text>></text> -->
<view class="standard-img"></view>
<view class="standard-body">
<view class="standard-body-title">
充电桩交付规范
</view>
<view class="standard-body-title">
请点击学习
</view>
</view>
<view cl ass="standard-go-look-look">去查看</view>*/
</style>
......@@ -99,15 +99,15 @@ export default {
return login.authorization(params);
}).then(res => {
uni.hideLoading();
if (res) {
if (res && res.code == 200 && res.data && res.data.token) {
that.setUserData(res.data)
that.goBackPage()
} else {
this.setLoginStatus()
that.setLoginStatus()
}
}).catch(res => {
uni.hideLoading()
this.setLoginStatus()
that.setLoginStatus()
})
},
......
This diff is collapsed.
......@@ -551,6 +551,7 @@
url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
})
},
rejectOrder() { // 拒单
......
......@@ -45,7 +45,7 @@
<text class="txt">{{ txt }}</text>
</view>
</view>
<view class="input-view" v-show="showRemark">
<view class="input-view">
<u-input v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
</view>
......@@ -160,8 +160,6 @@ export default {
}
},
async onLoad(e) {
this.orderId = 1;
this.categoryId = 88;
if (e) {
this.orderId = e.orderId || null;
this.categoryId = e.categoryId || null;
......@@ -327,7 +325,6 @@ export default {
},
async submitForm() {
let self = this;
self.orderId = 666;
if (!self.orderId) {
uni.showToast({
icon: error,
......@@ -480,10 +477,6 @@ export default {
border: none;
}
}
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
}
.btn {
padding: 30rpx;
border-radius: 52rpx;
......
......@@ -184,7 +184,7 @@
// 页面数据
getOrderList(index) {
// 状态处理
// this.pageNumber += 1
this.pageNumber += 1
this.loaded = false
var param = {
pageNumber: this.pageNumber,
......@@ -250,23 +250,23 @@
// 获取订单数量
getOrderCount() {
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
// 加载订单列表
this.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===", res.data)
if (res.data) {
var count = 0
self.list.forEach(item => {
this.list.forEach(item => {
if (item.name === '待预约') {
item.count = res.data.toAppointmentCount
item.total = res.data.toAppointmentCount
} else if (item.name === '待签到') {
item.count = res.data.toCheckinCount
item.total = res.data.toCheckinCount
} else if (item.name === '待完工') {
item.count = res.data.toFinishCount
item.total = res.data.toFinishCount
} else if (item.name === '审核中') {
item.count = res.data.reviewingCount
item.total = res.data.reviewingCount
} else if (item.name === '异常单') {
item.count = res.data.exceptionCount
item.total = res.data.exceptionCount
}
})
var count = 0
......
const app = getApp();
// 小程序登录
function appLogin() {
return new Promise(function (resolve, reject) {
......@@ -28,13 +26,12 @@ function appLogin() {
// 小程序授权
function authorization(data) {
const app = getApp();
return new Promise(async function (resolve, reject) {
data.wxAppNo = app.globalData.wxAppNo
const res = await app.$vm.$u.api.loginWechatAuth(data)
if (res) {
if (res.code == 200 && res.data) {
// app.setUserData(res.data)
// app.getBaseInfo(app.$vm)
resolve(res);
} else {
reject(res);
......@@ -50,13 +47,12 @@ function authorization(data) {
// 小程序注册
function signup(data) {
const app = getApp();
return new Promise(async function (resolve, reject) {
data.wxAppNo = app.globalData.wxAppNo
const res = await app.$vm.$u.api.loginWechatAuth(data)
if (res) {
if (res.code == 200 && res.data) {
// app.setUserData(res.data)
// app.getBaseInfo(app.$vm)
resolve(res);
} else {
uni.showModal({
......
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