Commit 48c237ad authored by Facius's avatar Facius

Merge branch 'dev' into test

parents 6b16f38e 29244ad3
......@@ -5,11 +5,11 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://192.168.0.62:37080', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'http://deudn.c.pp.cc/',
qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'http://deudn.c.pp.cc/',
argoDebugMode: 1
}
module.exports = UNI_APP;
(function() {
let NODE_ENV = 'prod'; // dev:开发环境 | test:测试环境 | prod:生产环境
(function () {
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null;
let VERSION_NUMBER = '1.3.1';//版本号
let VERSION_NUMBER = '1.3.3';//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
......@@ -21,8 +21,8 @@
}
if (ENV_VAR) {
process.uniEnv = {};
process.uniEnv['node_env'] = NODE_ENV;
process.uniEnv['version_number'] = VERSION_NUMBER;
process.uniEnv['node_env'] = NODE_ENV;
process.uniEnv['version_number'] = VERSION_NUMBER;
for (let key in ENV_VAR) {
process.uniEnv[key] = ENV_VAR[key];
}
......
......@@ -106,7 +106,7 @@ export default {
},
getSystemInfo() {
try {
let a = wx.getSystemInfoSync();
let a = this.$u.sys();
this.globalData.navHeight =
(a.statusBarHeight / a.screenWidth) * 750 + 90;
this.globalData.rpxScreenHeight =
......@@ -116,9 +116,6 @@ export default {
} catch (a) {}
},
async getBaseInfo(vm, callBack) {
// uni.showLoading({
// title: "加载中……",
// });
const res = await vm.$u.api.getSettleBaseInfo();
if (res.code !== 200) {
return false;
......@@ -131,7 +128,6 @@ export default {
if (typeof callBack == "function") {
callBack(vm, res.data);
}
// uni.hideLoading();
return res.data;
},
......@@ -261,6 +257,7 @@ export default {
<style>
/*每个页面公共css */
@import "@/common/iconfont.css";
</style>
<style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
......
......@@ -119,6 +119,11 @@ let orderApiFun = function(vm){
*/
let getCompleteConfigAndData= async (orderId) => await vm.$u.get(prefix + vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/**
* 完工项阶段下一步
*/
let completeNextStep= async (params = {}, orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/maintain/nextStep', params);
/**
* 查询措施
*/
......@@ -172,6 +177,10 @@ let orderApiFun = function(vm){
let otherUser = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/other/user', params);
// 是否添加客服
let checkAddCustomer = async (params = {}) => await vm.$u.get(prefix + 'order/revision/' + vm.vuex_token + '/checkAddCustomer', params);
// 工单文件标签
let fileLabel = async (params = {}) => await vm.$u.get(prefix + 'config/' + vm.vuex_token + '/finish/file/lable/', params);
// 工单文件列表
let fileList = async (params = {}) => await vm.$u.get(prefix + 'config/' + vm.vuex_token + '/finish/file', params);
const orderApi = {
listByRecommendOrder,
......@@ -212,7 +221,10 @@ let orderApiFun = function(vm){
workerApplyPay,
allowLogin,
otherUser,
checkAddCustomer
checkAddCustomer,
fileLabel,
fileList,
completeNextStep
}
return orderApi
}
......
......@@ -88,7 +88,8 @@ const install = (Vue, vm) => {
// return result;
case 200:
return {
data:result.data == null ? result : result.data, // result.data的值为0, false, ''的时候也要算有值
// data:result.data == null ? result : result.data, // result.data的值为0, false, ''的时候也要算有值
data:result.data,
code:code,
message:msg
};
......
@font-face {
font-family: "wxh"; /* Project id 2600874 */
/* Color fonts */
src:
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAHYAAwAAAAAA3wAAAGNAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIhgjEgZgADwKYGwBNgIkAwwLCgAEIAWBVAcgG6sCyL5APLajkgSQKlA9xTEuxLtPw+avikE32OCp3+939u3+/1Gp7skkindRuVQ8k0iUaNNpRCLDdLF04f9/532v+ifKCgIKskACGvLAxrTW4SE+1iqP8/+6guhXXAM8hf9vEasvfKVwncDD1TkrNzR1E+lJXq2Jk7a1bQ3roijRNAvX4KcCSyxqd7YWLiJliUdasyQ5XAICJABpCMZgAkDSE0gAP2OGrgmRg5tgCnRTF5lSK4fYlCRE6qmni0ey3kWdd6AOt3OGAD8DWYQiKJCG+oE0jAWEMQIW696D9G/KUxg1AKI02plA7vAtAEFB+v7O7tkkdNLjvbjTF5h7OrYl920W6m8dFljELe5HnXjRVxjkRJ65+0r0u+pq6/XtP1pP8E4/1AFhLCAv7zVIoOnH2TR4MIAZYTWjM0p5KABhHoosGhHQgGmEmthvxABkBq2gMBm5GwxWbNsxY8CkaZsWjFpTTQVVKdtAj149uirJqit35ACW9XfEpDXrZi1bkqVWQeFDBQCPX3IBAA==') format('woff2');
}
.wxh {
font-family: "wxh" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.wxh-doc:before {
content: "\e601";
}
......@@ -9,38 +9,49 @@
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 v-if="confirmButtonText !== '确定'">
<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="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 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="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 class="u-flex u-row-between list-item"
v-for="(item, index) in listData" :key="index">
<view class="item-txt left-txt" style="width: 200rpx;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>
<view v-else>
<view class="check-status">
<text class='status-txt' style="color: #333;">确认安装结果</text>
</view>
<view class="u-flex no-install">
<text class="tips">提交信息,确认安装结论为不安装</text>
</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 class="button cancel" v-show="cancelButtonText !== ''" @tap="cancel">{{ cancelButtonText }}</view>
<view class="button confirm" @tap="confirm">{{ confirmButtonText }}</view>
</view>
</view>
</u-popup>
......@@ -79,6 +90,14 @@
{label: '安装信息', submitted: 15, required: 20, pass: false}
]
}
},
confirmButtonText: {
type: String,
default: '确定'
},
cancelButtonText: {
type: String,
default: ''
}
},
data() {
......@@ -104,9 +123,6 @@
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'},
},
......@@ -115,14 +131,7 @@
this.$emit('close')
},
confirm() {
if(this.pass) {
this.$emit('change')
} else {
let data = this.listData.find((item, index) => {
return item.pass == false;
})
this.$emit('handle', data)
}
this.$emit('confirm')
}
},
......@@ -161,6 +170,15 @@
margin-bottom: 40rpx;
}
}
.no-install {
justify-content: center;
align-items: center;
height: 200rpx;
border-top: 2rpx solid #F4F5F7;
.tips {
font-size: 28rpx;
}
}
.check-bottom {
display: flex;
justify-content: center;
......@@ -194,7 +212,7 @@
line-height: 32rpx;
}
.left-txt {
width: 160rpx;
width: 200rpx;
text-align: left;
}
.right-txt {
......
......@@ -61,7 +61,7 @@
display: flex;
flex-wrap: wrap;
line-height: 50rpx;
max-width: 46%;
max-width: 46%;
align-items: center;
&.active{
background-color: #2272FF;
......
......@@ -4,7 +4,7 @@
<view class="file-box">
<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 ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'" :border-radius="10" @click.stop="prviewImage(item,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)" fade lazy-load ></u-image>
<view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view>
<view class="icon-del rotate"></view>
......
......@@ -2,7 +2,10 @@
<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" :cursor-spacing="10" hold-keyboard/>
:custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC" :maxlength="maxlength" :cursor-spacing="10" :disabled="isDisabled" hold-keyboard/>
<view class="content" v-if="slotContent">
<text class="txt">{{ slotContent }}</text>
</view>
</view>
</template>
......@@ -26,42 +29,18 @@
type: {
type: String,
default: 'text'
},
slotContent: {
type: String,
default: ''
}
// width: { // 例如:454rpx
// type: String,
// default: '100%'
// }
},
data() {
return {
inputType: 'text',
// type: 'text'
inputType: 'text'
}
},
computed: {
// type() {
// if (this.item) {
// let ty = this.item.fieldsType.toLocaleLowerCase()
// switch (ty) {
// case 'text':
// return 'textarea'
// case 'password':
// return this.item.fieldsType
// case 'decimal':
// case 'number':
// case 'double':
// case 'integer':
// this.maxlength = 9
// return 'digit'
// case 'textarea':
// default:
// return 'text'
// }
// } else {
// return 'text'
// }
// },
maxlength() {
return this.type == 'digit' ? 9 : 140
},
......@@ -89,6 +68,9 @@
},
backgroundColor() {
return this.textarea ? 'transparent' : '#F4F5F7'
},
isDisabled() {
return this.item.fieldsId === 254 || this.disabled ? true : false
}
},
watch: {},
......@@ -97,8 +79,16 @@
}
</script>
<style scoped>
<style lang="scss" scoped>
.input-item{
background: #F4F5F7;
}
.content {
padding-top: 20rpx;
line-height: 45rpx;
.txt {
font-size: 24rpx;
color: #999;
}
}
</style>
......@@ -25,6 +25,7 @@
mounted() {},
methods: {
setValue(txt){
if (this.disabled) return
this.dataValue = txt
this.valueChange(txt)
}
......@@ -44,7 +45,7 @@
display: flex;
flex-wrap: wrap;
line-height: 50rpx;
max-width: 46%;
max-width: 46%;
align-items: center;
&.active{
background-color: #2272FF;
......
<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>
</u-image>
<!-- 我的页面进来下载图片,其他页面进来open-type为客服,跳转到客服页面 -->
<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 +45,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,12 +85,16 @@
}
},
methods: {
qnFile(src) {
return process.uniEnv.qn_base_url + src
},
phoneToCustomer() { // 联系客户
uni.makePhoneCall({
phoneNumber: this.phone, //仅为示例
complete() {}
});
},
},
// 我的页面下载图片,其他页面要跳到客服页面
download() {
if (!this.isMine) {
this.$emit('click')
......
<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>
<template>
<view class="card base-item">
<view class="top-item">
<view class="left">
<view :class="['tag', {'active': order.orderServiceType == '安装'}]">{{ order.orderServiceType }}</view>
<text class="title">{{ order.categoryName }}</text>
</view>
<view class="right">{{ order.orderBusinessTypeText }}</view>
</view>
<view class="order-cell">
<text>工单编号:</text>
<text>{{ order.orderNumber }}</text>
</view>
<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">
<text>客户信息:</text>
<text>{{ order.contactName }}</text>
</view>
<image v-if="showOperate" style="width: 84rpx;height: 56rpx;" :src="phoneIcon"
@click="phoneToCustomer(order.contactPhone)">
</image>
</view>
<view class="order-cell">
<text>联系方式:</text>
<text>{{ order.contactPhone }}</text>
</view>
<view class="between-cell address-cell">
<view class="left-address">
<u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ formatAddress }}</text>
</view>
<image v-if="showOperate" style="width: 84rpx;height: 56rpx;" :src="navigationIcon"
@click="openLocation(order.contactAddress)"></image>
</view>
<view v-if="readMore" @click="handleClick(false)" class="read-more-toggle">
<u-icon name="arrow-down"></u-icon>
<text class="read-more-text">查看更多</text>
</view>
<view v-else class="order-item-more">
<view class="line-view"></view>
<view class="order-cell between-cell">
<text class="cell-title">品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text class="cell-title">数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<view class="read-more-toggle" @click="handleClick(true)">
<u-icon name="arrow-up"></u-icon>
<text class="read-more-text">点击收起</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
// 履约记录
order: {
type: Object,
default () {
return {}
}
},
// true 显示「查看更多」按钮, false 显示「点击收起」按钮
readMore: {
type: Boolean,
default: true
},
// 可以点击电话和地址
operate: {
type: Boolean,
default: true
},
// 显示点击电话和地址
showOperate: {
type: Boolean,
default: true
}
},
data() {
return {}
},
computed: {
formatAddress() {
let self = this
let address = ""
if (self.order) {
address = self.order.contactProvinceText || ""
address += self.order.contactCityText || ""
address += self.order.contactCommunityText || ""
address += self.order.contactStreetText || ""
address += self.order.contactAddress || ""
}
return address
},
phoneIcon() {
//self-support/icon/dianhua-0@2x.png
if (this.operate) {
return process.uniEnv.qn_base_url + 'dianhua.png'
} else {
return process.uniEnv.qn_base_url + 'dianhua-d.png'
}
},
navigationIcon() {
//self-support/icon/daohang-0@2x.png
if (this.operate) {
return process.uniEnv.qn_base_url + 'daohang.png'
} else {
return process.uniEnv.qn_base_url + 'daohang-d.png'
}
},
},
methods: {
openLocation(address) {
if (this.operate) {
const latitude = this.order.contactAddressLatitud //res.latitude;
const longitude = this.order.contactAddressLongitud //res.longitude;
uni.openLocation({
latitude: Number(latitude),
longitude: Number(longitude),
success: function() {
console.log('success');
}
});
}
},
phoneToCustomer(phone) { // 联系客户
if (this.operate) {
uni.makePhoneCall({
phoneNumber: phone, //仅为示例
complete() {}
});
this.contactTime()
}
},
contactTime() {
let self = this
var data = {}
if (this.submitType === "workerAppointment") {
self.$u.api.contactTime(data, this.order.orderId)
}
},
handleClick(val) {
this.$emit('update:readMore', val)
}
}
}
</script>
<style lang="scss" scoped>
.base-item {
padding-bottom: 6rpx;
background-color: #FFFFFF;
margin-bottom: 20rpx;
// padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px;
.top-item {
display: flex;
justify-content: space-between;
margin-bottom: 30rpx;
.left {
display: flex;
align-items: center;
.tag {
text-align: center;
width: 84rpx;
height: 40rpx;
border-radius: 8rpx;
font-size: 22rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 40rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
&.active {
background-image: linear-gradient(to right, #2272FF, #47ABFF);
}
}
.title {
margin-left: 20rpx;
height: 36rpx;
font-size: 36rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
}
}
.right {
text-align: center;
width: 100rpx;
height: 40rpx;
background: #F4F5F7;
border-radius: 22rpx;
font-size: 22rpx;
font-weight: 400;
color: #333333;
line-height: 40rpx;
}
}
.address-cell {
font-size: 24rpx;
font-weight: 400;
color: #333333;
line-height: 24rpx;
margin-top: 20rpx;
margin-bottom: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
.left-address {
display: flex;
align-items: flex-start;
.address-txt {
line-height: 30rpx;
margin-left: 8rpx;
margin-right: 30rpx;
}
}
}
}
.read-more-toggle {
text-align: center;
color: #2272FF;
font-size: 26rpx;
margin-top: 30rpx;
padding-bottom: 30rpx;
}
.read-more-text {
padding-left: 8rpx;
}
.order-item-more {
font-size: 26rpx;
color: #333333;
text-align: right;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
margin-bottom: 20rpx;
}
}
.order-cell {
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 48rpx;
margin-bottom: 10rpx;
}
.between-cell {
display: flex;
justify-content: space-between;
align-items: center;
}
.display-cell {
display: flex;
}
.cell-title {
text-align: left;
flex-shrink: 0;
}
</style>
......@@ -39,8 +39,8 @@
<view>
<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>
<u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh" hide-zero-day
: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,14 +281,14 @@
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
if (timestamp == 0 && !this.timeout) {
if (timestamp == 0 && !this.timeout) { // 超时之后倒计时变为正计时
setTimeout(()=> {
this.timestamp = 1
this.timeout = true
......
......@@ -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>
......@@ -18,18 +18,19 @@
<view class="line-view-top">
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy.mm.dd hh:MM:ss')}} </text>
<text style="color: red;">{{record.overTime?'超时':''}}{{record.exception?'异常':''}}</text>
<text style="color: #2272FF;"
v-show="record.operationType==='报备' || record.operationType==='改约'">跟进</text>
<text style="color: #2272FF;" v-show="record.isTrace">跟进</text>
</view>
<view class="line-view-item">
<view>
<text>{{record.operationTypeText}}</text>
</view>
<view class="item-operation-view"
v-show="record.operationType==='报备' || record.operationType==='预约'|| record.operationType==='改约'">
<text>{{record.operationType==='报备' ? '下次联系时间:' : record.operationType==='改约'?'改约时间:': ''}}</text>
<text
style="color: #2272FF;word-break: break-all;">{{record.orderRecordRemark}}</text>
<view class="item-operation-view" v-show="record.isTrace">
<text class="item-label" >{{record.traceLabel + ":"}}</text>
<text class="item-content">{{record.traceTime}}</text>
</view>
<view class="item-operation-view" v-show="record.operationContent">
<text class="item-label">备注:</text>
<text class="item-content">{{ record.operationContent }}</text>
</view>
</view>
</view>
......@@ -70,14 +71,14 @@
}
},
computed: {
shwoOrderRecords() {
showOrderRecords() {
if (this.readMoreRecord && this.orderRecords && this.orderRecords.length > 0) {
return this.orderRecords.slice(0, this.showLenght)
} else {
return this.orderRecords
}
},
}
},
}
</script>
......@@ -93,14 +94,15 @@
.no-record-view {
font-size: 26rpx;
color: #333333;
margin-top: 30rpx;
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.record-list-view {
position: relative;
&.short {
padding-bottom: 30rpx;
}
.record-right-view {
position: relative;
display: flex;
......@@ -128,22 +130,25 @@
.node-view {
margin-right: 18rpx;
flex-shrink: 0;
margin-top: 8rpx;
margin-top: 8rpx;
z-index: 1;
.node-border-view {
border: 2rpx solid #2272FF;
border-radius: 11rpx;
width: 22rpx;
height: 22rpx;
display: flex;
align-items: center;
justify-content: center;
// display: flex;
// align-items: center;
// justify-content: center;
padding: 5rpx;
background-color: #FFFFFF;
.node-middle-view {
width: 10rpx;
height: 10rpx;
background-color: #2272FF;
border-radius: 5rpx;
border-radius: 6rpx;
}
}
}
......@@ -156,6 +161,7 @@
align-items: center;
justify-content: space-between;
color: #333333;
font-weight: bold;
font-size: 28rpx;
}
......@@ -166,6 +172,12 @@
.item-operation-view {
margin-top: 20rpx;
.item-label {
color: #2272FF;
}
.item-content {
word-break: break-all;
}
}
}
}
......@@ -179,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.
......@@ -4,7 +4,7 @@
<scroll-view style="height: 100%;" scroll-y @scrolltolower="reachBottom" :scroll-top="scrollTop" @scroll="scroll"
scroll-anchoring scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100"
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" enable-back-to-top>
@refresherrestore="onRestore" enable-back-to-top>
<!-- <TabBarPage title="扳手会"> -->
<image class="banner-image" :src="bannerImage" @click="handleClickBanner"></image>
......@@ -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() {
......
This diff is collapsed.
......@@ -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,11 +43,12 @@
export default {
data() {
return {
qnPath: process.uniEnv.qn_base_url,
serviceTel: '18124099271',
showSuperButton: false,
show: false,
content: '是否确认退出该账户?'
content: '是否确认退出该账户?',
wodebeijingImage: '',
placeholderImage: ''
}
},
computed: {
......@@ -122,12 +123,6 @@
headImageUrl() {
return this.avatar || this.placeholderImage
},
wodebeijingImage() {
return util.imageCache(this, 'wodebeijing.png')
},
placeholderImage() {
return util.imageCache(this, 'touxiang.png')
},
headImageStyle() {
return this.avatar ? 'width:136rpx; height:136rpx;border-radius:68rpx' : 'width:144rpx; height:144rpx;border-radius:72rpx'
},
......@@ -135,7 +130,7 @@
return this.avatar ? 136 : 144
}
},
onLoad() {
async onLoad() {
app.trackPage('我的首页')
if(this.vuex_token ) {
if (!this.showSuperButton) {
......@@ -146,9 +141,13 @@
this.getData()
}
}
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){
// 去完工
......@@ -303,15 +301,16 @@
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&partnerCompanyId=" + item.partnerCompanyId
+ "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'')
+ "&maintainStep=" + item.maintainStep
})
},
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'
......
<template>
<template>
<view>
<u-navbar
back-icon-color="#000000"
:background="background"
title-color="#000000"
:border-bottom="false">
</u-navbar>
<view class="title">
{{ title }}
<u-navbar back-icon-color="#000000" :background="background" title-color="#000000" :border-bottom="false">
</u-navbar>
<view class="title">
{{ title }}
</view>
<view class="creat_at">
{{create_at}}
</view>
<view class="u-content">
<u-parse :html="body" :tag-style="style"></u-parse>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
body: ''
}
},
onLoad() {
getApp().trackPage('消息通知详情页')
var that = this;
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('acceptDataFromLearn', function(data) {
that.title = data.title;
that.body = data.body;
})
this.$u.mpShare.path = ''
},
}
</script>
<style>
.title{
font-size: 32rpx;
font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
}
.u-content{
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-top: 30rpx;
margin-right: 30rpx;
}
</style>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: "",
body: "",
create_at: "",
};
},
onLoad() {
getApp().trackPage("消息通知详情页");
var that = this;
const eventChannel = this.getOpenerEventChannel();
eventChannel.on("acceptDataFromLearn", function (data) {
that.title = data.title;
that.body = data.body;
that.create_at = data.create_at;
console.log(data);
});
this.$u.mpShare.path = "";
},
};
</script>
<style>
.title {
font-size: 32rpx;
font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
}
.u-content {
font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-right: 30rpx;
}
.creat_at {
font-size: 24rpx;
color: #999999;
margin-left: 30rpx;
margin-top: 20rpx;
}
rich-text {
margin-top: 40rpx;
display: block;
}
</style>
<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>
......@@ -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
......@@ -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.
<template>
<view class="doc-tag">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="安装文件" titleColor="#333333"
:border-bottom="false" title-bold></u-navbar>
<!-- 合作商或品牌标签列表 -->
<view class="label-content">
<view v-for="(label, index) in labels" :key="index" class="label-item">
<!-- 选中为蓝底,非选中状态为灰底 -->
<view :class="['label-normal', {'selected': label.id == selectedId}]"
@click="handleClick(label)">
<text class="label-text">{{label.name}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
labels: [], // 标签列表
selectedId: ''
};
},
onLoad(e) {
if (e && e.partnerCompanyId) { // 合作商id
this.tagTitle = '品牌'
this.loadFileLabel('2', e.partnerCompanyId)
} else { // 获取所有文件资料
this.tagTitle = '合作商'
this.loadFileLabel('1')
}
},
methods: {
// 选中标签
handleClick(key, label) {
},
// 获取合作商列表
async loadFileLabel(type, partnerCompanyId) {
let param = {
type: type, // 1:合作商标签,2:品牌标签
}
if (type == '2') {
param.partnerCompanyId = partnerCompanyId // 合作商的标签id
}
let res = await this.$u.api.fileLabel(param)
if (res && res.code == 200) {
this.labels = res.data || []
// this.labels = [...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data] // 测试模拟多条数据
}
},
}
};
</script>
<style lang="scss" scoped>
.doc-tag {
background-color: #F4F5F7;
height: 100vh;
display: flex;
flex-direction: column;
.label-content {
width: 100%;
display: flex;
align-items: center;
overflow: auto;
padding: 0 10rpx 44rpx 30rpx;
.label-item {
padding-right: 20rpx;
flex-shrink: 0;
.label-normal {
height: 104rpx;
width: 200rpx;
font-size: 26rpx;
color: #666666;
background-color: #FFFFFF;
border-radius: 8rpx;
padding-left: 30rpx;
padding-right: 30rpx;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
.label-text {
word-break: break-all;
}
&.selected {
color: #FFFFFF;
background-color: #2272FF;
}
}
}
}
}
</style>
This diff is collapsed.
......@@ -246,16 +246,17 @@
},
async closeTake(img) {
if(img !==undefined){
// 复制一份 用于保存
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
let saveList = JSON.parse(JSON.stringify(this.currentItemDate.orderImages))
const files = img.map(v => v.path)
const value = await this.saveToTask(files)
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
// 复制一份 用于保存
let saveList = this.currentItemDate.orderImages.concat();
value.map(item =>{
// step1 添加缓存图片 到显示
this.currentItemDate.orderImages.push(item.path)
// 文件key添加保存数组中
saveList.push(item.key)
// step1 添加缓存图片 到显示
this.currentItemDate.orderImages.push(item.path)
})
// step2 保存图片
var data={
......@@ -263,6 +264,7 @@
images : Array.from(saveList),
fieldsName:this.currentItemDate.fieldName
}
console.log("data", data)
this.$u.api.saveImage(data,this.orderId).then((res) => {
if (res.code == 200) {
} else {
......
......@@ -35,15 +35,18 @@ const setOpenid = function (openid) {
}
}
async function validImages(imgurl) {
let exists = false
await uni.getImageInfo({
src: imgurl,
success (res) {
exists = true
}
})
return exists
function validImages(imgurl) {
return new Promise((resolve, reject) => {
uni.getImageInfo({
src: imgurl,
success(res) {
resolve(true)
},
fail() {
reject(false)
}
})
})
}
/**
......@@ -52,14 +55,13 @@ async function validImages(imgurl) {
* @param {Object} src 图片地址
* @param {Object} host 图片前缀,默认使用qn_base_url
*/
const imageCache = function (vm, src, host) {
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);
if (vm.vuex_cache && arr.length && arr.includes(image_name) &&
validImages(vm.vuex_cache[image_name])) {
const result = await validImages(vm.vuex_cache[image_name])
if (vm.vuex_cache && arr.length && arr.includes(image_name) && result) {
return vm.vuex_cache[image_name]
} else {
// 本地没有缓存 需要下载
......@@ -67,7 +69,6 @@ const imageCache = 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