|
@@ -9,13 +9,13 @@
|
|
|
<!-- <view class="tips-box tips-title">
|
|
<!-- <view class="tips-box tips-title">
|
|
|
您好,智能投顾很高兴为您服务!
|
|
您好,智能投顾很高兴为您服务!
|
|
|
</view> -->
|
|
</view> -->
|
|
|
-<!--
|
|
|
|
|
|
|
+
|
|
|
<view class="talk-box">
|
|
<view class="talk-box">
|
|
|
<view class="talk-head-box">
|
|
<view class="talk-head-box">
|
|
|
<image src="../../static/rabotHead.png" mode="" class="talk-head"></image>
|
|
<image src="../../static/rabotHead.png" mode="" class="talk-head"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="talk-content">您好,智能顾投很高兴为您服务!</view>
|
|
|
|
|
- </view> -->
|
|
|
|
|
|
|
+ <view class="talk-content">您好,欢迎您使用阿拉灯神丁。我可以给您提供股票投资建议,快来试试吧。</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<view v-for="chat in talkList" :key="chat.talkType" class="m-item">
|
|
<view v-for="chat in talkList" :key="chat.talkType" class="m-item">
|
|
|
<view class="talk-box talk-box-end" v-show="chat.content">
|
|
<view class="talk-box talk-box-end" v-show="chat.content">
|
|
@@ -28,16 +28,17 @@
|
|
|
<view class="talk-head-box">
|
|
<view class="talk-head-box">
|
|
|
<image :src='rabotHeadImg' mode="" class="talk-head"></image>
|
|
<image :src='rabotHeadImg' mode="" class="talk-head"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="talk-content">{{chat.reply}}</view>
|
|
|
|
|
|
|
+ <view class="talk-content">{{chat.reply}}<text class="goRechargeText" v-if='chat.isRecharge' @click.stop="goRecharge">去充值</text></view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
<view class="send-box" :style="{ 'padding-bottom' : isShowKeyBoard + 'px'}">
|
|
<view class="send-box" :style="{ 'padding-bottom' : isShowKeyBoard + 'px'}">
|
|
|
- <input type="text" class="enter-box" v-model="inputInfo" :adjust-position="true" @input='isInputing'
|
|
|
|
|
|
|
+ <input type="text" class="enter-box" v-model="inputInfo" :adjust-position="true"
|
|
|
:style="{'width':inputWidth}" confirm-hold='true' confirm-type='send' @confirm="sendInputInfo" />
|
|
:style="{'width':inputWidth}" confirm-hold='true' confirm-type='send' @confirm="sendInputInfo" />
|
|
|
- <button type="primary" class="submit-message" @click="sendInputInfo()" v-if='isShowSend'>发送</button>
|
|
|
|
|
|
|
+ <!-- @input='isInputing' -->
|
|
|
|
|
+ <!-- <button type="primary" class="submit-message" @click="sendInputInfo()" v-if='isShowSend'>发送</button> -->
|
|
|
<image src="/static/setIcon.png" @click.stop='openModal()' v-if='isShowSetCenter'></image>
|
|
<image src="/static/setIcon.png" @click.stop='openModal()' v-if='isShowSetCenter'></image>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="goUserSelf" /> -->
|
|
<!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="goUserSelf" /> -->
|
|
@@ -75,6 +76,7 @@
|
|
|
isShowSend:false,
|
|
isShowSend:false,
|
|
|
isShowSetModal:false,
|
|
isShowSetModal:false,
|
|
|
isShowSetCenter:true,
|
|
isShowSetCenter:true,
|
|
|
|
|
+ isShowRecharge:false,
|
|
|
inputWidth:'80%',
|
|
inputWidth:'80%',
|
|
|
title: 'RABOT',
|
|
title: 'RABOT',
|
|
|
nowTime: '',
|
|
nowTime: '',
|
|
@@ -139,7 +141,7 @@
|
|
|
getApp().globalData.open_id = res.data.msg.openid;
|
|
getApp().globalData.open_id = res.data.msg.openid;
|
|
|
getApp().globalData.isAuth = res.data.msg.isauth === '0';
|
|
getApp().globalData.isAuth = res.data.msg.isauth === '0';
|
|
|
getApp().globalData.user_name = res.data.msg.name;
|
|
getApp().globalData.user_name = res.data.msg.name;
|
|
|
- getApp().globalData.user_headUrl = res.data.msg.headimg;
|
|
|
|
|
|
|
+ getApp().globalData.user_headUrl = res.data.msg.headimg || '../../static/userDefault.png';
|
|
|
getApp().globalData.times = res.data.msg.times;
|
|
getApp().globalData.times = res.data.msg.times;
|
|
|
getApp().globalData.total_times = res.data.msg.total_times;
|
|
getApp().globalData.total_times = res.data.msg.total_times;
|
|
|
that.getHistory();
|
|
that.getHistory();
|
|
@@ -180,7 +182,7 @@
|
|
|
// }, 100)
|
|
// }, 100)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getHistory() {
|
|
|
|
|
|
|
+ getHistory(isShow) {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
uni.request({
|
|
uni.request({
|
|
|
url: getApp().globalData.shareUrl, //需要设置为全局
|
|
url: getApp().globalData.shareUrl, //需要设置为全局
|
|
@@ -198,6 +200,9 @@
|
|
|
},
|
|
},
|
|
|
success: res => {
|
|
success: res => {
|
|
|
that.userHeadUrl = getApp().globalData.user_headUrl;
|
|
that.userHeadUrl = getApp().globalData.user_headUrl;
|
|
|
|
|
+ if(isShow){
|
|
|
|
|
+ res.data.msg[0].isRecharge = 1
|
|
|
|
|
+ }
|
|
|
if(page === 1){
|
|
if(page === 1){
|
|
|
that.scrollRequestEnable = true;
|
|
that.scrollRequestEnable = true;
|
|
|
that.talkList = ((res.data.msg).reverse());
|
|
that.talkList = ((res.data.msg).reverse());
|
|
@@ -245,15 +250,23 @@
|
|
|
content: msg
|
|
content: msg
|
|
|
},
|
|
},
|
|
|
success: res => {
|
|
success: res => {
|
|
|
- this.inputInfo = '';
|
|
|
|
|
- that.getHistory();
|
|
|
|
|
|
|
+ if(res.data.code === 100){
|
|
|
|
|
+ that.isShowRecharge = true;
|
|
|
|
|
+ that.inputInfo = '';
|
|
|
|
|
+ that.getHistory('show');
|
|
|
|
|
+ }else {
|
|
|
|
|
+ that.inputInfo = '';
|
|
|
|
|
+ that.getHistory();
|
|
|
|
|
+ that.isShowRecharge = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
sendInputInfo() {
|
|
sendInputInfo() {
|
|
|
- this.inputWidth = '80%';
|
|
|
|
|
- this.isShowSend = false;
|
|
|
|
|
- this.isShowSetCenter = true;
|
|
|
|
|
|
|
+ // this.inputWidth = '80%';
|
|
|
|
|
+ // this.isShowSend = false;
|
|
|
|
|
+ // this.isShowSetCenter = true;
|
|
|
if (!this.inputInfo) {
|
|
if (!this.inputInfo) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '请输入股票代码',
|
|
title: '请输入股票代码',
|
|
@@ -383,7 +396,7 @@
|
|
|
}
|
|
}
|
|
|
.talk-reply{
|
|
.talk-reply{
|
|
|
padding: 2%;
|
|
padding: 2%;
|
|
|
- background: #fff;
|
|
|
|
|
|
|
+ background: #9EEA6A;
|
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
|
border-top-left-radius: 20rpx;
|
|
border-top-left-radius: 20rpx;
|
|
|
border-bottom-left-radius: 20rpx;
|
|
border-bottom-left-radius: 20rpx;
|
|
@@ -391,7 +404,9 @@
|
|
|
text-align: left;
|
|
text-align: left;
|
|
|
max-width: 70%;
|
|
max-width: 70%;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ .goRechargeText {
|
|
|
|
|
+ color:#0A98D5
|
|
|
|
|
+ }
|
|
|
.enter-box {
|
|
.enter-box {
|
|
|
height: 70rpx;
|
|
height: 70rpx;
|
|
|
background: #fff;
|
|
background: #fff;
|