secondBrandAlert.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. <template name="brandalert">
  2. <view class="regulations-template">
  3. <view class="regulations-title" @tap.stop="hanldOperationConfim">
  4. <text class="text">售后条款</text>
  5. <view class="freight-right">
  6. <text class="text-l">{{regulaText}}</text>
  7. <text class="iconfont icon-xiayibu"></text>
  8. </view>
  9. </view>
  10. <!--底部选择模态层弹窗组件 -->
  11. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="discard" >
  12. <!-- 遮罩层 -->
  13. <view class="mask"></view>
  14. <view class="layer">
  15. <view class="content">
  16. <view class="freight-ltitle">售后条款</view>
  17. <text class="iconfont icon-iconfontguanbi" @click="freightConfim"></text>
  18. <view class="freight-radio">
  19. <radio-group class="row-group" @change="radioChange">
  20. <label class="row-input">
  21. <view class="row-text noTk">无条款</view>
  22. <radio class="row-radio" value="无条款" color="#E15616"/>
  23. </label>
  24. <label class="row-input" v-for="(item, index) in freightList" :key="item.value">
  25. <view class="row-text">{{item.name}}</view>
  26. <radio class="row-radio" :value="item.name" :checked="index === current" color="#E15616"/>
  27. </label>
  28. </radio-group>
  29. </view>
  30. </view>
  31. <view class="btn">
  32. <view class="button add" @click="freightConfim">确定</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default{
  40. name:'brandalert',
  41. props:{
  42. barndDatas:{
  43. type:Object
  44. }
  45. },
  46. data(){
  47. return{
  48. regulaText:'无条款',
  49. freightList:[
  50. {value:1,name:'第一款—售后条款'},
  51. {value:0,name:'第一款—售后条款'},
  52. {value:-1,name:'第一款—售后条款'},
  53. {value:-1,name:'第一款—售后条款'},
  54. {value:-1,name:'第一款—售后条款'},
  55. {value:-1,name:'第一款—售后条款'},
  56. {value:-1,name:'第一款—售后条款'},
  57. {value:-1,name:'第一款—售后条'},
  58. ],
  59. freightMoney:0,
  60. specClass: '',//规格弹窗css类,控制开关动画
  61. }
  62. },
  63. methods:{
  64. radioChange(e){
  65. this.regulaText = e.target.value;
  66. },
  67. freightConfim(){//提交完成选择
  68. this.hideSpec()
  69. },
  70. hideSpec() {//关闭弹窗
  71. this.specClass = 'hide';
  72. setTimeout(() => {
  73. this.specClass = 'none';
  74. }, 200);
  75. },
  76. hanldOperationConfim(data){//显示弹窗
  77. this.specClass = 'show';
  78. this.freightMoney = this.hanldFreight
  79. },
  80. showTip(){//显示弹窗
  81. this.$emit('@showregulaAlert');
  82. },
  83. }
  84. }
  85. </script>
  86. <style lang="scss">
  87. .regulations-template{
  88. width: 100%;
  89. height: auto;
  90. background: #FFFFFF;
  91. float: left;
  92. margin-top: 24rpx;
  93. .regulations-title{
  94. width: 702rpx;
  95. padding: 0 24rpx;
  96. height: 88rpx;
  97. line-height: 88rpx;
  98. font-size: $font-size-28;
  99. color: $text-color;
  100. background: #FFFFFF;
  101. float: left;
  102. font-weight: bold;
  103. border-bottom: 1rpx solid #EBEBEB;
  104. .freight-left{
  105. float: left;
  106. .icon-yunfeishuoming{
  107. height: 100%;
  108. padding:15rpx;
  109. color: $color-system;
  110. font-weight: normal;
  111. }
  112. }
  113. .Tk{
  114. float: right;
  115. margin-right: 38rpx;
  116. font-size: $font-size-28;
  117. color: #666666;
  118. }
  119. .freight-right{
  120. float: right;
  121. color: #2A81FF;
  122. .text-l{
  123. margin-right: 20rpx;
  124. }
  125. .text{
  126. line-height: 88rpx;
  127. color: #ff0000;
  128. margin:0 20rpx;
  129. font-weight: normal;
  130. }
  131. .icon-xiayibu{
  132. line-height: 88rpx;
  133. color: #999999;
  134. font-weight: normal;
  135. }
  136. }
  137. }
  138. }
  139. .freight-ltitle{
  140. width: 100%;
  141. line-height: 60rpx;
  142. height: 60rpx;
  143. font-size: $font-size-34;
  144. color: #333333;
  145. text-align:center;
  146. }
  147. .icon-iconfontguanbi{
  148. position: absolute;
  149. top: 0;
  150. right: 0;
  151. font-size: 34rpx;
  152. color: #b2b2b2
  153. }
  154. .freight-radio{
  155. height: 66rpx;
  156. line-height: 66rpx;
  157. padding: 0 20rpx;
  158. .row-group{
  159. width: 100%;
  160. max-height: 460rpx;
  161. overflow: auto;
  162. }
  163. .row-input{
  164. height: 66rpx;
  165. line-height: 66rpx;
  166. width: 100%;
  167. display: block;
  168. }
  169. .row-radio{
  170. float: right;
  171. transform: scale(0.9);
  172. color: #b2b2b2;
  173. }
  174. .row-text{
  175. font-size: $font-size-28;
  176. color: #1890f9;
  177. float: left;
  178. &.noTk{
  179. color: #666666;
  180. }
  181. }
  182. }
  183. .freight-group{
  184. width: 100%;
  185. height: 88rpx;
  186. display: flex;
  187. border-bottom: 1px solid #FFFFFF;
  188. flex-direction: row;
  189. .text{
  190. display: block;
  191. flex: 1;
  192. line-height: 88rpx;
  193. font-size: $font-size-24;
  194. color: #999999;
  195. text-align: left;
  196. padding-left: 10rpx;
  197. }
  198. .group-from{
  199. flex: 1;
  200. height: 40rpx;
  201. padding: 20rpx;
  202. line-height: 40rpx;
  203. align-items: flex-start;
  204. font-size: $font-size-24;
  205. color: $text-color;
  206. background: #F7F7F7;
  207. border-radius: 14rpx;
  208. margin-bottom: 20rpx;
  209. margin-top: 10rpx;
  210. .form-input{
  211. height: 40rpx;
  212. line-height: 40rpx;
  213. flex-grow: 1;
  214. }
  215. }
  216. }
  217. /* 加入购物模态层*/
  218. @keyframes showPopup {
  219. 0% {
  220. opacity: 0;
  221. }
  222. 100% {
  223. opacity: 1;
  224. }
  225. }
  226. @keyframes hidePopup {
  227. 0% {
  228. opacity: 1;
  229. }
  230. 100% {
  231. opacity: 0;
  232. }
  233. }
  234. @keyframes showLayer {
  235. 0% {
  236. transform: translateY(0);
  237. }
  238. 100% {
  239. transform: translateY(-100%);
  240. }
  241. }
  242. @keyframes hideLayer {
  243. 0% {
  244. transform: translateY(-100%);
  245. }
  246. 100% {
  247. transform: translateY(0);
  248. }
  249. }
  250. @keyframes showAmnation {
  251. 0% {
  252. top: -12rpx;
  253. opacity: 0;
  254. }
  255. 50% {
  256. top: -60rpx;
  257. opacity: 1;
  258. }
  259. 100% {
  260. top: -100rpx;
  261. opacity: 0;
  262. }
  263. }
  264. @keyframes hideAmnation {
  265. 0% {
  266. top: -100rpx;
  267. opacity: 0;
  268. }
  269. 100% {
  270. top: -12rpx;
  271. opacity: 0;
  272. }
  273. }
  274. .popup {
  275. position: fixed;
  276. top: 0;
  277. width: 100%;
  278. height: 100%;
  279. z-index: 999;
  280. display: none;
  281. .mask{
  282. position: fixed;
  283. top: 0;
  284. width: 100%;
  285. height: 100%;
  286. z-index: 21;
  287. background-color: rgba(0, 0, 0, 0.6);
  288. }
  289. .layer {
  290. position: fixed;
  291. z-index: 22;
  292. bottom: -710rpx;
  293. width: 702rpx;
  294. padding: 24rpx 24rpx 36rpx 24rpx;
  295. height: 670rpx;
  296. border-radius: 20rpx 20rpx 0 0;
  297. background-color: #fff;
  298. display: flex;
  299. flex-wrap: wrap;
  300. align-content: space-between;
  301. .content {
  302. width: 100%;
  303. position: relative;
  304. }
  305. .btn {
  306. width: 100%;
  307. height: 88rpx;
  308. display: flex;
  309. .button {
  310. width: 702rpx;
  311. height: 88rpx;
  312. color: #fff;
  313. display: flex;
  314. align-items: center;
  315. justify-content: center;
  316. font-size: $font-size-28;
  317. border-radius: 14rpx;
  318. background: $btn-confirm;
  319. }
  320. }
  321. }
  322. &.show {
  323. display: block;
  324. .mask{
  325. animation: showPopup 0.2s linear both;
  326. }
  327. .layer {
  328. animation: showLayer 0.2s linear both;
  329. }
  330. }
  331. &.hide {
  332. display: block;
  333. .mask{
  334. animation: hidePopup 0.2s linear both;
  335. }
  336. .layer {
  337. animation: hideLayer 0.2s linear both;
  338. }
  339. }
  340. &.none {
  341. display: none;
  342. }
  343. &.service {
  344. .row {
  345. margin: 30upx 0;
  346. .title {
  347. font-size: 30upx;
  348. margin: 10upx 0;
  349. }
  350. .description {
  351. font-size: 28upx;
  352. color: #999;
  353. }
  354. }
  355. }
  356. .layer-smimg{
  357. width: 114rpx;
  358. height: 114rpx;
  359. float: left;
  360. border-radius: 10rpx;
  361. margin-right: 24rpx;
  362. image{
  363. width: 114rpx;
  364. height: 114rpx;
  365. border-radius: 10rpx;
  366. }
  367. }
  368. .layer-nunbox{
  369. justify-content: space-between;
  370. align-items: center;
  371. width: 536rpx;
  372. height: 88rpx;
  373. padding: 13rpx 0 0 0;
  374. float: left;
  375. .layer-nunbox-t{
  376. width: 100%;
  377. height:44rpx;
  378. position:relative;
  379. display: flex;
  380. .layer-nunbox-text{
  381. line-height: 44rpx;
  382. font-size: $font-size-28;
  383. }
  384. .number-box{
  385. display: flex;
  386. justify-content: center;
  387. align-items: center;
  388. .iconfont{
  389. font-size: $font-size-32;
  390. padding:0 20rpx;
  391. font-size: $text-color;
  392. }
  393. .btn-input{
  394. width: 62rpx;
  395. height: 48rpx;
  396. line-height: 48rpx;
  397. background: #F8F8F8;
  398. border-radius: 4rpx;
  399. text-align: center;
  400. font-size: $font-size-28;
  401. }
  402. }
  403. .product-step{
  404. position: absolute;
  405. left: 45rpx;
  406. bottom: 0;
  407. height: 44rpx;
  408. background: #FFFFFF;
  409. }
  410. }
  411. .layer-nunbox-b{
  412. width: 100%;
  413. height:44rpx;
  414. margin-top: 13rpx;
  415. }
  416. .text{
  417. line-height: 44rpx;
  418. font-size: $font-size-28;
  419. .p{
  420. color: #FF2A2A;
  421. }
  422. .p:first-child{
  423. margin-left: 30rpx;
  424. }
  425. .p.sm{
  426. font-size: $font-size-24;
  427. }
  428. }
  429. }
  430. }
  431. </style>