index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. <template>
  2. <view class="content">
  3. <!-- <navigation-custom :config="config" :scrollTop="scrollTopNav" @customConduct="customConduct" :scrollMaxHeight="scrollMaxHeight" /> -->
  4. <scroll-view id="scrollview" class='chat-box' :style="{height: style.contentViewHeight + 'px'}" scroll-y="true"
  5. :scroll-with-animation="false" :scroll-top="scrollTop" @scrolltoupper="lower()">
  6. <view class="auth" v-if="!isAuth">
  7. <text>对不起,您还未登录!请</text>
  8. <button open-type="getUserInfo" @getuserinfo="getUserInfo">授权登录</button>
  9. </view>
  10. <!-- <view class="tips-box">
  11. {{nowTime}}
  12. </view> -->
  13. <!-- <view class="tips-box tips-title">
  14. 您好,智能投顾很高兴为您服务!
  15. </view> -->
  16. <!-- <view class="talk-box">
  17. <view class="talk-head-box">
  18. <image src="../../static/rabotHead.png" mode="" class="talk-head"></image>
  19. </view>
  20. <view class="talk-content">您好,欢迎您使用阿拉灯神丁。我可以给您提供股票投资建议,快来试试吧。</view>
  21. </view> -->
  22. <view v-for="chat in talkList" :key="chat.talkType" class="m-item">
  23. <view class="talk-box talk-box-end" v-show="chat.content">
  24. <view class="talk-reply">{{chat.content}}</view>
  25. <view class="talk-head-box">
  26. <image :src='userHeadUrl' mode="" class="talk-head" @click.stop='goUserSelf'></image>
  27. </view>
  28. </view>
  29. <view class="talk-box">
  30. <view class="talk-head-box">
  31. <image :src='rabotHeadImg' mode="" class="talk-head" ></image>
  32. </view>
  33. <view class="talk-content">{{chat.reply}}<text class="goRechargeText" v-if='chat.isRecharge' @click.stop="goSharePage()">去分享</text></view>
  34. </view>
  35. </view>
  36. </scroll-view>
  37. <view class="send-box" :style="{ 'padding-bottom' : isShowKeyBoard + 'px'}">
  38. <image :src="[!isVoiceType ? '/static/icon/voice-icon.png' : '/static/icon/keyBoard-icon.png']" @click.stop='tabVoice()'></image>
  39. <view class="voice-mode" v-if='isVoiceType' @click="asrStart" >语音识别</view>
  40. <!-- <view>{{arsRes}}</view> -->
  41. <!-- 语音识别 -->
  42. <wechat-asr ref="weixinAsr" @callback="asrResult"/>
  43. <input type="text" v-if="!isVoiceType" class="enter-box" v-model="inputInfo" :adjust-position="true" @focus="isNeedAuth()"
  44. :style="{'width':inputWidth}" confirm-hold='true' confirm-type='send' @confirm="sendInputInfo" />
  45. <!-- @input='isInputing' -->
  46. <!-- <button type="primary" class="submit-message" @click="sendInputInfo()" v-if='isShowSend'>发送</button> -->
  47. <image src="/static/setIcon.png" @click.stop='openModal()' v-if='isShowSetCenter'></image>
  48. </view>
  49. <!-- 录音UI效果
  50. <view class="record" :class="recording?'':'hidden'">
  51. <view class="ing" :class="willStop?'hidden':''"><image src="../../static/icon/send-icon.png" style="width: 64rpx;height: 64rpx;"></image></view>
  52. <view class="cancel" :class="willStop?'':'hidden'"><image src="../../static/icon/cancel-icon.png" style="width: 64rpx;height: 64rpx;"></image></view>
  53. <view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
  54. </view> -->
  55. <!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="goUserSelf" /> -->
  56. <uni-popup ref="popup" type="bottom">
  57. <view class="uni-share">
  58. <view class="uni-share-content">
  59. <view class="uni-share-content-box" @click.stop='goUserSelf' >
  60. <view class="uni-share-content-image">
  61. <image src="/static/icon/userSetIcon.png" class="image" />
  62. </view>
  63. <view class="uni-share-content-text">个人中心</view>
  64. </view>
  65. <view class="uni-share-content-box" @click.stop='goSharePage' >
  66. <view class="uni-share-content-image">
  67. <image src="/static/icon/share-icon.png" class="image" />
  68. </view>
  69. <view class="uni-share-content-text">邀好友奖查询次数</view>
  70. </view>
  71. <!-- <view class="uni-share-content-box" @click.stop='tabVoice' >
  72. <view class="uni-share-content-image">
  73. <image src="/static/icon/userSetIcon.png" class="image" />
  74. </view>
  75. <view class="uni-share-content-text">语音输入</view>
  76. </view> -->
  77. <view class="uni-share-content-box" @click.stop='cleanChatRecord()' >
  78. <view class="uni-share-content-image">
  79. <image src="/static/icon/clean-icon.png" class="image" />
  80. </view>
  81. <view class="uni-share-content-text">清空</view>
  82. </view>
  83. <!-- <view class="uni-share-content-box" @click.stop='goRecharge' v-if="!isIos">
  84. <view class="uni-share-content-image">
  85. <image src="/static/icon/recharge.png" class="image" />
  86. </view>
  87. <view class="uni-share-content-text">去充值</view>
  88. </view> -->
  89. </view>
  90. <view class="uni-share-btn" @click="cancelModal()">取消</view>
  91. </view>
  92. </uni-popup>
  93. </view>
  94. </template>
  95. <script>
  96. import uniPopup from "@/components/uni-popup/uni-popup.vue"
  97. import WechatAsr from '../chat/chat.vue';
  98. var md5 = require("../../common/md5.js");
  99. var page = 1;
  100. const recorderManager = uni.getRecorderManager();
  101. const innerAudioContext = uni.createInnerAudioContext();
  102. export default {
  103. data() {
  104. return {
  105. isShowSend:false,
  106. isShowSetModal:false,
  107. isShowSetCenter:true,
  108. isShowRecharge:false,
  109. inputWidth:'70%',
  110. title: 'RABOT',
  111. nowTime: '',
  112. nowHeight: '622px',
  113. inputInfo: '',
  114. isShowKeyBoard:0,
  115. rabotHeadImg: "../../static/rabotHead.png",
  116. userHeadUrl: getApp().globalData.user_headUrl || '../../static/userDefault.png',
  117. talkList: [],
  118. scrollTopNav: 0, // 当linear为true的时候需要通过onpagescroll传递参数
  119. scrollMaxHeight: 200 ,//滑动的高度限制,超过这个高度即背景全部显示
  120. scrollTop:0,
  121. scrollRequestEnable: true,
  122. pageSize:10,
  123. isIos:Boolean,
  124. style: {
  125. pageHeight: 0,
  126. contentViewHeight: 0,
  127. footViewHeight: 90,
  128. mitemHeight: 0
  129. },
  130. isAuth:true,
  131. iv:'',
  132. session_key:'',
  133. encryptedData:'',
  134. //录音相关参数
  135. isVoiceType:false,
  136. RECORDER:uni.getRecorderManager(),
  137. isVoice:false,
  138. voiceTis:'按住 说话',
  139. recordTis:"手指上滑 取消发送",
  140. recording:false,
  141. willStop:false,
  142. initPoint:{identifier:0,Y:0},
  143. recordTimer:null,
  144. recordLength:0,
  145. //播放语音相关参数
  146. AUDIO:uni.createInnerAudioContext(),
  147. playMsgid:null,
  148. VoiceTimer:null,
  149. voicePath: '',
  150. arsRes: '',
  151. inviteId:''
  152. }
  153. },
  154. components: {
  155. uniPopup,
  156. WechatAsr
  157. },
  158. onPageScroll(e) {
  159. this.scrollTopNav = e.scrollTop;
  160. },
  161. onShareAppMessage(){
  162. return {
  163. title: '阿拉灯神丁',
  164. path: '/pages/index/index?inviteId=' + getApp().globalData.user_id
  165. }
  166. },
  167. onLoad(options) {
  168. console.log(options)
  169. this.inviteId = options.inviteId
  170. this.userLogin();
  171. this.getEquipmentHeight();
  172. },
  173. onShow() {
  174. // this.getNowTime();
  175. console.log(getApp().globalData.isAuth)
  176. this.userHeadUrl = getApp().globalData.user_headUrl || '../../static/userDefault.png',
  177. getApp().globalData.isAuth ? this.isAuth = true : this.isAuth = false ;
  178. getApp().globalData.isAuth ? this.getHistory() : this.isAuth = false ;
  179. },
  180. methods: {
  181. userLogin(){
  182. uni.showLoading({})
  183. uni.login({
  184. success: (res) => {
  185. this.getCodeRabot(res)
  186. }
  187. });
  188. },
  189. // 获取用户信息
  190. getUserInfo(e) {
  191. console.log(e);
  192. if (e.detail.errMsg == "getUserInfo:ok") {
  193. this.iv = e.detail.iv;
  194. this.encryptedData = e.detail.encryptedData;
  195. this.loginUserInfo()
  196. } else {
  197. console.log("用户信息授权失败");
  198. this.isShowAuthBtn = true;
  199. }
  200. },
  201. loginUserInfo(){
  202. let that = this;
  203. uni.request({
  204. url:getApp().globalData.shareUrl, //需要设置为全局
  205. method: 'POST',
  206. header: {
  207. 'content-type': 'application/x-www-form-urlencoded'
  208. },
  209. data: {
  210. method: 'auth',
  211. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  212. uid:getApp().globalData.user_id,
  213. sign: md5('auth' + getApp().globalData.globalTimestamp),
  214. nickname:getApp().globalData.user_name,
  215. headimg:getApp().globalData.user_headUrl,
  216. iv:that.iv,
  217. session_key:that.session_key,
  218. encryptedData:that.encryptedData
  219. },
  220. success: res => {
  221. that.isAuth = true;
  222. getApp().globalData.user_id = res.data.msg.id;
  223. getApp().globalData.open_id = res.data.msg.openid;
  224. getApp().globalData.isAuth = that.isAuth;
  225. getApp().globalData.times = res.data.msg.times;
  226. getApp().globalData.total_times = res.data.msg.total_times;
  227. getApp().globalData.user_headUrl = res.data.msg.headimg;
  228. getApp().globalData.user_name = res.data.msg.name;
  229. that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
  230. that.getHistory();
  231. }
  232. });
  233. },
  234. getCodeRabot(res){
  235. let that = this;
  236. uni.request({
  237. url:getApp().globalData.shareUrl, //需要设置为全局
  238. method: 'POST',
  239. header: {
  240. 'content-type': 'application/x-www-form-urlencoded'
  241. },
  242. data: {
  243. method: 'login',
  244. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  245. code: res.code,
  246. sign: md5('login' + getApp().globalData.globalTimestamp),
  247. invited:that.inviteId
  248. },
  249. success: res => {
  250. // 通过openid发起会员登录
  251. // getApp().globalData.user_id = res.data.msg.id;
  252. // getApp().globalData.open_id = res.data.msg.openid;
  253. // getApp().globalData.isAuth = res.data.msg.isauth === '0';
  254. // getApp().globalData.times = res.data.msg.times;
  255. // getApp().globalData.total_times = res.data.msg.total_times;
  256. // getApp().globalData.user_headUrl = res.data.msg.headimg;
  257. // getApp().globalData.user_name = res.data.msg.name;
  258. // that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
  259. // that.getHistory();
  260. var isAuth = res.data.msg.isauth === 1;
  261. that.session_key = res.data.msg.session_key;
  262. if(isAuth){
  263. this.isAuth = true;
  264. getApp().globalData.user_id = res.data.msg.id;
  265. getApp().globalData.open_id = res.data.msg.openid;
  266. getApp().globalData.isAuth = true;
  267. getApp().globalData.times = res.data.msg.times;
  268. getApp().globalData.total_times = res.data.msg.total_times;
  269. getApp().globalData.user_headUrl = res.data.msg.headimg;
  270. getApp().globalData.user_name = res.data.msg.name;
  271. that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
  272. that.getHistory();
  273. }else{
  274. getApp().globalData.session_key = res.data.msg.session_key;
  275. that.isAuth = isAuth;
  276. getApp().globalData.isAuth = isAuth;
  277. wx.hideLoading();
  278. }
  279. }
  280. });
  281. },
  282. getNowTime() {
  283. let time = new Date();
  284. let y = time.getFullYear();
  285. let m = time.getMonth() + 1;
  286. let d = time.getDate();
  287. let h = time.getHours();
  288. let i = time.getMinutes();
  289. i = i > 10 ? i : '0' + i;
  290. this.nowTime = y + "年" + m + "月" + d + "日" + " " + h + ":" + i
  291. },
  292. getEquipmentHeight() {
  293. const height = uni.getSystemInfoSync().windowHeight;
  294. this.nowHeight = height + 'px';
  295. getApp().globalData.glbalHeight = this.nowHeight;
  296. this.style.pageHeight = height;
  297. this.style.contentViewHeight = height - uni.getSystemInfoSync().screenWidth / 750 * (100) -7; //像素 因为给出的是像素高度 然后我们用的是upx 所以换算一下
  298. },
  299. scrollToBottom() {
  300. let that = this;
  301. let query = uni.createSelectorQuery();
  302. query.selectAll('.m-item').boundingClientRect();
  303. query.select('#scrollview').boundingClientRect();
  304. query.exec((res) => {
  305. that.style.mitemHeight = 0;
  306. res[0].forEach((rect) => that.style.mitemHeight = that.style.mitemHeight + rect.height + 40) //获取所有内部子元素的高度
  307. // 因为vue的虚拟DOM 每次生成的新消息都是之前的,所以采用异步setTimeout 主要就是添加了这红字
  308. that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight
  309. // setTimeout(() => {
  310. // if (that.style.mitemHeight > (that.style.contentViewHeight - 100)) { //判断子元素高度是否大于显示高度
  311. // that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight //用子元素的高度减去显示的高度就获益获得序言滚动的高度
  312. // }
  313. // }, 100)
  314. })
  315. },
  316. getHistory(isShow) {
  317. // if(getApp.globalData.isAuth){this.isAuth = true}
  318. let that = this;
  319. uni.request({
  320. url: getApp().globalData.shareUrl, //需要设置为全局
  321. method: 'POST',
  322. header: {
  323. 'content-type': 'application/x-www-form-urlencoded'
  324. },
  325. data: {
  326. method: 'question_list',
  327. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  328. uid: getApp().globalData.user_id,
  329. sign: md5('question_list' + getApp().globalData.globalTimestamp),
  330. page: page || 1,
  331. pageSize: 10,
  332. },
  333. success: res => {
  334. uni.hideLoading()
  335. that.isIos = getApp().globalData.isIos;
  336. if(isShow){
  337. res.data.msg[0].isRecharge = 1
  338. }
  339. if(page === 1){
  340. that.scrollRequestEnable = true;
  341. that.talkList = ((res.data.msg).reverse());
  342. setTimeout(()=>{
  343. that.scrollToBottom()
  344. },100)
  345. }else if (page > 1 && res.data.msg.length === that.pageSize) {
  346. that.scrollRequestEnable = true;
  347. that.talkList.unshift(...((res.data.msg).reverse()));
  348. }else if (page > 1 && (res.data.msg.length > 0) && (res.data.msg.length < that.pageSize)){
  349. that.scrollRequestEnable = true;
  350. that.talkList.unshift(...((res.data.msg).reverse()));
  351. }else if (page > 1 && res.data.msg.length == 0){
  352. that.scrollRequestEnable = false;
  353. }
  354. }
  355. });
  356. },
  357. goUserSelf() {
  358. this.$refs.popup.close()
  359. uni.navigateTo({
  360. url: '../selfInfo/selfInfo'
  361. })
  362. },
  363. goRecharge() {
  364. this.$refs.popup.close()
  365. uni.navigateTo({
  366. url: '../selfInfo/payList/payList'
  367. })
  368. },
  369. sendMsgRequest(msg) {
  370. if(getApp().globalData.user_id=='') return false;
  371. let that = this;
  372. uni.request({
  373. url: getApp().globalData.shareUrl, //需要设置为全局
  374. method: 'POST',
  375. header: {
  376. 'content-type': 'application/x-www-form-urlencoded'
  377. },
  378. data: {
  379. method: 'question',
  380. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  381. uid: getApp().globalData.user_id,
  382. sign: md5('question' + getApp().globalData.globalTimestamp),
  383. content: msg
  384. },
  385. success: res => {
  386. if(res.data.code === 100){
  387. that.isShowRecharge = true;
  388. that.inputInfo = '';
  389. that.getHistory('show');
  390. }else {
  391. that.inputInfo = '';
  392. that.getHistory();
  393. that.isShowRecharge = false
  394. }
  395. }
  396. });
  397. },
  398. sendInputInfo() {
  399. // this.inputWidth = '80%';
  400. // this.isShowSend = false;
  401. // this.isShowSetCenter = true;
  402. if (!this.inputInfo) {
  403. uni.showToast({
  404. title: '请输入股票代码',
  405. icon: 'none'
  406. });
  407. } else {
  408. page = 1;
  409. this.sendMsgRequest(this.inputInfo)
  410. }
  411. },
  412. isInputing(){
  413. if (this.inputInfo) {
  414. this.inputWidth = '72%';
  415. this.isShowSend = true;
  416. this.isShowSetCenter = false;
  417. } else {
  418. this.inputWidth = '80%';
  419. this.isShowSend = false;
  420. this.isShowSetCenter = true;
  421. }
  422. },
  423. isNeedAuth(){
  424. console.log(this.isAuth)
  425. if(!this.isAuth){
  426. setTimeout(()=>{
  427. uni.navigateTo({
  428. url: '../auth/index',
  429. success: res => {},
  430. fail: () => {},
  431. complete: () => {}
  432. });
  433. },500)
  434. }
  435. },
  436. // 滚动至底部触发的事件
  437. lower() {
  438. if (this.scrollRequestEnable) {
  439. // 允许滚动时,触底page加一,重新请求数据
  440. console.log(666)
  441. page++;
  442. this.getHistory();
  443. } else {
  444. // 不允许滚动时,只显示"到底了"提示
  445. // this.showBottem = true
  446. console.log('noData')
  447. }
  448. },
  449. getInputFocus(e){
  450. //this.isShowKeyBoard = e.detail.height
  451. },
  452. getInputBlur(){
  453. //this.isShowKeyBoard = 0
  454. },
  455. goSharePage(){
  456. uni.navigateTo({
  457. url: '../share/sharePage',
  458. success: res => {},
  459. fail: () => {},
  460. complete: () => {}
  461. });
  462. },
  463. tabVoice(){
  464. this.isVoiceType = !this.isVoiceType;
  465. },
  466. clearChat(){
  467. },
  468. openModal(){
  469. // 需要在 popup 组件,指定 ref 为 popup
  470. if(!this.isAuth){
  471. uni.navigateTo({
  472. url: '../auth/index',
  473. success: res => {},
  474. fail: () => {},
  475. complete: () => {}
  476. });
  477. }else {
  478. this.$refs.popup.open();
  479. }
  480. },
  481. cancelModal(){
  482. // 需要在 popup 组件,指定 ref 为 popup
  483. this.$refs.popup.close();
  484. },
  485. //情况聊天记录
  486. cleanChatRecord(){
  487. if(getApp().globalData.user_id=='') return false;
  488. let that = this;
  489. uni.request({
  490. url: getApp().globalData.shareUrl, //需要设置为全局
  491. method: 'POST',
  492. header: {
  493. 'content-type': 'application/x-www-form-urlencoded'
  494. },
  495. data: {
  496. method: 'clear_question',
  497. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  498. uid: getApp().globalData.user_id,
  499. sign: md5('clear_question' + getApp().globalData.globalTimestamp),
  500. },
  501. success: res => {
  502. console.log(res)
  503. if(res.data.code === 200){
  504. uni.showToast({
  505. title: '清除成功',
  506. icon:'none',
  507. duration:1500
  508. });
  509. that.$refs.popup.close();
  510. page = 1;
  511. that.getHistory();
  512. }else{
  513. uni.showToast({
  514. title: res.data.msg,
  515. icon:'none',
  516. duration:1500
  517. });
  518. }
  519. }
  520. });
  521. },
  522. // 语音识别
  523. asrStart () {
  524. this.$refs.weixinAsr.show();
  525. },
  526. asrResult (res) {
  527. //this.arsRes = res;
  528. res = res.substring(0,res.length-1)
  529. page = 1;
  530. this.sendMsgRequest(res)
  531. }
  532. },
  533. onShareAppMessage(){
  534. }
  535. }
  536. </script>
  537. <style>
  538. .content {
  539. text-align: center;
  540. }
  541. .chat-box {
  542. background: #f4f5f7;
  543. padding-top: 3%;
  544. /* padding-bottom: 100upx; */
  545. }
  546. .tips-box {
  547. background: #D5D5DA;
  548. font-size: 28upx;
  549. color: #fff;
  550. border-radius: 30upx;
  551. width: 50%;
  552. margin: 0 auto;
  553. height: 50rpx;
  554. line-height: 50rpx
  555. }
  556. .tips-title {
  557. width: 70%;
  558. margin-top: 5%;
  559. font-size: 30rpx;
  560. height: 70rpx;
  561. line-height: 70rpx
  562. }
  563. .send-box {
  564. width: 100%;
  565. height: 90rpx;
  566. position: fixed;
  567. bottom: 0;
  568. background: #F4F0ED;
  569. display: flex;
  570. align-items: center;
  571. padding: 2upx;
  572. }
  573. .talk-box {
  574. display: flex;
  575. justify-content: flex-start;
  576. align-items: center;
  577. margin-top: 3%;
  578. }
  579. .talk-box-end {
  580. justify-content: flex-end;
  581. }
  582. .talk-head-box {
  583. width: 80rpx;
  584. height: 80rpx;
  585. border-radius: 30rpx;
  586. margin-left: 2%;
  587. margin-right: 2%;
  588. }
  589. .talk-head {
  590. width: 100%;
  591. height: 100%;
  592. border-radius: 50%;
  593. }
  594. .talk-content {
  595. padding: 2%;
  596. background: #fff;
  597. font-size: 28rpx;
  598. border-top-right-radius: 20rpx;
  599. border-bottom-left-radius: 20rpx;
  600. border-bottom-right-radius: 20rpx;
  601. text-align: left;
  602. max-width: 70%;
  603. }
  604. .talk-reply{
  605. padding: 2%;
  606. background: #9EEA6A;
  607. font-size: 28rpx;
  608. border-top-left-radius: 20rpx;
  609. border-bottom-left-radius: 20rpx;
  610. border-bottom-right-radius: 20rpx;
  611. text-align: left;
  612. max-width: 70%;
  613. }
  614. .goRechargeText {
  615. color:#0A98D5
  616. }
  617. .enter-box {
  618. height: 70rpx;
  619. background: #fff;
  620. border-radius: 1%;
  621. text-align: left;
  622. margin: 8px;
  623. margin-bottom: 10px;
  624. padding-left:8px;
  625. }
  626. .send-box image {
  627. width: 60rpx;
  628. height: 60rpx;
  629. margin-right: 10upx;
  630. margin-left: 10upx;
  631. }
  632. .submit-message {
  633. width: 18%;
  634. margin-right: 20upx;
  635. height: 70rpx;
  636. font-size: 28rpx;
  637. line-height: 70rpx;
  638. color: #fff;
  639. background-color: #0A98D5 !important;
  640. }
  641. .logo {
  642. height: 200upx;
  643. width: 200upx;
  644. margin-top: 200upx;
  645. margin-left: auto;
  646. margin-right: auto;
  647. margin-bottom: 50upx;
  648. }
  649. .text-area {
  650. display: flex;
  651. justify-content: center;
  652. }
  653. .title {
  654. font-size: 36upx;
  655. color: #8f8f94;
  656. }
  657. .uniFab{
  658. width:98px;
  659. height:36px;
  660. background:rgba(231,247,236,1);
  661. box-shadow:-6px 5px 74px 0px rgba(60,188,99,0.08);
  662. border-radius:100px 0px 0px 100px;
  663. right: 0upx;
  664. position: fixed;
  665. z-index: 9999;
  666. top: 50%;
  667. display: flex;
  668. justify-content: center;
  669. align-items: center;
  670. }
  671. .uniFab text{
  672. width:64px;
  673. font-size:16px;
  674. font-family:PingFangSC;
  675. font-weight:600;
  676. color:rgba(60,188,99,1);
  677. text-shadow:0px 1px 2px rgba(12,39,20,0.2);
  678. }
  679. .uni-share-content {
  680. display: flex;
  681. flex-wrap: wrap;
  682. padding: 15px;
  683. /* justify-content: center */
  684. }
  685. .uni-share-content-box {
  686. display: flex;
  687. flex-direction: column;
  688. align-items: center;
  689. width: 25%;
  690. box-sizing: border-box;
  691. }
  692. .uni-share-content-image {
  693. display: flex;
  694. justify-content: center;
  695. align-items: center;
  696. width: 60upx;
  697. height: 60upx;
  698. overflow: hidden;
  699. border-radius: 10upx;
  700. }
  701. .uni-share-content-image .image {
  702. width: 100%;
  703. height: 100%;
  704. }
  705. .uni-share-content-text {
  706. font-size: 26upx;
  707. color: #333;
  708. padding-top: 5px;
  709. padding-bottom: 10px;
  710. }
  711. .uni-share-btn {
  712. height: 90upx;
  713. line-height: 90upx;
  714. border-top: 1px #f5f5f5 solid;
  715. text-align: center;
  716. color: #666;
  717. font-size: 30rpx;
  718. }
  719. /* .placeHolder {
  720. padding:2px
  721. } */
  722. .auth{
  723. display: flex;
  724. flex-direction: row;
  725. font-size: 14px;
  726. justify-content: center;
  727. align-items: center;
  728. background-color: #eee;
  729. }
  730. .auth button{
  731. font-size: 14px;
  732. padding:0px;
  733. margin:0px;
  734. color:#007AFF;
  735. background-color: #eee;
  736. }
  737. .auth button:after{
  738. border: 0px;
  739. }
  740. .voice-mode {
  741. width: 70%;
  742. height: 70rpx;
  743. background: #fff;
  744. border-radius: 1%;
  745. text-align: left;
  746. margin: 8px;
  747. margin-bottom: 10px;
  748. padding-left:8px;
  749. text-align: center;
  750. line-height: 70upx;
  751. font-size: 30upx
  752. }
  753. .icon {
  754. font-family:"HMfont-home" !important;
  755. font-size:56upx;
  756. font-style:normal;
  757. color: #333;
  758. }
  759. .hidden{
  760. display: none !important;
  761. }
  762. .record{
  763. width: 40vw;
  764. height: 40vw;
  765. position: fixed;
  766. top: 55%;
  767. left: 30%;
  768. background-color: rgba(0,0,0,.6);
  769. border-radius: 20upx;
  770. }
  771. .ing{
  772. width: 100%;
  773. height: 30vw;
  774. display: flex;
  775. justify-content: center;
  776. align-items: center;
  777. // 模拟录音音效动画
  778. }
  779. @keyframes volatility {
  780. 0% {background-position: 0% 130%;}
  781. 20% {background-position: 0% 150%;}
  782. 30% {background-position: 0% 155%;}
  783. 40% {background-position: 0% 150%;}
  784. 50% {background-position: 0% 145%;}
  785. 70% {background-position: 0% 150%;}
  786. 80% {background-position: 0% 155%;}
  787. 90% {background-position: 0% 140%;}
  788. 100% {background-position: 0% 135%;}
  789. }
  790. .cancel{
  791. width: 100%;
  792. height: 30vw;
  793. display: flex;
  794. justify-content: center;
  795. align-items: center;
  796. }
  797. .icon{
  798. background-image:linear-gradient(to bottom,#f09b37,#fff 50%);
  799. background-size:100% 200%;
  800. animation: volatility 1.5s ease-in-out -1.5s infinite alternate;
  801. -webkit-background-clip:text;
  802. -webkit-text-fill-color:transparent;
  803. font-size: 150upx;
  804. color: #f09b37;
  805. }
  806. .tis{
  807. width: 100%;
  808. height: 10vw;
  809. display: flex;
  810. justify-content: center;
  811. font-size: 28upx;
  812. color: #fff;
  813. }
  814. .change{
  815. color: #f09b37;
  816. }
  817. </style>