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. <!-- <com-footer model="member"></com-footer> -->
  48. <uni-popup ref="popup" type="center"><image class="qrcode-img" :src="kefu.url"></image></uni-popup>
  49. <dialog-birthday v-if="showBirthday" @closed="showBirthday = false"></dialog-birthday>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import {getKefu} from "@/common/apis/common.js"
  55. import {getUserInfo} from "@/common/apis/my.js"
  56. export default {
  57. data() {
  58. return {
  59. isLogin: false,
  60. showLogin: false,
  61. isBirthday: true,
  62. showBirthday: false,
  63. showQrcode: true,
  64. avatar: '',
  65. userinfo: {
  66. type: "微信用户",
  67. id: '00001',
  68. },
  69. kefu:{url:"",},
  70. vipLevel: 0,
  71. iskq: 0,
  72. uid: 0,
  73. staticUrl: this.$config.staticUrl,
  74. memberMenus: [
  75. // {name:'观看历史',type:'link',model:'',link:'/pages/client/tuan/zjgk',icon:this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',show:1},
  76. // {name:'我的追剧',type:'link',model:'',link:'/pages/client/tuan/zjjl',icon:this.$config.staticUrl + 'vipcard_icon_my_order@2x.png',show:1},
  77. {
  78. name: '我的追剧',
  79. type: 'link',
  80. model: '',
  81. link: '/pages/client/tuan/zjjl',
  82. icon: this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',
  83. show: 1
  84. },
  85. {
  86. name: '充值记录',
  87. type: 'link',
  88. model: '',
  89. link: '/pages/client/orders/oreders',
  90. icon: this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',
  91. show: 1
  92. },
  93. {
  94. name: '消费记录',
  95. type: 'link',
  96. model: '',
  97. link: '/pages/client/consume/consume',
  98. icon: this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',
  99. show: 1
  100. },
  101. {
  102. name: '联系客服',
  103. type: 'kefu',
  104. model: '',
  105. link: '/pages/client/tuan/wdxh',
  106. icon: this.$config.staticUrl + 'vipcard_love.png?v=1',
  107. show: 1
  108. },
  109. // {name:'收货地址',type:'link',model:'',link:'/pages/client/member/address',icon:this.$config.staticUrl + 'vipcard_icon_my_address@2x.png',show:0},
  110. // {name:'官方商城',type:'link',model:'',link:'/pages/client/shop',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:0},
  111. // {name:'联系客服',type:'link',model:'',link:'/pages/client/vipcard/adviser',icon:this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',show:1},
  112. // {name:'我的团队',type:'link',model:'',link:'/pages/client/mytuandui',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
  113. // {name:'分销订单',type:'link',model:'',link:'/pages/client/vipcard/fxlog',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:3},
  114. ],
  115. }
  116. },
  117. computed: {
  118. getMenus() {
  119. let arr = new Array;
  120. for (var a in this.memberMenus) {
  121. if (this.memberMenus[a].show == 1 || (this.iskq == 1 && this.memberMenus[a].show == 3)) {
  122. arr.push(this.memberMenus[a]);
  123. }
  124. }
  125. return arr;
  126. }
  127. },
  128. async onLoad() {
  129. this.kefu = await getKefu();
  130. },
  131. async onShow() {
  132. let info = await getUserInfo();
  133. },
  134. onShareAppMessage: function(res) {
  135. // #ifdef MP-WEIXIN
  136. var href = '/pages/login/login?fxpid=' + this.uid
  137. console.log(res)
  138. let that = this;
  139. const obj = {
  140. title: "发送给好友",
  141. imageUrl: '',
  142. path: href,
  143. success: function(res) {
  144. console.log(res, "转发成功")
  145. },
  146. fail: function(res) {
  147. wx.showToast({
  148. title: '发送失败',
  149. icon: 'none'
  150. })
  151. }
  152. }
  153. return obj
  154. // #endif
  155. },
  156. onShareTimeline(e) {
  157. },
  158. methods: {
  159. showPopu(type = "kefu") {
  160. if (type == "kefu") {
  161. this.$refs.popup.open('center')
  162. }
  163. },
  164. opset() {
  165. uni.navigateTo({
  166. url: '/pages/set/set'
  167. })
  168. },
  169. opsets() {
  170. uni.navigateTo({
  171. url: '/pages/set/grzl/grzl'
  172. })
  173. },
  174. memberLinkTo(e) {
  175. let index = parseInt(e.currentTarget.dataset.index);
  176. if (this.isLogin == false && this.getMenus[index].model != 'integral') {
  177. this.showLogin = true;
  178. } else {
  179. }
  180. if (this.getMenus[index].link != '') {
  181. if (this.getMenus[index].model == 'integral') {
  182. uni.redirectTo({
  183. url: this.getMenus[index].link
  184. })
  185. } else {
  186. uni.navigateTo({
  187. url: this.getMenus[index].link
  188. })
  189. }
  190. }
  191. },
  192. birthdayAct() {
  193. if (this.isBirthday) {
  194. uni.navigateTo({
  195. url: '/pages/client/member/birthday'
  196. })
  197. } else {
  198. uni.navigateTo({
  199. url: '/pages/client/member/info'
  200. })
  201. }
  202. }
  203. }
  204. }
  205. </script>
  206. <style>
  207. @import url("style/index.css");
  208. </style>