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.9 KiB

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