AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

111 lines
3.1 KiB

  1. <template>
  2. <view class="translation">
  3. <view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;">
  4. <view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;"
  5. v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)">
  6. <view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;">
  7. <image style="width: 26rpx;height: 28rpx;" src="../../static/images/testimg.png" mode=""></image>
  8. </view>
  9. <view v-html="item.Content.onebest" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view>
  10. <view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. var util = require("../../utils/util.js");
  17. var config = require("../../config");
  18. export default {
  19. data() {
  20. return {
  21. customerId:'',
  22. listarr:[],
  23. id:'',
  24. type:'',
  25. tipsFncName: '', // 提醒页面变更的值
  26. };
  27. },
  28. onLoad(options) {
  29. this.customerId = options.customerId;
  30. this.id=options.id;
  31. this.type=options.type;
  32. if (options.UpDateEvent) this.tipsFncName = options.UpDateEvent
  33. this.searchinfo()
  34. },
  35. methods: {
  36. formatTime(num) {
  37. //格式化时间格式
  38. num = num.toFixed(0);
  39. let second = num % 60;
  40. if (second < 10) second = '0' + second;
  41. let min = Math.floor(num / 60);
  42. if (min < 10) min = '0' + min;
  43. return min + ":" + second;
  44. },
  45. //搜索
  46. searchinfo(){
  47. let parames={
  48. marketingId:this.id,
  49. customerId:this.customerId,
  50. type:this.type
  51. }
  52. this.$u.post("/corpus/pinWordMatching", parames).then(res => {
  53. res.forEach(item=>{
  54. item.Content=JSON.parse(item.transferContent)
  55. })
  56. res.forEach(cet=>{
  57. cet.Content.time=this.formatTime(cet.Content.bg/1000)
  58. })
  59. this.listarr=res;
  60. })
  61. },
  62. //跳转
  63. toaidoinfo(item,id,index){
  64. item.customerId=this.customerId;
  65. item.id=id;
  66. item.index=index;
  67. this.infostust(item)
  68. },
  69. //只有一条的时候
  70. infostust(item){
  71. console.log("zobudao")
  72. let d = JSON.parse(JSON.stringify([item]))
  73. d[0].onebest="";
  74. console.log(d)
  75. const parames = {
  76. pageNum: 1,
  77. pageSize: 100,
  78. query: {
  79. customerId: this.customerId,
  80. }
  81. }
  82. this.$u.post("/corpus/findByPage", parames).then(res => {
  83. uni.setStorageSync("entrance", 2); //写入缓存
  84. uni.setStorageSync("searchobj", d[0]); //写入缓存
  85. if(res[0].merge==0){
  86. if (this.tipsFncName) uni.$emit(this.tipsFncName, d[0])
  87. uni.$emit('newobjStatus', newobj.status)
  88. uni.navigateBack()
  89. // let newobj = res[0];
  90. // uni.navigateTo({
  91. // url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  92. // })
  93. }else{
  94. let newobj = res[0];
  95. uni.navigateTo({
  96. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  97. })
  98. }
  99. })
  100. },
  101. },
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. </style>