宜轩到家/服务到家第三版,换个颜色
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
6.9 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="distribution">
  3. <mNavbar title="分销代理" :leftClick="leftClick" />
  4. <view class="box">
  5. <view class="box1" />
  6. <view class="content">
  7. <view class="content-box">
  8. <view class="content-box1">
  9. <view>可用余额</view>
  10. <view>累计提现</view>
  11. <view>累积收益</view>
  12. </view>
  13. <view class="content-box2">
  14. <view>{{ agentFlow.use_money }}</view>
  15. <view>{{ agentFlow.lei_give }}</view>
  16. <view>{{ agentFlow.lei_set }}</view>
  17. </view>
  18. <view class="content-box3">
  19. <view @click="toNodes">
  20. <text>粉丝</text>
  21. </view>
  22. <view @click="toWithdraw">
  23. <text>提现</text>
  24. </view>
  25. <view @click="showQrcode">
  26. <text>二维码</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <van-tabs v-model:active="active" @change="tagChange">
  33. <van-tab v-for="(item,index) in tabs" :key="index" :title="item.title"></van-tab>
  34. </van-tabs>
  35. <view class="tab-box">
  36. <view class="tab-box1" v-if="agentFlow.pageList && agentFlow.pageList.total">
  37. <van-cell center border :title="item.title" v-for="(item, index) in agentFlow.pageList.records"
  38. :value="x[item.type] + item.money" :label="item.createTime" />
  39. </view>
  40. <van-empty v-else description="暂无数据" image="/static/ms/empty.png" />
  41. </view>
  42. <van-overlay :show="show" @click="show = false" z-index="999999">
  43. <div style="display: flex;justify-content: center;
  44. height: 100%;align-items: center;">
  45. <placard ref="placard" :userInfo="userInfo"></placard>
  46. </div>
  47. </van-overlay>
  48. </view>
  49. </template>
  50. <script>
  51. import mNavbar from '@/components/base/m-navbar.vue'
  52. import placard from '@/components/placard.vue'
  53. export default {
  54. components: {
  55. mNavbar,
  56. placard
  57. },
  58. data() {
  59. return {
  60. imageUrl: '',
  61. show: false,
  62. agentFlow: {},
  63. x: ['+', '-', '+'],
  64. type: 0,
  65. active : 0,
  66. tabs : [
  67. { title : '费用明细' },
  68. { title : '提现记录' },
  69. { title : '收益记录' }
  70. ],
  71. userInfo : {},
  72. }
  73. },
  74. onShow() {
  75. this.getAgentFlow()
  76. this.getUserInfo()
  77. },
  78. methods: {
  79. //获取用户信息
  80. getUserInfo() {
  81. this.$api('getUserInfo', {}, res => {
  82. if (res.code == 200) {
  83. this.userInfo = res.result;
  84. }
  85. })
  86. },
  87. getAgentFlow() {
  88. this.$api('getAgentFlow', {
  89. type: this.type
  90. }, res => {
  91. if (res.code == 200) {
  92. this.agentFlow = res.result
  93. }
  94. })
  95. },
  96. toNodes() {
  97. uni.navigateTo({
  98. url: '/pages/mine/nodes'
  99. })
  100. },
  101. leftClick() { //返回个人中心
  102. uni.switchTab({
  103. url: '/pages/index/center'
  104. })
  105. },
  106. showQrcode() {
  107. this.show = true
  108. // this.$api('showQrcode', {}, res => {
  109. // if (res.code == 200) {
  110. // this.imageUrl = res.result
  111. // }
  112. // })
  113. setTimeout(() => {
  114. this.$refs.placard.draw()
  115. })
  116. },
  117. wxshare() {
  118. window.jWeixin.config({
  119. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  120. appId: 'wxe934cebcbc89d869', // 必填,公众号的唯一标识
  121. // timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  122. // nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  123. // signature: res.data.signature, // 必填,签名,见附录1
  124. // surl: res.data.surl, //自己添加的,debug为true的时候可以网页打印出对应的URL是否正确
  125. jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"]
  126. });
  127. window.jWeixin.ready(() => {
  128. //自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
  129. window.jWeixin.updateAppMessageShareData({
  130. title: '邀请新用户', // 分享标题
  131. desc: "邀请新用户,成为你的粉丝", // 分享描述
  132. link: "http://tairoudj.natapp1.cc", // 分享链接
  133. imgUrl: res.result, // 分享图标
  134. success: res => {
  135. //点击分享时提示用户分享图,
  136. this.wxsharetip = true
  137. },
  138. cancel: function() {
  139. // 用户取消分享后执行的回调函数
  140. }
  141. });
  142. //自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
  143. window.jWeixin.updateTimelineShareData({
  144. title: '标题', // 分享标题
  145. link: "http://tairoudj.natapp1.cc", // 分享链接
  146. imgUrl: res.result, // 分享图标
  147. success: res => {
  148. //点击分享时提示用户分享图,
  149. this.wxsharetip = true
  150. },
  151. cancel: function() {
  152. // 用户取消分享后执行的回调函数
  153. }
  154. });
  155. })
  156. },
  157. tagChange(index) { //选中标签发生改变
  158. this.type = index;
  159. this.getAgentFlow()
  160. },
  161. toWithdraw() { //跳转充值页面
  162. uni.navigateTo({
  163. url: '/pages/mine/withdraw'
  164. })
  165. }
  166. }
  167. }
  168. </script>
  169. <style scoped lang="scss">
  170. .distribution {
  171. background-color: #f3f3f3;
  172. min-height: 100vh;
  173. .box {
  174. position: relative;
  175. width: 100%;
  176. height: 175px;
  177. background-color: #fff;
  178. .box1 {
  179. height: 100px;
  180. background: linear-gradient(to right, #ecb978, #ffe6ed);
  181. }
  182. .content {
  183. position: absolute;
  184. display: flex;
  185. justify-content: space-around;
  186. width: 94%;
  187. height: 140px;
  188. background-color: #F0F0F0;
  189. top: 20px;
  190. left: 3%;
  191. z-index: 9;
  192. border-radius: 10px;
  193. box-shadow: 0px 1px 7px 1px #6e300955;
  194. .content-box {
  195. display: flex;
  196. width: 94%;
  197. height: 94%;
  198. flex-direction: column;
  199. align-items: self-end;
  200. .content-box1 {
  201. display: flex;
  202. width: 100%;
  203. height: 60px;
  204. justify-content: center;
  205. align-items: center;
  206. view {
  207. width: 200rpx;
  208. display: flex;
  209. justify-content: space-around;
  210. }
  211. }
  212. .content-box2 {
  213. display: flex;
  214. width: 100%;
  215. height: 60px;
  216. justify-content: center;
  217. align-items: center;
  218. view {
  219. width: 200rpx;
  220. display: flex;
  221. justify-content: space-around;
  222. color: #6e3009;
  223. font-size: 18px;
  224. }
  225. }
  226. .content-box3 {
  227. display: flex;
  228. width: 100%;
  229. height: 60px;
  230. justify-content: center;
  231. align-items: center;
  232. view {
  233. width: 200rpx;
  234. display: flex;
  235. justify-content: space-around;
  236. align-items: center;
  237. }
  238. text {
  239. display: inline-block;
  240. padding: 5px 20px;
  241. text-align: center;
  242. border: 1px solid #6e3009;
  243. color: #6e3009;
  244. border-radius: 5px;
  245. }
  246. }
  247. }
  248. }
  249. }
  250. .tab-box {
  251. width: 96%;
  252. margin-top: 10px;
  253. margin-left: 2%;
  254. background-color: #fff;
  255. border-radius: 10px;
  256. overflow: hidden;
  257. .tab-box1 {
  258. margin-top: 10px;
  259. }
  260. }
  261. }
  262. </style>