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.

ScoringPlaylist.vue 2.7 KiB

3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. };
  25. },
  26. onLoad: function(options) {
  27. this.customerId = options.customerId;
  28. this.id=options.id;
  29. this.searchinfo()
  30. },
  31. methods: {
  32. formatTime(num) {
  33. //格式化时间格式
  34. num = num.toFixed(0);
  35. let second = num % 60;
  36. if (second < 10) second = '0' + second;
  37. let min = Math.floor(num / 60);
  38. if (min < 10) min = '0' + min;
  39. return min + ":" + second;
  40. },
  41. //搜索
  42. searchinfo(){
  43. let parames={
  44. marketingId:this.id,
  45. customerId:this.customerId
  46. }
  47. this.$u.post("/corpus/pinWordMatching", parames).then(res => {
  48. res.forEach(item=>{
  49. item.Content=JSON.parse(item.transferContent)
  50. })
  51. res.forEach(cet=>{
  52. cet.Content.time=this.formatTime(cet.Content.bg/1000)
  53. })
  54. this.listarr=res;
  55. })
  56. },
  57. //跳转
  58. toaidoinfo(item,id,index){
  59. item.customerId=this.customerId;
  60. item.id=id;
  61. item.index=index;
  62. this.infostust(item)
  63. },
  64. //只有一条的时候
  65. infostust(item){
  66. console.log("zobudao")
  67. let d = JSON.parse(JSON.stringify([item]))
  68. d[0].onebest=""
  69. const parames = {
  70. pageNum: 1,
  71. pageSize: 100,
  72. query: {
  73. customerId: this.customerId,
  74. }
  75. }
  76. this.$u.post("/corpus/findByPage", parames).then(res => {
  77. if(res[0].merge==0){
  78. let newobj = res[0];
  79. uni.navigateTo({
  80. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  81. })
  82. }else{
  83. let newobj = res[0];
  84. uni.navigateTo({
  85. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  86. })
  87. }
  88. })
  89. },
  90. },
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. </style>