detail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view>
  3. <view class="item">
  4. <view class="text">
  5. <view class="title u-line-2">{{ detail.awardname || '--' }}</view>
  6. <view class="count u-line-1">
  7. <text style="margin-right: 118px">类型:{{ detail.type || '--' }}</text>
  8. <text>金额:{{ CNY(detail.price, '', false) || '--' }}元</text>
  9. </view>
  10. <view class="count u-line-1">来源:{{ detail.awardheadname || '--' }}</view>
  11. </view>
  12. </view>
  13. <view class="head">
  14. 收货信息
  15. </view>
  16. <view class="row">
  17. <view class="label">
  18. 姓名
  19. </view>
  20. <view class="value">
  21. {{ detail.name || '--' }}
  22. </view>
  23. </view>
  24. <view class="row">
  25. <view class="label">
  26. 手机号
  27. </view>
  28. <view class="value">
  29. {{ detail.phonenumber || '--' }}
  30. </view>
  31. </view>
  32. <view class="row">
  33. <view class="label">
  34. 地址
  35. </view>
  36. <view class="value">
  37. {{ getCity(detail) || '--' }}
  38. </view>
  39. </view>
  40. <view style="height: 70px;" />
  41. <view class="footer">
  42. <view class="add" hover-class="navigator-hover" @click="toEdit">
  43. 编辑收货信息
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. export default {
  50. data() {
  51. return {
  52. detail: {},
  53. }
  54. },
  55. onLoad(options) {
  56. this.detail = JSON.parse(options.data);
  57. console.log("options", this.detail)
  58. },
  59. onUnload() {
  60. delete this.$Http.changeItem;
  61. },
  62. methods: {
  63. toEdit() {
  64. let that = this;
  65. uni.navigateTo({
  66. url: '/store/deliveryAddress/index?tips=奖项根据收货信息发放,请选择并提交收货地址'
  67. })
  68. that.$Http.selectAddress = (item) => {
  69. uni.showModal({
  70. title: '提示',
  71. content: `是否确定选择“${item.address}”作为收货地址?`,
  72. success: (success) => {
  73. if (success.confirm) that.$Http.basic({
  74. id: "2024052910464202",
  75. content: {
  76. sa_awardmxid: that.detail.sa_awardmxid,
  77. name: item.name,
  78. phonenumber: item.phonenumber,
  79. province: item.province,
  80. city: item.city,
  81. county: item.county,
  82. address: item.address,
  83. }
  84. }).then(s => {
  85. if (that.cutoff(s.msg, '设置成功', true, '1000')) return;
  86. that.detail.name = item.name;
  87. that.detail.phonenumber = item.phonenumber;
  88. that.detail.province = item.province;
  89. that.detail.city = item.city;
  90. that.detail.county = item.county;
  91. that.detail.address = item.address;
  92. that.$Http.changeItem && that.$Http.changeItem(that.detail)
  93. })
  94. },
  95. })
  96. }
  97. }
  98. },
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. .item {
  103. display: flex;
  104. width: 355px;
  105. border-radius: 5px;
  106. overflow: hidden;
  107. background: #FFFFFF;
  108. padding: 10px;
  109. box-sizing: border-box;
  110. margin: 10px;
  111. .text {
  112. flex: 1;
  113. font-family: Source Han Sans SC, Source Han Sans SC;
  114. .title {
  115. font-weight: bold;
  116. font-size: 14px;
  117. color: #333333;
  118. line-height: 24px;
  119. }
  120. .count {
  121. font-size: 12px;
  122. color: #999999;
  123. line-height: 17px;
  124. margin-top: 8px;
  125. }
  126. }
  127. }
  128. .head {
  129. width: 375px;
  130. height: 45px;
  131. line-height: 45px;
  132. padding-left: 10px;
  133. box-sizing: border-box;
  134. background: #FFFFFF;
  135. font-family: PingFang SC, PingFang SC;
  136. font-size: 16px;
  137. font-weight: bold;
  138. color: #333333;
  139. }
  140. .row {
  141. width: 100vw;
  142. padding: 10px;
  143. background: #fff;
  144. box-sizing: border-box;
  145. .label {
  146. line-height: 20px;
  147. font-family: Source Han Sans SC, Source Han Sans SC;
  148. font-size: 14px;
  149. color: #666666;
  150. }
  151. .value {
  152. width: 355px;
  153. line-height: 20px;
  154. font-family: Source Han Sans SC, Source Han Sans SC;
  155. font-size: 14px;
  156. color: #000000;
  157. margin-top: 10px;
  158. }
  159. }
  160. .footer {
  161. position: fixed;
  162. bottom: 0;
  163. width: 100vw;
  164. height: 65px;
  165. background: #FFFFFF;
  166. box-shadow: 0px -2px 6px 1px rgba(0, 0, 0, 0.16);
  167. box-sizing: border-box;
  168. padding: 5px 10px;
  169. display: flex;
  170. .add {
  171. display: flex;
  172. align-items: center;
  173. justify-content: center;
  174. width: 100%;
  175. height: 45px;
  176. background: #C30D23;
  177. border-radius: 5px;
  178. font-family: PingFang SC, PingFang SC;
  179. font-size: 14px;
  180. color: #FFFFFF;
  181. }
  182. .forbidden {
  183. opacity: .6;
  184. }
  185. }
  186. </style>