integralConfirm.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. var that = this
  75. uni.showModal({
  76. title: '提示',
  77. content: '提交成功',
  78. cancelText:'回到首页',
  79. confirmText:'查看订单',
  80. success: function (res2) {
  81. if (res2.confirm) {
  82. uni.redirectTo({
  83. url:'recordDetail?id='+res.data
  84. })
  85. } else if (res2.cancel) {
  86. uni.switchTab({
  87. url:'../index/index'
  88. })
  89. }
  90. }
  91. });
  92. }else{
  93. uni.showToast({
  94. title: res.msg,
  95. icon: 'none',
  96. duration: 3000
  97. });
  98. }
  99. })
  100. }
  101. }
  102. }
  103. </script>
  104. <style scoped>
  105. .box{
  106. background: #F4F5F7;
  107. min-height: 100vh;
  108. }
  109. .tanhao{
  110. width: 30rpx;
  111. height: 30rpx;
  112. background: #F19D01;
  113. border-radius: 50%;
  114. text-align: center;
  115. line-height: 30rpx;
  116. color: #ffffff;
  117. font-size: 30rpx;
  118. }
  119. .topTis{
  120. padding: 20rpx 21rpx;
  121. background: #FDF5E5;
  122. display: flex;
  123. }
  124. .topTisTxt{
  125. color: #F19D01;font-size: 26rpx;line-height: 30rpx;padding-left: 10rpx;
  126. }
  127. .cont{
  128. width: 702rpx;
  129. background: #FFFFFF;
  130. border-radius: 10rpx;
  131. margin-left: 24rpx;
  132. margin-top: 20rpx;
  133. }
  134. .contTitle{
  135. font-size: 30rpx;
  136. font-family: PingFangSC-Medium, PingFang SC;
  137. font-weight: 500;
  138. color: #3C3C3C;
  139. line-height: 42rpx;
  140. padding: 26rpx 20rpx;
  141. border-bottom: 1px solid #EEEEEE;
  142. }
  143. .goodsImg{
  144. width: 120rpx;
  145. height: 120rpx;
  146. }
  147. .goodsCont{
  148. display: flex;
  149. padding: 30rpx 20rpx;
  150. }
  151. .goodsRight{
  152. width: 522rpx;
  153. padding-left: 20rpx;
  154. display: flex;
  155. flex-direction: column;
  156. justify-content: space-between;
  157. }
  158. .goodsName{
  159. color: #3C3C3C;font-size: 26rpx;
  160. }
  161. .goodsNumbox{
  162. display: flex;
  163. justify-content: space-between;
  164. }
  165. .Price{
  166. color: #3C3C3C;font-size: 22rpx;
  167. }
  168. .Price span{
  169. font-weight: 500;
  170. color: #3C3C3C;
  171. font-size: 32rpx;
  172. }
  173. .goodsNum{
  174. color: #999999;font-size: 24rpx;padding-top: 5rpx;
  175. }
  176. .buybtnBox{
  177. width: 750rpx;
  178. height: 120rpx;
  179. background: #FFFFFF;
  180. box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.2000);
  181. display: flex;
  182. justify-content: space-between;
  183. position: fixed;
  184. left: 0;
  185. bottom: 0;
  186. padding-bottom: env(safe-area-inset-bottom);
  187. }
  188. .ktyong{
  189. font-weight: 500;
  190. color: #666666;
  191. font-size: 24rpx;
  192. padding-left: 30rpx;
  193. padding-top: 18rpx;
  194. } .ktyong1{
  195. color: #FF0000;
  196. font-size: 32rpx;
  197. }
  198. .ktyong2{
  199. color: #FF0000;
  200. font-size: 24rpx;
  201. }
  202. .kyNum{
  203. color: #999999;
  204. font-size: 24rpx;
  205. }
  206. .bottomBtn{
  207. width: 204rpx;
  208. height: 74rpx;
  209. background: #D53533;
  210. border-radius: 37rpx;
  211. line-height: 74rpx;
  212. text-align: center;
  213. color: #FFFFFF;
  214. font-size: 30rpx;
  215. margin-top: 23rpx;
  216. margin-left: 70rpx;
  217. margin-right: 30rpx;
  218. }
  219. .shopCont{
  220. background: #FEFFFE;
  221. border-radius: 10rpx;
  222. width: 702rpx;
  223. padding: 30rpx 0;
  224. margin-top: 20rpx;
  225. margin-left: 24rpx;
  226. display: flex;
  227. justify-content: space-between;
  228. }
  229. .shopLeft{
  230. color: #666666;
  231. font-size: 28rpx;
  232. padding-left: 20rpx;
  233. }
  234. .shopName{
  235. color: #333333;font-size: 28rpx;
  236. padding-right: 20rpx;
  237. }
  238. </style>