域名更换
This commit is contained in:
parent
a4b56b1e0c
commit
85a3a6ef9b
@ -246,7 +246,7 @@ function addUserBehaviorNew(obj) {
|
||||
})
|
||||
}
|
||||
/*
|
||||
根据关键字获取相应的枚举选项,文档见 https://api.eshangtech.com/EShangApiMain/swagger/ui/index#!/FrameWork/FrameWork_GetFieldEnumByField
|
||||
根据关键字获取相应的枚举选项,文档见 https://eshangtech.com:18900/EShangApiMain/swagger/ui/index#!/FrameWork/FrameWork_GetFieldEnumByField
|
||||
params:{FieldExplainField,FieldEnumStatus}
|
||||
*/
|
||||
async function getFieldEnumByField(params) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -179,7 +179,7 @@
|
||||
// imageSrc = res.tempFilePath.replace('undefined','.jpg')
|
||||
|
||||
uni.uploadFile({
|
||||
url: 'https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA',
|
||||
url: 'https://eshangtech.com:18999/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA',
|
||||
filePath: res.tempFilePath,
|
||||
fileType: 'image',
|
||||
name: 'data',
|
||||
@ -214,7 +214,7 @@
|
||||
}else {
|
||||
|
||||
uni.uploadFile({
|
||||
url: 'https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA',
|
||||
url: 'https://eshangtech.com:18999/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA',
|
||||
filePath: rs.tempFilePaths[0],
|
||||
fileType: 'image',
|
||||
name: 'data',
|
||||
|
||||
@ -227,7 +227,7 @@
|
||||
let imageSrc = res.tempFilePaths[0]
|
||||
uni.showLoading()
|
||||
uni.uploadFile({
|
||||
url: 'https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA',
|
||||
url: 'https://eshangtech.com:18999/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=MBWA',
|
||||
filePath: imageSrc,
|
||||
fileType: 'image',
|
||||
name: 'data',
|
||||
|
||||
@ -1,282 +1,318 @@
|
||||
<template>
|
||||
<view class="page-card" v-if="!isLoading">
|
||||
<!-- 日期筛选 -->
|
||||
<div class="uni-flex ai-center screen-box">
|
||||
<picker mode="date" @change="bindDateChange($event,0)" :value="pageData.searchTime[0]" :end="pageData.endDate" start="2018-12-01" class="screen-unit">
|
||||
<text>{{pageData.searchTime[0]}}</text>
|
||||
<text class="uni-icon uni-icon-arrowdown"></text>
|
||||
</picker>
|
||||
<text class="mr20">至</text>
|
||||
<picker mode="date" @change="bindDateChange($event,1)" :value="pageData.searchTime[1]" :end="pageData.endDate" start="2018-12-01" class="screen-unit">
|
||||
<text>{{pageData.searchTime[1]}}</text>
|
||||
<text class="uni-icon uni-icon-arrowdown"></text>
|
||||
</picker>
|
||||
</div>
|
||||
<!-- 日期筛选 -->
|
||||
<div class="uni-flex ai-center screen-box">
|
||||
<picker mode="date" @change="bindDateChange($event, 0)" :value="pageData.searchTime[0]"
|
||||
:end="pageData.endDate" start="2018-12-01" class="screen-unit">
|
||||
<text>{{ pageData.searchTime[0] }}</text>
|
||||
<text class="uni-icon uni-icon-arrowdown"></text>
|
||||
</picker>
|
||||
<text class="mr20">至</text>
|
||||
<picker mode="date" @change="bindDateChange($event, 1)" :value="pageData.searchTime[1]"
|
||||
:end="pageData.endDate" start="2018-12-01" class="screen-unit">
|
||||
<text>{{ pageData.searchTime[1] }}</text>
|
||||
<text class="uni-icon uni-icon-arrowdown"></text>
|
||||
</picker>
|
||||
</div>
|
||||
|
||||
<!-- @tap="toTrend"-->
|
||||
<!-- @tap="toTrend"-->
|
||||
<view class="head-card" v-show="pageMsg.Serverpart_Name">
|
||||
<view class="uni-flex jc-between ai-center text-strong">
|
||||
<view class=""> {{pageMsg.Serverpart_Name}} </view>
|
||||
<view class=""> ¥{{$util.fmoney(pageMsg.Serverpart_Revenue,2)}} </view>
|
||||
<view class=""> {{ pageMsg.Serverpart_Name }} </view>
|
||||
<view class=""> ¥{{ $util.fmoney(pageMsg.Serverpart_Revenue, 2) }} </view>
|
||||
</view>
|
||||
<view class="uni-flex jc-between ai-center">
|
||||
<text class="" v-if="pageMsg.Serverpart_S"> {{pageMsg.Serverpart_S}} ¥{{$util.fmoney(pageMsg.Serverpart_RevenueS,2)}}</text>
|
||||
<text class="" v-if="pageMsg.Serverpart_N"> {{pageMsg.Serverpart_N}} ¥{{$util.fmoney(pageMsg.Serverpart_RevenueN,2)}}</text>
|
||||
<text class="" v-if="pageMsg.Serverpart_S"> {{ pageMsg.Serverpart_S }}
|
||||
¥{{ $util.fmoney(pageMsg.Serverpart_RevenueS, 2) }}</text>
|
||||
<text class="" v-if="pageMsg.Serverpart_N"> {{ pageMsg.Serverpart_N }}
|
||||
¥{{ $util.fmoney(pageMsg.Serverpart_RevenueN, 2) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-list" v-if="pageMsg.ShopList && pageMsg.ShopList.length>0">
|
||||
<!-- <view v-for="(dateItem,i) in pageMsg.revenueReportDetilsDates" :key="i">-->
|
||||
<!-- <text class="list-date"> {{// $util.cutDate(dateItem.Statistics_Date,'MM.DD')}}</text>-->
|
||||
<view class="cell-body uni-flex ai-center" v-for="(item,i) in pageMsg.ShopList" :key="i">
|
||||
<image :src="item.BusinessType_Logo || '/static/images/revenue/operating-shop.png'" mode="aspectFit"></image>
|
||||
<view class="">
|
||||
<view class="uni-flex ai-center jc-between">
|
||||
<text>{{item.BusinessType_Name}}</text>
|
||||
<text class="shop-total">+ ¥{{$util.fmoney(item.BusinessType_Revenue,2)}}</text>
|
||||
</view>
|
||||
<view class="uni-flex ai-center jc-between">
|
||||
<text style="display: inline-block;width: 20%" class="type-text" :class="{'scan':item.Upload_Type==1,'port':item.Upload_Type==2}">
|
||||
<template v-if="item.Upload_Type==1">
|
||||
扫码上传
|
||||
</template>
|
||||
<template v-else-if="item.Upload_Type==2" >
|
||||
接口传输
|
||||
</template>
|
||||
<template v-else>
|
||||
自动上传
|
||||
</template>
|
||||
<!-- <text class="type-text scan" v-if="item.Upload_Type==1" >扫码上传</text>
|
||||
<view class="page-list" v-if="pageMsg.ShopList && pageMsg.ShopList.length > 0">
|
||||
<!-- <view v-for="(dateItem,i) in pageMsg.revenueReportDetilsDates" :key="i">-->
|
||||
<!-- <text class="list-date"> {{// $util.cutDate(dateItem.Statistics_Date,'MM.DD')}}</text>-->
|
||||
<view class="cell-body uni-flex ai-center" v-for="(item, i) in pageMsg.ShopList" :key="i">
|
||||
<image :src="item.BusinessType_Logo || '/static/images/revenue/operating-shop.png'" mode="aspectFit">
|
||||
</image>
|
||||
<view class="">
|
||||
<view class="uni-flex ai-center jc-between">
|
||||
<text>{{ item.BusinessType_Name }}</text>
|
||||
<text class="shop-total">+ ¥{{ $util.fmoney(item.BusinessType_Revenue, 2) }}</text>
|
||||
</view>
|
||||
<view class="uni-flex ai-center jc-between">
|
||||
<text style="display: inline-block;width: 20%" class="type-text"
|
||||
:class="{ 'scan': item.Upload_Type == 1, 'port': item.Upload_Type == 2 }">
|
||||
<template v-if="item.Upload_Type == 1">
|
||||
扫码上传
|
||||
</template>
|
||||
<template v-else-if="item.Upload_Type == 2">
|
||||
接口传输
|
||||
</template>
|
||||
<template v-else>
|
||||
自动上传
|
||||
</template>
|
||||
<!-- <text class="type-text scan" v-if="item.Upload_Type==1" >扫码上传</text>
|
||||
<text class="type-text port" >接口传输</text>
|
||||
<text v-else>自动上传</text> -->
|
||||
</text>
|
||||
<view class="uni-flex ai-center" style="display: inline-block;width: 80%">
|
||||
<div style="display: inline-block;width: 48%;text-align: left;margin-right: 4%" class="text-coast">
|
||||
<text style="display: inline-block;width: 40px;text-align: left">
|
||||
{{item.Serverpart_RevenueS===0 || item.Serverpart_RevenueS? `${item.Serverpart_S}: `:''}}
|
||||
</text>
|
||||
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
|
||||
{{item.Serverpart_RevenueS===0 || item.Serverpart_RevenueS? `¥${$util.fmoney(item.Serverpart_RevenueS,2)}`:''}}
|
||||
</text>
|
||||
</div>
|
||||
<div style="display: inline-block;width: 48%;text-align: right" class="text-coast">
|
||||
<text style="display: inline-block;width: 40px;text-align: left">
|
||||
{{item.Serverpart_RevenueN===0 || item.Serverpart_RevenueN? `${item.Serverpart_N}: `:''}}
|
||||
</text>
|
||||
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
|
||||
{{item.Serverpart_RevenueN===0 || item.Serverpart_RevenueN? `¥${$util.fmoney(item.Serverpart_RevenueN,2)}`:''}}
|
||||
</text>
|
||||
</div>
|
||||
</view>
|
||||
</text>
|
||||
<view class="uni-flex ai-center" style="display: inline-block;width: 80%">
|
||||
<div style="display: inline-block;width: 48%;text-align: left;margin-right: 4%"
|
||||
class="text-coast">
|
||||
<text style="display: inline-block;width: 40px;text-align: left">
|
||||
{{ item.Serverpart_RevenueS === 0 || item.Serverpart_RevenueS ? `${item.Serverpart_S}:
|
||||
`:''}}
|
||||
</text>
|
||||
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
|
||||
{{ item.Serverpart_RevenueS === 0 || item.Serverpart_RevenueS ?
|
||||
`¥${$util.fmoney(item.Serverpart_RevenueS, 2) }`:''}}
|
||||
</text>
|
||||
</div>
|
||||
<div style="display: inline-block;width: 48%;text-align: right" class="text-coast">
|
||||
<text style="display: inline-block;width: 40px;text-align: left">
|
||||
{{ item.Serverpart_RevenueN === 0 || item.Serverpart_RevenueN ? `${item.Serverpart_N}:
|
||||
`:''}}
|
||||
</text>
|
||||
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
|
||||
{{ item.Serverpart_RevenueN === 0 || item.Serverpart_RevenueN ?
|
||||
`¥${$util.fmoney(item.Serverpart_RevenueN, 2) }`:''}}
|
||||
</text>
|
||||
</div>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<view class="" v-if="isLoading && !pageOption.Serverpart_Name">
|
||||
<noFound nodata="true" :text="noDataText"/>
|
||||
<noFound nodata="true" :text="noDataText" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/util/index.js'
|
||||
export default {
|
||||
data() {
|
||||
let now = new Date()
|
||||
let nowTime = this.$util.cutDate(now, 'YYYY-MM-DD',-1)
|
||||
let sTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1)
|
||||
return {
|
||||
export default {
|
||||
data() {
|
||||
let now = new Date()
|
||||
let nowTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1)
|
||||
let sTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1)
|
||||
return {
|
||||
isLoading: true,
|
||||
pageData: {
|
||||
endDate: nowTime,
|
||||
searchTime: [sTime, nowTime],
|
||||
msg: {},
|
||||
isLoading: true,
|
||||
pageData: {
|
||||
endDate: nowTime,
|
||||
searchTime: [sTime,nowTime],
|
||||
msg: {},
|
||||
isLoading: true,
|
||||
exsideShow: true,
|
||||
insideShow: true,
|
||||
},
|
||||
pageMsg:{},
|
||||
pageOption: {},
|
||||
noDataText: '抱歉,没有数据,请稍后重试'
|
||||
exsideShow: true,
|
||||
insideShow: true,
|
||||
},
|
||||
pageMsg: {},
|
||||
pageOption: {},
|
||||
noDataText: '抱歉,没有数据,请稍后重试'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindDateChange(e, index) {
|
||||
let nowDate = this.pageData.searchTime[index]
|
||||
if (e.detail.value != nowDate) {
|
||||
this.pageData.searchTime[index] = e.detail.value
|
||||
this.$forceUpdate()
|
||||
this.getDetail({ st: this.pageData.searchTime[0], et: this.pageData.searchTime[1], id: this.pageOption.id, pcode: this.pageOption.pcode })
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindDateChange(e,index){
|
||||
let nowDate = this.pageData.searchTime[index]
|
||||
if(e.detail.value != nowDate){
|
||||
this.pageData.searchTime[index] = e.detail.value
|
||||
this.$forceUpdate()
|
||||
this.getDetail({st:this.pageData.searchTime[0],et:this.pageData.searchTime[1],id:this.pageOption.id,pcode:this.pageOption.pcode})
|
||||
}
|
||||
},
|
||||
toTrend(){
|
||||
this.$util.toNextRoute('navigateTo','/pages/operatingStatements/operatingTrend?name='+this.pageMsg.Serverpart_Name+'&time='+this.pageOption.et+'&id='+this.pageOption.id+'&ProvinceCode='+this.pageOption.pcode)
|
||||
},
|
||||
getDetail(obj){
|
||||
let _this = this
|
||||
uni.showLoading({
|
||||
title:'正在加载...',
|
||||
mask:true
|
||||
})
|
||||
// _this.$request.$webGet('WeChat/GetRevenueReportDetils',{
|
||||
request.$webGet('CommercialApi/Revenue/GetRevenueReportDetil',{
|
||||
startTime: obj.st,
|
||||
endTime: obj.et,
|
||||
serverpartId: obj.id,
|
||||
provinceCode: obj.pcode,
|
||||
BusinessTrade: obj.BusinessTrade || '',
|
||||
SearchKeyName:_this.pageOption.searchKey,
|
||||
SearchKeyValue:_this.pageOption.searchValue,
|
||||
BusinessType:_this.pageOption.BusinessTypeValue>0?_this.pageOption.BusinessTypeValue:'',
|
||||
SettlementMode:_this.pageOption.SettlementModeValue>0?_this.pageOption.SettlementModeValue:'',
|
||||
}).then(res=>{
|
||||
if(res.Result_Code==100) {
|
||||
_this.pageMsg = res.Result_Data
|
||||
|
||||
}else if(res.Result_Code==200 || res.Result_Code==999){
|
||||
_this.noDataText = '暂无数据'
|
||||
} else{
|
||||
_this.noDataText = res.Result_Desc
|
||||
}
|
||||
uni.hideLoading()
|
||||
_this.isLoading = false
|
||||
})
|
||||
},
|
||||
toTrend() {
|
||||
this.$util.toNextRoute('navigateTo', '/pages/operatingStatements/operatingTrend?name=' + this.pageMsg.Serverpart_Name + '&time=' + this.pageOption.et + '&id=' + this.pageOption.id + '&ProvinceCode=' + this.pageOption.pcode)
|
||||
},
|
||||
// 拿到传入的数据
|
||||
onLoad(op) {
|
||||
console.log('op',op)
|
||||
this.pageOption = op
|
||||
if (this.pageOption.st){
|
||||
this.pageData.searchTime[0] = this.pageOption.st
|
||||
}
|
||||
if (this.pageOption.et){
|
||||
this.pageData.searchTime[1] = this.pageOption.et
|
||||
}
|
||||
this.getDetail(op)
|
||||
getDetail(obj) {
|
||||
let _this = this
|
||||
uni.showLoading({
|
||||
title: '正在加载...',
|
||||
mask: true
|
||||
})
|
||||
// _this.$request.$webGet('WeChat/GetRevenueReportDetils',{
|
||||
request.$webGet('CommercialApi/Revenue/GetRevenueReportDetil', {
|
||||
startTime: obj.st,
|
||||
endTime: obj.et,
|
||||
serverpartId: obj.id,
|
||||
provinceCode: obj.pcode,
|
||||
BusinessTrade: obj.BusinessTrade || '',
|
||||
SearchKeyName: _this.pageOption.searchKey,
|
||||
SearchKeyValue: _this.pageOption.searchValue,
|
||||
BusinessType: _this.pageOption.BusinessTypeValue > 0 ? _this.pageOption.BusinessTypeValue : '',
|
||||
SettlementMode: _this.pageOption.SettlementModeValue > 0 ? _this.pageOption.SettlementModeValue : '',
|
||||
}).then(res => {
|
||||
if (res.Result_Code == 100) {
|
||||
_this.pageMsg = res.Result_Data
|
||||
|
||||
} else if (res.Result_Code == 200 || res.Result_Code == 999) {
|
||||
_this.noDataText = '暂无数据'
|
||||
} else {
|
||||
_this.noDataText = res.Result_Desc
|
||||
}
|
||||
uni.hideLoading()
|
||||
_this.isLoading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
// 拿到传入的数据
|
||||
onLoad(op) {
|
||||
console.log('op', op)
|
||||
this.pageOption = op
|
||||
if (this.pageOption.st) {
|
||||
this.pageData.searchTime[0] = this.pageOption.st
|
||||
}
|
||||
if (this.pageOption.et) {
|
||||
this.pageData.searchTime[1] = this.pageOption.et
|
||||
}
|
||||
this.getDetail(op)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.page-card {
|
||||
margin: 0 20rpx 30rpx;
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
.screen-box {
|
||||
background-color: #fff;
|
||||
padding: 0 20rpx;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
.screen-box .screen-unit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 200rpx;
|
||||
padding: 0 14rpx;
|
||||
line-height: 3;
|
||||
}
|
||||
.screen-box .mr20 {
|
||||
margin-right: 20rpx;
|
||||
color: #95999C;
|
||||
}
|
||||
.uni-icon-arrowdown {
|
||||
font-size: 22rpx;
|
||||
color: #C7C7C7;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
.screen-box text {
|
||||
line-height: 3;
|
||||
}
|
||||
.screen-box image{
|
||||
width: 12rpx;
|
||||
height: 8rpx;
|
||||
margin: 0 16rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.head-card {
|
||||
padding: 30rpx 35rpx;
|
||||
background: linear-gradient(to left, #f7f6f8 0%, #eceaeb 100%);
|
||||
border-radius: 12rpx 12rpx 0 0 ;
|
||||
}
|
||||
.head-card > view+view {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.text-strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
.head-card > view>text {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
}
|
||||
.list-date {
|
||||
font-size: 22rpx;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 4rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.page-list {
|
||||
border: 1rpx solid #F0F0F0;
|
||||
border-radius: 0 0 12rpx 12rpx;
|
||||
overflow: hidden;
|
||||
.page-card {
|
||||
margin: 0 20rpx 30rpx;
|
||||
|
||||
padding: 30rpx 16rpx 30rpx 16rpx;
|
||||
}
|
||||
.cell-body {
|
||||
position: relative;
|
||||
padding: 20rpx 20rpx 20rpx 0;
|
||||
}
|
||||
.cell-body image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.cell-body>view {
|
||||
flex: 1;
|
||||
}
|
||||
.page-list text {
|
||||
font-size: 22rpx;
|
||||
color: #2E2E2E;
|
||||
}
|
||||
text.shop-total {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
text.type-text {
|
||||
color: #DFBE9F;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
text.type-text.scan::before,text.type-text.port::before {
|
||||
content: '';
|
||||
width: 21rpx;
|
||||
height: 23rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
text.type-text.scan::before {
|
||||
background: url(/static/images/revenue/scan-up.png) no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
text.type-text.port::before {
|
||||
background: url(/static/images/revenue/port.png) no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
text.type-text.port {
|
||||
color: #95BAF2;
|
||||
}
|
||||
text.text-coast {
|
||||
color: #848484;
|
||||
width: 184rpx;
|
||||
text-align: right;
|
||||
}
|
||||
/*text.text-coast + text.text-coast {*/
|
||||
/* text-align: right;*/
|
||||
//}
|
||||
</style>
|
||||
}
|
||||
|
||||
.screen-box {
|
||||
background-color: #fff;
|
||||
padding: 0 20rpx;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.screen-box .screen-unit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 200rpx;
|
||||
padding: 0 14rpx;
|
||||
line-height: 3;
|
||||
}
|
||||
|
||||
.screen-box .mr20 {
|
||||
margin-right: 20rpx;
|
||||
color: #95999C;
|
||||
}
|
||||
|
||||
.uni-icon-arrowdown {
|
||||
font-size: 22rpx;
|
||||
color: #C7C7C7;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.screen-box text {
|
||||
line-height: 3;
|
||||
}
|
||||
|
||||
.screen-box image {
|
||||
width: 12rpx;
|
||||
height: 8rpx;
|
||||
margin: 0 16rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.head-card {
|
||||
padding: 30rpx 35rpx;
|
||||
background: linear-gradient(to left, #f7f6f8 0%, #eceaeb 100%);
|
||||
border-radius: 12rpx 12rpx 0 0;
|
||||
}
|
||||
|
||||
.head-card>view+view {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.text-strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.head-card>view>text {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.list-date {
|
||||
font-size: 22rpx;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 4rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.page-list {
|
||||
border: 1rpx solid #F0F0F0;
|
||||
border-radius: 0 0 12rpx 12rpx;
|
||||
overflow: hidden;
|
||||
|
||||
padding: 30rpx 16rpx 30rpx 16rpx;
|
||||
}
|
||||
|
||||
.cell-body {
|
||||
position: relative;
|
||||
padding: 20rpx 20rpx 20rpx 0;
|
||||
}
|
||||
|
||||
.cell-body image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.cell-body>view {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.page-list text {
|
||||
font-size: 22rpx;
|
||||
color: #2E2E2E;
|
||||
}
|
||||
|
||||
text.shop-total {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
text.type-text {
|
||||
color: #DFBE9F;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
text.type-text.scan::before,
|
||||
text.type-text.port::before {
|
||||
content: '';
|
||||
width: 21rpx;
|
||||
height: 23rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
text.type-text.scan::before {
|
||||
background: url(/static/images/revenue/scan-up.png) no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
text.type-text.port::before {
|
||||
background: url(/static/images/revenue/port.png) no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
text.type-text.port {
|
||||
color: #95BAF2;
|
||||
}
|
||||
|
||||
text.text-coast {
|
||||
color: #848484;
|
||||
width: 184rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/*text.text-coast + text.text-coast {*/
|
||||
/* text-align: right;*/
|
||||
//}</style>
|
||||
|
||||
@ -1,25 +1,16 @@
|
||||
<template>
|
||||
<web-view src="https://eshangtech.com/deepseek/"></web-view>
|
||||
<!-- <web-view src="https://ahyd.eshangtech.com/robot/"></web-view> -->
|
||||
<!-- <web-view src="https://saas.eshangtech.com/robot/robot"></web-view> -->
|
||||
<!-- <web-view src="https://saas.eshangtech.com/robot/robot"></web-view> -->
|
||||
<!-- <view class="main" v-if="false">
|
||||
<view
|
||||
class="mainTop"
|
||||
:style="{
|
||||
height: menu.bottom + 6 + 'px',
|
||||
paddingTop: menu.top - 6 + 'px',
|
||||
}"
|
||||
>
|
||||
<view class="mainTop" :style="{
|
||||
height: menu.bottom + 6 + 'px',
|
||||
paddingTop: menu.top - 6 + 'px',
|
||||
}">
|
||||
<view class="mainTopContent" :style="{ height: menu.height + 12 + 'px' }">
|
||||
<image
|
||||
class="backIcon"
|
||||
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"
|
||||
/>
|
||||
<image class="backIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg" />
|
||||
<view class="robotBox">
|
||||
<image
|
||||
class="robotImg"
|
||||
src="https://eshangtech.com/ShopICO/ahyd-BID/robot/robotIcon.png"
|
||||
/>
|
||||
<image class="robotImg" src="https://eshangtech.com/ShopICO/ahyd-BID/robot/robotIcon.png" />
|
||||
<view class="robotDetail">
|
||||
<span class="name">小驿</span>
|
||||
<span class="desc">商业智能助理 </span>
|
||||
@ -29,21 +20,12 @@
|
||||
</view>
|
||||
|
||||
<view class="dialogContentBox">
|
||||
<view
|
||||
:class="item.type === 1 ? 'item itemLeft' : 'item rightItem'"
|
||||
v-for="(item, index) in dialogueList"
|
||||
:key="index"
|
||||
:style="{ marginTop: index !== 0 ? '8px' : '' }"
|
||||
>
|
||||
<view
|
||||
:id="'printBox' + index"
|
||||
:class="item.type === 1 ? `dialogItem white` : `dialogItem green`"
|
||||
>
|
||||
<view :class="item.type === 1 ? 'item itemLeft' : 'item rightItem'" v-for="(item, index) in dialogueList"
|
||||
:key="index" :style="{ marginTop: index !== 0 ? '8px' : '' }">
|
||||
<view :id="'printBox' + index" :class="item.type === 1 ? `dialogItem white` : `dialogItem green`">
|
||||
{{ item.text || "" }}
|
||||
<view class="line" v-if="item.searchType === 'default'"></view>
|
||||
<view class="defaultBox">
|
||||
<view>你可能想问:</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -51,24 +33,16 @@
|
||||
</view>
|
||||
|
||||
<view class="inputBox">
|
||||
<image
|
||||
class="microphone"
|
||||
src="https://eshangtech.com/ShopICO/ahyd-BID/robot/microphone.png"
|
||||
/>
|
||||
<div class="textBox">
|
||||
<textarea
|
||||
class="searchText"
|
||||
:value="searchText"
|
||||
@input="handleInput"
|
||||
placeholder="有问题尽管问我~"
|
||||
/>
|
||||
<textarea class="searchText" :value="searchText" @input="handleInput" auto-height :maxlength="500"
|
||||
placeholder="有问题尽管问我~" confirm-type="search" @confirm="handleSubmit" />
|
||||
</div>
|
||||
|
||||
<view class="searchBtn" @click="handleSubmit"> 发送 </view>
|
||||
<view class="searchBtn" @click="handleSubmit"> 发送 </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</template>
|
||||
<script >
|
||||
<script>
|
||||
import request from "@/util/index.js";
|
||||
export default {
|
||||
data() {
|
||||
@ -79,6 +53,7 @@ export default {
|
||||
isLoading: false, // 是否加载中
|
||||
useInfo: {},
|
||||
menu: {},
|
||||
nowTime: new Date().getTime()
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@ -90,10 +65,15 @@ export default {
|
||||
searchType: "default",
|
||||
});
|
||||
this.handlePrintText();
|
||||
let userInfo = uni.getStorageSync("vuex");
|
||||
userInfo = JSON.parse(userInfo);
|
||||
this.useInfo = JSON.parse(JSON.stringify(userInfo));
|
||||
// this.printText = `您好!我是服务区商业智能助理小驿。<br>您想了解服务区哪些方面的信息?`
|
||||
},
|
||||
methods: {
|
||||
handleSubmit() {
|
||||
console.log('111');
|
||||
|
||||
let list = this.dialogueList;
|
||||
console.log("this.searchText", this.searchText);
|
||||
if (this.searchText) {
|
||||
@ -112,58 +92,100 @@ export default {
|
||||
// 查询的方法
|
||||
async handleGetData() {
|
||||
this.isLoading = true;
|
||||
const req = {
|
||||
Sentence: this.searchText,
|
||||
ProvinceCode: "340000",
|
||||
DialogCode: this.nowTime,
|
||||
};
|
||||
const data = await request.$webGet(
|
||||
"CommercialApi/Analysis/TranslateSentence",
|
||||
{ Sentence: this.searchText }
|
||||
req
|
||||
);
|
||||
console.log("data", data);
|
||||
if (data.Result_Code === 999) {
|
||||
this.dialogueList.push({
|
||||
text: `'小驿还无法理解,请换个说法我会不停努力学习的!'`,
|
||||
type: 1,
|
||||
});
|
||||
} else {
|
||||
let str = data.Result_Data.RevenueAnalysis + "\n";
|
||||
let list = data.Result_Data.ServerpartList;
|
||||
if (list && list.length > 0) {
|
||||
list.forEach((item) => {
|
||||
let obj = item["RevenueINC"];
|
||||
if (str) {
|
||||
str += `${item.ServerpartName}:${this.formatNumber(
|
||||
obj.curYearData / 10000
|
||||
)}万元${
|
||||
obj.increaseRate > 0
|
||||
? ",同比增幅"
|
||||
: obj.increaseRate < 0
|
||||
? ",同比降幅"
|
||||
: ""
|
||||
}${obj.increaseRate || ""}\n`;
|
||||
} else {
|
||||
str = `${item.ServerpartName}:${this.formatNumber(
|
||||
obj.curYearData / 10000
|
||||
)}万元${
|
||||
obj.increaseRate > 0
|
||||
? ",同比同比增幅"
|
||||
: obj.increaseRate < 0
|
||||
? ",同比降幅"
|
||||
: ""
|
||||
}${obj.increaseRate || ""}\n`;
|
||||
}
|
||||
});
|
||||
|
||||
console.log('datadatadatadata', data);
|
||||
if (data.Result_Data.AnalysisRuleId) {
|
||||
let configReq = {
|
||||
searchParameter: {
|
||||
ANALYSISRULE_IDS: data.Result_Data.AnalysisRuleId,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
sortstr: "RULE_PRIORITY asc",
|
||||
PageIndex: 1,
|
||||
pagesize: 999999,
|
||||
}
|
||||
|
||||
this.dialogueList.push({ text: str, type: 1 });
|
||||
|
||||
const configData = await request.$webPost(
|
||||
"EShangApiMain/Analysis/GetANALYSISRULEList",
|
||||
configReq
|
||||
)
|
||||
console.log('configDataconfigDataconfigDataconfigData', configData);
|
||||
if (configData.Result_Data.List && configData.Result_Data.List.length > 0) {
|
||||
let configDetail = configData.Result_Data.List[0];
|
||||
|
||||
if (configDetail) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// return
|
||||
// this.isLoading = true;
|
||||
// const data = await request.$webGet(
|
||||
// "CommercialApi/Analysis/TranslateSentence",
|
||||
// { Sentence: this.searchText }
|
||||
// );
|
||||
// console.log("data", data);
|
||||
|
||||
// await this.handleGetRequestAnwers(data.Result_Data.AnalysisRuleId, data.Result_Data)
|
||||
|
||||
|
||||
// if (data.Result_Code === 999) {
|
||||
// this.dialogueList.push({
|
||||
// text: `'小驿还无法理解,请换个说法我会不停努力学习的!'`,
|
||||
// type: 1,
|
||||
// });
|
||||
// } else {
|
||||
// let str = data.Result_Data.RevenueAnalysis + "\n";
|
||||
// let list = data.Result_Data.ServerpartList;
|
||||
// if (list && list.length > 0) {
|
||||
// list.forEach((item) => {
|
||||
// let obj = item["RevenueINC"];
|
||||
// if (str) {
|
||||
// str += `${item.ServerpartName}:${this.formatNumber(
|
||||
// obj.curYearData / 10000
|
||||
// )}万元${obj.increaseRate > 0
|
||||
// ? ",同比增幅"
|
||||
// : obj.increaseRate < 0
|
||||
// ? ",同比降幅"
|
||||
// : ""
|
||||
// }${obj.increaseRate || ""}\n`;
|
||||
// } else {
|
||||
// str = `${item.ServerpartName}:${this.formatNumber(
|
||||
// obj.curYearData / 10000
|
||||
// )}万元${obj.increaseRate > 0
|
||||
// ? ",同比同比增幅"
|
||||
// : obj.increaseRate < 0
|
||||
// ? ",同比降幅"
|
||||
// : ""
|
||||
// }${obj.increaseRate || ""}\n`;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// this.dialogueList.push({ text: str, type: 1 });
|
||||
// }
|
||||
this.isLoading = false;
|
||||
},
|
||||
// 打印机效果
|
||||
handlePrintText() {
|
||||
const query = wx.createSelectorQuery();
|
||||
const contentBox = query.select(
|
||||
`#printBox${
|
||||
this.dialogueList && this.dialogueList.length > 0
|
||||
? this.dialogueList.length - 1
|
||||
: 0
|
||||
`#printBox${this.dialogueList && this.dialogueList.length > 0
|
||||
? this.dialogueList.length - 1
|
||||
: 0
|
||||
}`
|
||||
);
|
||||
console.log("contentBox", contentBox);
|
||||
@ -184,6 +206,91 @@ export default {
|
||||
// 返回带千分号的整数部分和保留两位小数的数字
|
||||
return `${integerPart}.${decimalPart}`;
|
||||
},
|
||||
|
||||
// 拿到问题的答案方法
|
||||
async handleGetRequestAnwers(id, resData) {
|
||||
const data = await request.$webGet(
|
||||
"EShangApiMain/Analysis/GetANALYSISRULEDetail",
|
||||
{ ANALYSISRULEId: id }
|
||||
);
|
||||
|
||||
console.log('datadatadatadata', data);
|
||||
|
||||
let newData = data.Result_Data
|
||||
|
||||
if (newData) {
|
||||
let newReq = JSON.parse(`${newData?.PARAM_TEMPLATE}`)
|
||||
let newRESPONSE_CONFIG = JSON.parse(`${newData?.RESPONSE_CONFIG}`)
|
||||
let newPARSING_RULES = JSON.parse(`${newData?.PARSING_RULES}`)
|
||||
|
||||
let lastReq = {}
|
||||
if (newReq) {
|
||||
for (let key in newReq) {
|
||||
let realKey = newPARSING_RULES[key]
|
||||
console.log('realKey', realKey);
|
||||
// formatType 0:数值 1:字段 2:取缓存 3:取年份 name 就是去resData里面去字段 value 非1 的时候会有值
|
||||
if (realKey) {
|
||||
if (realKey.formatType === 1) {
|
||||
lastReq[key] = resData[realKey.fieldName]
|
||||
} else if (realKey.formatType === 0) {
|
||||
lastReq[key] = realKey.value
|
||||
} else if (realKey.formatType === 2) {
|
||||
if (key === 'pushProvinceCode') {
|
||||
lastReq[key] === '340000'
|
||||
} else {
|
||||
lastReq[key] = this.useInfo[realKey.fieldName]
|
||||
}
|
||||
} else if (realKey.formatType === 3) {
|
||||
lastReq[key] = resData[realKey.fieldName] ? moment(resData[realKey.fieldName]).format('YYYY') : ''
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
let [requestMethod, resultType, type] = []
|
||||
if (newData.OUTPUT_FORMAT) {
|
||||
// requestMethod 请求方法 resultType 结果类型 type 要不要wrapTreeNode 对结果
|
||||
[requestMethod, resultType, type] = newData.OUTPUT_FORMAT.split('|')
|
||||
}
|
||||
|
||||
const lastData = await this.handleRequest(newData.API_ENDPOINT, requestMethod === 'post' ? {
|
||||
method: 'POST',
|
||||
data: lastReq
|
||||
} : {
|
||||
method: 'GET',
|
||||
params: lastReq
|
||||
}
|
||||
)
|
||||
console.log('lastData', lastData);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 公共调用方法
|
||||
async handleRequest(url, params) {
|
||||
console.log('url', url);
|
||||
console.log('params', params);
|
||||
|
||||
const data = params.method === 'GET' ?
|
||||
request.$webGet(
|
||||
url,
|
||||
params.params
|
||||
) :
|
||||
request.$webPost(
|
||||
url,
|
||||
params.params
|
||||
)
|
||||
|
||||
|
||||
// const data = await request(url, params)
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return []
|
||||
}
|
||||
|
||||
return data.Result_Data
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -195,31 +302,38 @@ export default {
|
||||
// background: #f0f0f0;
|
||||
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/robot/robotBackground.png");
|
||||
background-repeat: no-repeat;
|
||||
|
||||
.mainTop {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.mainTopContent {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-left: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.backIcon {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.robotBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.robotImg {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.robotDetail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.name {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
@ -229,6 +343,7 @@ export default {
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
@ -245,10 +360,11 @@ export default {
|
||||
|
||||
.dialogContentBox {
|
||||
width: 100%;
|
||||
height: calc(100vh - 90px);
|
||||
height: calc(100vh - 100px);
|
||||
overflow-y: scroll;
|
||||
box-sizing: border-box;
|
||||
padding: 32rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -259,6 +375,7 @@ export default {
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
.dialogItem {
|
||||
max-width: calc(100vw - 64rpx);
|
||||
display: block;
|
||||
@ -267,6 +384,7 @@ export default {
|
||||
border-radius: 4px;
|
||||
background: #ffffff;
|
||||
border-radius: 0rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
@ -274,6 +392,7 @@ export default {
|
||||
border-radius: 16rpx;
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.defaultBox {
|
||||
.clickItem {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
@ -286,21 +405,26 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.white {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: #12a153ff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.itemLeft {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.rightItem {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.loadingBox {
|
||||
font-size: 12px;
|
||||
color: #ccc;
|
||||
@ -309,9 +433,10 @@ export default {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.inputBox {
|
||||
width: 100%;
|
||||
height: 180rpx;
|
||||
min-height: 180rpx;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
@ -321,20 +446,26 @@ export default {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.microphone {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.textBox {
|
||||
width: calc(100% - 64rpx);
|
||||
height: 88rpx;
|
||||
width: calc(100% - 90px);
|
||||
min-height: 88rpx;
|
||||
background: #f2f3f7;
|
||||
border-radius: 44rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 26rpx 16rpx 0;
|
||||
}
|
||||
|
||||
.searchText {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
|
||||
@ -184,7 +184,7 @@ export default {
|
||||
// let str = this.generateNonceStr();
|
||||
// let time = new Date().getTime();
|
||||
// fetch(
|
||||
// `https://api.eshangtech.com/EShangApiMain/WeChat/GetJsapiTicket?appId=wx4c497eddcec4a0e7&sourcePlatform=minprogram`
|
||||
// `https://eshangtech.com:18900/EShangApiMain/WeChat/GetJsapiTicket?appId=wx4c497eddcec4a0e7&sourcePlatform=minprogram`
|
||||
// )
|
||||
// .then((response) => response.json())
|
||||
// .then((data) => {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
export default {
|
||||
|
||||
baseURL: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx', // 合作商户请求
|
||||
baseURL: 'https://eshangtech.com:18998/Coop.Merchant/Handler/handler_ajax.ashx', // 合作商户请求
|
||||
// baseURL: 'http://192.168.11.136:8000/Coop.Merchant/Handler/handler_ajax.ashx', // 合作商户请求
|
||||
// baseURL: 'https://tcm.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx', // 合作商户请求
|
||||
|
||||
mpUrl: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx', // 接口
|
||||
apiurl: 'https://api.eshangtech.com/', // web api正式接口地址
|
||||
mpUrl: 'https://eshangtech.com:18998/Coop.Merchant/Handler/handler_ajax.ashx', // 接口
|
||||
apiurl: 'https://eshangtech.com:18900/', // web api正式接口地址
|
||||
// EshangUrl: 'https://eshangtech.com/',
|
||||
// apiurl: 'https://erysfeipeng.oicp.net/', // web api
|
||||
testApiurl: 'http://dev.eshangtech.com:8001/', // web api测试接口地址
|
||||
|
||||
@ -19,7 +19,7 @@ export default {
|
||||
// data.action_type = control
|
||||
// return Api.request('GET', ApiPath.mobUrl ,data)
|
||||
// },
|
||||
// getMp: function (control,data) { // mp.eshangtech.com
|
||||
// getMp: function (control,data) { // eshangtech.com:18998
|
||||
// data.action_type = control
|
||||
// return Api.request('GET', ApiPath.mpUrl ,data)
|
||||
// },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user