东风启辰小程序端
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.

5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. // pages/myCenter/myCenter.js
  2. const app = getApp()
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. imgUrl: app.globalData.urlStatic,//图片路径
  9. isAddress:false,
  10. placing:false,
  11. buyState:false,
  12. buyStateTime:"",
  13. isAgreement: true,//是否同意协议
  14. phoneInputShow: false,//是否显示电话输入框
  15. siteSelect: false,//是否显示位置选择框
  16. isLogin:false,//登录状态
  17. selectNow:0,//现在的选项
  18. taskNow:1,//现在的任务类型
  19. recordNow: 1,//现在的记录类型
  20. taskList: [],//任务列表
  21. shareFriendList:[],//星探小分队列表
  22. recordList:[],//获奖记录列表
  23. provinceArr: [],//省
  24. provinceValue: 0,//选中的省下标
  25. storeArr: [],//店铺
  26. storeValue: 0,//选中的店铺下标
  27. verificationCode: '获取验证码',//验证码文案
  28. sendCode: true,
  29. appointment: true,
  30. subscribeData: {
  31. realname: "",//姓名
  32. mobile: "",//手机号
  33. captcha: "",//验证码
  34. province: "",//省份
  35. agent_code: "",//经销商编码
  36. agentDetail: "",//经销商详细信息
  37. parentOpenid: app.globalData.friendOpenid,//好友openid
  38. },
  39. userData:{
  40. avatarUrl: null,
  41. nickName: null,
  42. userLevel: 1
  43. },
  44. descFrameShow:false,//是否显示奖品详情
  45. ruleShow: false,//是否显示星探等级规则
  46. // isRegister: false,//查询是否已注册
  47. parames:{
  48. page:1,
  49. count:20
  50. },
  51. noData:false,
  52. optionsData:null,
  53. lookDescId: null,
  54. agreement: false,//是否显示协议
  55. addressShow:false,
  56. mycenterTipWindow:0,
  57. barNums:0
  58. },
  59. /**
  60. * 生命周期函数--监听页面加载
  61. */
  62. onLoad: function (options) {
  63. app.globalData.nowPage = 4;
  64. if (options.sourcePage){
  65. this.data.optionsData = options.sourcePage;
  66. }
  67. if (app.globalData.openid) {
  68. this.loadFun();
  69. } else {
  70. app.globalData.openidSuccessFuc = this.loadFun;
  71. }
  72. },
  73. loadFun: function () {
  74. this.getUserInfo();
  75. this.getAddress();
  76. if (app.globalData.userMobile) {
  77. this.data.subscribeData.mobile = app.globalData.userMobile;
  78. this.setData({
  79. phoneInputShow: true,
  80. subscribeData: this.data.subscribeData
  81. })
  82. }
  83. if (app.globalData.myCenterData) {
  84. this.setData({
  85. provinceArr: app.globalData.myCenterData.provinceArr,
  86. storeArr: app.globalData.myCenterData.storeArr,
  87. provinceValue: app.globalData.myCenterData.provinceValue,
  88. storeValue: app.globalData.myCenterData.storeValue,
  89. // isRegister: app.globalData.isRegister
  90. })
  91. this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province;
  92. this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail;
  93. this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code;
  94. }
  95. // if (!app.globalData.isRegister) {
  96. // this.getOrderInfo();
  97. // }
  98. if (app.globalData.userInfoData) {
  99. this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl;
  100. this.data.userData.nickName = app.globalData.userInfoData.nickName;
  101. this.data.userData.userLevel = app.globalData.userInfoData.userLevel;
  102. this.setData({
  103. isLogin: true,
  104. userData: this.data.userData
  105. })
  106. }
  107. },
  108. /**
  109. * 生命周期函数--监听页面初次渲染完成
  110. */
  111. onReady: function () {
  112. },
  113. /**
  114. * 生命周期函数--监听页面显示
  115. */
  116. onShow: function () {
  117. if (app.globalData.getBuyState) {
  118. this.getBuyStates();
  119. } else {
  120. app.globalData.buyStateSuccessFuc = this.getBuyStates;
  121. }
  122. this.data.subscribeData.parentOpenid = app.globalData.friendOpenid;
  123. },
  124. getBuyStates: function () {
  125. this.setData({
  126. buyState: app.globalData.getBuyState.success,
  127. buyStateTime: app.globalData.getBuyState.cdate
  128. })
  129. },
  130. /**
  131. * 生命周期函数--监听页面隐藏
  132. */
  133. onHide: function () {
  134. },
  135. /**
  136. * 生命周期函数--监听页面卸载
  137. */
  138. onUnload: function () {
  139. },
  140. /**
  141. * 页面相关事件处理函数--监听用户下拉动作
  142. */
  143. onPullDownRefresh: function () {
  144. },
  145. /**
  146. * 页面上拉触底事件的处理函数
  147. */
  148. onReachBottom: function () {
  149. },
  150. /**
  151. * 用户点击右上角分享
  152. */
  153. onShareAppMessage: function () {
  154. return app.sharePack();
  155. },
  156. selectChange:function(e){
  157. this.setData({
  158. selectNow: e.currentTarget.dataset.value
  159. })
  160. if (e.currentTarget.dataset.value == 1) {
  161. this.getTaskProgress();
  162. } else if (e.currentTarget.dataset.value == 2) {
  163. this.getMyAwardList();
  164. } else if (e.currentTarget.dataset.value == 3){
  165. this.data.parames.page = 0;
  166. this.setData({
  167. parames: this.data.parames,
  168. shareFriendList:[]
  169. })
  170. this.getShareList();
  171. }
  172. },
  173. selectTask: function (e) {
  174. this.setData({
  175. taskNow: e.currentTarget.dataset.type
  176. })
  177. if (this.data.taskNow==2){
  178. this.getFriendBuCarNum();
  179. }
  180. },
  181. getFriendBuCarNum:function(){
  182. app.wxRequest(app.globalData.urlRoot +"/share/getFriendBuCarNum",{},res=>{
  183. if(res.code==200){
  184. this.setData({
  185. barNums: res.data.total
  186. })
  187. }
  188. },this);
  189. },
  190. selectRecord: function (e) {
  191. if (this.data.recordNow == e.currentTarget.dataset.type) {
  192. return;
  193. }
  194. this.setData({
  195. recordList:[],
  196. recordNow: e.currentTarget.dataset.type
  197. })
  198. this.getMyAwardList();
  199. },
  200. getUserLocation: function (e) {
  201. wx.getLocation({
  202. type: 'gcj02', //wgs84
  203. success: (res) => {
  204. this.getDistributorList(res.longitude, res.latitude);
  205. },
  206. fail: (res) => {
  207. this.getDistributorList("", "");
  208. },
  209. complete: (res) => {
  210. this.setData({
  211. siteSelect: true,
  212. })
  213. }
  214. })
  215. },
  216. getDistributorList: function (longitude, latitude) {//获取经销商列表
  217. app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => {
  218. if (res.code == 200) {
  219. app.globalData.myCenterData = {};
  220. this.setData({
  221. provinceArr: res.data.list,
  222. storeArr: res.data.list[res.data.nearData.provinceIndex].children,
  223. provinceValue: res.data.nearData.provinceIndex,
  224. storeValue: res.data.nearData.cityIndex
  225. })
  226. this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province;
  227. this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail;
  228. this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code;
  229. app.globalData.myCenterData.provinceArr = res.data.list;
  230. app.globalData.myCenterData.storeArr = res.data.list[res.data.nearData.provinceIndex].children;
  231. app.globalData.myCenterData.provinceValue = res.data.nearData.provinceIndex;
  232. app.globalData.myCenterData.storeValue = res.data.nearData.cityIndex;
  233. } else {
  234. wx.showToast({
  235. title: res.msg,
  236. icon: "none"
  237. })
  238. }
  239. }, this);
  240. },
  241. provinceChane: function (e) {//选中省
  242. this.setData({
  243. provinceValue: e.detail.value,
  244. storeArr: this.data.provinceArr[e.detail.value].children,
  245. storeValue: 0
  246. })
  247. this.data.subscribeData.province = this.data.provinceArr[this.data.provinceValue].province;
  248. this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail;
  249. this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code;
  250. },
  251. storeChane: function (e) {//选中店铺
  252. this.setData({
  253. storeValue: e.detail.value,
  254. })
  255. this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail;
  256. this.data.subscribeData.agent_code = this.data.storeArr[this.data.storeValue].agent_code;
  257. },
  258. getCode: function (e) {//获取验证码
  259. if (!app.mobileVerify(this.data.subscribeData.mobile)) {
  260. if (this.data.subscribeData.mobile) {
  261. wx.showToast({
  262. title: '请输入正确的电话',
  263. icon: 'none'
  264. })
  265. } else {
  266. wx.showToast({
  267. title: '请输入电话',
  268. icon: 'none'
  269. })
  270. }
  271. return;
  272. }
  273. if (!this.data.sendCode) {
  274. return;
  275. }
  276. this.data.sendCode = false;
  277. app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile }, res => {
  278. if (res.code == 200) {
  279. this.countDown();
  280. wx.showToast({
  281. title: '验证码获取成功',
  282. icon: "none"
  283. })
  284. this.setData({
  285. verificationCode: 60
  286. })
  287. } else {
  288. this.data.sendCode = true;
  289. wx.showToast({
  290. title: res.msg,
  291. icon: "none"
  292. })
  293. }
  294. }, this)
  295. },
  296. countDown: function () {//倒计时
  297. setTimeout(() => {
  298. this.setData({
  299. verificationCode: this.data.verificationCode - 1
  300. })
  301. if (this.data.verificationCode > 0) {
  302. this.countDown();
  303. } else {
  304. this.setData({
  305. verificationCode: "获取验证码"
  306. })
  307. this.data.sendCode = true;
  308. }
  309. }, 1000);
  310. },
  311. getRealname: function (e) {//获取用户输入的姓名
  312. this.data.subscribeData.realname = e.detail.value;
  313. },
  314. getMobile: function (e) {//获取用户输入的电话
  315. this.data.subscribeData.mobile = e.detail.value;
  316. },
  317. getCaptcha: function (e) {//获取用户输入的验证码
  318. this.data.subscribeData.captcha = e.detail.value;
  319. },
  320. subscribeFun: function (e) {//预约鉴赏
  321. if(!this.data.subscribeData.realname){
  322. wx.showToast({
  323. title: '请输入姓名',
  324. icon:"none"
  325. })
  326. return;
  327. }
  328. if (!this.data.subscribeData.mobile) {
  329. wx.showToast({
  330. title: '请输入电话',
  331. icon: "none"
  332. })
  333. return;
  334. }
  335. if (!this.data.subscribeData.captcha) {
  336. wx.showToast({
  337. title: '请输入验证码',
  338. icon: "none"
  339. })
  340. return;
  341. }
  342. if (!this.data.isAgreement) {
  343. wx.showToast({
  344. title: '请同意协议',
  345. icon: 'none'
  346. })
  347. return;
  348. }
  349. if (!this.data.appointment) {
  350. return;
  351. }
  352. this.data.appointment = false;
  353. app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => {
  354. this.data.appointment = true;
  355. if (res.code == 200) {
  356. wx.showToast({
  357. title: '预约成功'
  358. })
  359. this.data.subscribeData.realname = "";
  360. this.data.subscribeData.captcha = "";
  361. this.setData({
  362. subscribeData: this.data.subscribeData,
  363. verificationCode: '获取验证码',
  364. })
  365. this.setData({
  366. siteSelect: false
  367. })
  368. // this.setData({
  369. // isRegister: true
  370. // })
  371. // app.globalData.isRegister = true;
  372. app.globalData.userMobile = this.data.subscribeData.mobile;
  373. } else {
  374. wx.showToast({
  375. title: res.msg,
  376. icon: "none"
  377. })
  378. }
  379. }, this, "POST")
  380. },
  381. getUserWxMsg:function(e){//通过微信获取用户信息
  382. if (e.detail.errMsg == "getUserInfo:ok") {
  383. this.data.userData.avatarUrl = e.detail.userInfo.avatarUrl;
  384. this.data.userData.nickName = e.detail.userInfo.nickName;
  385. this.setData({
  386. userData: this.data.userData,
  387. isLogin: true
  388. })
  389. app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName);
  390. }
  391. },
  392. getUserInfo:function(e){//获取个人信息
  393. app.wxRequest(app.globalData.urlRoot + 'userInfo/getUserInfo', {}, res => {
  394. if(res.code==200){
  395. if (res.data && res.data.avatarUrl) {
  396. if (!app.globalData.userInfoData) {
  397. this.data.userData.avatarUrl = res.data.avatarUrl;
  398. this.data.userData.nickName = res.data.nickName;
  399. this.data.userData.userLevel = res.data.userLevel;
  400. app.globalData.userInfoData = {};
  401. app.globalData.userInfoData.avatarUrl = res.data.avatarUrl;
  402. app.globalData.userInfoData.nickName = res.data.nickName;
  403. app.globalData.userInfoData.userLevel = res.data.userLevel;
  404. wx.setStorageSync('userInfoData', {
  405. avatarUrl: res.data.avatarUrl,
  406. nickName: res.data.nickName,
  407. userLevel: res.data.userLevel,
  408. })
  409. } else if (app.globalData.userInfoData){
  410. if (app.globalData.userInfoData.userLevel != res.data.userLevel) {
  411. this.data.userData.userLevel = res.data.userLevel;
  412. app.globalData.userInfoData.userLevel = res.data.userLevel;
  413. wx.setStorageSync('userInfoData', app.globalData.userInfoData);
  414. }
  415. if (app.globalData.userInfoData.avatarUrl != res.data.avatarUrl) {
  416. this.data.userData.avatarUrl = res.data.avatarUrl;
  417. app.globalData.userInfoData.avatarUrl = res.data.avatarUrl;
  418. wx.setStorageSync('userInfoData', app.globalData.userInfoData);
  419. }
  420. if (app.globalData.userInfoData.nickName != res.data.nickName) {
  421. this.data.userData.nickName = res.data.nickName;
  422. app.globalData.userInfoData.nickName = res.data.nickName;
  423. wx.setStorageSync('userInfoData', app.globalData.userInfoData);
  424. }
  425. }
  426. this.setData({
  427. userData: this.data.userData
  428. })
  429. if (!app.globalData.userInfoData){
  430. this.setData({
  431. isLogin: true
  432. })
  433. }
  434. }
  435. }
  436. },this)
  437. },
  438. getTaskProgress: function () {//获取任务完成度 1每日任务
  439. app.wxRequest(app.globalData.urlRoot + "task/getTaskProgress", { taskType: this.data.taskNow},res=>{
  440. if(res.code==200){
  441. if(res.data){
  442. for (let i = 0; i < res.data.taskData.length; i++) {
  443. res.data.taskData[i]['unlockNum'] = 0;
  444. for (let j = 0; j < res.data.taskData[i].childIdArr.length; j++) {
  445. if (res.data.taskData[i].childIdArr[j]) {
  446. res.data.taskData[i]['unlockNum'] += 1;
  447. }
  448. }
  449. }
  450. this.setData({
  451. taskList: res.data.taskData
  452. })
  453. }
  454. }
  455. },this)
  456. },
  457. lookDesc:function(e){//查看奖品详情
  458. if (this.data.descFrameShow){
  459. this.setData({
  460. descFrameShow: !this.data.descFrameShow,
  461. })
  462. return;
  463. }
  464. if (this.data.recordList[e.currentTarget.dataset.value].awardState == 2){
  465. this.setData({
  466. mycenterTipWindow:this.data.isAddress?2:1
  467. })
  468. } else {
  469. this.setData({
  470. descFrameShow: !this.data.descFrameShow,
  471. lookDescId: e.currentTarget.dataset.value || e.currentTarget.dataset.value == 0 ? e.currentTarget.dataset.value : null
  472. })
  473. }
  474. },
  475. lookRule: function (e) {//查看奖品详情
  476. this.setData({
  477. ruleShow: e.currentTarget.dataset.value
  478. })
  479. },
  480. getShareList: function () {//星探小分队
  481. app.wxRequest(app.globalData.urlRoot + "share/getFriendRegisterList", this.data.parames,res=>{
  482. if(res.code==200){
  483. for(let i=0;i<res.data.length;i++){
  484. this.data.shareFriendList.push(res.data[i]);
  485. }
  486. this.setData({
  487. shareFriendList: this.data.shareFriendList
  488. })
  489. if (res.data.length<this.data.parames.count){
  490. this.setData({
  491. noData: true
  492. })
  493. }
  494. }
  495. },this);
  496. },
  497. getOrderInfo: function () {//查询是否已注册
  498. app.wxRequest(app.globalData.urlRoot + "userInfo/getOrderInfo", {}, res => {
  499. if (res.code == 200) {
  500. if (res.data) {
  501. this.setData({
  502. isRegister: true
  503. })
  504. app.globalData.isRegister = true;
  505. app.globalData.userMobile = res.data.mobile;
  506. } else {
  507. if (app.globalData.userMobile) {
  508. this.data.subscribeData.mobile = app.globalData.userMobile;
  509. this.setData({
  510. phoneInputShow: true,
  511. subscribeData: this.data.subscribeData
  512. })
  513. }
  514. }
  515. } else {
  516. console.log(res.msg)
  517. }
  518. }, this);
  519. },
  520. scrolltolower:function(){//星探小分队滚动条触底时执行
  521. if(!this.data.noData){
  522. this.data.parames.page+=1;
  523. this.getShareList();
  524. }
  525. },
  526. getMyAwardList: function () {//获取获奖记录
  527. var recordNow = this.data.recordNow;
  528. if (recordNow==1){
  529. recordNow=3;
  530. } else if (recordNow == 3) {
  531. recordNow = 1;
  532. }
  533. app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", { awardSource: recordNow},res=>{
  534. if(res.code == 200){
  535. this.setData({
  536. recordList:res.data
  537. })
  538. }
  539. },this)
  540. },
  541. getUserPhone: function (e) {//获取用户手机号
  542. this.setData({
  543. phoneInputShow: true
  544. })
  545. if (e.detail.errMsg == 'getPhoneNumber:ok') {
  546. app.getMobile(e.detail.encryptedData, e.detail.iv, res => {
  547. if (res.code == 200) {
  548. if (res.data && res.data.decodeData){
  549. this.data.subscribeData.mobile = res.data.decodeData.phoneNumber;
  550. this.setData({
  551. subscribeData: this.data.subscribeData
  552. })
  553. }
  554. } else {
  555. wx.showToast({
  556. title: res.msg,
  557. icon: "none"
  558. })
  559. }
  560. }, this);
  561. }
  562. },
  563. addressControl: function () {//跳转到地址管理
  564. if (app.globalData.userInfoData) {
  565. this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl;
  566. this.data.userData.nickName = app.globalData.userInfoData.nickName;
  567. this.setData({
  568. userData: this.data.userData
  569. })
  570. }
  571. this.setData({
  572. addressShow:!this.data.addressShow
  573. })
  574. if (this.data.isAddress== false){
  575. this.getAddress();
  576. }
  577. },
  578. agreementState: function () {//协议
  579. this.setData({
  580. isAgreement: !this.data.isAgreement
  581. })
  582. },
  583. agreementControl: function () {
  584. this.setData({
  585. agreement: !this.data.agreement
  586. })
  587. },
  588. lookMore:function(){
  589. wx.navigateTo({
  590. url: '/pages/moreType/moreType',
  591. })
  592. },
  593. showSite: function () {//显示地址选择框
  594. if (!this.data.siteSelect) {
  595. if (!app.globalData.myCenterData) {
  596. this.getUserLocation();//获取用户当前位置
  597. }else{
  598. this.setData({
  599. siteSelect:true
  600. })
  601. }
  602. }
  603. },
  604. placingControl: function () {
  605. if (app.globalData.getBuyState.success != this.data.buyState) {
  606. this.setData({
  607. buyState: app.globalData.getBuyState.success,
  608. buyStateTime: app.globalData.getBuyState.cdate
  609. })
  610. }
  611. this.setData({
  612. placing: !this.data.placing
  613. })
  614. },
  615. tipWindow:function(){
  616. this.setData({
  617. mycenterTipWindow:0
  618. })
  619. },
  620. lookAddress:function(){
  621. this.addressControl();
  622. },
  623. copyExchangeCode:function(){
  624. var text = this.data.recordList[this.data.lookDescId].couponCode || this.data.recordList[this.data.lookDescId].productCode || "";
  625. this.contentCopy(text);
  626. },
  627. contentCopy:function(text){//内容复制
  628. wx.setClipboardData({
  629. data: text
  630. })
  631. },
  632. getAddress: function () {//获取地址
  633. app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => {
  634. if (res.code == 200) {
  635. if (res.data) {
  636. this.data.isAddress = true;
  637. }
  638. } else {
  639. wx.showToast({
  640. title: res.msg,
  641. icon: "none"
  642. })
  643. }
  644. }, this);
  645. },
  646. starGo:function(){//去完成
  647. wx.reLaunch({
  648. url: '/pages/star/star',
  649. })
  650. },
  651. enterLucky:function(){
  652. wx.reLaunch({
  653. url: '/pages/luckyStar/luckyStar',
  654. })
  655. },
  656. enterEvery:function(){
  657. wx.navigateTo({
  658. url: '/pages/everyday/everyday',
  659. })
  660. }
  661. })