jkDetail.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <img :src="info.img" alt="" class="topimg">
  5. </view>
  6. <view class="cont">
  7. <view class="name">{{info.activityName}}</view>
  8. <view class="name2">{{info.startTime}}~{{info.endTime}}</view>
  9. <view class="name3">{{info.activityContent}}</view>
  10. </view>
  11. <view class="shopBox">
  12. <view class="shopBoxTop">
  13. <view class="shopMs">活动门店</view>
  14. <view class="shopTy">
  15. <view class="shopTyTxt">{{shopNum}}家门店通用</view>
  16. <img src="../../static/img/jt2.png" alt="" class="shopjt">
  17. </view>
  18. </view>
  19. </view>
  20. <view class="detailBOx" v-if="info.imgList">
  21. <view class="detailTitle">活动详情</view>
  22. <view class="detailImgBox" v-for="(item,index) in info.imgList.split(',')">
  23. <img :src="item" alt="" class="detailImg">
  24. </view>
  25. </view>
  26. <view style="height: 120rpx;"></view>
  27. <view class="bottom" v-if="type==1">
  28. <view class="bottomLeft">编辑活动内容</view>
  29. <view class="bottomRight" @click="generate">生成活动</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. info:'',
  38. type:'',
  39. shopNum:'',
  40. }
  41. },
  42. onLoad(opt) {
  43. if(opt.type==1){
  44. this.type=1;
  45. this.info = uni.getStorageSync("editdata");
  46. this.shopNum=this.info.shopList.split(',').length
  47. uni.setNavigationBarTitle({
  48. title:this.info.activityName
  49. })
  50. }
  51. },
  52. methods: {
  53. auditSetTheGuest(){
  54. uni.showLoading({
  55. title: '加载中'
  56. })
  57. this.$http('openH5SetTheGuest/auditSetTheGuest', this.info,'POST').then(res => {
  58. uni.hideLoading();
  59. //this.list=res.data
  60. })
  61. },
  62. generate(){
  63. var that=this;
  64. uni.showModal({
  65. title: '提示',
  66. content: '活动已生成,是否立即启用',
  67. cancelText:'暂不启用',
  68. confirmText:'立即启用',
  69. success: function(res) {
  70. if (res.confirm) {
  71. that.info.clState=2;
  72. that.auditSetTheGuest()
  73. }else{
  74. console.log("no")
  75. that.info.clState=1;
  76. that.auditSetTheGuest()
  77. }
  78. }
  79. });
  80. }
  81. }
  82. }
  83. </script>
  84. <style scoped>
  85. .content{
  86. min-height: 100vh;
  87. background:#F4F5F7;
  88. }
  89. .detailImg{
  90. width: 750rpx;
  91. display: block;
  92. }
  93. .detailBOx{
  94. background: #ffffff;
  95. margin-top: 20rpx;
  96. }
  97. .detailTitle{
  98. color: #3C3C3C;
  99. font-weight: 500;
  100. padding: 20rpx 24rpx;
  101. font-size: 30rpx;
  102. }
  103. .topimg{
  104. width: 750rpx;
  105. }
  106. .shopMs{
  107. font-weight: 500;
  108. color: #222222;
  109. line-height: 42rpx;
  110. font-size: 30rpx;
  111. }
  112. .shopBox{
  113. background: #ffffff;
  114. margin-top: 20rpx;
  115. padding: 20rpx 34rpx;
  116. }
  117. .shopBoxTop{
  118. display: flex;
  119. justify-content: space-between;
  120. }
  121. .shopTy{
  122. display: flex;
  123. }
  124. .shopTyTxt{
  125. font-weight: 400;
  126. color: #666666;
  127. font-size: 24rpx;
  128. line-height: 42rpx;
  129. }
  130. .shopjt{
  131. width: 14rpx;
  132. height: 23rpx;
  133. margin-top: 10rpx;
  134. margin-left: 10rpx;
  135. }
  136. .cont{
  137. background: #ffffff;
  138. border-radius: 24rpx 24rpx 0px 0px;
  139. margin-top: -30rpx;
  140. padding: 30rpx 24rpx;
  141. position: relative;
  142. }
  143. .name{
  144. color: #3C3C3C;
  145. line-height: 42rpx;
  146. font-weight: 500;
  147. font-size: 30rpx;
  148. }
  149. .name2{
  150. color: #3C3C3C;
  151. line-height: 36rpx;
  152. font-weight: 400;
  153. font-size: 26rpx;
  154. padding-top: 16rpx;
  155. }
  156. .name3{
  157. color: #999999;
  158. line-height: 36rpx;
  159. font-weight: 400;
  160. font-size: 26rpx;
  161. padding-top: 16rpx;
  162. }
  163. .bottom{
  164. width: 750rpx;
  165. height: 98rpx;
  166. background: #FFFFFF;
  167. position: fixed;
  168. bottom: 0;
  169. left: 0;
  170. display: flex;
  171. }
  172. .bottomLeft{
  173. width: 375rpx;
  174. line-height: 98rpx;
  175. text-align: center;
  176. color: #3C3C3C;
  177. font-size: 30rpx;
  178. }
  179. .bottomRight{
  180. width: 375rpx;
  181. height: 98rpx;
  182. background: #3F90F7;
  183. line-height: 98rpx;
  184. text-align: center;
  185. color: #FFFFFF;
  186. font-size: 30rpx;
  187. }
  188. </style>