app-condition.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <template>
  2. <view>
  3. <view v-if="!check.pass">
  4. <view class="main-center app-progress-area">
  5. <view class="cross-center dir-top-nowrap condition">
  6. <image v-if="check.all_children > -1" src="../image/no-member.png"></image>
  7. <image v-else-if="check.all_order > -1" src="../image/no-order.png"></image>
  8. <image v-else src="../image/no-money.png"></image>
  9. <view>0
  10. <text v-if="check.all_children > -1">人</text>
  11. <text v-else-if="check.all_order > -1">单</text>
  12. <text v-else>元</text>
  13. </view>
  14. </view>
  15. <view class="cross-center progress-item">
  16. <view class="progress"></view>
  17. <view class="active-progress" :style="{'width': `${rate + '%'}`}"></view>
  18. <view class="cross-center dir-top-nowrap active-icon">
  19. <view :style="{'left': `${rate + '%'}`}" class="condition-detail">
  20. <text v-if="check.all_children > -1">{{check.all_children}}</text>
  21. <text v-if="check.all_order > -1">{{check.all_order}}</text>
  22. <text v-if="check.all_money > -1">{{check.all_money}}</text>
  23. <text v-if="check.cash_money > -1">{{check.cash_money}}</text>
  24. <text v-if="check.total_money > -1">{{check.total_money}}</text>
  25. <text v-if="check.all_children > -1">人</text>
  26. <text v-else-if="check.all_order > -1">单</text>
  27. <text v-else>元</text>
  28. </view>
  29. <view :style="{'left': `${rate + '%'}`}" class="line"></view>
  30. <image :style="{'left': `${rate + '%'}`}" src="../image/progress.png"></image>
  31. </view>
  32. </view>
  33. <view class="cross-center dir-top-nowrap condition">
  34. <image v-if="check.all_children > -1" src="../image/member.png"></image>
  35. <image v-else-if="check.all_order > -1" src="../image/order.png"></image>
  36. <image v-else src="../image/money.png"></image>
  37. <view style='color: #ff4544'>{{check.condition}}
  38. <text v-if="check.all_children > -1">人</text>
  39. <text v-else-if="check.all_order > -1">单</text>
  40. <text v-else>元</text>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="app-condition-info">
  45. <view>
  46. <text v-if="check.all_children > -1">下线总人数满</text>
  47. <text v-if="check.all_order > -1">分销订单总数满</text>
  48. <text v-if="check.all_money > -1">分销订单总金额满</text>
  49. <text v-if="check.cash_money > -1">已提现佣金总金额满</text>
  50. <text v-if="check.total_money > -1">累计佣金总金额满</text>
  51. <text class="condition-num">{{check.condition}}</text>
  52. <text v-if="check.all_children > -1">人</text>
  53. <text v-else-if="check.all_order > -1">单</text>
  54. <text v-else>元</text>
  55. <text v-if="setting.apply_type == 1 || setting.apply_type == 3">可申请成为股东</text>
  56. <text v-else>可自动成为股东</text>
  57. </view>
  58. <view>
  59. <text v-if="check.all_children > -1">您当前的下线总人数为</text>
  60. <text v-if="check.all_order > -1">您当前的分销订单总数为</text>
  61. <text v-if="check.all_money > -1">您当前的分销订单总金额为</text>
  62. <text v-if="check.cash_money > -1">您当前的已提现佣总金金额为</text>
  63. <text v-if="check.total_money > -1">您当前的累计佣金总金额为</text>
  64. <text class="condition-num" v-if="check.all_children > -1">{{check.all_children}}</text>
  65. <text class="condition-num" v-if="check.all_order > -1">{{check.all_order}}</text>
  66. <text class="condition-num" v-if="check.all_money > -1">{{check.all_money}}</text>
  67. <text class="condition-num" v-if="check.cash_money > -1">{{check.cash_money}}</text>
  68. <text class="condition-num" v-if="check.total_money > -1">{{check.total_money}}</text>
  69. <text v-if="check.all_children > -1">人</text>
  70. <text v-else-if="check.all_order > -1">单</text>
  71. <text v-else>元</text>
  72. </view>
  73. </view>
  74. <view @click="toIndex" class="app-to-index">去商城逛逛</view>
  75. </view>
  76. <view class="app-get" v-if="check.pass && !beApply">
  77. <image class="get-img" :src="stock.get"></image>
  78. <view class="get-text">您已达到成为股东条件</view>
  79. <view>
  80. <text v-if="check.all_children > -1">下线总人数:</text>
  81. <text v-if="check.all_order > -1">分销订单总数:</text>
  82. <text v-if="check.all_money > -1">分销订单总金额:</text>
  83. <text v-if="check.cash_money > -1">已提现佣金金额:</text>
  84. <text v-if="check.total_money > -1">累计佣金金额:</text>
  85. <text class="condition-num">{{check.condition}}</text>
  86. <text v-if="check.all_children > -1">人</text>
  87. <text v-else-if="check.all_order > -1">单</text>
  88. <text v-else>元</text>
  89. </view>
  90. <view class="apply-input cross-bottom main-center" v-if="setting.is_agreement == 1 && (setting.apply_type == 3 || setting.apply_type == 4)">
  91. <view class="read cross-bottom" @click="toggle">
  92. <image src="/static/image/icon/icon-uncheck.png" v-if="read == false"></image>
  93. <image src="/static/image/icon/icon-checkbox-checked-a.png" v-else></image>
  94. </view>
  95. <text>已阅读并同意《</text>
  96. <text class="agreement_title" @click="toRead">{{setting.agreement_title ? setting.agreement_title : '股东分红申请协议'}}</text>
  97. <text>》</text>
  98. </view>
  99. <view @click="toApply" class="app-to-index">申请成为股东</view>
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. import { mapState } from "vuex";
  105. export default {
  106. name: 'app-condition',
  107. props: {
  108. check: {
  109. type: Object
  110. },
  111. read: {
  112. type: Boolean,
  113. default() {
  114. return false
  115. }
  116. },
  117. setting: {
  118. type: Object
  119. },
  120. rate: {
  121. type: Number,
  122. default() {
  123. return 0;
  124. }
  125. }
  126. },
  127. data() {
  128. return {
  129. beApply: false,
  130. }
  131. },
  132. computed: {
  133. ...mapState({
  134. stock: state => state.mallConfig.__wxapp_img.stock,
  135. })
  136. },
  137. methods: {
  138. toApply() {
  139. let that = this;
  140. if(that.setting.apply_type == 3 || that.setting.apply_type == 4) {
  141. that.$emit('submit');
  142. }else {
  143. that.beApply = true;
  144. that.$emit("update",that.beApply);
  145. }
  146. },
  147. toggle() {
  148. this.$emit("beRead");
  149. },
  150. toRead() {
  151. let that = this;
  152. that.$emit("toRead");
  153. },
  154. toIndex() {
  155. uni.reLaunch({
  156. url: '/pages/index/index'
  157. });
  158. },
  159. },
  160. creatd(options) {
  161. let that = this;
  162. }
  163. }
  164. </script>
  165. <style scoped lang="scss">
  166. .app-progress-area {
  167. margin-top: #{100rpx};
  168. .condition {
  169. font-size: #{24rpx};
  170. color: #999999;
  171. image {
  172. width: #{120rpx};
  173. height: #{100rpx};
  174. margin-bottom: #{8rpx};
  175. }
  176. }
  177. .progress-item {
  178. width: #{470rpx};
  179. height: #{5rpx};
  180. top: #{50rpx};
  181. border-radius: #{2.5rpx};
  182. background-color: #e3e3e3;
  183. position: relative;
  184. .active-progress {
  185. position: absolute;
  186. background-color: #ff4544;
  187. height: #{5rpx};
  188. top: 0;
  189. left: 0;
  190. height: 100%;
  191. }
  192. .active-icon {
  193. font-size: #{24rpx};
  194. color: #ff4544;
  195. .condition-detail {
  196. position: absolute;
  197. top: #{-68rpx};
  198. width: #{200rpx};
  199. margin-left: #{-100rpx};
  200. text-align: center;
  201. }
  202. .line {
  203. position: absolute;
  204. top: #{-30.5rpx};
  205. width: #{2rpx};
  206. height: #{30.5rpx};
  207. z-index: 5;
  208. background-color: #ff4544;
  209. }
  210. image {
  211. position: absolute;
  212. top: #{-17.5rpx};
  213. height: #{35rpx};
  214. width: #{35rpx};
  215. margin-left: #{-17.5rpx};
  216. z-index: 6;
  217. display: block;
  218. }
  219. }
  220. }
  221. }
  222. .app-condition-info {
  223. text-align: center;
  224. margin-top: #{70rpx};
  225. font-size: #{32rpx};
  226. color: #353535;
  227. view:first-of-type {
  228. margin-bottom: #{20rpx};
  229. }
  230. .condition-num {
  231. font-size: #{40rpx};
  232. color: #ff4544;
  233. font-family: DIN;
  234. }
  235. }
  236. .app-to-index {
  237. width: #{702rpx};
  238. height: #{80rpx};
  239. border-radius: #{40rpx};
  240. background-color: #ff4544;
  241. color: #fff;
  242. text-align: center;
  243. line-height: #{80rpx};
  244. font-size: #{32rpx};
  245. margin: #{210rpx} auto 0;
  246. }
  247. .app-get {
  248. font-size: #{28rpx};
  249. color: #353535;
  250. text-align: center;
  251. .get-img {
  252. width: #{650rpx};
  253. height: #{450rpx};
  254. margin: #{16rpx} auto;
  255. }
  256. .get-text {
  257. font-size: #{36rpx};
  258. margin-bottom: #{3rpx};
  259. }
  260. .app-to-index {
  261. margin-top: #{45rpx};
  262. width: #{440rpx};
  263. }
  264. .apply-input {
  265. height: #{60rpx};
  266. width: 100%;
  267. font-size: #{28rpx};
  268. color: #353535;
  269. .agreement_title {
  270. color:#ff4544;
  271. max-width: 360rpx;
  272. overflow: hidden;
  273. text-overflow: ellipsis;
  274. white-space: nowrap;
  275. }
  276. text {
  277. display: inline-block;
  278. }
  279. .label {
  280. width: #{126rpx};
  281. }
  282. .read {
  283. width: #{42rpx};
  284. height: #{60rpx};
  285. padding-bottom: #{3rpx};
  286. padding-right: #{10rpx};
  287. image {
  288. height: #{32rpx};
  289. width: #{32rpx};
  290. display: block;
  291. }
  292. }
  293. }
  294. }
  295. </style>