域名更换

This commit is contained in:
ylj20011123 2025-09-30 09:37:04 +08:00
parent a4b56b1e0c
commit 85a3a6ef9b
9 changed files with 4914 additions and 5525 deletions

View File

@ -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} params:{FieldExplainField,FieldEnumStatus}
*/ */
async function getFieldEnumByField(params) { async function getFieldEnumByField(params) {

File diff suppressed because it is too large Load Diff

View File

@ -179,7 +179,7 @@
// imageSrc = res.tempFilePath.replace('undefined','.jpg') // imageSrc = res.tempFilePath.replace('undefined','.jpg')
uni.uploadFile({ 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, filePath: res.tempFilePath,
fileType: 'image', fileType: 'image',
name: 'data', name: 'data',
@ -214,7 +214,7 @@
}else { }else {
uni.uploadFile({ 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], filePath: rs.tempFilePaths[0],
fileType: 'image', fileType: 'image',
name: 'data', name: 'data',

View File

@ -227,7 +227,7 @@
let imageSrc = res.tempFilePaths[0] let imageSrc = res.tempFilePaths[0]
uni.showLoading() uni.showLoading()
uni.uploadFile({ 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, filePath: imageSrc,
fileType: 'image', fileType: 'image',
name: 'data', name: 'data',

View File

@ -1,282 +1,318 @@
<template> <template>
<view class="page-card" v-if="!isLoading"> <view class="page-card" v-if="!isLoading">
<!-- 日期筛选 --> <!-- 日期筛选 -->
<div class="uni-flex ai-center screen-box"> <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"> <picker mode="date" @change="bindDateChange($event, 0)" :value="pageData.searchTime[0]"
<text>{{pageData.searchTime[0]}}</text> :end="pageData.endDate" start="2018-12-01" class="screen-unit">
<text class="uni-icon uni-icon-arrowdown"></text> <text>{{ pageData.searchTime[0] }}</text>
</picker> <text class="uni-icon uni-icon-arrowdown"></text>
<text class="mr20"></text> </picker>
<picker mode="date" @change="bindDateChange($event,1)" :value="pageData.searchTime[1]" :end="pageData.endDate" start="2018-12-01" class="screen-unit"> <text class="mr20"></text>
<text>{{pageData.searchTime[1]}}</text> <picker mode="date" @change="bindDateChange($event, 1)" :value="pageData.searchTime[1]"
<text class="uni-icon uni-icon-arrowdown"></text> :end="pageData.endDate" start="2018-12-01" class="screen-unit">
</picker> <text>{{ pageData.searchTime[1] }}</text>
</div> <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="head-card" v-show="pageMsg.Serverpart_Name">
<view class="uni-flex jc-between ai-center text-strong"> <view class="uni-flex jc-between ai-center text-strong">
<view class=""> {{pageMsg.Serverpart_Name}} </view> <view class=""> {{ pageMsg.Serverpart_Name }} </view>
<view class=""> ¥{{$util.fmoney(pageMsg.Serverpart_Revenue,2)}} </view> <view class=""> ¥{{ $util.fmoney(pageMsg.Serverpart_Revenue, 2) }} </view>
</view> </view>
<view class="uni-flex jc-between ai-center"> <view class="uni-flex jc-between ai-center">
<text class="" v-if="pageMsg.Serverpart_S"> {{pageMsg.Serverpart_S}} &nbsp; &nbsp;¥{{$util.fmoney(pageMsg.Serverpart_RevenueS,2)}}</text> <text class="" v-if="pageMsg.Serverpart_S"> {{ pageMsg.Serverpart_S }} &nbsp;
<text class="" v-if="pageMsg.Serverpart_N"> {{pageMsg.Serverpart_N}} &nbsp; &nbsp;¥{{$util.fmoney(pageMsg.Serverpart_RevenueN,2)}}</text> &nbsp;¥{{ $util.fmoney(pageMsg.Serverpart_RevenueS, 2) }}</text>
<text class="" v-if="pageMsg.Serverpart_N"> {{ pageMsg.Serverpart_N }} &nbsp;
&nbsp;¥{{ $util.fmoney(pageMsg.Serverpart_RevenueN, 2) }}</text>
</view> </view>
</view> </view>
<view class="page-list" v-if="pageMsg.ShopList && pageMsg.ShopList.length>0"> <view class="page-list" v-if="pageMsg.ShopList && pageMsg.ShopList.length > 0">
<!-- <view v-for="(dateItem,i) in pageMsg.revenueReportDetilsDates" :key="i">--> <!-- <view v-for="(dateItem,i) in pageMsg.revenueReportDetilsDates" :key="i">-->
<!-- <text class="list-date"> {{// $util.cutDate(dateItem.Statistics_Date,'MM.DD')}}</text>--> <!-- <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"> <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> <image :src="item.BusinessType_Logo || '/static/images/revenue/operating-shop.png'" mode="aspectFit">
<view class=""> </image>
<view class="uni-flex ai-center jc-between"> <view class="">
<text>{{item.BusinessType_Name}}</text> <view class="uni-flex ai-center jc-between">
<text class="shop-total"> ¥{{$util.fmoney(item.BusinessType_Revenue,2)}}</text> <text>{{ item.BusinessType_Name }}</text>
</view> <text class="shop-total"> ¥{{ $util.fmoney(item.BusinessType_Revenue, 2) }}</text>
<view class="uni-flex ai-center jc-between"> </view>
<text style="display: inline-block;width: 20%" class="type-text" :class="{'scan':item.Upload_Type==1,'port':item.Upload_Type==2}"> <view class="uni-flex ai-center jc-between">
<template v-if="item.Upload_Type==1"> <text style="display: inline-block;width: 20%" class="type-text"
扫码上传 :class="{ 'scan': item.Upload_Type == 1, 'port': item.Upload_Type == 2 }">
</template> <template v-if="item.Upload_Type == 1">
<template v-else-if="item.Upload_Type==2" > 扫码上传
接口传输 </template>
</template> <template v-else-if="item.Upload_Type == 2">
<template v-else> 接口传输
自动上传 </template>
</template> <template v-else>
<!-- <text class="type-text scan" v-if="item.Upload_Type==1" >扫码上传</text> 自动上传
</template>
<!-- <text class="type-text scan" v-if="item.Upload_Type==1" >扫码上传</text>
<text class="type-text port" >接口传输</text> <text class="type-text port" >接口传输</text>
<text v-else>自动上传</text> --> <text v-else>自动上传</text> -->
</text> </text>
<view class="uni-flex ai-center" style="display: inline-block;width: 80%"> <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"> <div style="display: inline-block;width: 48%;text-align: left;margin-right: 4%"
<text style="display: inline-block;width: 40px;text-align: left"> class="text-coast">
{{item.Serverpart_RevenueS===0 || item.Serverpart_RevenueS? `${item.Serverpart_S} `:''}} <text style="display: inline-block;width: 40px;text-align: left">
</text> {{ item.Serverpart_RevenueS === 0 || item.Serverpart_RevenueS ? `${item.Serverpart_S}
<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>
</text> <text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px">
</div> {{ item.Serverpart_RevenueS === 0 || item.Serverpart_RevenueS ?
<div style="display: inline-block;width: 48%;text-align: right" class="text-coast"> `¥${$util.fmoney(item.Serverpart_RevenueS, 2) }`:''}}
<text style="display: inline-block;width: 40px;text-align: left"> </text>
{{item.Serverpart_RevenueN===0 || item.Serverpart_RevenueN? `${item.Serverpart_N} `:''}} </div>
</text> <div style="display: inline-block;width: 48%;text-align: right" class="text-coast">
<text style="display: inline-block;width: calc(100% - 50px);margin-left: 10px"> <text style="display: inline-block;width: 40px;text-align: left">
{{item.Serverpart_RevenueN===0 || item.Serverpart_RevenueN? `¥${$util.fmoney(item.Serverpart_RevenueN,2)}`:''}} {{ item.Serverpart_RevenueN === 0 || item.Serverpart_RevenueN ? `${item.Serverpart_N}
</text> `:''}}
</div> </text>
</view> <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>
<!-- </view>-->
</view> </view>
<view class="" v-if="isLoading && !pageOption.Serverpart_Name"> <view class="" v-if="isLoading && !pageOption.Serverpart_Name">
<noFound nodata="true" :text="noDataText"/> <noFound nodata="true" :text="noDataText" />
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import request from '@/util/index.js' import request from '@/util/index.js'
export default { export default {
data() { data() {
let now = new Date() let now = new Date()
let nowTime = this.$util.cutDate(now, 'YYYY-MM-DD',-1) let nowTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1)
let sTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1) let sTime = this.$util.cutDate(now, 'YYYY-MM-DD', -1)
return { return {
isLoading: true,
pageData: {
endDate: nowTime,
searchTime: [sTime, nowTime],
msg: {},
isLoading: true, isLoading: true,
pageData: { exsideShow: true,
endDate: nowTime, insideShow: true,
searchTime: [sTime,nowTime], },
msg: {}, pageMsg: {},
isLoading: true, pageOption: {},
exsideShow: true, noDataText: '抱歉,没有数据,请稍后重试'
insideShow: true, }
}, },
pageMsg:{}, methods: {
pageOption: {}, bindDateChange(e, index) {
noDataText: '抱歉,没有数据,请稍后重试' 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: { toTrend() {
bindDateChange(e,index){ this.$util.toNextRoute('navigateTo', '/pages/operatingStatements/operatingTrend?name=' + this.pageMsg.Serverpart_Name + '&time=' + this.pageOption.et + '&id=' + this.pageOption.id + '&ProvinceCode=' + this.pageOption.pcode)
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
})
},
}, },
// getDetail(obj) {
onLoad(op) { let _this = this
console.log('op',op) uni.showLoading({
this.pageOption = op title: '正在加载...',
if (this.pageOption.st){ mask: true
this.pageData.searchTime[0] = this.pageOption.st })
} // _this.$request.$webGet('WeChat/GetRevenueReportDetils',{
if (this.pageOption.et){ request.$webGet('CommercialApi/Revenue/GetRevenueReportDetil', {
this.pageData.searchTime[1] = this.pageOption.et startTime: obj.st,
} endTime: obj.et,
this.getDetail(op) 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> </script>
<style> <style>
page { page {
background-color: #fff; background-color: #fff;
} }
.page-card {
margin: 0 20rpx 30rpx;
} .page-card {
.screen-box { margin: 0 20rpx 30rpx;
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 { .screen-box {
position: relative; background-color: #fff;
padding: 20rpx 20rpx 20rpx 0; padding: 0 20rpx;
} position: sticky;
.cell-body image { top: 0;
width: 60rpx; left: 0;
height: 60rpx; z-index: 9;
border-radius: 50%; }
margin-right: 16rpx;
} .screen-box .screen-unit {
.cell-body>view { display: flex;
flex: 1; align-items: center;
} width: 200rpx;
.page-list text { padding: 0 14rpx;
font-size: 22rpx; line-height: 3;
color: #2E2E2E; }
}
text.shop-total { .screen-box .mr20 {
font-size: 24rpx; margin-right: 20rpx;
} color: #95999C;
text.type-text { }
color: #DFBE9F;
display: flex; .uni-icon-arrowdown {
align-items: center; font-size: 22rpx;
} color: #C7C7C7;
text.type-text.scan::before,text.type-text.port::before { margin-left: 8rpx;
content: ''; }
width: 21rpx;
height: 23rpx; .screen-box text {
margin-right: 8rpx; line-height: 3;
} }
text.type-text.scan::before {
background: url(/static/images/revenue/scan-up.png) no-repeat center; .screen-box image {
background-size: contain; width: 12rpx;
} height: 8rpx;
text.type-text.port::before { margin: 0 16rpx;
background: url(/static/images/revenue/port.png) no-repeat center; vertical-align: middle;
background-size: contain; }
}
text.type-text.port { .head-card {
color: #95BAF2; padding: 30rpx 35rpx;
} background: linear-gradient(to left, #f7f6f8 0%, #eceaeb 100%);
text.text-coast { border-radius: 12rpx 12rpx 0 0;
color: #848484; }
width: 184rpx;
text-align: right; .head-card>view+view {
} margin-top: 16rpx;
/*text.text-coast + text.text-coast {*/ }
/* text-align: right;*/
//} .text-strong {
</style> 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>

View File

@ -1,25 +1,16 @@
<template> <template>
<web-view src="https://eshangtech.com/deepseek/"></web-view> <web-view src="https://eshangtech.com/deepseek/"></web-view>
<!-- <web-view src="https://ahyd.eshangtech.com/robot/"></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="main" v-if="false">
<view <view class="mainTop" :style="{
class="mainTop" height: menu.bottom + 6 + 'px',
:style="{ paddingTop: menu.top - 6 + 'px',
height: menu.bottom + 6 + 'px', }">
paddingTop: menu.top - 6 + 'px',
}"
>
<view class="mainTopContent" :style="{ height: menu.height + 12 + 'px' }"> <view class="mainTopContent" :style="{ height: menu.height + 12 + 'px' }">
<image <image class="backIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg" />
class="backIcon"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"
/>
<view class="robotBox"> <view class="robotBox">
<image <image class="robotImg" src="https://eshangtech.com/ShopICO/ahyd-BID/robot/robotIcon.png" />
class="robotImg"
src="https://eshangtech.com/ShopICO/ahyd-BID/robot/robotIcon.png"
/>
<view class="robotDetail"> <view class="robotDetail">
<span class="name">小驿</span> <span class="name">小驿</span>
<span class="desc">商业智能助理 </span> <span class="desc">商业智能助理 </span>
@ -29,21 +20,12 @@
</view> </view>
<view class="dialogContentBox"> <view class="dialogContentBox">
<view <view :class="item.type === 1 ? 'item itemLeft' : 'item rightItem'" v-for="(item, index) in dialogueList"
:class="item.type === 1 ? 'item itemLeft' : 'item rightItem'" :key="index" :style="{ marginTop: index !== 0 ? '8px' : '' }">
v-for="(item, index) in dialogueList" <view :id="'printBox' + index" :class="item.type === 1 ? `dialogItem white` : `dialogItem green`">
:key="index"
:style="{ marginTop: index !== 0 ? '8px' : '' }"
>
<view
:id="'printBox' + index"
:class="item.type === 1 ? `dialogItem white` : `dialogItem green`"
>
{{ item.text || "" }} {{ item.text || "" }}
<view class="line" v-if="item.searchType === 'default'"></view> <view class="line" v-if="item.searchType === 'default'"></view>
<view class="defaultBox">
<view>你可能想问</view>
</view>
</view> </view>
</view> </view>
@ -51,24 +33,16 @@
</view> </view>
<view class="inputBox"> <view class="inputBox">
<image
class="microphone"
src="https://eshangtech.com/ShopICO/ahyd-BID/robot/microphone.png"
/>
<div class="textBox"> <div class="textBox">
<textarea <textarea class="searchText" :value="searchText" @input="handleInput" auto-height :maxlength="500"
class="searchText" placeholder="有问题尽管问我~" confirm-type="search" @confirm="handleSubmit" />
:value="searchText"
@input="handleInput"
placeholder="有问题尽管问我~"
/>
</div> </div>
<view class="searchBtn" @click="handleSubmit"> 发送 </view> <view class="searchBtn" @click="handleSubmit"> 发送 </view>
</view> </view>
</view> --> </view> -->
</template> </template>
<script > <script>
import request from "@/util/index.js"; import request from "@/util/index.js";
export default { export default {
data() { data() {
@ -79,6 +53,7 @@ export default {
isLoading: false, // isLoading: false, //
useInfo: {}, useInfo: {},
menu: {}, menu: {},
nowTime: new Date().getTime()
}; };
}, },
onLoad() { onLoad() {
@ -90,10 +65,15 @@ export default {
searchType: "default", searchType: "default",
}); });
this.handlePrintText(); this.handlePrintText();
let userInfo = uni.getStorageSync("vuex");
userInfo = JSON.parse(userInfo);
this.useInfo = JSON.parse(JSON.stringify(userInfo));
// this.printText = `驿<br>` // this.printText = `驿<br>`
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
console.log('111');
let list = this.dialogueList; let list = this.dialogueList;
console.log("this.searchText", this.searchText); console.log("this.searchText", this.searchText);
if (this.searchText) { if (this.searchText) {
@ -112,58 +92,100 @@ export default {
// //
async handleGetData() { async handleGetData() {
this.isLoading = true; this.isLoading = true;
const req = {
Sentence: this.searchText,
ProvinceCode: "340000",
DialogCode: this.nowTime,
};
const data = await request.$webGet( const data = await request.$webGet(
"CommercialApi/Analysis/TranslateSentence", "CommercialApi/Analysis/TranslateSentence",
{ Sentence: this.searchText } req
); );
console.log("data", data);
if (data.Result_Code === 999) { console.log('datadatadatadata', data);
this.dialogueList.push({ if (data.Result_Data.AnalysisRuleId) {
text: `'小驿还无法理解,请换个说法我会不停努力学习的!'`, let configReq = {
type: 1, searchParameter: {
}); ANALYSISRULE_IDS: data.Result_Data.AnalysisRuleId,
} else { current: 1,
let str = data.Result_Data.RevenueAnalysis + "\n"; pageSize: 10,
let list = data.Result_Data.ServerpartList; },
if (list && list.length > 0) { sortstr: "RULE_PRIORITY asc",
list.forEach((item) => { PageIndex: 1,
let obj = item["RevenueINC"]; pagesize: 999999,
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 });
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; this.isLoading = false;
}, },
// //
handlePrintText() { handlePrintText() {
const query = wx.createSelectorQuery(); const query = wx.createSelectorQuery();
const contentBox = query.select( const contentBox = query.select(
`#printBox${ `#printBox${this.dialogueList && this.dialogueList.length > 0
this.dialogueList && this.dialogueList.length > 0 ? this.dialogueList.length - 1
? this.dialogueList.length - 1 : 0
: 0
}` }`
); );
console.log("contentBox", contentBox); console.log("contentBox", contentBox);
@ -184,6 +206,91 @@ export default {
// //
return `${integerPart}.${decimalPart}`; 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> </script>
@ -195,31 +302,38 @@ export default {
// background: #f0f0f0; // background: #f0f0f0;
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/robot/robotBackground.png"); background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/robot/robotBackground.png");
background-repeat: no-repeat; background-repeat: no-repeat;
.mainTop { .mainTop {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.mainTopContent { .mainTopContent {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-left: 32rpx; padding-left: 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.backIcon { .backIcon {
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.robotBox { .robotBox {
display: flex; display: flex;
align-items: center; align-items: center;
.robotImg { .robotImg {
width: 68rpx; width: 68rpx;
height: 68rpx; height: 68rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.robotDetail { .robotDetail {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.name { .name {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 600; font-weight: 600;
@ -229,6 +343,7 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
.desc { .desc {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
@ -245,10 +360,11 @@ export default {
.dialogContentBox { .dialogContentBox {
width: 100%; width: 100%;
height: calc(100vh - 90px); height: calc(100vh - 100px);
overflow-y: scroll; overflow-y: scroll;
box-sizing: border-box; box-sizing: border-box;
padding: 32rpx; padding: 32rpx;
.item { .item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -259,6 +375,7 @@ export default {
line-height: 44rpx; line-height: 44rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
.dialogItem { .dialogItem {
max-width: calc(100vw - 64rpx); max-width: calc(100vw - 64rpx);
display: block; display: block;
@ -267,6 +384,7 @@ export default {
border-radius: 4px; border-radius: 4px;
background: #ffffff; background: #ffffff;
border-radius: 0rpx 24rpx 24rpx 24rpx; border-radius: 0rpx 24rpx 24rpx 24rpx;
.line { .line {
width: 100%; width: 100%;
height: 2rpx; height: 2rpx;
@ -274,6 +392,7 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
margin: 24rpx 0; margin: 24rpx 0;
} }
.defaultBox { .defaultBox {
.clickItem { .clickItem {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -286,21 +405,26 @@ export default {
} }
} }
} }
.white { .white {
background: #fff; background: #fff;
color: #000; color: #000;
} }
.green { .green {
background: #12a153ff; background: #12a153ff;
color: #fff; color: #fff;
} }
} }
.itemLeft { .itemLeft {
justify-content: flex-start; justify-content: flex-start;
} }
.rightItem { .rightItem {
justify-content: flex-end; justify-content: flex-end;
} }
.loadingBox { .loadingBox {
font-size: 12px; font-size: 12px;
color: #ccc; color: #ccc;
@ -309,9 +433,10 @@ export default {
justify-content: center; justify-content: center;
} }
} }
.inputBox { .inputBox {
width: 100%; width: 100%;
height: 180rpx; min-height: 180rpx;
background: #fff; background: #fff;
position: fixed; position: fixed;
left: 0; left: 0;
@ -321,20 +446,26 @@ export default {
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
display: flex; display: flex;
align-items: center; align-items: center;
.microphone { .microphone {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.textBox { .textBox {
width: calc(100% - 64rpx); width: calc(100% - 90px);
height: 88rpx; min-height: 88rpx;
background: #f2f3f7; background: #f2f3f7;
border-radius: 44rpx; border-radius: 44rpx;
box-sizing: border-box;
padding: 26rpx 16rpx 0;
} }
.searchText { .searchText {
width: 100%;
} }
.searchBtn { .searchBtn {
width: 80px; width: 80px;
height: 40px; height: 40px;

View File

@ -184,7 +184,7 @@ export default {
// let str = this.generateNonceStr(); // let str = this.generateNonceStr();
// let time = new Date().getTime(); // let time = new Date().getTime();
// fetch( // 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((response) => response.json())
// .then((data) => { // .then((data) => {

View File

@ -1,11 +1,11 @@
export default { 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: 'http://192.168.11.136:8000/Coop.Merchant/Handler/handler_ajax.ashx', // 合作商户请求
// baseURL: 'https://tcm.eshangtech.com/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', // 接口 mpUrl: 'https://eshangtech.com:18998/Coop.Merchant/Handler/handler_ajax.ashx', // 接口
apiurl: 'https://api.eshangtech.com/', // web api正式接口地址 apiurl: 'https://eshangtech.com:18900/', // web api正式接口地址
// EshangUrl: 'https://eshangtech.com/', // EshangUrl: 'https://eshangtech.com/',
// apiurl: 'https://erysfeipeng.oicp.net/', // web api // apiurl: 'https://erysfeipeng.oicp.net/', // web api
testApiurl: 'http://dev.eshangtech.com:8001/', // web api测试接口地址 testApiurl: 'http://dev.eshangtech.com:8001/', // web api测试接口地址

View File

@ -19,7 +19,7 @@ export default {
// data.action_type = control // data.action_type = control
// return Api.request('GET', ApiPath.mobUrl ,data) // 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 // data.action_type = control
// return Api.request('GET', ApiPath.mpUrl ,data) // return Api.request('GET', ApiPath.mpUrl ,data)
// }, // },