Commit 76aa12f2 authored by Damon's avatar Damon

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

parents 188113e5 cf7ce8b4
......@@ -2,7 +2,7 @@
(function() {
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null;
let VERSION_NUMBER = '1.2.9';//版本号
let VERSION_NUMBER = '1.3.1';//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
......
<template>
<view class="cus-wrap-component">
<image class="top-image" mode="widthFix" v-if="!isPop" :src="minekefutuImage"></image>
<image class="top-image" mode="widthFix" v-if="!isPop" :src="qnFile(imageName)"></image>
<view class="content-view">
<view :class="['title-view', {'is-mine': isMine}]">
<text :class="['title-text', {'is-mine': isMine}]">{{titleText[typeIndex]}}</text>
<text>{{tipText[typeIndex]}}</text>
</view>
<u-image :class="['qrcode', {'is-mine': isMine}]" :src="cusQrcode" mode="widthFix" :fade="true"
duration="450">
<u-image :class="['qrcode', {'is-mine': isMine}]" :src="qnFile(cusQrcode)" mode="widthFix" :fade="false">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<button :class="['settle-button', {'is-mine': isMine}]" type="primary" :open-type="openTypes[typeIndex]" show-message-card
send-message-title="点击下方客服会话添加订单助手" shape="circle" @click="download" :send-message-img="kefuzxiaoxiImage"
send-message-title="点击下方客服会话添加订单助手" shape="circle" @click="download" :send-message-img="qnFile('kefuzxiaoxi.png')"
send-message-path="/pages/index/index">
{{buttonText[typeIndex]}}
</button>
......@@ -45,14 +44,7 @@
},
computed: {
cusQrcode() {
let src = this.isMine ? 'erweima-rk.png' : 'dingdanzhushou-n.png';
return util.imageCache(this, src)
},
kefuzxiaoxiImage() {
return util.imageCache(this, 'kefuzxiaoxi.png')
},
minekefutuImage() {
return util.imageCache(this, this.imageName)
return this.isMine ? 'erweima-rk.png' : 'dingdanzhushou-n.png';
},
imageName() {
return this.isMine ? 'kefufuwu-n.png' : 'kefutuzs.png'
......@@ -92,6 +84,9 @@
}
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
phoneToCustomer() { // 联系客户
uni.makePhoneCall({
phoneNumber: this.phone, //仅为示例
......
<template>
<view class="bottom-button">
<view v-for="(item, index) in list" :class="['button-view', item.type]">
<u-button :class="['list-button', item.type, {'one': list.length == 1}]" @click="handleClick(item)"
:hover-class="item.type == 'image' || item.disabled ? 'none' : ''"
:custom-style="{...buttonStyle[item.disabled ? 'disabled' : item.type], ...item.customStyle}" type="primary" shape="circle">
<view class="image-view" v-if="item.type == 'image'">
<image :src="baseImageUrl + item.image" class="image-content"></image>
</view>
<view :class="['text-content', item.type]">{{item.label}}</view>
</u-button>
</view>
</view>
</template>
<script>
export default {
props: {
// label: 按钮文字,
// type: 'text'普通按钮;'image'图文按钮
// image: type='image'的时候,按钮图片
// show: 是否显示,
// disabled: 是否禁用,true禁用;false 可以点击
// customStyle: 自定义button样式
buttons: {
type: Array,
default () {
return [{
label: '过程反馈',
type: 'image',
image: 'guochengfankui.png',
show: true,
disabled: false,
},
{
label: '异常签到',
type: 'image',
image: 'yichangqiandao.png',
show: false,
disabled: false
},
{
label: '现场拍照',
type: 'image',
image: 'xiancahngpaizhao.png',
show: true,
disabled: false,
},
{
label: '接单',
type: 'text',
show: true,
disabled: true,
customStyle: {
'background-color': '#2272FF'
}
}
]
}
}
},
computed: {
baseImageUrl() {
return process.uniEnv.qn_base_url
},
list() {
return this.buttons.filter((item) => {
return item.show == true
})
},
buttonStyle() {
return {
'image': {
'background-color': 'transparent',
'border-color': 'transparent',
'display': 'flex',
'flex-direction': 'column',
'height': '104rpx',
'width': '82rpx',
},
'text': {
'background-color': '#2272FF',
'border-color': 'transparent',
'display': 'flex',
'flex-direction': 'column',
'height': '104rpx',
'width': '100%',
},
'disabled': {
'background-color': '#D1D4D4',
'border-color': 'transparent',
'display': 'flex',
'flex-direction': 'column',
'height': '104rpx',
'width': '100%'
},
}
},
},
methods: {
// 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照
handleClick(item) {
if (item.disabled) return
this.$emit('submit', item.id)
}
}
}
</script>
<style lang="scss" scoped>
.bottom-button {
display: flex;
justify-content: center;
align-items: center;
padding: 0 30rpx 44rpx 30rpx;
.button-view {
max-width: 600rpx;
display: flex;
&.image {}
&.text {
width: 100%;
display: flex;
justify-content: flex-end;
}
.list-button {
display: flex;
flex-direction: column;
width: 100%;
&.image {
margin-right: 40rpx;
}
&.text {
width: 400rpx;
margin-left: 40rpx;
&.one {
width: 600rpx;
margin-left: 0rpx;
}
}
.image-view {
flex-shrink: 0;
background-color: #FFFFFF;
border-radius: 38rpx;
width: 76rpx;
height: 76rpx;
.image-content {
width: 76rpx;
height: 76rpx;
}
}
.text-content {
&.text {
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
}
&.image {
color: #333333;
font-size: 20rpx;
line-height: 20rpx;
height: 20rpx;
margin-top: 8rpx;
}
}
}
}
}
</style>
......@@ -14,6 +14,10 @@
<view class="order-cell">
<text>合作厂商:</text>
<text>{{ order.partnerCompanyName }}</text>
</view>
<view class="order-cell">
<text>厂商编号:</text>
<text>{{ order.partnerSerialNumber }}</text>
</view>
<view class="order-cell between-cell">
<view class="left">
......@@ -164,7 +168,7 @@
padding-bottom: 6rpx;
background-color: #FFFFFF;
margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx;
// padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
.top-item {
......
......@@ -40,7 +40,7 @@
<view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view>
<u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh"
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange"separator-color="#666666" ref="order-count-down"></u-count-down>
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" separator-color="#666666" ref="order-count-down"></u-count-down>
</view>
<view v-else-if="showTime">
<text>{{timeTitle}}</text>
......@@ -196,6 +196,17 @@
showDistance() {
return this.orderType == 0 && this.location.length >= 2 && (this.orderData.contactAddressLatitud || this.orderData.contactAddressLongitud)
},
titles() {
return {
'waitAccept': '待' + this.type0Text, // 待接单、
'waitAppointment': '待预约', // 待预约、
'waitCheckIn': '待签到', // 待签到、
'waitFinish': '待完工', // 待完工、
'audit': '审核中', // 审核中、
'exception': '异常单', // 异常单、
'finish': '已完工', //已完工
}
},
types() {
return {
'waitAccept': 0, // 待接单、
......@@ -207,6 +218,9 @@
'finish': 6, //已完工
}
},
title() {
return this.titles[this.type]
},
orderDistance() {
return this.distance(this.orderData.contactAddressLatitud,this.orderData.contactAddressLongitud, this.location[0], this.location[1])
},
......@@ -243,7 +257,7 @@
return 3
} else if (this.orderData.orderStatus == 85 || this.orderData.orderStatus == 87) {
return 4
} else if (this.orderData.orderStatus == 86 ||this.orderData.orderStatus == 88) {
} else if (this.orderData.orderStatus == 86 || this.orderData.orderStatus == 88) {
return 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
return 6
......@@ -267,10 +281,10 @@
methods: {
handleClick() {
// if (this.buttonDisabled) return
this.$emit('action')
this.$emit('action', this.orderData, this.title)
},
handleClickCell() {
this.$emit('click')
this.$emit('click', this.orderData, this.title)
},
handleChange(timestamp) {
if (this.timeout) this.$refs['order-count-down'].seconds += 2
......
......@@ -4,11 +4,11 @@
<text>履约记录</text>
</view>
<view v-if="orderRecords.length == 0" class="no-record-view">当前暂无履约记录</view>
<view v-else class="record-list-view">
<view v-else :class="['record-list-view', {'short': orderRecords.length <= showLenght}]">
<view class="record-right-view">
<view class="dashed-line-view"></view>
<view class="order-list">
<view v-for="(record,index) in shwoOrderRecords" :key="record.operationContent" :class="['order-cell', {'first': index == 0}]">
<view v-for="(record,index) in showOrderRecords" :key="record.operationContent" :class="['order-cell', {'first': index == 0}]">
<view class="node-view">
<view class="node-border-view">
<view class="node-middle-view"></view>
......@@ -71,7 +71,7 @@
}
},
computed: {
shwoOrderRecords() {
showOrderRecords() {
if (this.readMoreRecord && this.orderRecords && this.orderRecords.length > 0) {
return this.orderRecords.slice(0, this.showLenght)
} else {
......@@ -99,8 +99,10 @@
.record-list-view {
position: relative;
&.short {
padding-bottom: 30rpx;
}
.record-right-view {
position: relative;
display: flex;
......@@ -189,7 +191,7 @@
text-align: center;
color: #2272FF;
font-size: 26rpx;
margin-top: 30rpx;
padding-top: 30rpx;
padding-bottom: 30rpx;
}
......
import qiniuUploader from '@/include/libs/qiniuUploader.js';
const globalUrl = process.uniEnv || {}
export default {
name: 'qiniup',
components: {},
data() {
return {
domain: 'http://upload.qiniup.com', // 七牛上传域名地址
uptokenURL: globalUrl.ucenterUrl.apiUrl + '/v1/tokens', // 上传token地址
files:[], // 上传文件
fileMaps:[], // 上传文件返回对象
keys:[], // 七牛返回key
uploadToken: '', // 上传token
maximum:999, // 最大上传数量
qiniuOptions: {}, // 七牛上传配置
};
},
created() {
this.initQiniu()
},
methods: {
initQiniu: function() {
var defaulfs = {
// bucket所在区域,这里是华北区。ECN, SCN, NCN, NA, ASG,分别对应七牛云的:华东,华南,华北,北美,新加坡 5 个区域
region: 'ECN',
bucket: 'fa-cms',
qiniuBucketURLPrefix: 'uploads',
// 获取uptoken方法三选一即可,执行优先级为:uptoken > uptokenURL > uptokenFunc。三选一,剩下两个置空。推荐使用uptokenURL,详情请见 README.md
// 由其他程序生成七牛云uptoken,然后直接写入uptoken
uptoken: '',
// 从指定 url 通过 HTTP GET 获取 uptoken,返回的格式必须是 json 且包含 uptoken 字段,例如: {"uptoken": "0MLvWPnyy..."}
uptokenURL: this.uptokenURL,
// uptokenFunc 这个属性的值可以是一个用来生成uptoken的函数,详情请见 README.md
uptokenFunc: function() {
},
// bucket 外链域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 fileURL 字段。否则需要自己拼接
domain: this.domain,
// qiniuShouldUseQiniuFileName 如果是 true,则文件的 key 由 qiniu 服务器分配(全局去重)。如果是 false,则文件的 key 使用微信自动生成的 filename。出于初代sdk用户升级后兼容问题的考虑,默认是 false。
// 微信自动生成的 filename较长,导致fileURL较长。推荐使用{qiniuShouldUseQiniuFileName: true} + "通过fileURL下载文件时,自定义下载名" 的组合方式。
// 自定义上传key 需要两个条件:1. 此处shouldUseQiniuFileName值为false。 2. 通过修改qiniuUploader.upload方法传入的options参数,可以进行自定义key。(请不要直接在sdk中修改options参数,修改方法请见demo的index.js)
// 通过fileURL下载文件时,自定义下载名,请参考:七牛云“对象存储 > 产品手册 > 下载资源 > 下载设置 > 自定义资源下载名”(https://developer.qiniu.com/kodo/manual/1659/download-setting)。本sdk在README.md的"常见问题"板块中,有"通过fileURL下载文件时,自定义下载名"使用样例。
shouldUseQiniuFileName: true
};
let options = {}
if(Object.keys(this.qiniuOptions).length) {
Object.assign(options, defaulfs, this.qiniuOptions);
} else {
options = defaulfs;
}
// 将七牛云相关配置初始化进本sdk
qiniuUploader.init(options);
},
getUrlKey(file) {
let index = file.lastIndexOf('/');
let len = file.length
let name = file.substring(index + 1, len)
return name;
},
/**
* 确认上传
* @param {boolean} submit
*/
confirmUpload(submit = false) {
let self = this
const fileList = self.files
if (self.maximum - fileList.length <= 0) {
uni.showToast({
title: '图片数量不能大于' + self.maximum,
icon: 'none'
})
return
}
for (let file of fileList) {
let name = self.getUrlKey(file)
// 交给七牛上传
let item = {
src: '',
id: '',
key:'',
// filesize: '',
progress: 0
}
const params = {
name:name,
file:file,
}
qiniuUploader.upload(params, (res) => {
let inLen = self.maximum - fileList.length
if (inLen > 0) {
item.src = file
item.key = res.key || res.src
self.fileMaps.push(item);
self.keys.push(item.key)
if(submit) {
self.submitFile()
}
} else {
uni.showToast({
title: '图片数量不能大于9'
})
}
}, (error) => {
console.log('error: ' + error);
}, null, (res) => {
item.progress = res.progress
}, () => {
// 取消上传
}, () => {
// `before` 上传前执行的操作
}, (err) => {
// `complete` 上传接受后执行的操作(无论成功还是失败都执行)
});
}
}
}
}
import qiniuUploader from '@/include/libs/qiniuUploader.js';
const globalUrl = process.uniEnv || {}
export default {
name: 'upload-img',
components: {},
data() {
return {
domain: 'http://upload.qiniup.com',
uptokenURL: globalUrl.ucenterUrl.apiUrl + '/v1/tokens',
imgList: [],
imgs:[],
uploadToken: '',
selectNum:999,
};
},
computed: {
uploadBtnShow() {
let flag = this.imgList.length < this.selectNum
return flag && this.uploadVisible
}
},
created() {
this.initQiniu()
this.initImg();
},
methods: {
initQiniu: function() {
var options = {
// bucket所在区域,这里是华北区。ECN, SCN, NCN, NA, ASG,分别对应七牛云的:华东,华南,华北,北美,新加坡 5 个区域
region: 'ECN',
bucket: 'fa-cms',
qiniuBucketURLPrefix: 'uploads',
// 获取uptoken方法三选一即可,执行优先级为:uptoken > uptokenURL > uptokenFunc。三选一,剩下两个置空。推荐使用uptokenURL,详情请见 README.md
// 由其他程序生成七牛云uptoken,然后直接写入uptoken
uptoken: '',
// 从指定 url 通过 HTTP GET 获取 uptoken,返回的格式必须是 json 且包含 uptoken 字段,例如: {"uptoken": "0MLvWPnyy..."}
uptokenURL: this.uptokenURL,
// uptokenFunc 这个属性的值可以是一个用来生成uptoken的函数,详情请见 README.md
uptokenFunc: function() {
},
// bucket 外链域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 fileURL 字段。否则需要自己拼接
domain: this.domain,
// qiniuShouldUseQiniuFileName 如果是 true,则文件的 key 由 qiniu 服务器分配(全局去重)。如果是 false,则文件的 key 使用微信自动生成的 filename。出于初代sdk用户升级后兼容问题的考虑,默认是 false。
// 微信自动生成的 filename较长,导致fileURL较长。推荐使用{qiniuShouldUseQiniuFileName: true} + "通过fileURL下载文件时,自定义下载名" 的组合方式。
// 自定义上传key 需要两个条件:1. 此处shouldUseQiniuFileName值为false。 2. 通过修改qiniuUploader.upload方法传入的options参数,可以进行自定义key。(请不要直接在sdk中修改options参数,修改方法请见demo的index.js)
// 通过fileURL下载文件时,自定义下载名,请参考:七牛云“对象存储 > 产品手册 > 下载资源 > 下载设置 > 自定义资源下载名”(https://developer.qiniu.com/kodo/manual/1659/download-setting)。本sdk在README.md的"常见问题"板块中,有"通过fileURL下载文件时,自定义下载名"使用样例。
shouldUseQiniuFileName: true
};
// 将七牛云相关配置初始化进本sdk
qiniuUploader.init(options);
},
chooseImage() {
if (this.selectNum - this.imgList.length <= 0) {
uni.showToast({
title: '图片数量不能大于' + this.selectNum,
icon: 'none'
})
return
}
uni.chooseImage({
count: this.selectNum, //默认9 this.selectNum
success: (chooseImageRes) => {
for (var i = 0; i < chooseImageRes.tempFilePaths.length; i++) {
let file = chooseImageRes.tempFilePaths[i];
let index = file.lastIndexOf('/');
let len = file.length
let name = file.substring(index + 1, len)
// 交给七牛上传
let newLen = this.selectNum - this.imgList.length
let item = {
src: '',
id: '',
key:'',
// filesize: '',
progress: 0
}
const params = {
name:name,
file:file,
}
if (newLen > 0) {
qiniuUploader.upload(params, (res) => {
let inLen = this.selectNum - this.imgList.length
if (inLen > 0) {
item.src = file
item.key = res.key || res.src
this.imgList.push(item);
this.imgs.push(res.key)
// this.addRecord(item,res)
} else {
uni.showToast({
title: '图片数量不能大于9'
})
}
}, (error) => {
console.log('error: ' + error);
}, null, (res) => {
// item.filesize = res.totalBytesSent
item.progress = res.progress
}, () => {
// 取消上传
}, () => {
// `before` 上传前执行的操作
}, (err) => {
// `complete` 上传接受后执行的操作(无论成功还是失败都执行)
});
}
}
}
})
},
perviewImg(index) {
let urls = []
this.imgList.map(item => {
urls.push(item.src)
})
uni.previewImage({
current: index,
urls: urls
});
},
initImg() {
//传入图片,回显
this.imgList = this.initImgList.map(item=>{
let imgItem = {
src:'',
id:''
}
if(typeof item === 'string'){
imgItem.src = item
}else{
imgItem.src = item.src || item.pic || item.image
imgItem.id = item.id || '0'
}
return imgItem
})
},
// async addRecord(item, res) {
// let path = res.key;
// let hash = res.hash;
// let ext = path.substr(path.lastIndexOf('.') + 1);
// //推送到增加记录接口
// let params = {
// filename: hash + '.' + ext,
// full_url: res.fileURL,
// absolute_path: path,
// filesize: item.filesize,
// ext: ext
// };
// let recordRes = await this.$u.api.qiniuRecord(params);
// if (recordRes.code != 1) {
// uni.showToast({
// title: recordRs.msg,
// icon: 'none'
// })
// return
// }
// item.id = recordRes.data.id.id
// },
async removeImg(index) {
this.imgList.splice(index, 1)
// this.$emit('image-change', this.imgList) //将图片回传父页面
},
getUrlKey(file) {
let index = file.lastIndexOf('/');
let len = file.length
let name = file.substring(index + 1, len)
return name;
}
}
}
This diff is collapsed.
......@@ -51,7 +51,7 @@
scroll-anchoring> -->
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item" type="waitAccept" :location="location"
@click="handleClick(item.orderId)" @action="handleAction(item.orderId)">
@click="handleClick" @action="handleClick">
</OrderCell>
</view>
<u-loadmore v-show="(search.pageNumber == 1 && loadedOrder) || search.pageNumber > 2" :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore>
......@@ -166,15 +166,9 @@
this.getOrderCount()
this.initSettleInfo();
},
handleClick(orderId) { // 点击了cell
this.viewOderItem(orderId)
},
handleAction(orderId) { // 点击了按钮
this.viewOderItem(orderId)
},
viewOderItem(orderId) { // 跳转工单详情页面
handleClick(item, title) { // 跳转工单详情页面
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
url: 'pages/order/detail?id=' + item.orderId + '&title=' + title
})
},
async initSettleInfo() {
......
......@@ -41,7 +41,7 @@
</view>
</scroll-view>
</swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-if="version">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="learn-currency-class">
......@@ -231,12 +231,12 @@ var json = {
sectionId: "",
},
{
title: "充电桩安装要点提示",
desc: "在充电装安装过程中需要着重注意的要点",
title: "学习-我的模块",
desc: "学习-我的模块",
pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
percent: 0,
status: "",
id: 151,
id: 152,
sectionId: "",
},
],
......@@ -374,6 +374,9 @@ export default {
{
name: "消息通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
},
......@@ -385,9 +388,6 @@ export default {
{
name: "消息通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
},
......@@ -474,7 +474,7 @@ export default {
isReflesh: true,
triggered: false,
_freshing: false,
version: false,
version: true,
};
},
onLoad(param) {
......@@ -512,8 +512,9 @@ export default {
.getVersionInfo(version)
.then((res) => {
let data = res.data;
if(data.hasOwnProperty('is_audit') && data.is_audit == 1){
if(data.hasOwnProperty('is_audit') && data.is_audit == 0){
that.tabs = that.tabs2;
that.version = false
}
})
.catch((err) => {
......@@ -800,6 +801,7 @@ export default {
var news = {
body: e.body,
title: e.title,
create_at: e.create_at,
};
let that = this;
wx.navigateTo({
......
......@@ -23,7 +23,7 @@
<u-cell-group :border="false">
<view v-for="(item, index) in items" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName)">
<image slot="icon" :src="qnPath + item.icon" :style="item.imageStyle"></image>
<image slot="icon" :src="qnFile(item.icon)" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view>
</u-cell-item>
......@@ -43,7 +43,6 @@
export default {
data() {
return {
qnPath: process.uniEnv.qn_base_url,
serviceTel: '18124099271',
showSuperButton: false,
show: false,
......@@ -142,10 +141,13 @@
this.getData()
}
}
this.wodebeijingImage = await util.imageCache(this, 'wodebeijing.png')
this.placeholderImage = await util.imageCache(this, 'touxiang.png')
this.wodebeijingImage = this.qnFile('wodebeijing.png')
this.placeholderImage = this.qnFile('touxiang.png')
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
getData() {
let self = this
app.getBaseInfo(self);
......
......@@ -28,8 +28,8 @@
<NoOrder v-if="noMore" type="black" :customStyle="noOrderCustomStyle" />
<template v-else>
<view v-for="(item, index) in orderList" :key="item.orderId">
<OrderCell :orderData="item" :type="orderType" :location="dataValue" @click="handleClick(item)"
@action="handleAction(item)"> </OrderCell>
<OrderCell :orderData="item" :type="orderType" :location="dataValue" @click="handleClick"
@action="handleClick"> </OrderCell>
</view>
<u-loadmore v-show="(pageNumber == 1 && loaded) || pageNumber > 2" :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</template>
......@@ -282,17 +282,15 @@
}
});
},
viewOderItem(orderId) { // 跳转工单详情页面
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
})
},
handleClick(item) {
handleClick(item, title) {
console.log(item, title)
if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item)
return
}
this.viewOderItem(item.orderId)
uni.navigateTo({
url: 'pages/order/detail?id=' + item.orderId + '&title=' + title
})
},
filish(item){
// 去完工
......@@ -305,13 +303,13 @@
+ "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'')
})
},
handleAction(item) {
if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item)
return
}
this.viewOderItem(item.orderId)
},
// handleAction(item) {
// if(item.orderStatus===86 || item.orderStatus===88){
// this.filish(item)
// return
// }
// this.viewOderItem(item.orderId)
// },
handleClickSearch() {
uni.navigateTo({
url: 'pages/order/search'
......
This diff is collapsed.
<template>
<view>
<view class="news-wrap">
<u-navbar
back-icon-color="#000000"
:background="background"
......@@ -9,8 +9,11 @@
<view class="title">
{{ title }}
</view>
<view class="time-txt">
{{time | datefmt('YYYY.MM.DD HH:mm:ss')}}
</view>
<view class="u-content">
<u-parse :html="body" :tag-style="style"></u-parse>
<u-parse :html="body" :tag-style="style" :selectable="true"></u-parse>
</view>
</view>
</template>
......@@ -20,7 +23,20 @@
data() {
return {
title: '',
body: ''
body: '',
time: '',
style: {
// 字符串的形式
p: `
color: #666666;
font-size: 24rpx;
letter-spacing: 0.03rpx;
`,
span: 'font-size: 26rpx',
img: `
padding: 40rpx 0;
`,
},
}
},
onLoad() {
......@@ -30,25 +46,35 @@
eventChannel.on('acceptDataFromLearn', function(data) {
that.title = data.title;
that.body = data.body;
that.time = data.create_at
})
this.$u.mpShare.path = ''
},
}
</script>
<style>
<style>
.news-wrap {
background-color: #FFFFFF;
height: 100vh;
}
.title{
font-size: 32rpx;
font-size: 36rpx;
font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
}
margin: 20rpx 30rpx;
}
.time-txt {
margin: 0 30rpx;
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 24rpx;
}
.u-content{
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-top: 30rpx;
margin-right: 30rpx;
}
</style>
<template>
<template v-cloak>
<view class="">
<view class="learn-vedio">
<view class="learn-vedio" v-if="version && loaded">
<u-navbar back-icon-color="#000000" :background="background" title-color="#000000" :border-bottom="false">
</u-navbar>
<view class="uni-padding-wrap uni-common-mt">
......@@ -48,6 +48,11 @@
</view>
</view>
</view>
<view v-else-if="loaded">
<u-navbar back-icon-color="#000000" :background="background" title-color="#000000" :border-bottom="false">
</u-navbar>
<view style="text-align: center;">暂无数据</view>
</view>
</view>
</template>
......@@ -100,7 +105,9 @@
scrollTop: null
},
scrollValue: 0,
nowTime: 0
nowTime: 0,
version: true,
loaded: false
};
},
computed: {
......@@ -109,18 +116,37 @@
},
},
onLoad(e) {
getApp().trackPage('学习视频详情页')
this.section_id = e.section_id
this.params.course_id = e.course_id
this.getCapterDetails()
this.getSectionInfo({
section_id: e.section_id
})
this.getVersion();
getApp().trackPage('学习视频详情页')
if(e){
this.section_id = e.section_id
this.params.course_id = e.course_id
this.getCapterDetails()
this.getSectionInfo({
section_id: e.section_id
})
}
},
onReady: function(res) {
this.videoContext = uni.createVideoContext("courseVideo");
},
methods: {
getVersion() {
let version = process.uniEnv.version_number;
let that = this;
this.$u.api
.getVersionInfo(version)
.then((res) => {
that.loaded = true
let data = res.data;
if(data.hasOwnProperty('is_audit') && data.is_audit == 0){
that.version = false
}
})
.catch((err) => {
that.loaded = true
});
},
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop
},
......
<template>
<view class="">
<!-- <w-navbar></w-navbar> -->
<view class="backView">
<view class="login-block" v-if="needAuth">
<u-image class="u-flex u-row-center logo" :src="logo" width="200" height="200">
<u-image :fade="false" class="u-flex u-row-center logo" :src="logo" width="200" height="200">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<u-image class="u-flex u-row-center logo2" :src="logo2" width="214" height="60">
<u-image :fade="false" class="u-flex u-row-center logo2" :src="logo2" width="214" height="60">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
</view>
<view class="bind-block" v-else>
<u-image class="u-flex u-row-between logo" :src="logo" width="148" height="148">
<u-image :fade="false" class="u-flex u-row-between logo" :src="logo" width="148" height="148">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<view class="bind-phone">{{ bindPhone }}</view>
<view class="bind-tips">{{ bindTips }}</view>
</view>
<u-gap height="570"></u-gap>
<u-gap height="480"></u-gap>
<button class="loginBtn" v-if="needAuth" lang="zh_CN" @tap="getUserProfile">
<text class="u-font-32 white">{{ loginTitle }}</text>
</button>
......@@ -38,7 +39,6 @@ const app = getApp()
export default {
data() {
return {
qnPath: process.uniEnv.qn_base_url,
needAuth: true,
TimeID: -1,
loginTitle: '用户登录',
......@@ -50,10 +50,10 @@ export default {
},
computed: {
logo() {
return util.imageCache(this, 'logo.png')
return this.qnFile('logo.png')
},
logo2() {
return util.imageCache(this, 'logo-2.png')
return this.qnFile('logo-2.png')
},
},
onLoad(e) {
......@@ -67,6 +67,9 @@ export default {
this.getCode()
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
async getCode() {
login.appLogin().then(res => {
this.code = res.code
......@@ -160,7 +163,7 @@ export default {
login.signup(params).then(res => {
uni.hideLoading()
if (res) {
app.setUserData(res.data, that)
login.setUserData(res.data, that)
app.track('signup_login', {mobile: res.data.mobile});
app.profileSet(that)
app.profileAppend(that)
......@@ -171,11 +174,11 @@ export default {
title: '授权失败,请重新授权',
icon: 'none'
});
this.setLoginStatus(false)
that.setLoginStatus(false)
}
}).catch(res => {
uni.hideLoading()
this.setLoginStatus(false)
that.setLoginStatus(false)
})
},
fail () {
......@@ -184,7 +187,7 @@ export default {
}
})
} else {
this.toLogin(params)
that.toLogin(params)
}
} else {
uni.showModal({
......
......@@ -4,7 +4,7 @@
:border-bottom="false" title-bold></u-navbar>
<view class="wallet-content-view">
<view class="header-view">
<image class="header-image" :src="qianbaobeijing"></image>
<image class="header-image" :src="qnFile('qianbaobeijing.png')"></image>
</view>
<view class="survey-view">
<view class="survey-top-view">
......@@ -109,9 +109,6 @@
imageUrl() {
return process.uniEnv.qn_base_url
},
qianbaobeijing() {
return util.imageCache(this, 'qianbaobeijing.png')
},
buttonStyle() {
return {
width: "200rpx",
......@@ -139,6 +136,9 @@
this.loadStatement()
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
// 提现
handleClickWithdraw() {
this.$u.route({
......
......@@ -20,7 +20,7 @@
</view>
</view>
</view>
<image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image>
<image :src="qnFile('liushuibeijing.png')" class="head-back-image" mode="widthFix"></image>
<view class="list-view" v-if="hasInfo">
<view class="u-flex u-row-center" v-if="loading">
<u-gap height="20"></u-gap>
......@@ -31,7 +31,7 @@
</view>
</view>
<view class="list-view-empty" v-else>
<u-image class="empty-image" :src="banner" width="374" height="246" mode="widthFix" :fade="true" duration="450">
<u-image class="empty-image" :src="banner" width="374" height="246" mode="widthFix" :fade="false">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
......@@ -64,9 +64,6 @@
}
},
computed: {
liushuibeijingImage() {
return util.imageCache(this, 'liushuibeijing.png')
},
imageUrl() {
return process.uniEnv.qn_base_url
},
......@@ -74,7 +71,7 @@
return this.loading || this.info.payableRecordExtendDtos && this.info.payableRecordExtendDtos.length
},
banner() {
return util.imageCache(this, 'receipt.png')
return this.qnFile('receipt.png')
},
},
onLoad() {
......@@ -82,6 +79,9 @@
this.loadPayRecord()
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
async loadPayRecord() {
let self = this
self.loading = true
......
......@@ -20,7 +20,7 @@
</view>
</view>
</view>
<image :src="liushuibeijingImage" class="head-back-image" mode="widthFix"></image>
<image :src="qnFile('liushuibeijing.png')" class="head-back-image" mode="widthFix"></image>
<view class="list-view" v-if="hasInfo">
<view class="u-flex u-row-center" v-if="loading">
<u-gap height="20"></u-gap>
......@@ -31,7 +31,7 @@
</view>
</view>
<view class="list-view-empty" v-else>
<u-image class="empty-image" :src="banner" width="374" height="246" mode="widthFix" :fade="true" duration="450">
<u-image class="empty-image" :src="banner" width="374" height="246" mode="widthFix" :fade="false">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
......@@ -84,14 +84,11 @@
}
},
liushuibeijingImage() {
return util.imageCache(this, 'liushuibeijing.png')
},
imageUrl() {
return process.uniEnv.qn_base_url
},
banner() {
return util.imageCache(this, 'receipt.png')
return this.qnFile('receipt.png')
},
hasInfo() {
return this.loading || this.data.statementList && this.data.statementList.length
......@@ -101,7 +98,10 @@
getApp().trackPage('收入流水列表页')
this.loadStatement()
},
methods: {
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
bindDateChange: function(e) {
this.date = e.target.value
this.loadStatement()
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,14 +38,14 @@ const setOpenid = function (openid) {
function validImages(imgurl) {
return new Promise((resolve, reject) => {
uni.getImageInfo({
src: imgurl,
success (res) {
resolve(true)
},
fail () {
reject(false)
}
})
src: imgurl,
success(res) {
resolve(true)
},
fail() {
reject(false)
}
})
})
}
......@@ -58,7 +58,6 @@ function validImages(imgurl) {
const imageCache = async function (vm, src, host) {
host = host || process.uniEnv.qn_base_url
let image_url = host + src
return image_url // 临时
let image_name = md5Libs.md5(image_url)
var arr = Object.keys(vm.vuex_cache);
const result = await validImages(vm.vuex_cache[image_name])
......@@ -70,7 +69,6 @@ const imageCache = async function (vm, src, host) {
url: image_url,
success: (res) => {
if (res.statusCode === 200) {
// call_back(res.tempFilePath)
vm.$u.vuex(`vuex_cache.${image_name}`, res.tempFilePath)
}
}
......
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