jkDetail.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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 class="shopCont">
  20. <view class="shopContLeft">
  21. <view class="shopName">{{shopInfo.shopName}}</view>
  22. <view class="shopaddress">{{shopInfo.address}}</view>
  23. </view>
  24. <view class="shopContRight">
  25. <view class="shopContRightLine" @click="getmap">
  26. <img src="../../static/img/icon_map.png" alt="" class="shopRightIcon">
  27. <view class="shopRightTxt">地图</view>
  28. </view>
  29. <view class="shopRightSx"></view>
  30. <view class="shopContRightLine" @click="call">
  31. <img src="../../static/img/icon_phone.png" alt="" class="shopRightIcon">
  32. <view class="shopRightTxt">电话</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="detailBOx" v-if="info.imgList">
  38. <view class="detailTitle">活动详情</view>
  39. <view class="detailImgBox" v-for="(item,index) in info.imgList.split(',')">
  40. <img :src="item" alt="" class="detailImg">
  41. </view>
  42. </view>
  43. <view style="height: 120rpx;"></view>
  44. <view class="bottom" v-if="type==1">
  45. <view class="bottomLeft" @click="edit1">编辑活动内容</view>
  46. <view class="bottomRight" @click="generate">生成活动</view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. info:'',
  55. type:'',
  56. shopNum:'',
  57. shopInfo:'',
  58. }
  59. },
  60. onLoad(opt) {
  61. if(opt.type==1){
  62. this.type=1;
  63. this.info = uni.getStorageSync("editdata");
  64. this.shopNum=this.info.shopList.split(',').length
  65. uni.setNavigationBarTitle({
  66. title:this.info.activityName
  67. })
  68. }
  69. this.getShopinfo()
  70. },
  71. methods: {
  72. call() {
  73. uni.makePhoneCall({
  74. phoneNumber: this.shopInfo.mobilePhone
  75. });
  76. },
  77. getmap() {
  78. console.log("打开地图")
  79. var that = this;
  80. if (!that.shopInfo.lat || !that.shopInfo.lng) {
  81. uni.showToast({
  82. title: '该店铺未设置定位',
  83. icon: 'none',
  84. duration: 3000
  85. });
  86. } else {
  87. uni.openLocation({
  88. latitude: Number(that.shopInfo.lat),
  89. longitude: Number(that.shopInfo.lng),
  90. name: that.shopInfo.shopName,
  91. address: that.shopInfo.provinceName + that.shopInfo.cityName + that.shopInfo.areaName + that.shopInfo.address,
  92. success: function() {
  93. console.log('success');
  94. },
  95. fail(err) {
  96. console.log(err)
  97. }
  98. });
  99. }
  100. },
  101. edit1(){
  102. uni.navigateBack(-1)
  103. },
  104. auditSetTheGuest(){
  105. uni.showLoading({
  106. title: '加载中'
  107. })
  108. this.$http('openH5SetTheGuest/auditSetTheGuest', this.info,'POST').then(res => {
  109. uni.hideLoading();
  110. if(res.code==0){
  111. uni.showToast({
  112. title: '活动已生成',
  113. icon:'none',
  114. duration: 2000
  115. });
  116. }
  117. //this.list=res.data
  118. })
  119. },
  120. getShopinfo(){
  121. this.$http('openH5SetTheGuest/getShopinfo',{},'GET').then(res => {
  122. this.shopInfo=res.data
  123. })
  124. },
  125. generate(){
  126. var that=this;
  127. uni.showModal({
  128. title: '提示',
  129. content: '活动已生成,是否立即启用',
  130. cancelText:'暂不启用',
  131. confirmText:'立即启用',
  132. success: function(res) {
  133. if (res.confirm) {
  134. that.info.clState=2;
  135. that.auditSetTheGuest()
  136. }else{
  137. console.log("no")
  138. that.info.clState=1;
  139. that.auditSetTheGuest()
  140. }
  141. }
  142. });
  143. }
  144. }
  145. }
  146. </script>
  147. <style scoped>
  148. .shopRightIcon{
  149. width: 44rpx;
  150. height: 44rpx;
  151. display: block;
  152. margin: 0 auto;
  153. margin-bottom: 10rpx;
  154. }
  155. .shopName{
  156. color: #3C3C3C;
  157. font-size: 28rpx;
  158. }
  159. .shopaddress{
  160. font-weight: 400;
  161. color: #999999;
  162. font-size: 24rpx;
  163. padding-top: 10rpx;
  164. width: 500rpx;
  165. }
  166. .shopRightSx{
  167. width: 2rpx;
  168. height: 69rpx;
  169. background:#EEEEEE ;
  170. margin-left: 34rpx;
  171. margin-right: 34rpx;
  172. margin-top: 14rpx;
  173. }
  174. .shopCont{
  175. display: flex;
  176. justify-content: space-between;
  177. padding-top: 25rpx;
  178. }
  179. .shopContRight{
  180. display: flex;
  181. }
  182. .shopContRightLine{
  183. text-align: center;
  184. color: #999999;
  185. font-size: 24rpx;
  186. }
  187. .content{
  188. min-height: 100vh;
  189. background:#F4F5F7;
  190. }
  191. .detailImg{
  192. width: 750rpx;
  193. display: block;
  194. }
  195. .detailBOx{
  196. background: #ffffff;
  197. margin-top: 20rpx;
  198. }
  199. .detailTitle{
  200. color: #3C3C3C;
  201. font-weight: 500;
  202. padding: 20rpx 24rpx;
  203. font-size: 30rpx;
  204. }
  205. .topimg{
  206. width: 750rpx;
  207. }
  208. .shopMs{
  209. font-weight: 500;
  210. color: #222222;
  211. line-height: 42rpx;
  212. font-size: 30rpx;
  213. }
  214. .shopBox{
  215. background: #ffffff;
  216. margin-top: 20rpx;
  217. padding: 20rpx 34rpx;
  218. }
  219. .shopBoxTop{
  220. display: flex;
  221. justify-content: space-between;
  222. }
  223. .shopTy{
  224. display: flex;
  225. }
  226. .shopTyTxt{
  227. font-weight: 400;
  228. color: #666666;
  229. font-size: 24rpx;
  230. line-height: 42rpx;
  231. }
  232. .shopjt{
  233. width: 14rpx;
  234. height: 23rpx;
  235. margin-top: 10rpx;
  236. margin-left: 10rpx;
  237. }
  238. .cont{
  239. background: #ffffff;
  240. border-radius: 24rpx 24rpx 0px 0px;
  241. margin-top: -30rpx;
  242. padding: 30rpx 24rpx;
  243. position: relative;
  244. }
  245. .name{
  246. color: #3C3C3C;
  247. line-height: 42rpx;
  248. font-weight: 500;
  249. font-size: 30rpx;
  250. }
  251. .name2{
  252. color: #3C3C3C;
  253. line-height: 36rpx;
  254. font-weight: 400;
  255. font-size: 26rpx;
  256. padding-top: 16rpx;
  257. }
  258. .name3{
  259. color: #999999;
  260. line-height: 36rpx;
  261. font-weight: 400;
  262. font-size: 26rpx;
  263. padding-top: 16rpx;
  264. }
  265. .bottom{
  266. width: 750rpx;
  267. height: 98rpx;
  268. background: #FFFFFF;
  269. position: fixed;
  270. bottom: 0;
  271. left: 0;
  272. display: flex;
  273. }
  274. .bottomLeft{
  275. width: 375rpx;
  276. line-height: 98rpx;
  277. text-align: center;
  278. color: #3C3C3C;
  279. font-size: 30rpx;
  280. }
  281. .bottomRight{
  282. width: 375rpx;
  283. height: 98rpx;
  284. background: #3F90F7;
  285. line-height: 98rpx;
  286. text-align: center;
  287. color: #FFFFFF;
  288. font-size: 30rpx;
  289. }
  290. </style>