index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="body">
  3. <view class="pd24_20 flex alcenter space user-info">
  4. <view class="flex alcenter" @click="opsets">
  5. <view class="member-face">
  6. <image class="face" :src="statics.defaultFace"></image>
  7. <image class="vip-level" :src="userinfo.group_id>1?statics.vipLevelImg[0]:''"></image>
  8. </view>
  9. <view class="ml15">
  10. <view class="ft16 cl-main">{{userinfo.type}}</view>
  11. <view class="mt12 ft12 cl-notice">ID:{{ userinfo.user_id || '' }}</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="pd24_20">
  16. <div class="box pd16_15 creadit-box">
  17. <div class="mt16 coin-box">
  18. <div class="flex alcenter coin-item">
  19. <label class="coin-text">12300</label>
  20. <label class="coin-text">永久看币</label>
  21. </div>
  22. <label class="box-line">|</label>
  23. <div class="flex alcenter coin-item" >
  24. <label class="coin-text" >12300</label>
  25. <label class="coin-text">赠送看币</label>
  26. </div>
  27. </div>
  28. <div class="mt16 box-cj"><label class="btn-cz">去充值</label></div>
  29. </div>
  30. <!-- <home-vipcard :userinfo="userinfo" @loginAct="showLoginAct" @qrcode="showQrcode = true"></home-vipcard> -->
  31. <view class="flex wrap space mt16">
  32. <view v-for="(item,index) in getMenus" :key="index" :class="index > 1 ? 'mt16': ''">
  33. <view v-if="item.type == 'link'" :data-index="index" @click="memberLinkTo"
  34. class="box pd16_15 flex alcenter" style="width: 320rpx;">
  35. <image :src="item.icon" style="width: 64rpx;height: 64rpx;"></image>
  36. <text class="ml15 ft14 ftw500 cl-main">{{item.name}}</text>
  37. </view>
  38. <view v-else style="width: 320rpx;" @click="showPopu(item.type)">
  39. <button class="box pd16_15 flex alcenter" style="padding: 32rpx 30rpx; margin: 0;">
  40. <image :src="item.icon" style="width: 64rpx;height: 64rpx;"></image>
  41. <text class="ml15 ft14 ftw500 cl-main">{{item.name}}</text>
  42. </button>
  43. </view>
  44. </view>
  45. </view>
  46. <com-copyright></com-copyright>
  47. <!-- <image src=""></image> -->
  48. <!-- <com-footer model="member"></com-footer> -->
  49. <uni-popup ref="popup" type="center"><image class="qrcode-img" :src="kefu.url"></image></uni-popup>
  50. <dialog-birthday v-if="showBirthday" @closed="showBirthday = false"></dialog-birthday>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import {getKefu} from "@/common/apis/common.js"
  56. import {getUserInfo} from "@/common/apis/my.js"
  57. export default {
  58. data() {
  59. return {
  60. isLogin: false,
  61. showLogin: false,
  62. isBirthday: true,
  63. showBirthday: false,
  64. showQrcode: true,
  65. avatar: '',
  66. userinfo: {
  67. type: "微信用户",
  68. id: '00001',
  69. },
  70. kefu:{url:"",},
  71. vipLevel: 0,
  72. iskq: 0,
  73. uid: 0,
  74. staticUrl: this.$config.staticUrl,
  75. memberMenus: [
  76. // {name:'观看历史',type:'link',model:'',link:'/pages/client/tuan/zjgk',icon:this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',show:1},
  77. // {name:'我的追剧',type:'link',model:'',link:'/pages/client/tuan/zjjl',icon:this.$config.staticUrl + 'vipcard_icon_my_order@2x.png',show:1},
  78. {
  79. name: '我的追剧',
  80. type: 'link',
  81. model: '',
  82. link: '/pages/client/tuan/zjjl',
  83. icon: this.$config.zystaticUrl + '/static/img/wode/zhuij.png',
  84. show: 1
  85. },
  86. {
  87. name: '充值记录',
  88. type: 'link',
  89. model: '',
  90. link: '/pages/client/orders/oreders',
  91. icon: this.$config.zystaticUrl + '/static/img/wode/wd-cz.png',
  92. show: 1
  93. },
  94. {
  95. name: '消费记录',
  96. type: 'link',
  97. model: '',
  98. link: '/pages/client/consume/consume',
  99. icon: this.$config.zystaticUrl + '/static/img/wode/xiaofei.png',
  100. show: 1
  101. },
  102. {
  103. name: '联系客服',
  104. type: 'kefu',
  105. model: '',
  106. link: '/pages/client/tuan/wdxh',
  107. icon: this.$config.zystaticUrl + '/static/img/wode/kefu.png',
  108. show: 1
  109. },
  110. // {name:'收货地址',type:'git link',model:'',link:'/pages/client/member/address',icon:this.$config.staticUrl + 'vipcard_icon_my_address@2x.png',show:0},
  111. // {name:'官方商城',type:'link',model:'',link:'/pages/client/shop',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:0},
  112. // {name:'联系客服',type:'link',model:'',link:'/pages/client/vipcard/adviser',icon:this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',show:1},
  113. // {name:'我的团队',type:'link',model:'',link:'/pages/client/mytuandui',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
  114. // {name:'分销订单',type:'link',model:'',link:'/pages/client/vipcard/fxlog',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:3},
  115. ],
  116. }
  117. },
  118. computed: {
  119. getMenus() {
  120. let arr = new Array;
  121. for (var a in this.memberMenus) {
  122. if (this.memberMenus[a].show == 1 || (this.iskq == 1 && this.memberMenus[a].show == 3)) {
  123. arr.push(this.memberMenus[a]);
  124. }
  125. }
  126. return arr;
  127. }
  128. },
  129. async onLoad() {
  130. this.kefu = await getKefu();
  131. },
  132. async onShow() {
  133. let info = await getUserInfo();
  134. },
  135. onShareAppMessage: function(res) {
  136. // #ifdef MP-WEIXIN
  137. var href = '/pages/login/login?fxpid=' + this.uid
  138. console.log(res)
  139. let that = this;
  140. const obj = {
  141. title: "发送给好友",
  142. imageUrl: '',
  143. path: href,
  144. success: function(res) {
  145. console.log(res, "转发成功")
  146. },
  147. fail: function(res) {
  148. wx.showToast({
  149. title: '发送失败',
  150. icon: 'none'
  151. })
  152. }
  153. }
  154. return obj
  155. // #endif
  156. },
  157. onShareTimeline(e) {
  158. },
  159. methods: {
  160. showPopu(type = "kefu") {
  161. if (type == "kefu") {
  162. this.$refs.popup.open('center')
  163. }
  164. },
  165. opset() {
  166. uni.navigateTo({
  167. url: '/pages/set/set'
  168. })
  169. },
  170. opsets() {
  171. uni.navigateTo({
  172. url: '/pages/set/grzl/grzl'
  173. })
  174. },
  175. memberLinkTo(e) {
  176. let index = parseInt(e.currentTarget.dataset.index);
  177. if (this.isLogin == false && this.getMenus[index].model != 'integral') {
  178. this.showLogin = true;
  179. } else {
  180. }
  181. if (this.getMenus[index].link != '') {
  182. if (this.getMenus[index].model == 'integral') {
  183. uni.redirectTo({
  184. url: this.getMenus[index].link
  185. })
  186. } else {
  187. uni.navigateTo({
  188. url: this.getMenus[index].link
  189. })
  190. }
  191. }
  192. },
  193. birthdayAct() {
  194. if (this.isBirthday) {
  195. uni.navigateTo({
  196. url: '/pages/client/member/birthday'
  197. })
  198. } else {
  199. uni.navigateTo({
  200. url: '/pages/client/member/info'
  201. })
  202. }
  203. }
  204. }
  205. }
  206. </script>
  207. <style>
  208. @import url("style/index.css");
  209. </style>