app-condition.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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.type == 1" src="../image/no-member.png"></image>
  7. <image v-else-if="check.type == 4" src="../image/no-order.png"></image>
  8. <image v-else src="../image/no-money.png"></image>
  9. <view>0
  10. <text v-if="check.type == 1">人</text>
  11. <text v-else-if="check.type == 4">单</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>{{check.now_target}}</text>
  21. <text v-if="check.type == 1">人</text>
  22. <text v-else-if="check.type == 4">单</text>
  23. <text v-else>元</text>
  24. </view>
  25. <view :style="{'left': `${rate + '%'}`}" class="line"></view>
  26. <image :style="{'left': `${rate + '%'}`}" src="../image/progress.png"></image>
  27. </view>
  28. </view>
  29. <view class="cross-center dir-top-nowrap condition">
  30. <image v-if="check.type == 1" src="../image/no-member.png"></image>
  31. <image v-else-if="check.type == 4" src="../image/no-order.png"></image>
  32. <image v-else src="../image/money.png"></image>
  33. <view style='color: #ff4544'>{{check.target}}
  34. <text v-if="check.type == 1">人</text>
  35. <text v-else-if="check.type == 4">单</text>
  36. <text v-else>元</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="app-condition-info">
  41. <view>
  42. <text v-if="check.type == 1">下线总人数满</text>
  43. <text v-if="check.type == 4">分销订单总数满</text>
  44. <text v-if="check.type == 5">分销订单总金额满</text>
  45. <text v-if="check.type == 3">已提现佣金总金额满</text>
  46. <text v-if="check.type == 2">累计佣金总金额满</text>
  47. <text v-if="check.type == 6">消费金额满</text>
  48. <text class="condition-num">{{check.target}}</text>
  49. <text class="condition-num" v-if="check.type == 1">人</text>
  50. <text class="condition-num" v-else-if="check.type == 4">单</text>
  51. <text class="condition-num" v-else>元</text>
  52. <text>可申请成为代理</text>
  53. </view>
  54. <view>
  55. 您当前的
  56. <text v-if="check.type == 1">下线总人数为</text>
  57. <text v-if="check.type == 4">分销订单总数为</text>
  58. <text v-if="check.type == 5">分销订单总金额为</text>
  59. <text v-if="check.type == 3">已提现佣金总金额为</text>
  60. <text v-if="check.type == 2">累计佣金总金额为</text>
  61. <text v-if="check.type == 6">消费金额为</text>
  62. <text class="condition-num">{{check.now_target}}</text>
  63. <text class="condition-num" v-if="check.type == 1">人</text>
  64. <text class="condition-num" v-else-if="check.type == 4">单</text>
  65. <text class="condition-num" v-else>元</text>
  66. </view>
  67. </view>
  68. <view class="info">
  69. <view class="dir-left-nowrap info-title">
  70. <view>代理区域</view>
  71. <view @click="resetChoose" class="toChange">去修改</view>
  72. </view>
  73. <view class="dir-left-nowrap">
  74. <view class="label">代理级别:</view>
  75. <view class="content">{{check.level_desc}}</view>
  76. </view>
  77. <view class="dir-left-nowrap">
  78. <view class="label">代理地区:</view>
  79. <view class="content">
  80. <view>{{province.name}}<text v-if="check.level == 3"> - {{city.name}}</text></view>
  81. <view class="dir-left-wrap district-list" v-if="district.length > 0">
  82. <view style="color: #353535" v-for="(item,index) in district" :key="item.name">
  83. <text v-if="index > 0"> / </text>
  84. {{item.name}}
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view @click="toIndex" class="app-to-index">去商城逛逛</view>
  91. </view>
  92. <view class="app-get" v-if="check.pass && !beApply">
  93. <image class="get-img" :src="region.get"></image>
  94. <view class="get-text">您已达到成为代理条件</view>
  95. <view>
  96. <text v-if="check.type == 1">下线总人数: </text>
  97. <text v-if="check.type == 4">分销订单总数: </text>
  98. <text v-if="check.type == 5">分销订单总金额: </text>
  99. <text v-if="check.type == 3">已提现佣金总金额: </text>
  100. <text v-if="check.type == 2">累计佣金总金额: </text>
  101. <text v-if="check.type == 6">消费金额: </text>
  102. <text class="condition-num">{{check.target}}</text>
  103. <text v-if="check.type == 1">人</text>
  104. <text v-else-if="check.type == 4">单</text>
  105. <text v-else>元</text>
  106. </view>
  107. <view class="apply-input cross-bottom main-center" v-if="setting.is_agreement == 1 && setting.apply_type == 2">
  108. <view class="read cross-bottom" @click="toggle">
  109. <image src="/static/image/icon/icon-uncheck.png" v-if="read == false"></image>
  110. <image src="/static/image/icon/icon-checkbox-checked-a.png" v-else></image>
  111. </view>
  112. <text>已阅读并同意《</text>
  113. <text class="agreement_title" @click="toRead">{{setting.agreement_title ? setting.agreement_title : '区域代理申请协议'}}</text>
  114. <text>》</text>
  115. </view>
  116. <view class="info">
  117. <view class="dir-left-nowrap">
  118. <view class="label">代理级别:</view>
  119. <view class="content">{{check.level_desc}}</view>
  120. </view>
  121. <view class="dir-left-nowrap">
  122. <view class="label">代理地区:</view>
  123. <view class="content">
  124. <view>{{province.name}}<text v-if="check.level == 3"> - {{city.name}}</text></view>
  125. <view class="dir-left-wrap district-list" v-if="district.length > 0">
  126. <view style="color: #353535" v-for="(item,index) in district" :key="item.name">
  127. <text v-if="index > 0"> / </text>
  128. {{item.name}}
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <view @click="toApply" class="app-to-index">申请成为代理</view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. import { mapState } from "vuex";
  140. export default {
  141. name: 'app-condition',
  142. props: {
  143. check: {
  144. type: Object
  145. },
  146. read: {
  147. type: Boolean,
  148. default() {
  149. return false
  150. }
  151. },
  152. setting: {
  153. type: Object
  154. },
  155. province: {
  156. type: Object
  157. },
  158. city: {
  159. type: Object
  160. },
  161. district: {
  162. type: Array
  163. },
  164. rate: {
  165. type: Number,
  166. default() {
  167. return 0;
  168. }
  169. }
  170. },
  171. data() {
  172. return {
  173. beApply: false,
  174. }
  175. },
  176. computed: {
  177. ...mapState({
  178. region: state => state.mallConfig.__wxapp_img.region,
  179. })
  180. },
  181. methods: {
  182. toApply() {
  183. let that = this;
  184. if(that.setting.apply_type == 2) {
  185. that.$emit('submit');
  186. }else {
  187. that.beApply = true;
  188. that.$emit("update",that.beApply);
  189. }
  190. },
  191. resetChoose() {
  192. this.$emit("reset",false);
  193. },
  194. toggle() {
  195. this.$emit("beRead");
  196. },
  197. toRead() {
  198. let that = this;
  199. that.$emit("toRead");
  200. },
  201. toIndex() {
  202. uni.reLaunch({
  203. url: '/pages/index/index'
  204. });
  205. },
  206. }
  207. }
  208. </script>
  209. <style scoped lang="scss">
  210. .app-progress-area {
  211. margin-top: #{100rpx};
  212. .condition {
  213. font-size: #{24rpx};
  214. color: #999999;
  215. image {
  216. width: #{120rpx};
  217. height: #{100rpx};
  218. margin-bottom: #{8rpx};
  219. }
  220. }
  221. .progress-item {
  222. width: #{470rpx};
  223. height: #{5rpx};
  224. top: #{50rpx};
  225. border-radius: #{2.5rpx};
  226. background-color: #e3e3e3;
  227. position: relative;
  228. .active-progress {
  229. position: absolute;
  230. background-color: #ff4544;
  231. height: #{5rpx};
  232. top: 0;
  233. left: 0;
  234. height: 100%;
  235. }
  236. .active-icon {
  237. font-size: #{24rpx};
  238. color: #ff4544;
  239. .condition-detail {
  240. position: absolute;
  241. top: #{-68rpx};
  242. width: #{200rpx};
  243. margin-left: #{-100rpx};
  244. text-align: center;
  245. }
  246. .line {
  247. position: absolute;
  248. top: #{-30.5rpx};
  249. width: #{2rpx};
  250. height: #{30.5rpx};
  251. z-index: 5;
  252. background-color: #ff4544;
  253. }
  254. image {
  255. position: absolute;
  256. top: #{-17.5rpx};
  257. height: #{35rpx};
  258. width: #{35rpx};
  259. margin-left: #{-17.5rpx};
  260. z-index: 6;
  261. display: block;
  262. }
  263. }
  264. }
  265. }
  266. .app-condition-info {
  267. text-align: center;
  268. margin-top: #{70rpx};
  269. font-size: #{32rpx};
  270. color: #353535;
  271. view:first-of-type {
  272. margin-bottom: #{20rpx};
  273. .condition-num {
  274. font-size: #{40rpx};
  275. }
  276. }
  277. .condition-num {
  278. color: #ff4544;
  279. font-family: DIN;
  280. }
  281. }
  282. .app-to-index {
  283. width: #{702rpx};
  284. height: #{80rpx};
  285. border-radius: #{40rpx};
  286. background-color: #ff4544;
  287. color: #fff;
  288. text-align: center;
  289. line-height: #{80rpx};
  290. font-size: #{32rpx};
  291. margin: #{78rpx} auto 0;
  292. }
  293. .app-get {
  294. font-size: #{28rpx};
  295. color: #353535;
  296. text-align: center;
  297. padding-bottom: #{50rpx};
  298. background-color: #fff;
  299. .get-img {
  300. width: #{650rpx};
  301. height: #{450rpx};
  302. margin: #{16rpx} auto;
  303. }
  304. .get-text {
  305. font-size: #{36rpx};
  306. margin-bottom: #{3rpx};
  307. }
  308. .app-to-index {
  309. margin-top: #{45rpx};
  310. width: #{670rpx};
  311. }
  312. .apply-input {
  313. height: #{60rpx};
  314. width: 100%;
  315. font-size: #{28rpx};
  316. color: #353535;
  317. .agreement_title {
  318. color:#ff4544;
  319. max-width: #{360rpx};
  320. overflow: hidden;
  321. text-overflow: ellipsis;
  322. white-space: nowrap;
  323. }
  324. text {
  325. display: inline-block;
  326. }
  327. .label {
  328. width: #{126rpx};
  329. }
  330. .read {
  331. width: #{42rpx};
  332. height: #{60rpx};
  333. padding-bottom: #{3rpx};
  334. padding-right: #{10rpx};
  335. image {
  336. height: #{32rpx};
  337. width: #{32rpx};
  338. display: block;
  339. }
  340. }
  341. }
  342. }
  343. .info {
  344. border-top: #{2rpx} solid #e2e2e2;
  345. padding-top: #{30rpx};
  346. font-size: #{28rpx};
  347. color: #353535;
  348. margin: #{30rpx} #{40rpx};
  349. .info-title {
  350. font-size: #{32rpx};
  351. height: #{40rpx};
  352. line-height: #{40rpx};
  353. margin-bottom: #{28rpx};
  354. .toChange {
  355. height: #{40rpx};
  356. line-height: #{38rpx};
  357. display: inline-block;
  358. padding: 0 #{16rpx};
  359. color: #ff4544;
  360. border: #{2rpx} solid #ff4544;
  361. margin-left: #{16rpx};
  362. border-radius: #{20rpx};
  363. font-size: #{24rpx};
  364. }
  365. }
  366. >view {
  367. margin-bottom: #{16rpx};
  368. }
  369. .label {
  370. color: #999999;
  371. }
  372. .content {
  373. width: #{530rpx};
  374. text-align: left;
  375. .district-list {
  376. text {
  377. margin: 0 #{10rpx};
  378. }
  379. }
  380. }
  381. }
  382. </style>