t-select-goodsgiftcard.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <view>
  3. <tui-bottom-popup :show="show" @close="close">
  4. <view class="tui-goodsgiftcard__box">
  5. <view class="tui-goodsgiftcard__title">
  6. <text>购物卡</text>
  7. <view class="tui-icon-close" @tap="close">
  8. <tui-icon name="shut" :size="22" color="#BFBFBF"></tui-icon>
  9. </view>
  10. </view>
  11. <scroll-view scroll-y class="tui-goodsgiftcard__list">
  12. <radio-group @change="radioChange">
  13. <label class="tui-not-used tui-top20">
  14. <text>不使用购物卡</text>
  15. <radio value="-1" class="tui-goodsgiftcard-radio" color="#e41f19" />
  16. </label>
  17. <view class="tui-bankcard__list tui-top20">
  18. <view class="tui-bankcard__item" @click="Change(index)" :class="'cardbg'+item.styleno" v-for="(item,index) in dataList"
  19. :key="index">
  20. <view class="tui-card__info">
  21. <view class="tui-logo__box">
  22. <radio :value="index" class="tui-goodsgiftcard-radio" color="#e41f19" :checked="selIndex==index" />
  23. </view>
  24. <view class="tui-name__box">
  25. <view class="tui-name">{{item.name}}</view>
  26. <view class="tui-desc">余额:{{item.balance}}</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </radio-group>
  32. <view class="tui-seat__box tui-top20"></view>
  33. </scroll-view>
  34. <view class="tui-btn-pay">
  35. <tui-button height="88rpx" type="danger" shape="circle" shadow @click="btnConfirm">确定</tui-button>
  36. </view>
  37. </view>
  38. </tui-bottom-popup>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. name: 'tSelectgoodsgiftcard',
  44. props: {
  45. dataList: {
  46. type: Array,
  47. default () {
  48. return [{}, {}, {}, {}, {}];
  49. }
  50. },
  51. //控制显示
  52. show: {
  53. type: Boolean,
  54. default: false
  55. },
  56. page: {
  57. type: Number,
  58. default: 1
  59. }
  60. },
  61. data() {
  62. return {
  63. selIndex:'-1'
  64. };
  65. },
  66. methods: {
  67. btnConfirm() {
  68. this.$emit("ChangeGoodsgiftcard", {selIndex:this.selIndex})
  69. },
  70. radioChange(e) {
  71. this.selIndex = e.target.value
  72. },
  73. Change(e) {
  74. this.selIndex = e
  75. },
  76. close() {
  77. this.$emit("close", {})
  78. },
  79. }
  80. };
  81. </script>
  82. <style scoped>
  83. .tui-goodsgiftcard__box {
  84. width: 100%;
  85. }
  86. .tui-goodsgiftcard__title {
  87. width: 100%;
  88. padding: 40rpx 30rpx;
  89. box-sizing: border-box;
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. position: relative;
  94. }
  95. .tui-icon-close {
  96. position: absolute;
  97. right: 30rpx;
  98. top: 50%;
  99. transform: translateY(-50%);
  100. }
  101. .tui-goodsgiftcard__list {
  102. width: 100%;
  103. height: 640rpx;
  104. padding: 0 30rpx;
  105. box-sizing: border-box;
  106. background-color: #FAFAFA;
  107. }
  108. .tui-not-used{
  109. width: 100%;
  110. display: flex;
  111. align-items: center;
  112. justify-content: space-between;
  113. font-size: 28rpx;
  114. color: #333333;
  115. background-color: #fff;
  116. padding:20rpx 30rpx;
  117. box-sizing: border-box;
  118. border-radius:6rpx;
  119. }
  120. .tui-goodsgiftcard-item {
  121. width: 100%;
  122. height: 210rpx;
  123. position: relative;
  124. display: flex;
  125. align-items: center;
  126. padding-right: 30rpx;
  127. box-sizing: border-box;
  128. overflow: hidden;
  129. }
  130. .tui-goodsgiftcard-bg {
  131. width: 100%;
  132. height: 210rpx;
  133. position: absolute;
  134. left: 0;
  135. top: 0;
  136. z-index: 1;
  137. }
  138. .tui-goodsgiftcard-sign {
  139. height: 110rpx;
  140. width: 110rpx;
  141. position: absolute;
  142. z-index: 9;
  143. top: -30rpx;
  144. right: 40rpx;
  145. }
  146. .tui-goodsgiftcard-item-left {
  147. width: 218rpx;
  148. height: 210rpx;
  149. position: relative;
  150. z-index: 2;
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. flex-direction: column;
  155. flex-shrink: 0;
  156. }
  157. .tui-goodsgiftcard-price-box {
  158. display: flex;
  159. color: #e41f19;
  160. align-items: flex-end;
  161. }
  162. .tui-goodsgiftcard-price-sign {
  163. font-size: 30rpx;
  164. }
  165. .tui-goodsgiftcard-price {
  166. font-size: 70rpx;
  167. line-height: 68rpx;
  168. font-weight: bold;
  169. }
  170. .tui-price-small {
  171. font-size: 58rpx !important;
  172. line-height: 56rpx !important;
  173. }
  174. .tui-goodsgiftcard-intro {
  175. background: #f7f7f7;
  176. padding: 8rpx 10rpx;
  177. font-size: 26rpx;
  178. line-height: 26rpx;
  179. font-weight: 400;
  180. color: #666;
  181. margin-top: 18rpx;
  182. }
  183. .tui-goodsgiftcard-item-right {
  184. flex: 1;
  185. height: 210rpx;
  186. position: relative;
  187. z-index: 2;
  188. display: flex;
  189. align-items: center;
  190. justify-content: space-between;
  191. padding-left: 24rpx;
  192. box-sizing: border-box;
  193. overflow: hidden;
  194. }
  195. .tui-goodsgiftcard-content {
  196. width: 82%;
  197. display: flex;
  198. flex-direction: column;
  199. justify-content: center;
  200. }
  201. .tui-goodsgiftcard-title-box {
  202. display: flex;
  203. align-items: center;
  204. }
  205. .tui-goodsgiftcard-btn {
  206. padding: 6rpx;
  207. background: #ffebeb;
  208. color: #e41f19;
  209. font-size: 25rpx;
  210. line-height: 25rpx;
  211. display: flex;
  212. align-items: center;
  213. justify-content: center;
  214. transform: scale(0.9);
  215. transform-origin: 0 center;
  216. border-radius: 4rpx;
  217. flex-shrink: 0;
  218. }
  219. .tui-goodsgiftcard-title {
  220. width: 100%;
  221. font-size: 26rpx;
  222. color: #333;
  223. white-space: nowrap;
  224. overflow: hidden;
  225. text-overflow: ellipsis;
  226. }
  227. .tui-goodsgiftcard-rule {
  228. padding-top: 52rpx;
  229. }
  230. .tui-rule-box {
  231. display: flex;
  232. align-items: center;
  233. transform: scale(0.8);
  234. transform-origin: 0 100%;
  235. }
  236. .tui-padding-btm {
  237. padding-bottom: 6rpx;
  238. }
  239. .tui-goodsgiftcard-circle {
  240. width: 8rpx;
  241. height: 8rpx;
  242. background: rgb(160, 160, 160);
  243. border-radius: 50%;
  244. }
  245. .tui-goodsgiftcard-text {
  246. font-size: 28rpx;
  247. line-height: 28rpx;
  248. font-weight: 400;
  249. color: #666;
  250. padding-left: 8rpx;
  251. white-space: nowrap;
  252. }
  253. .tui-top20 {
  254. margin-top: 20rpx;
  255. }
  256. .tui-goodsgiftcard-title {
  257. font-size: 28rpx;
  258. line-height: 28rpx;
  259. }
  260. .tui-goodsgiftcard-radio {
  261. transform: scale(0.7);
  262. transform-origin: 100% center;
  263. }
  264. /* #ifdef APP-PLUS || MP */
  265. .wx-radio-input {
  266. margin-right: 0 !important;
  267. }
  268. /* #endif */
  269. /* #ifdef H5 */
  270. >>>uni-radio .uni-radio-input {
  271. margin-right: 0 !important;
  272. }
  273. /* #endif */
  274. .tui-seat__box {
  275. width: 100%;
  276. height: 1rpx;
  277. }
  278. .tui-btn-pay {
  279. width: 100%;
  280. padding: 20rpx 60rpx 40rpx;
  281. box-sizing: border-box;
  282. }
  283. .tui-bankcard__item {
  284. width: 100%;
  285. height: 240rpx;
  286. padding: 30rpx;
  287. box-sizing: border-box;
  288. border-radius: 16rpx;
  289. margin-bottom: 20rpx;
  290. }
  291. .tui-logo__box {
  292. width: 80rpx;
  293. height: 80rpx;
  294. display: flex;
  295. align-items: center;
  296. justify-content: center;
  297. margin-right: 20rpx;
  298. }
  299. .tui-logo {
  300. width: 52rpx;
  301. height: 52rpx;
  302. }
  303. .tui-card__info {
  304. display: flex;
  305. align-items: center;
  306. color: #fff;
  307. }
  308. .tui-name {
  309. font-size: 30rpx;
  310. font-weight: 500;
  311. }
  312. .tui-desc {
  313. font-size: 24rpx;
  314. opacity: 0.7;
  315. }
  316. .tui-card__no {
  317. margin-left: auto;
  318. }
  319. .cardbg0 {
  320. background: linear-gradient(to right, #FEAD4B, #FF9225);
  321. }
  322. .cardbg1 {
  323. background: linear-gradient(to right, #2C85D5, #2D66D1);
  324. }
  325. .cardbg2 {
  326. background: linear-gradient(to right, #2C87D6, #2D69D0);
  327. }
  328. .cardbg3 {
  329. background: linear-gradient(to right, #01ADA3, #0291A9);
  330. }
  331. .cardbg4 {
  332. background: linear-gradient(to right, #FF6F64, #FE5762);
  333. }
  334. .cardbg5 {
  335. background: linear-gradient(to right, #FF7065, #FD4754);
  336. }
  337. .tui-ping_an {
  338. background: linear-gradient(to right, #FEAD4B, #FF9225);
  339. }
  340. .tui-jian_she {
  341. background: linear-gradient(to right, #2C85D5, #2D66D1);
  342. }
  343. .tui-min_sheng {
  344. background: linear-gradient(to right, #2C87D6, #2D69D0);
  345. }
  346. .tui-nong_ye {
  347. background: linear-gradient(to right, #01ADA3, #0291A9);
  348. }
  349. .tui-zhao_shang {
  350. background: linear-gradient(to right, #FF6F64, #FE5762);
  351. }
  352. .tui-zhong_xin {
  353. background: linear-gradient(to right, #FF7065, #FD4754);
  354. }
  355. </style>