pass.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <template name="buy">
  2. <view>
  3. <view class="buy-layer" :class="show ?'slidein':''">
  4. <form bindsubmit="doBuy">
  5. <view class="tit ">《{{fetch.info.name}}》{{fetch.info.password_name}}</view>
  6. <scroll-view scroll-y class="list">
  7. <view class="gui-form-item gui-border-b">
  8. <view class="gui-form-body">
  9. <input type="text" class="gui-form-input"
  10. v-model="password" :placeholder="`请输入`+fetch.info.password_name" />
  11. </view>
  12. </view>
  13. </scroll-view>
  14. <view class="btn-wrapper ">
  15. <view class="button cancel" @click="hidePass">取消</view>
  16. <view class="button primary" :style="bgcolor" @click="act">确认
  17. <button formType="submit"></button>
  18. </view>
  19. </view>
  20. </form>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. name: "buy",
  27. props: {
  28. curid : 0,
  29. bgcolor : '',
  30. color : '',
  31. code : '',
  32. name : '',
  33. },
  34. data() {
  35. return {
  36. show : false,
  37. password : '',
  38. fetch : {
  39. info : {},
  40. },
  41. }
  42. },
  43. mounted() {
  44. this.getData();
  45. },
  46. methods:{
  47. getData : function() {
  48. var self = this;
  49. this.Dever.get(this, 'app/collection/?l=api.getInfo', {id:this.curid, code:this.code}, function(t) {
  50. self.show = true;
  51. });
  52. },
  53. act : function() {
  54. var self = this;
  55. if (!this.password) {
  56. this.Dever.alert('请输入' + this.fetch.info.password_name);
  57. return;
  58. }
  59. var data = {};
  60. data.password = this.password;
  61. data.id = this.curid;
  62. data.code = this.code;
  63. var location = 'dream/view?code='+this.code + '&name=' + this.name;
  64. this.Dever.post('app/user/?l=api.check_pwd', data, function(t) {
  65. self.Dever.alert('认证成功', '', function() {
  66. self.Dever.location(location);
  67. });
  68. });
  69. },
  70. hidePass : function() {
  71. this.show = false;
  72. this.$emit('hidePass');
  73. },
  74. },
  75. components:{
  76. }
  77. }
  78. </script>
  79. <style>
  80. .spliter{
  81. flex-shrink: 0;
  82. width: 1rpx;
  83. background: #fff;
  84. height: 40rpx;
  85. color: #333;
  86. margin-left: 20rpx;
  87. }
  88. .share_left {
  89. position: relative;
  90. }
  91. .share_right {
  92. position: relative;
  93. }
  94. .image {
  95. width:150rpx;
  96. height:150rpx;
  97. }
  98. .buy-layer{
  99. padding: 50rpx 55rpx 62rpx;
  100. background-color: #fff;
  101. position: fixed;
  102. bottom: 0;
  103. left: 0;
  104. right: 0;
  105. transform: translateY(100%);
  106. transition-property: transform;
  107. transition-duration: 0.3s;
  108. transition-timing-function: ease-in;
  109. overflow: auto;
  110. }
  111. .buy-layer.slidein{
  112. transform: translateY(0);
  113. }
  114. .buy-layer .tit{
  115. font-weight: bolder;
  116. font-size: 36rpx;
  117. margin: 0 0 40rpx;
  118. text-align: center;
  119. }
  120. .buy-layer .msg{
  121. font-size: 22rpx;
  122. line-height: 36rpx;
  123. width: 640rpx;
  124. margin: 0 auto 47rpx;
  125. text-align: center;
  126. text-decoration: underline;
  127. color: #666;
  128. }
  129. .buy-layer .share_msg{
  130. font-size: 22rpx;
  131. line-height: 36rpx;
  132. width: 640rpx;
  133. margin: 0 auto 47rpx;
  134. color: #666;
  135. text-align: center;
  136. border: 1px dashed cornflowerblue;
  137. }
  138. .btn-wrapper {
  139. justify-content: space-around;
  140. width: 100%;
  141. }
  142. .button {
  143. height: 80rpx;
  144. border: 1rpx solid #cc1619;
  145. color: #cc1619;
  146. font-size: 30rpx;
  147. min-width: 300rpx;
  148. border-radius: 40rpx;
  149. text-align: center;
  150. line-height: 80rpx;
  151. display: block;
  152. position: relative;
  153. }
  154. .button>button{
  155. position: absolute;
  156. width: 100%;
  157. height: 100%;
  158. left: 0;
  159. top: 0;
  160. opacity: 0;
  161. }
  162. .button.big {
  163. width: 420rpx;
  164. }
  165. .button.primary {
  166. background-color: #000;
  167. color: #fff;
  168. }
  169. .button.blk {
  170. background-color: #000;
  171. color: #fff;
  172. border-color: #000;
  173. }
  174. .btn-wrapper{
  175. display: flex;
  176. justify-content: space-between;
  177. padding-top: 20rpx;
  178. }
  179. .btn-wrapper .button{
  180. border: 0;
  181. min-width: 0;
  182. box-sizing: border-box;
  183. color: #999999;
  184. width: 284rpx;
  185. border-radius: 5rpx;
  186. }
  187. .btn-wrapper .button.primary{
  188. border:0;
  189. color: #fff;
  190. }
  191. .btn-wrapper .button.cancel{
  192. border:0;
  193. background-color: #CCCCCC;
  194. color: #fff;
  195. }
  196. .list{
  197. max-height: 500rpx;
  198. }
  199. .list .item{
  200. height: 100rpx;
  201. border-radius: 10rpx;
  202. border: 1rpx solid #999;
  203. color: #999;
  204. margin-bottom: 30rpx;
  205. box-sizing: border-box;
  206. padding: 0 30rpx;
  207. display: flex;
  208. justify-content: space-between;
  209. align-items: center;
  210. font-size: 30rpx;
  211. }
  212. .list .item.active{
  213. border-color: #000;
  214. color: #000;
  215. }
  216. .list .item .name{
  217. display: flex;
  218. align-items: center;
  219. }
  220. .list .item .name:before{
  221. content: "";
  222. width: 40rpx;
  223. height: 40rpx;
  224. display: block;
  225. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkI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zE1w5IhNWF9mO3tr1CXxSe7erLti2l32duTQqtspvV/f34INXpv+GiNJ/AQYAgCbhym+3rl8AAAAASUVORK5CYII=) no-repeat;
  226. background-size: 40rpx 40rpx;
  227. flex-shrink: 0;
  228. padding-right: 30rpx;
  229. }
  230. .list .item.active .name:before{
  231. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABgmlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kb9LQlEUxz9qYVhhVFBDg0Q1aZiB1NKglAXVYAb9WvTlj0Dt8Z4R0hq0CgVRS7+G+gtqDZqDoCiCaGlpLmopeZ2XghJ5Lueez/3eew73ngvWSFrJ6HVeyGRzWjgUcM3NL7jsL9hpxYGNjqiiq1MzYxFq2uc9FjPeesxatc/9a43LcV0BS4PwiKJqOeFx4cn1nGryjnC7koouC58JuzW5oPCdqcdK/GpyssTfJmuRcBCsLcKuZBXHqlhJaRlheTk9mfSaUr6P+ZKmeHZ2RmK3eBc6YUIEcDHBKEH8DDAssx8PPvplRY1872/+NKuSq8iskkdjhSQpcrhFXZPqcYkJ0eMy0uTN/v/tq54Y9JWqNwWg/tkw3nvBvg3FgmF8HRlG8RhsT3CZreSvHsLQh+iFitZzAM5NOL+qaLFduNiCzkc1qkV/JZu4NZGAt1Nonoe2G3AslnpW3ufkASIb8lXXsLcPfXLeufQDE6lnwO9DRkoAAAAJcEhZcwAACxMAAAsTAQCanBgAAAKDSURBVFiF1dk/axRBGMfxT06CgaBJI4FgISGQMtEijSin2Ik2V1qFFHkF+grSWaayFS++gZDC2CQgqIWQUjSQwkYIIpGIYkCL3SW7k7nL3t4fLz9YOHaeeea7M7vP88zciGoaxU3cww3MYQrjafsRvuIjPuA13uBPxfFKaxZrOMDfDq+DtO9sP8Cm0cRxBbDwOk59TZcZeKSEzQqe4lKk7TfeYxf7+J7en8Q1zGMRFyN9f+AxnpUBjWkM6+KzsIFGalPGTyPtE/O1XtJPQRPYjjjbwkKnznJaSH2EfrfTMUtpLAJ3hKUuwEItpT5DyFIzGS7rF8m71GvNp77D5W6rlQjcTB/gMs04DbnSyngah4rL2o+ZCzWvuNyHWoSgpuKT9PKdO0tLwdjN0GBWMQhvDRAuU/7rPhZknDXFJ+gmlFTVQsCwljWMKubWjT6DjOI2rkTa8sH8ILVVVyRv9BFuAm/Tcb45/TE0ApY6rOZu/FIh7XQA9y4AeBjYjKUMWfsqbOZu7AwQ7hMuR2x3cjabNUmxmWm3T3CvJFVNpj3ckcS8UHmGuZqkEs60PyC4uiSDxJRnmKo5KdM5qediGsED3FeujqwCFzKMU3wvltt0fJKze4ELZ8CF79xnXG3TJ9Nyvl9NkgczTbbpeD33+xGet4CsOnMxhqOs86noHdEifirOSjOA7GbmMuWz2h6dhZm7bSB7AUcQZug8UMcgX/YILhqo64HjMqkuBtktHC1SXdVioRVkVThaFAtUL7dCyG7gWpZbdFew3pJs3je6gOOMgpUhL/k5B5smhnzbmWmoN+6cg6MPhvzwKNNQHL+d6wPMvP7bEXCnGvghepkljmlgf0P8A8uurmx6Sm7EAAAAAElFTkSuQmCC);
  232. }
  233. .buytip{
  234. font-size: 24rpx;
  235. color: #999999;
  236. text-decoration: underline;
  237. padding-bottom: 40rpx;
  238. }
  239. .p{
  240. font-size: 28rpx;
  241. text-align: justify;
  242. line-height: 40rpx;
  243. margin-bottom: 12rpx;
  244. display: block;
  245. box-sizing: border-box;
  246. }
  247. .buy-tit{
  248. font-size: 40rpx;
  249. /* font-weight: bolder; */
  250. text-align: center;
  251. margin-bottom: 40rpx;
  252. }
  253. .mask .buytip-layer{
  254. padding: 60rpx;
  255. }
  256. .buytip-layer .button{
  257. width: 300rpx;
  258. line-height: 80rpx;
  259. height: 80rpx;
  260. background-color: #000;
  261. color: #fff;
  262. border: 0;
  263. border-radius: 5rpx;
  264. margin: 0 auto;
  265. }
  266. .success-tip .layer{
  267. padding: 0;
  268. border-radius: 5rpx;
  269. }
  270. .success-tip .layer .msg{
  271. font-size: 32rpx;
  272. text-align: center;
  273. }
  274. .success-tip .layer .tit{
  275. font-size: 36rpx;
  276. text-align: center;
  277. margin: 62rpx 0 65rpx;
  278. }
  279. .success-tip .layer .btn-wrapper{
  280. display: flex;
  281. padding-top: 87rpx;
  282. }
  283. .success-tip .layer .btn-wrapper .button{
  284. border: 0;
  285. flex: 1;
  286. min-width: 0;
  287. box-sizing: border-box;
  288. font-size: 32rpx;
  289. color: #000;
  290. }
  291. .success-tip .layer .btn-wrapper .button:first-child{
  292. border-top: 1rpx solid #CCCCCC;
  293. border-radius: 0;
  294. }
  295. .success-tip .layer .btn-wrapper .button:last-child{
  296. background-color: #000;
  297. color: #fff;
  298. border-radius: 0 0 5rpx 0;
  299. }
  300. .mask {
  301. position: fixed;
  302. left: 0;
  303. top: 0;
  304. right: 0;
  305. bottom: 0;
  306. background: rgba(0, 0, 0, 0.5);
  307. }
  308. .mask .layer {
  309. width: 620rpx;
  310. box-sizing: border-box;
  311. padding: 70rpx 60rpx;
  312. background: #fff;
  313. border-radius: 10rpx;
  314. position: absolute;
  315. top: 50%;
  316. left: 50%;
  317. transform: translate(-50%,-50%);
  318. }
  319. .mask .layer .tit {
  320. text-align: center;
  321. font-size: 40rpx;
  322. margin: 16rpx 0 60rpx;
  323. }
  324. .mask .layer input {
  325. border-radius: 10rpx;
  326. border: 1rpx solid #999;
  327. height: 88rpx;
  328. line-height: 88rpx;
  329. padding: 0 28rpx;
  330. box-sizing: border-box;
  331. font-size: 24rpx;
  332. }
  333. .mask .layer .errtip {
  334. color: #d1171a;
  335. text-align: center;
  336. font-size: 24rpx;
  337. margin: 21rpx 0;
  338. height: 34rpx;
  339. }
  340. .mask .layer .btn-wrapper {
  341. padding-top: 30rpx;
  342. }
  343. .mask .btn-wrapper{
  344. display: flex;
  345. justify-content: space-between;
  346. padding-top: 20rpx;
  347. }
  348. .mask .btn-wrapper .button{
  349. border: 0;
  350. min-width: 0;
  351. box-sizing: border-box;
  352. /*color: #999999;*/
  353. width: 200rpx;
  354. border-radius: 5rpx;
  355. }
  356. </style>