猎豆优选小程序

loginRemind.vue 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <u-mask :show="show">
  3. <view class="container">
  4. <image @click="onClickCallback()" class="close" src="/static/imgs/close.png" mode="widthFix"></image>
  5. <image src="/static/imgs/loginReindIcon.png" class="loginReindIcon" mode="widthFix"></image>
  6. <view class="title">登录提醒</view>
  7. <view class="hint">登录小程序购买还可赚取商品佣金</view>
  8. <view class="button loginButton" @click="goLogin">立即登录</view>
  9. <!-- <navigator class="button" target="miniProgram" v-if="weChatShortLink" :short-link="weChatShortLink">直接购买</navigator> -->
  10. <view class="button" @click="onClickCallback('ZJGM')">直接购买</view>
  11. <view class="neverNotify" @click="checkboxChange">
  12. <view :class="['itemCheckbox', checkValue ? 'itemCheckboxActive' : '']"></view>
  13. <text>不再提醒</text>
  14. </view>
  15. </view>
  16. </u-mask>
  17. </template>
  18. <script>
  19. export default {
  20. props:{
  21. show:{
  22. type: Boolean,
  23. default: false
  24. },
  25. weChatShortLink:{
  26. type: String,
  27. default: ''
  28. },
  29. MiniProId:{
  30. type: String,
  31. default: ''
  32. },
  33. MiniProPath:{
  34. type: String,
  35. default: ''
  36. },
  37. wordCommand:{
  38. type: String,
  39. default: ''
  40. }
  41. },
  42. name:"loginRemind",
  43. data() {
  44. return {
  45. neverNotify: false,
  46. checkValue: false
  47. };
  48. },
  49. mounted(){
  50. },
  51. methods:{
  52. checkboxChange(){
  53. this.checkValue = !this.checkValue;
  54. if (this.checkValue) {
  55. uni.setStorageSync('loginRemindMask', true)
  56. } else {
  57. uni.setStorageSync('loginRemindMask', false)
  58. }
  59. },
  60. onClickCallback(val){
  61. this.$emit('callback',val)
  62. if (val == 'ZJGM' && this.weChatShortLink) {
  63. wx.navigateToMiniProgram({
  64. 'shortLink': this.weChatShortLink
  65. })
  66. }else if(val == 'ZJGM' && this.wordCommand){ //抖音
  67. this.$copyEvent({ text: this.wordCommand })
  68. }else if(val == 'ZJGM'){ // 拼多多
  69. if(!this.MiniProId){
  70. uni.showToast({ title: '跳转小程序id错误', icon: 'none' })
  71. }else if(!this.MiniProPath){
  72. uni.showToast({ title: '跳转小程序路径错误', icon: 'none' })
  73. }else{
  74. wx.navigateToMiniProgram({
  75. appId: this.MiniProId,
  76. path: this.MiniProPath
  77. })
  78. }
  79. }else{
  80. uni.showToast({ title: '暂无口令', icon: 'none' })
  81. }
  82. },
  83. goLogin(){
  84. this.$emit('callback')
  85. uni.navigateTo({
  86. url: '/pages/subPackages/login/loginPhone'
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style scoped lang="scss">
  93. .container{
  94. width: 650rpx;
  95. height: 720rpx;
  96. background: url('~@/static/imgs/loginReindBg.png') #fff no-repeat;
  97. // background-image: url("/static/imgs/loginReindBg.png");
  98. background-size: 100%;
  99. border-radius: 82rpx 82rpx 36rpx 36rpx;
  100. position: absolute;
  101. top: 0;
  102. bottom: 0;
  103. left: 0;
  104. right: 0;
  105. margin: auto;
  106. }
  107. .loginReindIcon{
  108. width: 300rpx;
  109. position: absolute;
  110. top: -80rpx;
  111. left: 0;
  112. right: 0;
  113. margin: auto;
  114. }
  115. .title{
  116. color: #333333;
  117. font-size: 44rpx;
  118. line-height: 60rpx;
  119. font-weight: bold;
  120. text-align: center;
  121. margin-top: 152rpx;
  122. }
  123. .hint{
  124. color: #333333;
  125. font-size: 32rpx;
  126. line-height: 44rpx;
  127. margin-top: 58rpx;
  128. margin-bottom: 50rpx;
  129. text-align: center;
  130. }
  131. .button{
  132. width: 492rpx;
  133. height: 108rpx;
  134. border-radius: 54rpx;
  135. border: 2rpx solid #C1C1C1;
  136. color: #9E9E9E;
  137. font-size: 36rpx;
  138. line-height: 108rpx;
  139. text-align: center;
  140. margin:auto;
  141. }
  142. .loginButton{
  143. background: linear-gradient(90deg, #FF9048 0%, #FB3F3C 100%);
  144. color: #fff;
  145. border: none;
  146. margin-bottom: 28rpx;
  147. }
  148. .neverNotify{
  149. text-align: center;
  150. font-size: 28rpx;
  151. margin-top: 30rpx;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. text{
  156. color: #636262;
  157. font-size: 28rpx;
  158. }
  159. }
  160. .itemCheckbox{
  161. width: 30rpx;
  162. height: 30rpx;
  163. border: 2rpx solid #d3d4d6;
  164. border-radius: 50%;
  165. background: #fff;
  166. cursor: pointer;
  167. margin-right: 10rpx;
  168. }
  169. .itemCheckboxActive{
  170. border-color: #FB3F3C;
  171. background-color: #FB3F3C;
  172. position: relative;
  173. border-radius: 50%;
  174. margin-right: 10rpx;
  175. &::after{
  176. box-sizing: content-box;
  177. content: "";
  178. border: 2rpx solid #fff;
  179. border-left: 0;
  180. border-top: 0;
  181. position: absolute;
  182. top: 1rpx;
  183. width: 4rpx;
  184. transform: rotate(45deg) scaleY(1);
  185. height: 16rpx;
  186. left: 10rpx;
  187. }
  188. }
  189. .close {
  190. position: absolute;
  191. bottom: -100rpx;
  192. left: 0;
  193. right: 0;
  194. margin: auto;
  195. width: 60rpx;
  196. height: 60rpx;
  197. }
  198. </style>