integralConfirm.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view class="box">
  3. <view class="topTis">
  4. <view class="tanhao">!</view>
  5. <view class="topTisTxt">提交申请后请到店兑换</view>
  6. </view>
  7. <view class="cont">
  8. <view class="contTitle">商品明细</view>
  9. <view class="goodsCont">
  10. <img :src="jfgoodsDetail.imgList[0].img" alt="" class="goodsImg" v-if="jfgoodsDetail.imgList.length>0">
  11. <image src="../../static/timg/noimg.png" class="goodsImg" v-else></image>
  12. <view class="goodsRight">
  13. <view class="goodsName">{{jfgoodsDetail.name}}</view>
  14. <view class="goodsNumbox">
  15. <view class="Price" v-if="jfgoodsDetail.salePrice">¥<span>{{jfgoodsDetail.salePrice}}</span> </view>
  16. <view class="goodsNum">x{{goodsnum}}</view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="shopCont">
  22. <view class="shopLeft">服务门店</view>
  23. <view class="shopName">{{shopName}}</view>
  24. </view>
  25. <view class="buybtnBox">
  26. <view class="ktyong"><view>合计 <span class="ktyong1">{{goodsnum*jfgoodsDetail.integral}}</span><span class="ktyong2">积分</span> </view>
  27. <view class="kyNum">可用积分:{{avaIntegral}}</view>
  28. </view>
  29. <view class="bottomBtn" @click="goBuy">提交订单</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. shopId:'',
  38. shopName:'',
  39. avaIntegral:'',
  40. goodsnum:'',
  41. jfgoodsDetail:'',
  42. }
  43. },
  44. onLoad(opt) {
  45. this.jfgoodsDetail=uni.getStorageSync("jfgoodsDetail");
  46. this.shopName=opt.shopName;
  47. this.shopId=opt.shopID;
  48. this.avaIntegral=opt.avaIntegral;
  49. this.goodsnum=opt.goodsnum;
  50. },
  51. methods: {
  52. goDetail(){
  53. uni.navigateTo({
  54. url:'integralgoodsDetail'
  55. })
  56. },
  57. goBuy(){
  58. uni.showLoading({
  59. title: '加载中'
  60. })
  61. this.$http('openIntegralMall/exchangeApply', {
  62. shopId:this.shopId,
  63. goodsID:this.jfgoodsDetail.id,
  64. qty:this.goodsnum
  65. },'POST').then(res => {
  66. uni.hideLoading();
  67. if(res.code==0){
  68. this.orderData=res.data
  69. uni.showToast({
  70. title: '兑换成功',
  71. icon: 'none',
  72. duration: 3000
  73. });
  74. uni.redirectTo({
  75. url:'recordDetail?id='+res.data
  76. })
  77. }else{
  78. uni.showToast({
  79. title: res.msg,
  80. icon: 'none',
  81. duration: 3000
  82. });
  83. }
  84. })
  85. }
  86. }
  87. }
  88. </script>
  89. <style scoped>
  90. .box{
  91. background: #F4F5F7;
  92. min-height: 100vh;
  93. }
  94. .tanhao{
  95. width: 30rpx;
  96. height: 30rpx;
  97. background: #F19D01;
  98. border-radius: 50%;
  99. text-align: center;
  100. line-height: 30rpx;
  101. color: #ffffff;
  102. font-size: 30rpx;
  103. }
  104. .topTis{
  105. padding: 20rpx 21rpx;
  106. background: #FDF5E5;
  107. display: flex;
  108. }
  109. .topTisTxt{
  110. color: #F19D01;font-size: 26rpx;line-height: 30rpx;padding-left: 10rpx;
  111. }
  112. .cont{
  113. width: 702rpx;
  114. background: #FFFFFF;
  115. border-radius: 10rpx;
  116. margin-left: 24rpx;
  117. margin-top: 20rpx;
  118. }
  119. .contTitle{
  120. font-size: 30rpx;
  121. font-family: PingFangSC-Medium, PingFang SC;
  122. font-weight: 500;
  123. color: #3C3C3C;
  124. line-height: 42rpx;
  125. padding: 26rpx 20rpx;
  126. border-bottom: 1px solid #EEEEEE;
  127. }
  128. .goodsImg{
  129. width: 120rpx;
  130. height: 120rpx;
  131. }
  132. .goodsCont{
  133. display: flex;
  134. padding: 30rpx 20rpx;
  135. }
  136. .goodsRight{
  137. width: 522rpx;
  138. padding-left: 20rpx;
  139. display: flex;
  140. flex-direction: column;
  141. justify-content: space-between;
  142. }
  143. .goodsName{
  144. color: #3C3C3C;font-size: 26rpx;
  145. }
  146. .goodsNumbox{
  147. display: flex;
  148. justify-content: space-between;
  149. }
  150. .Price{
  151. color: #3C3C3C;font-size: 22rpx;
  152. }
  153. .Price span{
  154. font-weight: 500;
  155. color: #3C3C3C;
  156. font-size: 32rpx;
  157. }
  158. .goodsNum{
  159. color: #999999;font-size: 24rpx;padding-top: 5rpx;
  160. }
  161. .buybtnBox{
  162. width: 750rpx;
  163. height: 120rpx;
  164. background: #FFFFFF;
  165. box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.2000);
  166. display: flex;
  167. justify-content: space-between;
  168. position: fixed;
  169. left: 0;
  170. bottom: 0;
  171. padding-bottom: env(safe-area-inset-bottom);
  172. }
  173. .ktyong{
  174. font-weight: 500;
  175. color: #666666;
  176. font-size: 24rpx;
  177. padding-left: 30rpx;
  178. padding-top: 18rpx;
  179. } .ktyong1{
  180. color: #FF0000;
  181. font-size: 32rpx;
  182. }
  183. .ktyong2{
  184. color: #FF0000;
  185. font-size: 24rpx;
  186. }
  187. .kyNum{
  188. color: #999999;
  189. font-size: 24rpx;
  190. }
  191. .bottomBtn{
  192. width: 204rpx;
  193. height: 74rpx;
  194. background: #D53533;
  195. border-radius: 37rpx;
  196. line-height: 74rpx;
  197. text-align: center;
  198. color: #FFFFFF;
  199. font-size: 30rpx;
  200. margin-top: 23rpx;
  201. margin-left: 70rpx;
  202. margin-right: 30rpx;
  203. }
  204. .shopCont{
  205. background: #FEFFFE;
  206. border-radius: 10rpx;
  207. width: 702rpx;
  208. padding: 30rpx 0;
  209. margin-top: 20rpx;
  210. margin-left: 24rpx;
  211. display: flex;
  212. justify-content: space-between;
  213. }
  214. .shopLeft{
  215. color: #666666;
  216. font-size: 28rpx;
  217. padding-left: 20rpx;
  218. }
  219. .shopName{
  220. color: #333333;font-size: 28rpx;
  221. padding-right: 20rpx;
  222. }
  223. </style>