Commit 66147a07 authored by 郭晓清's avatar 郭晓清

Merge branch 'master' of https://git.banshouhui.com/lijundan/self-support

# Conflicts:
#	src/pages/order/detail.vue
parents 02796097 a1488493
......@@ -18,7 +18,7 @@
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
......
......@@ -155,7 +155,7 @@ let orderApiFun = function(vm){
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 getAssets = async (params = {}) => await vm.$u.get(settle + vm.vuex_token + '/v3/total', params);
// 获取我的钱包-收入流水
let listStatement = async (params = {}) => await vm.$u.get(settle + vm.vuex_token + '/v2/statement', params);
// 获取我的钱包-支付单一览
......
......@@ -26,12 +26,12 @@
</view>
</view>
<!-- weekChange -->
<view class="select-time u-p-t-50">
<view class="select-time u-m-t-50">
<view class="u-flex u-row-between">
<view class="txt">选择时间:</view>
<view class="txt active">{{ appointRangeText }}</view>
</view>
<view class="u-p-t-30 u-flex u-flex-wrap time-list">
<view class="u-m-t-30 time-list">
<view
:class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList"
:key="item.pkey">
......@@ -283,12 +283,14 @@
}
.time-list {
justify-content: space-between;
margin-bottom: -30rpx;
display: flex;
flex-flow: row wrap;
align-content: flex-start;
.time-item {
flex: 0 0 196rpx;
min-width: 196rpx;
// margin-right: 24rpx;
margin-right: auto;
margin-bottom: 20rpx;
border-radius: 12rpx;
background-color: #F4F5F7;
......
......@@ -8,7 +8,7 @@
</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="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image>
<u-image class="pic" width="160" height="160" :src="item.path ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'" :border-radius="10" @click.stop="prviewImage(item,index)"></u-image>
<view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view>
<view class="icon-del rotate"></view>
......@@ -78,7 +78,7 @@
mounted() {
if(this.value){
this.imgList = this.value.map(img =>{
return {path: img, src:img}
return {src:img}
})
this.setValue()
}
......@@ -129,18 +129,16 @@
},
closeTake(val) {
if(val && val.length > 0){
val.forEach((item,index,array)=>{
item.path = item.key
item.src = item.key
val.forEach(item=>{
this.imgList.push(item)
})
this.setValue()
}
this.takeStatus = false
},
prviewImage(url, index) {
prviewImage(item, index) {
uni.previewImage({
urls: [url],
urls: [item.path ? item.path : item.src],
current: index
});
},
......@@ -157,10 +155,10 @@
this.$u.api.orderStandardItem(param).then((res)=>{
if (res.code == 200 && res.data.length>0) {
self.currentItemDate = res.data[0]
self.takeStatus = true
}else{
console.log("获取完工项的拍照标准异常",res.data.message)
}
self.takeStatus = true
})
},
getWatermark(){
......
......@@ -2,7 +2,7 @@
<template>
<view :style="{'width': fieldsWidth}">
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC" :maxlength="maxlength"/>
:custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC" :maxlength="maxlength" :cursor-spacing="10" hold-keyboard/>
</view>
</template>
......@@ -93,7 +93,11 @@
},
watch: {},
mounted() {},
methods: {}
methods: {
handleFocus() {
console.log('handle focus')
}
}
}
</script>
......
<template>
<view class="cus-wrap-component">
<image class="top-image" mode="widthFix" :src="minekefutuImage"></image>
<view class="content-view">
<view class="title-view" v-if="!isPop">
<text class="title-text">客服微信</text>
<text v-if="isMine">下载二维码添加官方客服微信</text>
</view>
<u-image :class="['qrcode', {'is-pop': isPop}]" :src="cusQrcode" mode="widthFix" :fade="true"
duration="450">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<view v-if="isPop" class="pop-tip-view">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text>
</view>
<u-button class="settle-button" type="primary" shape="circle" @click="download" :custom-style="buttonStyle">
点击下载
</u-button>
<view class="bottom-view" v-if="isMine">
<view class="line-view"></view>
<view class="phone-view">
<view class="phone-left-view">
<text class="phone-text">客服电话</text>
<text>{{phone}}</text>
</view>
<image class="phone-image" :src="phoneIcon" @click="phoneToCustomer">
</u-image>
</view>
</view>
<view v-else-if="isExclusive" class="tip-view">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
type: { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服
type: String,
default: 'mine'
}
},
data() {
return {
};
},
computed: {
cusQrcode() {
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
minekefutuImage() {
return process.uniEnv.qn_base_url + this.imageName
},
imageName() {
return this.isMine ? 'kefufuwu-n.png' : 'kefutuzs.png'
},
isMine() { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服
return this.type == 'mine'
},
isPop() {
return this.type == 'pop'
},
isExclusive() {
return this.type == 'exclusive'
},
phoneIcon() {
return process.uniEnv.qn_base_url + 'dianhua.png'
},
buttonStyle() {
return {
width: "300rpx",
height: "80rpx",
"font-size": "32rpx",
"font-weight": "bold",
};
},
phone() {
return '0755-81773817'
}
},
methods: {
phoneToCustomer() { // 联系客户
uni.makePhoneCall({
phoneNumber: this.phone, //仅为示例
complete() {}
});
},
download() {
let self = this
uni.downloadFile({ //获得二维码的临时地址
url: self.cusQrcode,
success: (result) => {
if (result.statusCode == 200) {
uni.saveImageToPhotosAlbum({
filePath: result.tempFilePath, //传入临时地址
success(e) {
self.$u.toast('保存成功!');
self.$emit('click')
},
fail(res) {
if (res.errMsg.indexOf('auth') != -1) {
uni.showModal({
title: '提示',
content: '获取权限失败,请到设置页面开启权限',
confirmText: '好的',
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting)
}
});
}
}
})
} else if (res.errMsg) {
self.$u.toast('保存失败!');
}
},
})
}
}
})
}
}
}
</script>
<style lang="scss">
.cus-wrap-component {
background: #FFFFFF;
border-radius: 12rpx;
.top-image {
width: 100%;
}
.content-view {
padding: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
.title-view {
font-size: 24rpx;
color: #666666;
width: 100%;
margin-top: 10rpx;
display: flex;
align-items: flex-end;
.title-text {
font-weight: bold;
font-size: 32rpx;
color: #333333;
margin-right: 30rpx;
}
}
.qrcode {
margin-top: 60rpx;
margin-bottom: 60rpx;
width: 400rpx;
height: 400rpx;
&.is-pop {
width: 248rpx;
height: 248rpx;
padding: 24rpx;
border: 6rpx solid #2272FF;
border-radius: 32rpx;
margin-top: 10rpx;
margin-bottom: 40rpx;
}
}
.desc {
margin-top: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 24rpx;
}
.bottom-view {
width: 100%;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-top: 46rpx;
}
.phone-view {
display: flex;
align-items: center;
width: 100%;
justify-content: space-between;
padding: 40rpx 0 30rpx 0;
.phone-left-view {
display: flex;
align-items: center;
color: #999999;
font-size: 26rpx;
.phone-text {
color: #333333;
font-size: 32rpx;
font-weight: bold;
margin-right: 40rpx;
}
}
.phone-image {
width: 84rpx;
height: 56rpx;
}
}
}
.settle-button {
margin-bottom: 14rpx;
}
.pop-tip-view {
text-align: center;
color: #333333;
font-size: 28rpx;
margin: 0rpx 60rpx 40rpx 60rpx;
}
.tip-view {
margin: 46rpx 60rpx 50rpx 60rpx;
text-align: center;
color: #333333;
font-size: 28rpx;
}
}
}
</style>
......@@ -29,7 +29,7 @@
payableRecordNumber: 'EE999777',
settlementAmount: 9899
}
}
},
}
},
data() {
......@@ -53,7 +53,16 @@
}
},
timeText() {
return this.$u.timeFormat(this.data.paymentTime, 'mm.dd')
let now = this.moment().startOf('day').unix()
let yesterday = this.moment(now*1000).subtract(1, 'days').unix()
let date = this.moment(this.data.updateDatetime).startOf('day').unix()
if(date == now) {
return '今天'
} else if(date == yesterday) {
return '昨天'
} else {
return this.$u.timeFormat(this.data.updateDatetime, 'mm.dd')
}
}
},
methods: {
......
......@@ -59,7 +59,16 @@
return this.isWarranty + '-' + this.data.orderServiceTypeText
},
timeText() {
return this.$u.timeFormat(this.data.updateDatetime, 'mm.dd')
let now = this.moment().startOf('day').unix()
let yesterday = this.moment(now*1000).subtract(1, 'days').unix()
let date = this.moment(this.data.updateDatetime).startOf('day').unix()
if(date == now) {
return '今天'
} else if(date == yesterday) {
return '昨天'
} else {
return this.$u.timeFormat(this.data.updateDatetime, 'mm.dd')
}
}
},
methods:{
......
......@@ -64,7 +64,7 @@
return
}
let path = ''
if(photo.tempPath.origin){
if(photo.tempPath.origin && photo.waterSetting.hasOrigin){
// 保存原图到本地
path = photo.tempPath.origin
let result = await this.saveLocal(path)
......@@ -136,7 +136,12 @@
uni.hideLoading()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
photo.allImages.unshift(this.fileMaps[0])
photo.allImages.unshift(
{
key: photo.tempPath.mixWater,
src: this.fileMaps[0].key
}
)
if(photo.currentItemLength<10){
this.$emit('changeType', 1)
}else{
......
......@@ -413,7 +413,7 @@
}
.popBtnView {
margin-top: 110rpx;
margin-top: 65rpx;
width: 100%;
display: flex;
align-items: center;
......
......@@ -52,7 +52,9 @@
dx: 0,
};
},
onLoad() {},
onLoad() {
this.$refs.tabs.setFinishCurrent(current);
},
computed: {
swiperList() {
let list = this.currentItem.images || []
......
......@@ -31,7 +31,7 @@
</cover-view>
<canvas canvas-id="canvas" id="photoCanvas" class="canvas"
:style="{'width':750 + 'rpx','height': cameraHeight + 'rpx'}"></canvas>
<view v-show="standardShow" class="page-mask" :z-index="10000">
<view v-if="standardShow" class="page-mask" :z-index="10000">
<photo-standard :currentItem="currentItem" />
<view class="btn-close">
<image @click="closeShadow" class="icon icon-close" mode="aspectFit" src="/static/photo/icon-close.png"></image>
......
......@@ -11,7 +11,7 @@ export default {
};
},
created() {
console.log(uploader,'uploader')
// console.log(uploader,'uploader')
// this.initQiniu()
},
methods: {
......
......@@ -291,7 +291,6 @@
{
"navigationBarTitleText": "订单详情",
"navigationStyle": "custom",
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
......
......@@ -4,7 +4,7 @@
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort" enable-back-to-top>
<TabBarPage title="充电桩自营平台">
<image class="banner-image" :src="bannerImage"></image>
<image class="banner-image" :src="bannerImage" @click="handleClickBanner"></image>
<view class="msg-view">
<view class="msg-title">最新消息</view>
......@@ -67,6 +67,12 @@
<view class="bottom-line-view"></view>
</view>
</TabBarPage>
<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>
</scroll-view>
</template>
......@@ -76,12 +82,14 @@
import NoOrder from "@/components/order/noOrder.vue"
const app = getApp();
import OrderCell from "@/components/order/index.vue";
import Customer from "@/components/mine/customer.vue"
export default {
components: {
OrderCell,
TabBarPage,
NoOrder
NoOrder,
Customer
},
data() {
return {
......@@ -103,7 +111,8 @@
},
waitInit: false, // 当token为空时,等待自动登录结束
triggered: false,
_freshing: false,
_freshing: false,
visible: false,
};
},
watch: {
......@@ -138,12 +147,15 @@
return process.uniEnv.qn_base_url + 'weiruzhu.png'
},
},
onLoad() {
onLoad(e) {
this._freshing = false;
if(this.vuex_token) {
this.getOrderCount()
} else {
this.waitInit = true
}
if (e && e.visible) {
this.visible = e.visible
}
},
onShow() {
......@@ -152,7 +164,7 @@
if (this.vuex_token) {
this.initSettleInfo();
}
this.getLocation()
this.getLocation()
},
// onPullDownRefresh() {
// console.log('------下拉刷新------')
......@@ -250,10 +262,11 @@
this.triggered = "restore";
},
reachBottom() {
console.log(this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
if (this.vuex_token) {
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
}
},
onPulling(e) {
console.log("onpulling", e);
......@@ -383,7 +396,15 @@
res.eventChannel.emit('acceptDataFromLearn', item)
}
});
}
},
handleClickBanner() {
uni.navigateTo({
url: "/pages/mine/customer/index" + '?type=exclusive',
});
},
handleDownload() {
this.visible = false
}
},
};
</script>
......
This diff is collapsed.
......@@ -6,8 +6,8 @@
</u-navbar>
<view class="mine-content">
<view class="header-view">
<view :class="['head-image', {'has-image': avatar}]">
<u-avatar :src="headImageUrl" :size="headSize" mode="circle"></u-avatar>
<view class="head-image">
<image :style="headImageStyle" :src="headImageUrl"></image>
</view>
<view class="header-content">
<view class="name-view" @click="handleClickName">{{name || "点击登录"}}</view>
......@@ -55,8 +55,8 @@
return this.vuex_settled && this.vuex_settled.avatar || ''
},
name() {
return this.settled && this.settled.id_card_name
|| this.settled.nickname || this.settled.name || ''
return this.settled && (this.settled.id_card_name
|| this.settled.nickname || this.settled.name) || ''
},
mobile() {
return this.settled && this.settled.mobile || ''
......@@ -120,6 +120,9 @@
},
placeholderImage() {
return this.qnPath + 'touxiang.png'
},
headImageStyle() {
return this.avatar ? 'width:136rpx; height:136rpx;border-radius:68rpx' : 'width:144rpx; height:144rpx;border-radius:72rpx'
},
headSize() {
return this.avatar ? 136 : 144
......@@ -192,11 +195,9 @@
height: 144rpx;
background-color: #FFFFFF;
border-radius: 72rpx;
&.has-image {
// border: 4rpx solid #FFFFFF;
padding: 4rpx;
}
display: flex;
align-items: center;
justify-content: center;
}
.header-content {
......
......@@ -136,7 +136,7 @@ export default {
//判断是否通过,通过去成功页,失败去失败页
let examInfo = this.examInfo;
let examId = this.examId;
let status = examInfo.examLevelResult == "通过";
let status = examInfo.examLevelResult == "已通过";
if (status) {
wx.navigateTo({
url:
......@@ -332,7 +332,8 @@ export default {
"&questionId=" +
questionId +
"&userAnswerIds=" +
(this.userAnswerIds || "9999"), // 9999超时自动下一题
(this.userAnswerIds || "9999") +
",", // 9999超时自动下一题
method: "POST",
data: {
// userExamId:this.userExamId,
......@@ -410,7 +411,8 @@ export default {
console.log(
"endTime:" + this.endTime,
"everyTime:" + this.everyTime,
"currentTime:" + this.currentTime
"currentTime:" + this.currentTime,
"答案:" + this.userAnswerIds
);
} else {
clearTimeout(this.timer);
......@@ -562,7 +564,8 @@ export default {
} else {
// if(this.userAnswerIds.length == 1)
this.userAnswerIds =
item.id + "," + this.userAnswerIds;
this.userAnswerIds + "," + item.id;
console.log(this.userAnswerIds, "答案答案");
}
//*/
} else {
......
......@@ -77,15 +77,17 @@ export default {
//再次考试
getAgain: function () {
wx.navigateTo({
url: "./assessment",
url: "/pages/learn/assessment",
});
},
//下次再考跳转到学习主界面页面
toIndex: function () {
wx.reLaunch({
url: "/pages/index/learn?tabs=3",
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let length = routes.length
uni.navigateBack({
delta: length - 1
});
// wx.navigateBack({ delta: 1 })//返回上一级页面
},
},
};
......
......@@ -87,10 +87,12 @@ export default {
},
//下次再考跳转到学习主界面页面
toIndex: function () {
wx.reLaunch({
url: "/pages/index/learn?tabs=3",
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
let length = routes.length
uni.navigateBack({
delta: length - 1
});
// wx.navigateBack({ delta: 1 })//返回上一级页面
},
},
};
......
......@@ -37,7 +37,7 @@
<view class="scroll_box">
<scroll-view scroll-x @scroll="scroll" :scroll-left="scrollValue">
<view class="item_list" :class="{'item_list_active': item.isActive}"
v-for="(item, index) in sectionList" :key="index" @click="goNext(item, $event)">
v-for="(item, index) in sectionList" :key="index" @click="goNext(item)">
<view class="" style="font-size: 24rpx;">{{ item.title }}</view>
<view class="" style="font-size: 26rpx;margin-top: 16rpx;">
{{ item.intro }}
......@@ -93,13 +93,14 @@
},
gklog: '',
videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 10, //设置几秒提交一次状态
status: 1, //是否已学习默认1已学习
howTimeToUpdateLearnedStatus: 5, //设置几秒提交一次状态
status: 0, //是否已学习默认1已学习
isLearned: false, //默认设置观看1/2就是已学
old: {
scrollTop: null
},
scrollValue: 0
scrollValue: 0,
nowTime: 0
};
},
computed: {
......@@ -110,10 +111,10 @@
onLoad(e) {
this.section_id = e.section_id
this.params.course_id = e.course_id
this.getCapterDetails()
this.getSectionInfo({
section_id: e.section_id
})
this.getCapterDetails()
},
onReady: function(res) {
this.videoContext = uni.createVideoContext("courseVideo");
......@@ -124,7 +125,10 @@
console.log(e)
this.old.scrollTop = e.detail.scrollTop
},
goNext(info, e) {
goNext(info) {
if(this.status == 1){
console.log('已学');
}
//切换成下一个
this.getSectionInfo({
section_id: info.id
......@@ -134,9 +138,7 @@
this.changeActiveAction()
},
changeActiveAction() {
// debugger
let activeKey = 0
// debugger
for (let i in this.sectionList) {
this.sectionList[i].isActive = this.section_id == this.sectionList[i].id ? true : false;
if(this.sectionList[i].isActive){
......@@ -170,6 +172,42 @@
playerReadied(player) {
player.currentTime(this.gklog)
},
//获取章节详情
getCapterDetails() {
let that = this
this.$u.api
.ChapterDetails(this.params)
.then((res) => {
if (res.code != 200) {
uni.showToast({
title: res.message,
icon: "none"
})
}
if (res.data) {
that.sectionList = res.data[0].section
that.courseTotal = that.sectionList.length
let length = that.sectionList.length
for (let i = 0; i < length; i++) {
that.sectionList[i].title = "第" + (i + 1) + "节"
that.sectionList[i].intro = that.sectionList[i].name
that.sectionList[i].isActive = that.section_id == that.sectionList[i].id
? true : false
}
this.changeActiveAction()
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none"
})
that.isLoadMore = false
if (that.params.start > 0) {
that.page -= 5
}
})
},
getSectionInfo(param) {
this.$u.api
.CourseSection(param)
......@@ -184,6 +222,7 @@
this.sectionInfo = res.data
console.log("----节信息----")
console.log(this.sectionInfo)
this.nextSectionId = this.sectionInfo.nextSectionId
let wareVal = this.sectionInfo.ware
this.courseTitle = res.data.name
this.courseDesc = res.data.content.replace(/<p.*?>|<\/p>/ig, "")
......@@ -193,11 +232,10 @@
this.teacherImage = res.data.teachers[0].avatar
this.teacherIntro = res.data.teachers[0].intro.replace(/<.*?>|<\/.*?>/ig, "")
this.params.course_id = res.data.course_id
this.nextSectionId = this.sectionInfo.nextSectionId
if (wareVal == "0") {
let coureWareList = res.data.courseware
this.courseSrc = coureWareList[0].src
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time)
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time) - 1;
console.log('视频时长信息:' + this.videoTotalTime)
}
}
......@@ -210,61 +248,27 @@
})
},
updateLearnedStatus(nowTime) {
if (this.gklog != nowTime && nowTime % this.howTimeToUpdateLearnedStatus == 0) {
let howLongIsLearned = parseInt(this.videoTotalTime / 2)
if (nowTime < howLongIsLearned) {
this.status = 0
} else if (this.isLearned) {
return
} else {
this.status = 1
}
let param = {
section_id: this.section_id,
video_time: nowTime,
status: this.status
};
this.$u.api.updateLearnCourses(param).then((res) => {}).catch((err) => {
console.log(err)
});
let param = {
section_id: this.section_id,
video_time: nowTime,
status: this.status
};
nowTime = parseInt(nowTime);
if(nowTime == this.nowTime){
return
}
},
//获取章节详情
getCapterDetails() {
let that = this
this.$u.api
.ChapterDetails(this.params)
.then((res) => {
if (res.code != 200) {
uni.showToast({
title: res.message,
icon: "none"
})
}
if (res.data) {
that.sectionList = res.data[0].section
that.courseTotal = that.sectionList.length
let length = that.sectionList.length
for (let i = 0; i < length; i++) {
that.sectionList[i].title = "第" + (i + 1) + "节"
that.sectionList[i].intro = that.sectionList[i].name
that.sectionList[i].isActive = that.section_id == that.sectionList[i].id
? true : false
}
this.changeActiveAction()
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none"
})
that.isLoadMore = false
if (that.params.start > 0) {
that.page -= 5
}
})
this.nowTime = nowTime;
if(this.status == 1 || nowTime < 5){
return
}
if(nowTime == this.videoTotalTime){
param.status = this.status = 1
}else if(nowTime % this.howTimeToUpdateLearnedStatus != 0){
return
}
this.$u.api.updateLearnCourses(param).then((res) => {}).catch((err) => {
console.log(err)
});
},
},
}
......
......@@ -126,12 +126,12 @@ export default {
signupLogin(e) {
var that = this
if (!e || !e.detail || e.detail.errMsg.indexOf('user deny') > -1) {
wx.showModal({
uni.showModal({
title: '提示',
showCancel: false,
content: '用户未授权不能完成注册'
});
} else {
} else if(!e.detail.errMsg && e.detail.encryptedData && e.detail.iv) {
let params = {
nickname: app.globalData.authUserInfo.nickName,
avatar: app.globalData.authUserInfo.avatarUrl,
......@@ -155,12 +155,14 @@ export default {
}
}).catch(res => {
uni.hideLoading()
uni.showToast({
title: res.message,
icon: 'none'
});
this.setLoginStatus(false)
})
} else {
uni.showModal({
title: '提示',
showCancel: false,
content: e.detail.errMsg || '授权失败,请重新授权'
});
}
},
......@@ -191,11 +193,13 @@ export default {
setUserData(userInfo) {
if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息
util.setOpenid(userInfo.wxopenid);
this.$u.vuex('vuex_token',userInfo.token );
uni.setStorageSync("user-info", userInfo);
this.$u.vuex('vuex_token',userInfo.token);
this.$u.vuex('vuex_user', userInfo);
this.$u.vuex('vuex_wx_uid', userInfo.wxopenid);
} else {
this.$u.vuex('vuex_token', '');
this.$u.vuex('vuex_user', null);
this.$u.vuex('vuex_wx_uid', '');
}
},
......
......@@ -3,11 +3,11 @@
<w-navbar title="收货地址"></w-navbar>
<view class="item">
<view class="top">
<view class="name">{{ settledInfo.id_card_name || settledInfo.nickname || settledInfo.name || '--' }}</view>
<view class="phone">{{ settledInfo.mobile }}</view>
<view class="name">{{ settled.id_card_name || settled.nickname || settled.name || '--' }}</view>
<view class="phone">{{ settled.mobile }}</view>
</view>
<view class="bottom">
<view class="address">{{ settledInfo.address }}</view>
<view class="address">{{ settled.address }}</view>
<u-icon :name="editPen" :size="32" color="#999999" @tap="toAddSite('修改地址')"></u-icon>
</view>
<view class="default" v-show="true">
......
......@@ -112,7 +112,7 @@
},
toDetail(key) {
let data = this.list[key].data;
if(!data.isUpload){
if(data.status != 1){
return;
}
wx.navigateTo({
......
<template>
<view class="cus-wrap">
<template>
<view class="cus-wrap">
<w-navbar title="联系客服"></w-navbar>
<view class="content">
<u-image class="qrcode" :src="cusQrcode" width="400" height="400" mode="widthFix" :fade="true" duration="450">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<text class="desc">长按二维码保存图片添加官方客服微信</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
computed: {
cusQrcode() {
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
},
methods: {
// download() {
// let that = this;
// uni.downloadFile({ //获得二维码的临时地址
// url: that.erweimaImage,
// success:(res)=>{
// if(res.statusCode == 200){
// uni.saveImageToPhotosAlbum({
// filePath:res.tempFilePath,//传入临时地址
// success() {
// that.$u.toast('保存成功!');
// },
// fail() {
// that.$u.toast('保存失败!');
// }
// })
// }
// }
// })
// }
}
}
</script>
<style lang="scss">
.cus-wrap {
background-color: #F4F5F7;
padding: 30rpx;
.content {
width: 690rpx;
height: 800rpx;
background: #FFFFFF;
border-radius: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
.qrcode {
margin-top: 160rpx;
}
.desc {
margin-top: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 24rpx;
}
}
}
<view class="cus-wrap-content">
<Customer :type="type"></Customer>
</view>
</view>
</template>
<script>
import Customer from "@/components/mine/customer.vue"
export default {
components: {
Customer
},
data() {
return {
type: 'mine'
};
},
onLoad(e) {
if (e && e.type) {
this.type = e.type
}
},
}
</script>
<style lang="scss">
.cus-wrap {
background-color: #F4F5F7;
padding: 20rpx 30rpx;
height: 100vh;
.cus-wrap-content {
overflow: auto;
}
}
</style>
<template>
<view class="wallet-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="我的钱包" titleColor="#333333"
:border-bottom="false"></u-navbar>
:border-bottom="false" title-bold></u-navbar>
<view class="wallet-content-view">
<view class="header-view">
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image>
......@@ -42,6 +42,7 @@
</view>
<view class="line-view" v-if="hasList"></view>
<view class="list-view" v-if="hasList">
<u-gap height="20" v-if="loading"></u-gap>
<view class="u-flex u-row-center" v-if="loading">
<u-loading color="#2272FF" :show="loading"></u-loading>
</view>
......@@ -54,6 +55,7 @@
</template>
<script>
let now = new Date(new Date().toLocaleDateString()).getTime();
import Statement from "@/components/mine/statement.vue"
export default {
components: {
......
<template>
<view class="settlement-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="结算账单" titleColor="#333333"
:border-bottom="false"></u-navbar>
:border-bottom="false" title-bold></u-navbar>
<view class="settlement-conten">
<view class="settlement-content-view">
<view class="head-view">
......
<template>
<view class="statement-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="收入流水" titleColor="#333333"
:border-bottom="false"></u-navbar>
:border-bottom="false" title-bold></u-navbar>
<view class="statement-conten">
<view class="statement-content-view">
<view class="head-view">
......
<template>
<view class="withdraw-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="提现" titleColor="#333333" :border-bottom="false">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="提现" titleColor="#333333" :border-bottom="false" title-bold>
</u-navbar>
<view class="withdraw-content">
<view class="withdraw-content-main">
......
......@@ -30,7 +30,7 @@
<view class="width-132 break">{{ item.businessNumber }}</view>
<view class="width-210 break">{{ item.skuName }}</view>
<view class="width-80 center">{{ item.outAmount }}</view>
<view class="width-140 break">{{ item.createTime | datefmt('YYYY.MM.DD HH:mm:ss')}}</view>
<view class="width-140 create-time">{{ (item.updateTime || item.createTime) | datefmt('YYYY.MM.DD HH:mm:ss')}}</view>
</view>
<u-loadmore :status="status" @loadmore="loadRecord" />
</view>
......@@ -49,7 +49,7 @@
total: 100,
search: {
pageNumber: 0,
pageSize: 20,
pageSize: 10,
},
};
},
......@@ -67,21 +67,14 @@
getData() {
let self = this
self.initDetails()
self.search.pageNumber = ++ self.search.pageNumber;
self.loadAccess()
},
async initDetails() {
let self = this
let res = await self.$u.api.listBystock()
if(res && res.code == 200) {
self.details = res.data.list
self.details = res.data
}
// 测试数据
self.details = [
{skuName: '广汽新能源立柱-特来电', systemStock: 1},
{skuName: '广汽新能源-星星', systemStock: 14}
]
},
loadRecord() {
if(this.status == 'nomore') return ;
......@@ -91,34 +84,10 @@
},
async loadAccess() {
let self = this
/*
/wxh-worker-rest/rest/{token}/myinfo/access/history
路径参数:
token=xxxx
Headers:
Content-Type: application/json
Query:
pageNumber=0
pageSize=10
*/
let res = await self.$u.api.listAccessHistory(self.search)
if(res && res.code == 200) {
self.total = res.data && res.data.total || self.total
let list = res.data && res.data.list && self.$u.deepClone(res.data.list) || [];
// 测试数据
list = [
{businessNumber: 'OR20210507332669', skuName: '广汽新能源立柱红红火火恍恍惚惚', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332775', skuName: '广汽新能源星星点灯', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332020', skuName: '广汽新能源星星点灯', outAmount: 6, createTime: Date.now()},
{businessNumber: 'OR20210507332333', skuName: '广汽新能源立柱啦啦啦啦啦啦啦', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507334689', skuName: '广汽新能源立柱', outAmount: 12, createTime: Date.now()},
{businessNumber: 'OR20210507339991', skuName: '广汽新能源立柱啦啦啦啦啦啦啦', outAmount: 12, createTime: Date.now()},
{businessNumber: 'OR20210507332660', skuName: '广汽新能源立柱', outAmount: 12, createTime: Date.now()},
{businessNumber: 'OR20210507332669', skuName: '广汽新能源立柱红红火火恍恍惚惚', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332775', skuName: '广汽新能源星星点灯', outAmount: 1, createTime: Date.now()},
{businessNumber: 'OR20210507332333', skuName: '广汽新能源立柱啦啦啦啦啦啦啦', outAmount: 1, createTime: Date.now()},
]
if(list && list.length) {
self.record.push(...list)
if(self.total > self.record.length) {
......@@ -176,6 +145,9 @@
line-height: 38rpx;
display: flex;
justify-content: space-between;
.create-time {
letter-spacing: 0.03rpx
}
}
}
}
......
......@@ -2,7 +2,7 @@
<view class="com-content">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check>
<view class="u-wrap">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar>
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" title-bold></u-navbar>
<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">
<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">
......@@ -16,7 +16,7 @@
</scroll-view>
<view class="form-list">
<view class="form-list" @touchmove="handleTouchstart">
<u-form :model="form" ref="uForm">
<template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])">
<view class="class-item" :key="groupIndex" v-show="current == groupIndex">
......@@ -674,8 +674,11 @@
}
}
}, 10)
}
}
},
handleTouchstart() {
uni.hideKeyboard()
}
}
}
</script>
......
......@@ -23,7 +23,7 @@
<text>客户信息:</text>
<text>{{ order.contactName }}</text>
</view>
<u-image width="84rpx" height="56rpx" :src="phoneIcon" @click="phoneToCustomer(order.contactPhone)" ></u-image>
<image style="width: 84rpx;height: 56rpx;" :src="phoneIcon" @click="phoneToCustomer(order.contactPhone)" ></image>
</view>
<view class="order-cell">
<text>联系方式:</text>
......@@ -34,7 +34,7 @@
<u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ formatAddress }}</text>
</view>
<u-image width="84rpx" height="56rpx" :src="navigationIcon" @click="openLocation(order.contactAddress)"></u-image>
<image style="width: 84rpx;height: 56rpx;" :src="navigationIcon" @click="openLocation(order.contactAddress)"></image>
</view>
<!-- <u-read-more ref="uReadMore" :show-height="40" :shadowStyle="{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view v-if="readMore" @click="readMore = false" class="read-more-toggle">
......@@ -223,7 +223,7 @@
scenePhoto: false,
isErrorSign:false,
errorSignUrl:'',
isAllowDianhuaAndDaohang : false,
isAllowDianhuaAndDaohang : true,
appointmentDatetimeRange:'',
appointmentDatetime:'',
signDistance:3000,
......@@ -231,7 +231,8 @@
contactAddressLatitud:0,
num:0,
showTimeOut:true,
clicking: false
clicking: false,
dateItem: null
}
},
onLoad(option) {
......@@ -460,10 +461,12 @@
let params = {
num: this.num
}
self.dateItem = null
let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) {
self.dateList = res.data
}
this.loadTimerange()
},
/* 加载预约时间段 */
async loadTimerange() {
......@@ -472,20 +475,24 @@
if(res && res.code == 200) {
let list = res.data
list.map((item, index) => {
item.disabled = false
if(self.dateItem && self.dateItem.timeRange.indexOf(item.pkey) > -1 || item.isEnd) {
item.disabled = true
} else {
false
}
})
self.timeList = list
}
},
dateChange(data){
// this.loadTimerange()
// 点击日期选择
console.log(data,'dateChange')
let self = this
self.appointmentDatetime = data.item.day
self.dateItem = data.item
self.appointmentDatetimeRange = null
self.timeList.map((item, index) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) {
if(data.item.timeRange.indexOf(item.pkey) > -1 || item.isEnd) {
item.disabled = true
} else {
item.disabled = false
......@@ -669,37 +676,27 @@
})
},
filish(){
let self = this
var data = {
'orderId': self.orderId
};
self.$u.api.orderDetail(data, self.orderId).then((res) => {
if (res.code == 200) {
if(res.data.orderStatus > 31 && res.data.orderStatus < 80){
// 去完工
uni.navigateTo({
url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
+ "&partnerCompanyId=" + this.order.partnerCompanyId
})
}else{
this.commonToast('当前工单已被改派!','warning')
}
} else {
console.log(res.message, "获取订单详情失败!");
}
});
// 去完工
uni.navigateTo({
url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
+ "&partnerCompanyId=" + this.order.partnerCompanyId
})
},
rejectOrder() { // 拒单
// 检查是否可以拒单
var data={}
this.$u.api.checkRejectable(data).then(res => {
if (res.code === 200 ) {
if( res.data === true){
uni.navigateTo({
url: 'pages/order/refuse?orderId='+this.order.orderId
if( res.data && res.data.rejectable){
this.$u.route({
url: 'pages/order/refuse',
params: {
orderId: this.order.orderId,
count: res.data.remainderTimes
}
})
}else{
this.commonToast("本月无拒单机会,请联系客服","warning")
......@@ -952,6 +949,7 @@
font-size: 26rpx;
color: #333333;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.record-line-view {
......
<!-- 过程反馈 -->
<template>
<view class="feedback-box bg">
<u-navbar back-icon-color="#FFFFFF" :background="background" title="过程反馈" titleColor="#FFFFFF" :border-bottom="false"></u-navbar>
<u-navbar back-icon-color="#FFFFFF" :background="background" title="过程反馈" titleColor="#FFFFFF" :border-bottom="false" title-bold></u-navbar>
<view class="content u-p-l-30 u-p-r-30">
<view class="top-tab">
<u-tabs
......@@ -246,7 +246,7 @@ export default {
if (self.dateList && self.timeList) {
self.timeList.map((item, index) => {
if (self.dateItem
&& self.dateItem.timeRange.indexOf(item.pkey) > -1) {
&& self.dateItem.timeRange.indexOf(item.pkey) > -1 || item.isEnd) {
item.disabled = true;
} else {
item.disabled = false;
......
......@@ -50,7 +50,7 @@
rejectReason: '',
remark: ''
},
count: 0, // 剩余次数
count: 3, // 剩余次数
};
},
computed: {
......@@ -62,18 +62,31 @@
PopView
},
onLoad(e) {
if(e && e.orderId) {
this.orderId = e.orderId
if(e) {
if(e.orderId) {
this.orderId = e.orderId
} else if(e.count) {
this.count = e.count
}
}
if(!this.count) {
this.getRejectCount()
}
this.getRejectCount()
},
methods: {
changeReason(reason) {
this.formData.rejectReason = reason
},
getRejectCount() {
let self = this
// 获取拒单次数
this.count = 3
self.$u.api.checkRejectable({}).then(res => {
if (res.code === 200 && res.data && res.data.rejectable) {
self.count = res.data.remainderTimes
} else {
self.count = 0
}
})
},
handleClickSubmit() {
......
<template>
<view class="backView">
<u-navbar :title-size="32" title-color="#000" :border-bottom="false" :title="title"></u-navbar>
<u-navbar :title-size="32" title-color="#000" :border-bottom="false" :title="title" title-bold></u-navbar>
<u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="topView">
<view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)"
......
......@@ -90,7 +90,7 @@
statusName: '已支付保证金',
txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"],
btnTxt: '去首页',
url: '/pages/index/index'
url: '/pages/index/index?visible=1'
}],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: '',
......
......@@ -103,13 +103,16 @@
}
},
onLoad(e) {},
onShow() {
onShow() {
/** 测试提了bug:ID1001079【首页-入驻-在线签约】:输入好各个字段信息,切换到其他APP再切换回来,会把已填的信息自动清空
不知道这一段当初为什么加,就屏蔽了
const refs = this.$refs
this.$nextTick(() => {
if (refs['radio'] && refs['radio'].length > 0) {
refs['radio'][0].setRadioCheckedStatus()
}
})
})
*/
this.startCounting()
this.getBaseInfo()
......
......@@ -55,18 +55,18 @@ function signup(data) {
if (res.code == 200 && res.data) {
resolve(res);
} else {
uni.showModal({
title: '用户授权失败',
content: res.message,
showCancel: false
});
console.log(res.message)
uni.showModal({
content: '登录失败',
showCancel: false
});
reject(res);
}
} else {
uni.showModal({
title: '请求失败',
content: res.message
});
uni.showModal({
content: '请求失败',
showCancel: false
});
}
});
......
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