wangyong 6 rokov pred
commit
95d2e1cd6f
100 zmenil súbory, kde vykonal 392 pridanie a 0 odobranie
  1. 144 0
      app.js
  2. 137 0
      app.json
  3. 111 0
      app.wxss
  4. BIN
      images/add.png
  5. BIN
      images/add_address.png
  6. BIN
      images/add_pre.png
  7. BIN
      images/address_delete.png
  8. BIN
      images/address_logo.png
  9. BIN
      images/address_msg_addr.png
  10. BIN
      images/address_msg_addr_more.png
  11. BIN
      images/address_msg_name.png
  12. BIN
      images/address_msg_tel.png
  13. BIN
      images/address_pre.png
  14. BIN
      images/all_gift_btn.png
  15. BIN
      images/await_icon.png
  16. BIN
      images/award_icon.png
  17. BIN
      images/black_more.png
  18. BIN
      images/black_more_2.png
  19. BIN
      images/bug_dz_service_icon.jpg
  20. BIN
      images/bug_share_icon.png
  21. BIN
      images/business_icon.png
  22. BIN
      images/buy_cart_num.png
  23. BIN
      images/buy_choose_icon.png
  24. BIN
      images/buy_service_each_icon.png
  25. BIN
      images/buy_service_icon.png
  26. BIN
      images/cart_choose_n.png
  27. BIN
      images/cart_choose_pre.png
  28. BIN
      images/change_liulan.png
  29. BIN
      images/change_msg_bg.png
  30. BIN
      images/close_gray_icon.png
  31. BIN
      images/close_icon_gray.png
  32. BIN
      images/close_icon_white.png
  33. BIN
      images/collect_icon_n.png
  34. BIN
      images/collect_icon_pre.png
  35. BIN
      images/coupon_logo_20180412.png
  36. BIN
      images/def_photo.png
  37. BIN
      images/delete.png
  38. BIN
      images/dingzhi_bg.jpg
  39. BIN
      images/dingzhi_null.png
  40. BIN
      images/dlz-logo.png
  41. BIN
      images/dragon_boat_festival_icon.png
  42. BIN
      images/find_img_bg.png
  43. BIN
      images/find_n.png
  44. BIN
      images/find_pre.png
  45. BIN
      images/gift_get_bg.png
  46. BIN
      images/gift_get_btn.png
  47. BIN
      images/goods_footer_cart.png
  48. BIN
      images/goods_footer_kefu.png
  49. BIN
      images/goods_infor_down_icon.png
  50. BIN
      images/goods_like_n.png
  51. BIN
      images/gray_back.png
  52. BIN
      images/gray_more_2.png
  53. BIN
      images/gray_search.png
  54. BIN
      images/home_search_icon.png
  55. BIN
      images/img_left_bg.png
  56. BIN
      images/index_close_coupon.png
  57. BIN
      images/index_coupon_each_left.png
  58. BIN
      images/index_coupon_each_right.png
  59. BIN
      images/index_menu_sec_0.png
  60. BIN
      images/index_menu_sec_1.png
  61. BIN
      images/index_menu_sec_2.png
  62. BIN
      images/index_menu_sec_3.png
  63. BIN
      images/index_menu_sec_4.png
  64. BIN
      images/index_n.png
  65. BIN
      images/index_pre.png
  66. BIN
      images/index_search_icon.png
  67. BIN
      images/index_title_bg_1.png
  68. BIN
      images/index_title_bg_2.png
  69. BIN
      images/index_top_menu_sec_0.jpg
  70. BIN
      images/index_top_menu_sec_1.jpg
  71. BIN
      images/index_top_menu_sec_2.jpg
  72. BIN
      images/index_top_menu_sec_3.jpg
  73. BIN
      images/index_top_menu_sec_4.jpg
  74. BIN
      images/kind_icon_neibu.png
  75. BIN
      images/kind_icon_vip.png
  76. BIN
      images/kind_n.png
  77. BIN
      images/kind_pre.png
  78. BIN
      images/kind_top_box.png
  79. BIN
      images/kind_top_man.png
  80. BIN
      images/kind_top_woman.png
  81. BIN
      images/list_right_btn_top.png
  82. BIN
      images/liulan.png
  83. BIN
      images/liulan_gray.png
  84. BIN
      images/liulan_icon_n.png
  85. BIN
      images/liulan_icon_pre.png
  86. BIN
      images/loading.gif
  87. BIN
      images/logo.png
  88. BIN
      images/mine_address_icon.png
  89. BIN
      images/mine_collect_icon.png
  90. BIN
      images/mine_coupon_icon.png
  91. BIN
      images/mine_help_icon.png
  92. BIN
      images/mine_jifen_icon.png
  93. BIN
      images/mine_n.png
  94. BIN
      images/mine_pre.png
  95. BIN
      images/mine_service_icon.png
  96. BIN
      images/minus.png
  97. BIN
      images/minus_pre.png
  98. BIN
      images/msg_bg_right.png
  99. BIN
      images/partner/partner_earnings_title.png
  100. 0 0
      images/renmen_search_icon.png

+ 144 - 0
app.js

@@ -0,0 +1,144 @@
+//app.js
+App({
+  data: {
+    deviceInfo: {}
+  },
+
+  onLaunch: function () {
+    var that = this;
+    that.data.deviceInfo = wx.getSystemInfoSync();
+
+    //调用API从本地缓存中获取数据
+    var logs = wx.getStorageSync('logs') || []
+    logs.unshift(Date.now());
+    wx.setStorageSync('logs', logs);
+    wx.clearStorage();
+
+    // 查看是否授权【只有处于授权状态,才可以利用 wx.getUserInfo 获取用户信息】
+    wx.getSetting({
+      success: function (res) {
+        console.log(res);
+        if (res.authSetting['scope.userInfo']) {
+          //对于授权过小程序的用户,获取用户信息
+          that.getUserRole();
+        }
+      }
+    })
+  },
+
+  //获取用户角色
+  getUserRole: function (id) {
+    var that = this;
+    var host = that.globalData.servsers;
+
+    wx.login({
+      success: function (res) {
+        var code = res.code;
+        wx.getUserInfo({
+          withCredentials: true,
+          success: function (res) {
+            that.globalData.userInfo = res.userInfo;
+            wx.request({
+              url: host + "api/distributeSell/getUserRole",
+              data: {
+                code: code,
+                iv: res.iv,
+                encryptedData: res.encryptedData,
+              },
+              method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
+              header: {
+                'content-type': 'application/x-www-form-urlencoded'
+              },
+              success: function (res) {
+                //成功
+                if (res.data.code == '200') {
+                  that.globalData.un_id = res.data.data.user_id;
+                  that.globalData.openid = res.data.data.openid;
+                  that.globalData.isNewUser = false;//不是新用户
+                  that.globalData.userRole = res.data.data.userRole;
+                  that.globalData.userInfo.avatarUrl = res.data.data.icon;
+
+                  var name = res.data.data.name;
+                  name = name.replace(/\?/g, '');
+                  name = unescape(escape(name).replace(/\%uD.{3}/g, ''));
+                  that.globalData.userInfo.nickName = name;
+
+                  if (that.employIdCallback) {
+                    that.employIdCallback(res.data.data.user_id);
+                  }
+
+                  if (that.employIdCallback2) {
+                    that.employIdCallback2(res.data.data.openid);
+                  }
+
+                  if (that.employIdCallbackUser) {
+                    that.employIdCallbackUser(false);
+                  }
+
+                  if (that.employIdCallbackRole) {
+                    that.employIdCallbackRole(res.data.data.userRole);
+                  }
+                }else{
+                  wx.navigateTo({
+                    url: '/pages/authorize/authorize?link=midAutumn',
+                  })
+                }
+                
+                if (res.data.data == '') {
+                  that.globalData.isNewUser = true;//是新用户
+                }
+                if (res == null || res.data == null) {
+                  console.error('网络请求失败');
+                  return;
+                }
+              }
+            });
+
+          },
+          fail: function (e) {
+            console.log("需重新授权");
+          }
+        })
+
+
+      }
+    });
+  },
+
+  //插入用户信息
+  insertUser:function(e){
+    var that = this;
+    var host = that.globalData.servsers;
+
+    wx.login({
+      success: function (res) {
+        var code = res.code;
+        wx.getUserInfo({
+          withCredentials: true,
+          success: function (res) {
+            that.globalData.userInfo = res.userInfo;
+          }
+        })
+      }
+    })
+  },
+
+
+
+  //设置全局变量
+  globalData: {
+    userInfo: [],
+    un_id:null,
+    open_id: null,
+    openid : null,
+    userRole : '',
+    isNewUser : '',
+    fromUserId : '',//分享者的id
+    fromUserRole : '',//分享者的role
+    //servsers: "https://52yqf.cn/",
+    servsers: "https://www.daliangzao.net/",//正式库
+    //servsers: "https://tt.daliangzao.net/",//测试库
+    appid: 'wxf9a0ddcb8c70b939',//appid
+    secret: 'a009cb3e46c8ecef9c54a50522f11823',//secret
+  }
+})

+ 137 - 0
app.json

@@ -0,0 +1,137 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/midAutumn/midAutumn",
+    "pages/awaitState/awaitState",
+    "pages/partnerShare/partnerShare",
+    "pages/partnerBusinessEarnings/partnerBusinessEarnings",
+    "pages/partnerBusinessRecord/partnerBusinessRecord",
+    "pages/partnerMineEarnings/partnerMineEarnings",
+    "pages/partnerCommonRecord/partnerCommonRecord",
+    "pages/dragonBoatFestival/dragonBoatFestival",
+    "pages/bindingPhone/bindingPhone",
+    "pages/dragonBoatFestivalInfor/dragonBoatFestivalInfor",
+    "pages/childrensDay/childrensDay",
+    "pages/fatherDay/fatherDay",
+    "pages/changePattern/changePattern",
+    "pages/newYears/newYears",
+    "pages/goodsAllList/goodsAllList",
+    "pages/find/index",
+    "pages/kind/index",
+    "pages/car/index",
+    "pages/carInsert/carInsert",
+    "pages/mine/mine",
+    "pages/mineCollect/mineCollect",
+    "pages/mineInvite/invite",
+    "pages/mineCoupon/coupon",
+    "pages/mineAddress/mineAddress",
+    "pages/editAddress/editAddress",
+    "pages/selectAddress/selectAddress",
+    "pages/mineHelp/index",
+    "pages/search/search",
+    "pages/orders/orders_index",
+    "pages/confirmOrder/confirmOrder",
+    "pages/kindList/kindList",
+    "pages/searchList/searchList",
+    "pages/addAddress/addAddress",
+    "pages/problemList/problemList",
+    "pages/feedback/feedback",
+    "pages/allGiftList/allGiftList",
+    "pages/articleInfor/articleInfor",
+    "pages/brandList/brandList",
+    "pages/brandInfor/brandInfor",
+    "pages/kindSecondList/kindSecondList",
+    "pages/buy/buy",
+    "pages/buyOnly/buyOnly",
+    "pages/buyMoonCake/buyMoonCake",
+    "pages/confirmedList/confirmedList",
+    "pages/orderList/orderList",
+    "pages/mineInviteAward/mineInviteAward",
+    "pages/newkindList/newkindList",
+    "pages/recommendList/recommendList",
+    "pages/problemInfor/problemInfor",
+    "pages/invoiceInfor/invoiceInfor",
+    "pages/mineAddress2/index2",
+    "pages/problemListCont1/problemListCont1",
+    "pages/problemListCont2/problemListCont2",
+    "pages/problemListCont3/problemListCont3",
+    "pages/problemListCont4/problemListCont4",
+    "pages/problemListCont6/problemListCont6",
+    "pages/wuliu/wuliu",
+    "pages/share/share",
+    "pages/shareGift/shareGift",
+    "pages/shareState/shareState",
+    "pages/awaitStateFromList/awaitStateFromList",
+    "pages/giftList/giftList",
+    "pages/sendOwnAddress/sendOwnAddress",
+    "pages/editAddressSendOwn/editAddressSendOwn",
+    "pages/addAddressSendOwn/addAddressSendOwn",
+    "pages/webview/webview",
+    "pages/serviceCont/serviceCont",
+    "pages/jianshe/jianshe",
+    "pages/addAddressFriend/addAddressFriend",
+    "pages/patternMenu/patternMenu",
+    "pages/patternList/patternList",
+    "pages/aboutUs/aboutUs",
+    "pages/girlsDayInfo/girlsDayInfo",
+    "pages/goodsGift/goodsGift",
+    "pages/mineGiftList/mineGiftList",
+    "pages/indepCoupon/indepCoupon",
+    "pages/indepCoupon2/indepCoupon2",
+    "pages/indepCoupon3/indepCoupon3",
+    "pages/sakuraDay/sakuraDay",
+    "pages/girlsDay/girlsDay",
+    "pages/confirmOrderOnly/confirmOrderOnly",
+    "pages/authorize/authorize",
+    "pages/eachGiftInfor/eachGiftInfor",
+    "pages/midAutumnFestival/midAutumnFestival"
+    
+  ],
+  "window": {
+    "backgroundTextStyle": "white",
+    "navigationBarTextStyle": "white",
+    "navigationBarTitleText": "大良造",
+    "navigationBarBackgroundColor": "#252a2d",
+    "backgroundColor": "#fff",
+    "enablePullDownRefresh": false
+  },
+  "tabBar": {
+    "color": "#fff",
+    "selectedColor": "#b4a078",
+    "borderStyle": "white",
+    "backgroundColor": "#1a1d1f",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath": "images/index_n.png",
+        "selectedIconPath": "images/index_pre.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/find/index",
+        "iconPath": "images/find_n.png",
+        "selectedIconPath": "images/find_pre.png",
+        "text": "发现"
+      },
+      {
+        "pagePath": "pages/kind/index",
+        "iconPath": "images/kind_n.png",
+        "selectedIconPath": "images/kind_pre.png",
+        "text": "分类"
+      },
+      {
+        "pagePath": "pages/car/index",
+        "iconPath": "images/shopping_n.png",
+        "selectedIconPath": "images/shopping_pre.png",
+        "text": "购物车"
+      },
+      {
+        "pagePath": "pages/mine/mine",
+        "iconPath": "images/mine_n.png",
+        "selectedIconPath": "images/mine_pre.png",
+        "text": "个人"
+      }
+    ]
+  },
+  "debug": true
+}

+ 111 - 0
app.wxss

@@ -0,0 +1,111 @@
+/**app.wxss**/
+.container {
+    font-family:"Microsoft Yahei",Tahoma,Arial,Helvetica,STHeiti;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    box-sizing: border-box;
+}
+
+page {
+    background-color: #e2e2e2;
+}
+.no_border{
+  border:0px none;
+}
+.clearfix{
+    clear:both;
+    zoom: 1;
+}
+.clearfix:after {
+    content: "";
+    height: 0;
+    display: block;
+    overflow: hidden;
+    clear: both;
+}
+.navigator-hover{
+  background-color: transparent;
+  opacity: 1;
+}
+
+/* button - share */
+button[plain] {
+  color:#353535;
+  border:0px none;
+  background-color:transparent;
+}
+
+
+/* 提示弹窗 */
+.modal_wrap{
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: 999999;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.modal{
+  max-width: 600rpx;
+  font-size: 28rpx;
+  color:#fff;
+  padding:15rpx 20rpx;
+  background-color: rgba(0,0,0,0.6);
+}
+.hidden{
+   display: none; 
+}
+.modal_bg{
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top:0;
+  left:0;
+  z-index: 11;
+  background-color: rgba(0,0,0,0.5);
+}
+.loading{
+  text-align: center;
+  font-size: 30rpx;
+  line-height: 60rpx;
+  color: #c8c8c8;
+}
+
+/* 返回首页 */
+.back_btn{
+  position: fixed;
+  right: 22rpx;
+  bottom:118rpx ;
+  z-index: 20;
+}
+.back_btn_hidden{
+   display: none; 
+}
+.back_btn_icon{
+  display: block;
+  width: 80rpx;
+  height: 80rpx;
+}
+button.form_button{
+  background-color: transparent;
+  padding: 0;
+  margin: 0;
+  display: inline;
+  position: static;
+  border: 0;
+  font-size:0;
+  color:transparent;
+}
+button.form_button::after{
+  content:'';
+  width:0;
+  height: 0;
+  -webkit-transform:scale(1);
+  transform:scale(1);
+  display:none;
+  background-color:transparent;
+}

BIN
images/add.png


BIN
images/add_address.png


BIN
images/add_pre.png


BIN
images/address_delete.png


BIN
images/address_logo.png


BIN
images/address_msg_addr.png


BIN
images/address_msg_addr_more.png


BIN
images/address_msg_name.png


BIN
images/address_msg_tel.png


BIN
images/address_pre.png


BIN
images/all_gift_btn.png


BIN
images/await_icon.png


BIN
images/award_icon.png


BIN
images/black_more.png


BIN
images/black_more_2.png


BIN
images/bug_dz_service_icon.jpg


BIN
images/bug_share_icon.png


BIN
images/business_icon.png


BIN
images/buy_cart_num.png


BIN
images/buy_choose_icon.png


BIN
images/buy_service_each_icon.png


BIN
images/buy_service_icon.png


BIN
images/cart_choose_n.png


BIN
images/cart_choose_pre.png


BIN
images/change_liulan.png


BIN
images/change_msg_bg.png


BIN
images/close_gray_icon.png


BIN
images/close_icon_gray.png


BIN
images/close_icon_white.png


BIN
images/collect_icon_n.png


BIN
images/collect_icon_pre.png


BIN
images/coupon_logo_20180412.png


BIN
images/def_photo.png


BIN
images/delete.png


BIN
images/dingzhi_bg.jpg


BIN
images/dingzhi_null.png


BIN
images/dlz-logo.png


BIN
images/dragon_boat_festival_icon.png


BIN
images/find_img_bg.png


BIN
images/find_n.png


BIN
images/find_pre.png


BIN
images/gift_get_bg.png


BIN
images/gift_get_btn.png


BIN
images/goods_footer_cart.png


BIN
images/goods_footer_kefu.png


BIN
images/goods_infor_down_icon.png


BIN
images/goods_like_n.png


BIN
images/gray_back.png


BIN
images/gray_more_2.png


BIN
images/gray_search.png


BIN
images/home_search_icon.png


BIN
images/img_left_bg.png


BIN
images/index_close_coupon.png


BIN
images/index_coupon_each_left.png


BIN
images/index_coupon_each_right.png


BIN
images/index_menu_sec_0.png


BIN
images/index_menu_sec_1.png


BIN
images/index_menu_sec_2.png


BIN
images/index_menu_sec_3.png


BIN
images/index_menu_sec_4.png


BIN
images/index_n.png


BIN
images/index_pre.png


BIN
images/index_search_icon.png


BIN
images/index_title_bg_1.png


BIN
images/index_title_bg_2.png


BIN
images/index_top_menu_sec_0.jpg


BIN
images/index_top_menu_sec_1.jpg


BIN
images/index_top_menu_sec_2.jpg


BIN
images/index_top_menu_sec_3.jpg


BIN
images/index_top_menu_sec_4.jpg


BIN
images/kind_icon_neibu.png


BIN
images/kind_icon_vip.png


BIN
images/kind_n.png


BIN
images/kind_pre.png


BIN
images/kind_top_box.png


BIN
images/kind_top_man.png


BIN
images/kind_top_woman.png


BIN
images/list_right_btn_top.png


BIN
images/liulan.png


BIN
images/liulan_gray.png


BIN
images/liulan_icon_n.png


BIN
images/liulan_icon_pre.png


BIN
images/loading.gif


BIN
images/logo.png


BIN
images/mine_address_icon.png


BIN
images/mine_collect_icon.png


BIN
images/mine_coupon_icon.png


BIN
images/mine_help_icon.png


BIN
images/mine_jifen_icon.png


BIN
images/mine_n.png


BIN
images/mine_pre.png


BIN
images/mine_service_icon.png


BIN
images/minus.png


BIN
images/minus_pre.png


BIN
images/msg_bg_right.png


BIN
images/partner/partner_earnings_title.png


+ 0 - 0
images/renmen_search_icon.png


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov