index1.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>创业帮</title>
  6. <meta name="keywords" content="创业帮">
  7. <meta name="description" content="创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="pb0" style="padding-top:0;">
  18. <div class="index_current" id="app" v-cloak>
  19. <div class="ovh-x" ref="wrapper2">
  20. <van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="height:100%;">
  21. <van-cell>
  22. <template #title>
  23. <div class="df index_userinfo" @click="userinfobtn"><img class="userimg" :src="PublicLib.CachePicture({picUrl:userphoto,domid:'indexuserheadimg'})" id="indexuserheadimg"><span>创业帮001</span></div>
  24. </template>
  25. <template #default>
  26. <div class="df index_userinfo defaultimg" @click="server"><img class="servce" src="./static/images/index-btn1.png" alt=""></div>
  27. </template>
  28. </van-cell>
  29. <van-swipe class="my-swipe" :autoplay="2000" indicator-color="rgba(255,255,255,.8)" v-cloak>
  30. <van-swipe-item v-for="item,index in banner" :key="index" @click="bannerbtn(item.Url)"><img width="100%" :src="PublicLib.CachePicture({picUrl:item.PicPath,domid:'banner' + index})" :id="'banner' + index" fit="cover" lazy-load></van-swipe-item>
  31. </van-swipe>
  32. <van-row class="block-padding bb8f7f7f7">
  33. <van-col class="mr12" span="6"><img class="toutiao-t fl" src="./static/images/logo-text.png" alt="" width="100%"></van-col>
  34. <van-col span="16">
  35. <van-swipe :autoplay="5000" style="height:.533333rem" vertical :show-indicators="false" :touchable="false">
  36. <van-swipe-item v-for="item,index in toutiao" :key="index">
  37. <div class="toutiao-txt c333 line1">创客{{item.RealName}}又收到{{item.Amount}}奖励</div>
  38. </van-swipe-item>
  39. </van-swipe>
  40. </van-col>
  41. </van-row>
  42. <van-grid class="main-btn bb8f7f7f7" :border="false" :icon-size="20" v-cloak>
  43. <van-grid-item class="gridicon" v-for="item,index in entrancelist" :text="item.Title" @click="entrance(item.Url)">
  44. <template v-slot:icon><img :src="item.Icon" :id="'indexIcon' + index"></template>
  45. </van-grid-item>
  46. </van-grid>
  47. <div class="block-padding" v-cloak @click="achievement" style="padding-bottom:50px;">
  48. <div class="df"><strong class="db f16 flex1">本月团队业绩</strong></div>
  49. <div class="index-card bgcfff bgimg">
  50. <div class="title df">
  51. <button class="view_detail f12 bgcfff rel"> 查看详情
  52. <van-icon class="abs" name="arrow"></van-icon>
  53. </button>
  54. </div>
  55. <div class="tc detail rel">
  56. <div class="index-num-b f18 b">15260</div>
  57. <div class="f12 c333">团队交易额(元)</div>
  58. <van-row class="pt16 pb8">
  59. <van-col span="12">
  60. <div class="index-num-b f16 b">29</div>
  61. <div class="f12 c333">新增创客</div>
  62. </van-col>
  63. <van-col span="12">
  64. <div class="index-num-b f16 b">37</div>
  65. <div class="f12 c333">新增活动商户</div>
  66. </van-col>
  67. </van-row><img class="abs people_bgimg" src="./static/images/index-bgimgpeople.png" alt="">
  68. </div>
  69. </div>
  70. </div>
  71. </van-pull-refresh>
  72. </div>
  73. <van-tabbar v-model="active" active-color="#333" inactive-color="#999" v-cloak v-if="tabsisshow">
  74. <van-tabbar-item icon="home-o">首页
  75. <template #icon="props"><img :src="props.active ? icon1.active : icon1.inactive"></template>
  76. </van-tabbar-item>
  77. <van-tabbar-item icon="search" @click="mall">商城
  78. <template #icon="props"><img :src="props.active ? icon2.active : icon2.inactive"></template>
  79. </van-tabbar-item>
  80. <van-tabbar-item icon="friends-o" @click="notice" :dot="isnotice">消息
  81. <template #icon="props"><img :src="props.active ? icon3.active : icon3.inactive"></template>
  82. </van-tabbar-item>
  83. <van-tabbar-item icon="setting-o" @click="user">我的
  84. <template #icon="props"><img :src="props.active ? icon4.active : icon4.inactive"></template>
  85. </van-tabbar-item>
  86. </van-tabbar>
  87. </div>
  88. <script src="./static/js/klm-vv.min.js"></script>
  89. <script src="./static/js/appfunc.min.js"></script>
  90. <script src="./static/js/klm-axios-config.js"></script>
  91. <script src="./static/js/publicfn.js"></script>
  92. <script>
  93. function OnStart(){
  94. app.getsuerinfo();
  95. app.verificationrealauth();
  96. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  97. PublicLib.SetStatusBarStyle({type:'default', isShow:1});
  98. };
  99. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  100. // 可以通过下面的方式手动注册
  101. Vue.use(vant.Lazyload);
  102. //- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  103. //- PublicLib.SetStatusBarStyle({type:'default', isShow:1});
  104. // 在 #app 标签下渲染一个按钮组件
  105. let app = new Vue({
  106. el: '#app',
  107. data() {
  108. return {
  109. isLoading:false,
  110. topisshow:false,
  111. realauth:false,
  112. active: 0,
  113. username:'',
  114. rankgrade:1,
  115. userphoto:'',
  116. banner: [
  117. ],
  118. toutiao: [
  119. ],
  120. icon1: {
  121. active: './static/images/tab-icon1-active.png',
  122. inactive: './static/images/tab-icon1-no.png',
  123. },
  124. icon2: {
  125. active: './static/images/tab-icon2-active.png',
  126. inactive: './static/images/tab-icon2-no.png',
  127. },
  128. icon3: {
  129. active: './static/images/tab-icon3-active.png',
  130. inactive: './static/images/tab-icon3-no.png',
  131. },
  132. icon4: {
  133. active: './static/images/tab-icon4-active.png',
  134. inactive: './static/images/tab-icon4-no.png',
  135. },
  136. teamperformance: '0',
  137. addcustomer:'0',
  138. merchant:'0',
  139. grade:[
  140. './static/images/grade-k1.png',
  141. './static/images/grade-k2.png',
  142. './static/images/grade-k3.png',
  143. './static/images/grade-k4.png',
  144. './static/images/grade-k5.png',
  145. './static/images/grade-k6.png',
  146. './static/images/grade-k8.png',
  147. './static/images/grade-k9.png',
  148. ],
  149. entrancelist:[
  150. ],
  151. tabsisshow:false,
  152. warehouse:[],
  153. };
  154. },
  155. created() {
  156. this.tabsisshow = bottomtabisshow;
  157. this.getsuerinfo();
  158. this.getteamachievement();
  159. this.getquickentrance();
  160. this.gettopbanner();
  161. this.getheadline();
  162. //- this.getwarehouselist();
  163. this.verificationrealauth();
  164. },
  165. mounted(){
  166. this.$nextTick(() => {
  167. this.$refs.wrapper2.style.height = `${document.documentElement.clientHeight}px`;
  168. });
  169. },
  170. computed:{
  171. isnotice:function(){
  172. return PublicLib.getCookieInfo('noticeiscount') !== "";
  173. }
  174. },
  175. methods: {
  176. async onRefresh(){
  177. await this.getsuerinfo();
  178. await this.getteamachievement();
  179. await this.getquickentrance();
  180. await this.gettopbanner();
  181. await this.getheadline();
  182. //- await this.getwarehouselist();
  183. await this.verificationrealauth();
  184. this.isLoading = false;
  185. },
  186. //- 吸顶状态
  187. sticky(status){
  188. this.topisshow = status
  189. },
  190. //- 获取用户个人信息
  191. async getsuerinfo(){
  192. const Id = PublicLib.getCookieInfo('userId');
  193. const res = await getRequest('api/v1/users/myinfo',JSON.stringify({Id}));
  194. if(res.status === '1') {
  195. this.username = res.data.RealName;
  196. this.rankgrade = res.data.UserLevel;
  197. this.userphoto = res.data.HeadPhoto;
  198. };
  199. },
  200. //- 获取团队业绩
  201. async getteamachievement(){
  202. const UserId = PublicLib.getCookieInfo('userId');
  203. const res = await getRequest('api/v1/usertradedaysummary/thismonth',JSON.stringify({UserId}));
  204. if(res.status === '1') {
  205. this.teamperformance = res.data.DirectTradeAmt;
  206. this.merchant = res.data.DirectDebitCapNum;
  207. this.addcustomer = res.data.AddCount;
  208. };
  209. },
  210. //- 获取快捷入口列表
  211. async getquickentrance(){
  212. //- PublicLib.ShowLoading({Message:''});
  213. //- const res = await getRequest('api/v1/indexiconlist/list',JSON.stringify({PageSize:8,PageNum:1}));
  214. //- if(res.status === '1') {
  215. //- TODO:动态生成入口
  216. //- this.entrancelist = res.data;
  217. this.entrancelist = [
  218. {Icon:'./static/images/main-btn5@3x.png',Title:'我的创客',Url:'creater-list1'},
  219. //- {Icon:'./static/images/main-btn6@3x.png',Title:'我的商户',Url:'merchant-list'},
  220. {Icon:'./static/images/main-btn7@3x.png',Title:'意见反馈',Url:'user-feedback1'},
  221. {Icon:'./static/images/main-btn1@3x.png',Title:'商户创建',Url:'merchant-establish'},
  222. {Icon:'./static/images/main-btn8@3x.png',Title:'进件查询',Url:'merchant-incoming1'},
  223. {Icon:'./static/images/main-btn2@3x.png',Title:'暂存箱',Url:'merchant-temporary-storage1'},
  224. ];
  225. //- PublicLib.HideLoading();
  226. //- }
  227. },
  228. //- 获取顶部banner
  229. async gettopbanner(){
  230. const res = await getRequest('api/v1/advertisment/indextop',JSON.stringify({PageSize:8,PageNum:1}));
  231. if(res.status === '1') {
  232. this.banner = res.data;
  233. };
  234. },
  235. //- 获取创业帮头条信息
  236. async getheadline(){
  237. const res = await getRequest('api/v1/sysrechargerecord/headline',JSON.stringify({PageSize:8,PageNum:1}));
  238. if(res.status === '1') {
  239. this.toutiao = res.data;
  240. };
  241. },
  242. //- 跳转特训营
  243. trainingCamp(){
  244. PublicLib.Goto({Url:'trainingCamp'});
  245. },
  246. //- 跳转商城
  247. mall(){
  248. PublicLib.Goto({Url:'mall'});
  249. },
  250. //- 跳转消息
  251. notice(){
  252. PublicLib.Goto({Url:'notice-center'});
  253. },
  254. //- 跳转我的
  255. user(){
  256. PublicLib.Goto({Url:'user-center'});
  257. },
  258. async verificationrealauth(){
  259. const Id = PublicLib.getCookieInfo('userId');
  260. const userinfo = await getRequest('api/v1/users/personalinfo',JSON.stringify({Id}));
  261. //- 是否实名认证完毕
  262. //- console.log(userinfo)
  263. if(userinfo.data.AuthFlag !== 1) {
  264. this.realauth = true;
  265. }else{
  266. this.realauth = false;
  267. };
  268. },
  269. entrance(Url){
  270. if(Url === 'user-feedback'){
  271. return PublicLib.Goto({Url});
  272. };
  273. if(this.realauth){
  274. PublicLib.ShowDialog({
  275. Title:'暂未实名认证',
  276. Message:'是否去实名认证?',
  277. ConfirmText:'去实名',
  278. CancelText:'暂不实名',
  279. ConfirmAction:'app.goAuth()',
  280. CanelAction:''
  281. });
  282. return;
  283. };
  284. //- 跳转对应的快捷入口页面
  285. PublicLib.Goto({Url});
  286. },
  287. goAuth(){
  288. PublicLib.Goto({Url:'user-realauth'});
  289. },
  290. bannerbtn(url){
  291. if(!url){
  292. return PublicLib.Goto({Url:'welcome'});
  293. };
  294. PublicLib.Goto({Url:url});
  295. },
  296. //- 跳转业绩
  297. achievement(){
  298. PublicLib.Goto({Url:'product-myperformance1'});
  299. },
  300. //- 服务中心
  301. server(){
  302. PublicLib.Goto({Url:'user-service-list'});
  303. },
  304. //- 点击头部个人信息
  305. userinfobtn(){
  306. PublicLib.Goto({Url:'user-info1'});
  307. },
  308. //- 获取仓库入口
  309. async getwarehouselist(){
  310. const UserId = PublicLib.getCookieInfo('userId');
  311. const res = await getRequest('api/v1/storehouse/indexlist',JSON.stringify({UserId,PageSize:8,PageNum:1}));
  312. if(res.status === '1') {
  313. this.warehouse = res.data;
  314. }
  315. },
  316. //- 跳转对应仓库
  317. gowarehouse(id,name){
  318. PublicLib.putCookieInfo('warehouseId', id);
  319. PublicLib.putCookieInfo('warehouseName', name);
  320. PublicLib.Goto({Url:'warehouse-management'});
  321. }
  322. }
  323. });
  324. </script>
  325. </body>
  326. </html>