宜轩到家/服务到家第三版,换个颜色
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.

291 lines
7.1 KiB

7 months ago
6 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
6 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>
  23. <text v-if="userInfo.isDai =='Y'" @click="toWithdraw">提现</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. if(this.userInfo.isDai == 'Y'){
  85. this.tabs = [
  86. { title : '费用明细' },
  87. { title : '提现记录' },
  88. { title : '收益记录' }
  89. ]
  90. }
  91. }
  92. })
  93. },
  94. getAgentFlow() {
  95. this.$api('getAgentFlow', {
  96. type: this.type
  97. }, res => {
  98. if (res.code == 200) {
  99. this.agentFlow = res.result
  100. }
  101. })
  102. },
  103. toNodes() {
  104. uni.navigateTo({
  105. url: '/pages/mine/nodes'
  106. })
  107. },
  108. leftClick() { //返回个人中心
  109. uni.switchTab({
  110. url: '/pages/index/center'
  111. })
  112. },
  113. showQrcode() {
  114. this.show = true
  115. // this.$api('showQrcode', {}, res => {
  116. // if (res.code == 200) {
  117. // this.imageUrl = res.result
  118. // }
  119. // })
  120. setTimeout(() => {
  121. this.$refs.placard.draw()
  122. })
  123. },
  124. wxshare() {
  125. window.jWeixin.config({
  126. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  127. appId: 'wxe934cebcbc89d869', // 必填,公众号的唯一标识
  128. // timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  129. // nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  130. // signature: res.data.signature, // 必填,签名,见附录1
  131. // surl: res.data.surl, //自己添加的,debug为true的时候可以网页打印出对应的URL是否正确
  132. jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"]
  133. });
  134. window.jWeixin.ready(() => {
  135. //自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
  136. window.jWeixin.updateAppMessageShareData({
  137. title: '邀请新用户', // 分享标题
  138. desc: "邀请新用户,成为你的粉丝", // 分享描述
  139. link: "http://tairoudj.natapp1.cc", // 分享链接
  140. imgUrl: res.result, // 分享图标
  141. success: res => {
  142. //点击分享时提示用户分享图,
  143. this.wxsharetip = true
  144. },
  145. cancel: function() {
  146. // 用户取消分享后执行的回调函数
  147. }
  148. });
  149. //自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
  150. window.jWeixin.updateTimelineShareData({
  151. title: '标题', // 分享标题
  152. link: "http://tairoudj.natapp1.cc", // 分享链接
  153. imgUrl: res.result, // 分享图标
  154. success: res => {
  155. //点击分享时提示用户分享图,
  156. this.wxsharetip = true
  157. },
  158. cancel: function() {
  159. // 用户取消分享后执行的回调函数
  160. }
  161. });
  162. })
  163. },
  164. tagChange(index) { //选中标签发生改变
  165. this.type = index;
  166. this.getAgentFlow()
  167. },
  168. toWithdraw() { //跳转充值页面
  169. uni.navigateTo({
  170. url: '/pages/mine/withdraw'
  171. })
  172. }
  173. }
  174. }
  175. </script>
  176. <style scoped lang="scss">
  177. .distribution {
  178. background-color: #f3f3f3;
  179. min-height: 100vh;
  180. .box {
  181. position: relative;
  182. width: 100%;
  183. height: 175px;
  184. background-color: #fff;
  185. .box1 {
  186. height: 100px;
  187. background: linear-gradient(to right, #ecb978, #ffe6ed);
  188. }
  189. .content {
  190. position: absolute;
  191. display: flex;
  192. justify-content: space-around;
  193. width: 94%;
  194. height: 140px;
  195. background-color: #F0F0F0;
  196. top: 20px;
  197. left: 3%;
  198. z-index: 9;
  199. border-radius: 10px;
  200. box-shadow: 0px 1px 7px 1px #6e300955;
  201. .content-box {
  202. display: flex;
  203. width: 94%;
  204. height: 94%;
  205. flex-direction: column;
  206. align-items: self-end;
  207. .content-box1 {
  208. display: flex;
  209. width: 100%;
  210. height: 60px;
  211. justify-content: center;
  212. align-items: center;
  213. view {
  214. width: 200rpx;
  215. display: flex;
  216. justify-content: space-around;
  217. }
  218. }
  219. .content-box2 {
  220. display: flex;
  221. width: 100%;
  222. height: 60px;
  223. justify-content: center;
  224. align-items: center;
  225. view {
  226. width: 200rpx;
  227. display: flex;
  228. justify-content: space-around;
  229. color: #6e3009;
  230. font-size: 18px;
  231. }
  232. }
  233. .content-box3 {
  234. display: flex;
  235. width: 100%;
  236. height: 60px;
  237. justify-content: center;
  238. align-items: center;
  239. view {
  240. width: 200rpx;
  241. display: flex;
  242. justify-content: space-around;
  243. align-items: center;
  244. }
  245. text {
  246. display: inline-block;
  247. padding: 5px 20px;
  248. text-align: center;
  249. border: 1px solid #6e3009;
  250. color: #6e3009;
  251. border-radius: 5px;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. .tab-box {
  258. width: 96%;
  259. margin-top: 10px;
  260. margin-left: 2%;
  261. background-color: #fff;
  262. border-radius: 10px;
  263. overflow: hidden;
  264. .tab-box1 {
  265. margin-top: 10px;
  266. }
  267. }
  268. }
  269. </style>