pageSpecial.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template name="pagesProduct">
  2. <view>
  3. <view class="container-pages clearfix">
  4. <scroll-view scroll-x>
  5. <view class="tui-goods__list">
  6. <view class="tui-goods__item" v-if="tempData.liveList != ''">
  7. <view class="tui-group-name" @click="LiveGoPath">
  8. <view class="tui-group-title"><text>精彩直播</text></view>
  9. <view class="iconfont icon-xiayibu"></view>
  10. </view>
  11. <view class="tui-goods__main" :class="flIndex == 0 ? 'one' : ''" v-for="(live, flIndex) in tempData.liveList" :key="flIndex" @click="LiveGoPathPros(live)">
  12. <view class="tui-goods__imgbox" v-if="flIndex === 0">
  13. <image :src="live.homePageImage" mode="" class="tui-goods__img"></image>
  14. <view class="tui-goods__name">{{ live.liveTitle }}</view>
  15. <view class="tui-goods__statu">
  16. <text class="iconfont icon-weikaishi" v-if="live.liveStatus == '1'"></text>
  17. <image :src="iconLive" mode="widthFix" class="icon-live" v-if="live.liveStatus == '2'"></image>
  18. <text class="iconfont icon-jieshu" v-if="live.liveStatus == '3'"></text>
  19. <text>{{ live.liveStatus | statusType }}</text>
  20. </view>
  21. </view>
  22. <view class="tui-goods__text" v-if="flIndex > 0">{{ live.liveTitle }}</view>
  23. </view>
  24. </view>
  25. <view class="tui-goods__item" v-if="tempData.cmImageList != ''">
  26. <view class="tui-group-name" @click="NewActivityList">
  27. <view class="tui-group-title"><text>最新活动</text></view>
  28. <view class="iconfont icon-xiayibu"></view>
  29. </view>
  30. <view class="tui-goods__main" :class="flIndex == 0 ? 'one' : ''" v-for="(cmImage, flIndex) in tempData.cmImageList" :key="flIndex" @click="NewActivityListPath(cmImage)">
  31. <view class="tui-goods__imgbox" v-if="flIndex === 0">
  32. <image :src="cmImage.homePageImage" mode="" class="tui-goods__img"></image>
  33. <view class="tui-goods__name">{{ cmImage.title }}</view>
  34. </view>
  35. <view class="tui-goods__text" v-if="flIndex > 0">{{ cmImage.title }}</view>
  36. </view>
  37. </view>
  38. <view class="tui-goods__item" v-if="tempData.infoList != ''">
  39. <view class="tui-group-name" @click="NavArticlePath('https://www.caimei365.com/info/center-3-1.html')">
  40. <view class="tui-group-title"><text>热门文章</text></view>
  41. <view class="iconfont icon-xiayibu"></view>
  42. </view>
  43. <view class="tui-goods__main" :class="flIndex == 0 ? 'one' : ''" v-for="(info, flIndex) in tempData.infoList" :key="flIndex" @click="NavArticlePath(info.link)">
  44. <view class="tui-goods__imgbox" v-if="flIndex === 0">
  45. <image :src="info.homePageImage" mode="" class="tui-goods__img"></image>
  46. <view class="tui-goods__name">{{ info.title }}</view>
  47. </view>
  48. <view class="tui-goods__text" v-if="flIndex > 0">{{ info.title }}</view>
  49. </view>
  50. </view>
  51. </view>
  52. </scroll-view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import { mapState,mapMutations} from 'vuex';
  58. export default{
  59. name:"pagesProduct",
  60. props:{
  61. templateData:{
  62. type:Object
  63. }
  64. },
  65. data() {
  66. return{
  67. tempData:{},
  68. iconLive:'https://static.caimei365.com/app/img/icon/icon-live.gif'
  69. }
  70. },
  71. filters: {
  72. statusType:function(value) {
  73. switch (value) {
  74. case '1':
  75. return '未开始';
  76. break;
  77. case '2':
  78. return '直播中';
  79. break;
  80. case '3':
  81. return '已结束';
  82. break;
  83. }
  84. },
  85. NumFormat:function(value) {//处理金额
  86. return Number(value).toFixed(2);
  87. },
  88. },
  89. created(){
  90. this.initData(this.templateData)
  91. },
  92. methods:{
  93. initData(data){
  94. this.tempData = data
  95. },
  96. NavArticlePath(LINK){
  97. this.$api.navigateTo(`/h5/pages/article/path?link=${LINK}`)
  98. },
  99. NewActivityList(){
  100. this.$api.navigateTo('/h5/pages/activity/activity-list')
  101. },
  102. NewActivityListPath(pros){
  103. this.$api.FlooryNavigateTo(pros)
  104. },
  105. LiveGoPath(){//查看直播
  106. this.$api.navigateTo('/h5/pages/article/path-live')
  107. // uni.navigateToMiniProgram({
  108. // appId: 'wx92d650b253f8f2e3',
  109. // path: '/pages/index/index',
  110. // extraData: {
  111. // 'data1': 'test'
  112. // },
  113. // envVersion: 'develop',
  114. // success(res) {
  115. // // 打开成功
  116. // console.log(res)
  117. // }
  118. // })
  119. },
  120. LiveGoPathPros(live){
  121. this.$api.navigateTo(`/h5/pages/article/page-image?title=${live.liveTitle}&image=${live.advertisingImage}`)
  122. }
  123. }
  124. }
  125. </script>
  126. <style lang="scss">
  127. .container-pages{
  128. width: 100%;
  129. height:508rpx;
  130. padding: 24rpx;
  131. float: left;
  132. background-color: #F7F7F7;
  133. margin-top: 16rpx;
  134. box-sizing: border-box;
  135. background-color: #F7F7F7;
  136. overflow: hidden;
  137. display: flex;
  138. align-items: center;
  139. .tui-goods__list {
  140. display: flex;
  141. align-items: center;
  142. }
  143. .tui-goods__item {
  144. background-color: #fff;
  145. width: 307rpx;
  146. height: 460rpx;
  147. border-radius: 16rpx;
  148. box-sizing: border-box;
  149. margin-right: 16rpx;
  150. padding: 17rpx;
  151. }
  152. .tui-group-name{
  153. width: 100%;
  154. height: 36rpx;
  155. float: left;
  156. margin-bottom: 13rpx;
  157. .tui-group-title{
  158. font-size: 26rpx;
  159. line-height: 36rpx;
  160. float: left;
  161. color: #333333;
  162. }
  163. .icon-xiayibu{
  164. font-size: 26rpx;
  165. line-height: 36rpx;
  166. float: right;
  167. color: #909090;
  168. }
  169. }
  170. .tui-goods__main{
  171. width: 100%;
  172. height: auto;
  173. float: left;
  174. position: relative;
  175. &.one{
  176. margin-bottom: 14rpx;
  177. }
  178. }
  179. .tui-goods__imgbox {
  180. width: 273rpx;
  181. height: 273rpx;
  182. box-sizing: border-box;
  183. border-radius: 8rpx;
  184. }
  185. .tui-goods__img {
  186. max-width: 273rpx;
  187. max-height: 273rpx;
  188. border-radius: 8rpx;
  189. display: block;
  190. }
  191. .tui-goods__name{
  192. width: 100%;
  193. height: 48rpx;
  194. float: left;
  195. line-height: 48rpx;
  196. box-sizing: border-box;
  197. padding-left: 12rpx;
  198. font-size: $font-size-24;
  199. color: #FFFFFF;
  200. background-color: rgba(0,0,0,0.4);
  201. position: absolute;
  202. bottom: 0;
  203. left: 0;
  204. white-space: nowrap;
  205. text-overflow: ellipsis;
  206. overflow: hidden;
  207. border-radius:0 0 8rpx 8rpx;
  208. }
  209. .tui-goods__statu{
  210. padding-left: 45rpx;
  211. padding-right: 10rpx;
  212. height: 35rpx;
  213. position: absolute;
  214. top: 17rpx;
  215. left: 17rpx;
  216. background-color: rgba(0,0,0,0.4);
  217. border-radius: 18rpx;
  218. line-height: 35rpx;
  219. color: #FFFFFF;
  220. text-align: right;
  221. font-size: $font-size-20;
  222. .icon-live{
  223. width: 17rpx;
  224. height: 17rpx;
  225. display: block;
  226. margin: 0 auto;
  227. position: absolute;
  228. left: 15rpx;
  229. top: 9rpx;
  230. }
  231. .iconfont{
  232. width: 35rpx;
  233. height: 35rpx;
  234. line-height: 35rpx;
  235. display: block;
  236. position: absolute;
  237. left: 10rpx;
  238. font-size: $font-size-26;
  239. &.icon-weikaishi{
  240. color: #E56D00;
  241. left:0;
  242. }
  243. &.icon-jieshu{
  244. color: #FFFFFF;
  245. left:0;
  246. font-size: 22rpx;
  247. }
  248. }
  249. }
  250. .tui-goods__text{
  251. width: 100%;
  252. height: 44rpx;
  253. float: left;
  254. line-height: 44rpx;
  255. box-sizing: border-box;
  256. padding-left: 12rpx;
  257. font-size: $font-size-24;
  258. color: #666666;
  259. white-space: nowrap;
  260. text-overflow: ellipsis;
  261. overflow: hidden;
  262. position: relative;
  263. &::before{
  264. content: '';
  265. width: 8rpx;
  266. height: 8rpx;
  267. border-radius: 50%;
  268. background-color: #cccccc;
  269. position: absolute;
  270. left: 0;
  271. top: 18rpx;
  272. }
  273. }
  274. }
  275. </style>