作者 liaolinfeng

提交

@@ -3,77 +3,25 @@ var e = require("./utils/network.js"); @@ -3,77 +3,25 @@ var e = require("./utils/network.js");
3 require("./utils/util.js"); 3 require("./utils/util.js");
4 4
5 App({ 5 App({
6 - onLaunch: function() {  
7 - wx.login({  
8 - success: function(s) {  
9 - if (s.code) {  
10 - var o = s.code;  
11 - wx.getSetting({  
12 - success: function(s) {  
13 - s.authSetting["scope.userInfo"] || wx.authorize({  
14 - scope: "scope.userInfo",  
15 - success: function() {  
16 - wx.getUserInfo ? wx.getUserInfo({  
17 - success: function(s) {  
18 - wx.showToast({  
19 - title: "加载中",  
20 - icon: "loading",  
21 - duration: 1500,  
22 - mask: !0  
23 - });  
24 - var t = s.userInfo;  
25 - wx.setStorage({  
26 - key: "userInfo",  
27 - data: t  
28 - }), wx.getStorage({  
29 - key: "userInfo",  
30 - success: function(s) {  
31 - console.log(s), e.POST({  
32 - url: "User/register",  
33 - header: "application/x-www-form-urlencoded",  
34 - params: {  
35 - code: o,  
36 - nickname: s.data.nickName,  
37 - headimg: s.data.avatarUrl  
38 - },  
39 - success: function(e) {  
40 - var s = e.data.ouid;  
41 - wx.setStorage({  
42 - key: "ouid",  
43 - data: s,  
44 - success: function(e) {  
45 - console.log(e), wx.hideToast(), wx.showToast({  
46 - title: "登录成功!",  
47 - icon: "success",  
48 - mask: !0,  
49 - duration: 1e3  
50 - });  
51 - }  
52 - });  
53 - }  
54 - });  
55 - }  
56 - });  
57 - }  
58 - }) : wx.showToast({  
59 - title: "版本过低",  
60 - icon: "none"  
61 - });  
62 - },  
63 - fail: function() {  
64 - var e = new Object();  
65 - e.userid = "", wx.setStorage({  
66 - key: "userInfo",  
67 - data: e  
68 - });  
69 - }  
70 - }), wx.hideToast();  
71 - }  
72 - });  
73 - }  
74 - }  
75 - });  
76 - }, 6 + onLaunch: function (options) {
  7 + console.log('onLaunch');
  8 +
  9 + },
  10 + onShow:function(options){
  11 + let that=this;
  12 + if (options.scene !=undefined){
  13 + this.globalData.scene = options.scene;
  14 + var scene = [1007, 1008];
  15 + var indexof = scene.indexOf(options.scene);
  16 + if (indexof == -1) {
  17 + //场景不在在数组中的处理
  18 + that.globalData.share_id = 0;
  19 + } else {
  20 +
  21 + }
  22 + }
  23 +
  24 + },
77 uploadimg: function(e) { 25 uploadimg: function(e) {
78 var s = this, o = e.i ? e.i : 0, t = e.success ? e.success : 0, a = e.fail ? e.fail : 0; 26 var s = this, o = e.i ? e.i : 0, t = e.success ? e.success : 0, a = e.fail ? e.fail : 0;
79 wx.uploadFile({ 27 wx.uploadFile({
@@ -93,5 +41,10 @@ App({ @@ -93,5 +41,10 @@ App({
93 ++o == e.path.length || (e.i = o, e.success = t, e.fail = a, s.uploadimg(e)); 41 ++o == e.path.length || (e.i = o, e.success = t, e.fail = a, s.uploadimg(e));
94 } 42 }
95 }); 43 });
96 - } 44 + },
  45 +
  46 + globalData: {
  47 + userInfo: null,
  48 + share_id:0,
  49 + }
97 }); 50 });
1 { 1 {
2 - "pages": [  
3 - "pages/index/index",  
4 - "pages/index/search/search",  
5 - "pages/classify/classify",  
6 - "pages/my/my",  
7 - "pages/cart/cart",  
8 - "pages/my/comment/comment",  
9 - "pages/my/payment/payment",  
10 - "pages/my/delivery/delivery",  
11 - "pages/my/shipped/shipped",  
12 - "pages/my/completed/completed",  
13 - "pages/my/pay/pay",  
14 - "pages/my/myoder/myoder",  
15 - "pages/classify/detail/detail",  
16 - "pages/index/goodsdetail/goodsdetail",  
17 - "pages/index/discuss/discuss",  
18 - "pages/index/paydetail/paydetail",  
19 - "pages/template/template",  
20 - "pages/my/logistic/logistic"  
21 - ],  
22 - "window": {  
23 - "backgroundTextStyle": "light",  
24 - "navigationBarBackgroundColor": "#fff",  
25 - "navigationBarTitleText": "礼寓Leemoral",  
26 - "navigationBarTextStyle": "black"  
27 - },  
28 - "tabBar": {  
29 - "selectedColor": "#ffb866",  
30 - "list": [  
31 - {  
32 - "text": "首页",  
33 - "pagePath": "pages/index/index",  
34 - "iconPath": "pages/src/img/nav02.png",  
35 - "selectedIconPath": "pages/src/img/nav_02.png"  
36 - },  
37 - {  
38 - "text": "分类",  
39 - "pagePath": "pages/classify/classify",  
40 - "iconPath": "pages/src/img/nav03.png",  
41 - "selectedIconPath": "pages/src/img/nav_04.png"  
42 - },  
43 - {  
44 - "text": "购物车",  
45 - "pagePath": "pages/cart/cart",  
46 - "iconPath": "pages/src/img/nav04.png",  
47 - "selectedIconPath": "pages/src/img/nav_06.png"  
48 - },  
49 - {  
50 - "text": "我的",  
51 - "pagePath": "pages/my/my",  
52 - "iconPath": "pages/src/img/nav05.png",  
53 - "selectedIconPath": "pages/src/img/nav_08.png"  
54 - }  
55 - ]  
56 - },  
57 - "networkTimeout": {  
58 - "request": 1000,  
59 - "connectSocket": 1000,  
60 - "uploadFile": 1000,  
61 - "downloadFile": 1000  
62 - },  
63 - "debug": true 2 + "pages": [
  3 + "pages/start/start",
  4 + "pages/index/index",
  5 + "pages/index/search/search",
  6 + "pages/classify/classify",
  7 + "pages/my/my",
  8 + "pages/cart/cart",
  9 + "pages/my/comment/comment",
  10 + "pages/my/payment/payment",
  11 + "pages/my/delivery/delivery",
  12 + "pages/my/shipped/shipped",
  13 + "pages/my/completed/completed",
  14 + "pages/my/pay/pay",
  15 + "pages/my/myoder/myoder",
  16 + "pages/classify/detail/detail",
  17 + "pages/index/goodsdetail/goodsdetail",
  18 + "pages/index/discuss/discuss",
  19 + "pages/index/paydetail/paydetail",
  20 + "pages/template/template",
  21 + "pages/my/logistic/logistic",
  22 + "pages/invoice/invoice",
  23 + "pages/my_wallet/my_wallet",
  24 + "pages/my_walletlog/my_walletlog"
  25 + ],
  26 + "window": {
  27 + "backgroundTextStyle": "light",
  28 + "navigationBarBackgroundColor": "#fff",
  29 + "navigationBarTitleText": "搭咕商城",
  30 + "navigationBarTextStyle": "black"
  31 + },
  32 + "tabBar": {
  33 + "selectedColor": "#FF87B1",
  34 + "list": [
  35 + {
  36 + "text": "首页",
  37 + "pagePath": "pages/index/index",
  38 + "iconPath": "pages/imgs/nav01@2x.png",
  39 + "selectedIconPath": "pages/imgs/nav02@2x.png"
  40 + },
  41 + {
  42 + "text": "分类",
  43 + "pagePath": "pages/classify/classify",
  44 + "iconPath": "pages/imgs/nav03@2x.png",
  45 + "selectedIconPath": "pages/imgs/nav04@2x.png"
  46 + },
  47 + {
  48 + "text": "购物车",
  49 + "pagePath": "pages/cart/cart",
  50 + "iconPath": "pages/imgs/nav05@2x.png",
  51 + "selectedIconPath": "pages/imgs/nav06@2x.png"
  52 + },
  53 + {
  54 + "text": "会员中心",
  55 + "pagePath": "pages/my/my",
  56 + "iconPath": "pages/imgs/nav07@2x.png",
  57 + "selectedIconPath": "pages/imgs/nav08@2x.png"
  58 + }
  59 + ]
  60 + },
  61 + "networkTimeout": {
  62 + "request": 1000,
  63 + "connectSocket": 1000,
  64 + "uploadFile": 1000,
  65 + "downloadFile": 1000
  66 + },
  67 + "debug": true
64 } 68 }
@@ -97,7 +97,7 @@ input,textarea { @@ -97,7 +97,7 @@ input,textarea {
97 margin: 16rpx auto; 97 margin: 16rpx auto;
98 border-radius: 30rpx; 98 border-radius: 30rpx;
99 display: flex; 99 display: flex;
100 - padding: 18rpx 20rpx; 100 + padding: 12rpx 20rpx;
101 font-size: 24rpx; 101 font-size: 24rpx;
102 align-items: center; 102 align-items: center;
103 position: fixed; 103 position: fixed;
@@ -114,7 +114,7 @@ input,textarea { @@ -114,7 +114,7 @@ input,textarea {
114 } 114 }
115 115
116 .index_box { 116 .index_box {
117 - padding: 26rpx 20rpx; 117 + padding: 18rpx 20rpx;
118 align-items: stretch; 118 align-items: stretch;
119 } 119 }
120 120
@@ -288,7 +288,7 @@ input,textarea { @@ -288,7 +288,7 @@ input,textarea {
288 } 288 }
289 289
290 .payactive { 290 .payactive {
291 - border-bottom: 2rpx solid #e91b1d; 291 + border-bottom: 2rpx solid #E91B1D;
292 } 292 }
293 293
294 .payorder { 294 .payorder {
@@ -347,7 +347,7 @@ input,textarea { @@ -347,7 +347,7 @@ input,textarea {
347 } 347 }
348 348
349 .rightprice { 349 .rightprice {
350 - color: #f00; 350 + color: #FF87B1;
351 } 351 }
352 352
353 .rightnum { 353 .rightnum {
@@ -365,8 +365,8 @@ input,textarea { @@ -365,8 +365,8 @@ input,textarea {
365 365
366 .gopay text { 366 .gopay text {
367 padding: 14rpx 32rpx; 367 padding: 14rpx 32rpx;
368 - border: 1px solid #f00;  
369 - color: #f00; 368 + border: 1px solid #FF87B1;
  369 + color: #FF87B1;
370 border-radius: 5rpx; 370 border-radius: 5rpx;
371 font-size: 26rpx; 371 font-size: 26rpx;
372 margin: 0 0 0 25rpx; 372 margin: 0 0 0 25rpx;
@@ -381,6 +381,7 @@ input,textarea { @@ -381,6 +381,7 @@ input,textarea {
381 } 381 }
382 382
383 .goodsList { 383 .goodsList {
  384 + width: 100%;
384 background-color: #f5f9fa; 385 background-color: #f5f9fa;
385 padding: 16rpx 24rpx; 386 padding: 16rpx 24rpx;
386 box-sizing: border-box; 387 box-sizing: border-box;
@@ -392,7 +393,7 @@ input,textarea { @@ -392,7 +393,7 @@ input,textarea {
392 margin-bottom: 16rpx; 393 margin-bottom: 16rpx;
393 background-color: #fff; 394 background-color: #fff;
394 font-size: 24rpx; 395 font-size: 24rpx;
395 - width: 343rpx; 396 + width: 340rpx;
396 } 397 }
397 398
398 .goods_box image { 399 .goods_box image {
@@ -404,6 +405,8 @@ input,textarea { @@ -404,6 +405,8 @@ input,textarea {
404 text-overflow: ellipsis; 405 text-overflow: ellipsis;
405 padding: 0 8rpx; 406 padding: 0 8rpx;
406 margin-top: 32rpx; 407 margin-top: 32rpx;
  408 + color:#000;
  409 + font-size:24rpx;
407 display: -webkit-box; 410 display: -webkit-box;
408 -webkit-box-orient: vertical; 411 -webkit-box-orient: vertical;
409 -webkit-line-clamp: 1; 412 -webkit-line-clamp: 1;
@@ -413,13 +416,15 @@ input,textarea { @@ -413,13 +416,15 @@ input,textarea {
413 } 416 }
414 417
415 .price { 418 .price {
416 - color: #f00;  
417 - padding: 0 8rpx; 419 + color: #FF87B1;
  420 + padding: 0 18rpx 0 8rpx;
  421 + font-size:30rpx;
418 } 422 }
419 423
420 .old_price { 424 .old_price {
421 text-decoration: line-through; 425 text-decoration: line-through;
422 color: #666; 426 color: #666;
  427 + font-size:24rpx;
423 } 428 }
424 429
425 .waterfall { 430 .waterfall {
@@ -518,7 +523,7 @@ input,textarea { @@ -518,7 +523,7 @@ input,textarea {
518 display: flex; 523 display: flex;
519 align-items: center; 524 align-items: center;
520 justify-content: space-between; 525 justify-content: space-between;
521 - padding: 10rpx 10rpx 10rpx 0; 526 + padding: 30rpx 10rpx 30rpx 0;
522 } 527 }
523 528
524 .price_box_month text { 529 .price_box_month text {
@@ -64,28 +64,41 @@ Page({ @@ -64,28 +64,41 @@ Page({
64 ouid: e.data.ouid 64 ouid: e.data.ouid
65 }, 65 },
66 success: function(t) { 66 success: function(t) {
  67 + let totalnum=0;
  68 + let ids='';
  69 + var a = [];
67 if (t.data.cars) { 70 if (t.data.cars) {
68 - var a = []; 71 +
69 a = t.data.cars; 72 a = t.data.cars;
70 - for (var i = 0; i < a.length; i++) a[i].selected = !1; 73 + for (var obj of a){
  74 + if (obj.selected){
  75 + totalnum++;
  76 + ids += obj.id+','
  77 + }
  78 + }
71 } 79 }
72 e.setData({ 80 e.setData({
73 - carlist: a 81 + carlist: a,
  82 + totalnum: totalnum,
  83 + ids:ids
74 }); 84 });
  85 + e.getTotalPrice();
75 } 86 }
76 }); 87 });
77 }, 88 },
78 - selectList: function(t) {  
79 - var a = [], e = [], i = t.currentTarget.dataset.index, s = this.data.carlist, c = s[i].selected;  
80 - s[i].selected = !c;  
81 - for (var n = 0; n < this.data.carlist.length; n++) 1 == this.data.carlist[n].selected && (a.push(this.data.carlist[n].selected),  
82 - e.push(this.data.carlist[n].id));  
83 - this.setData({  
84 - carlist: s,  
85 - selected: c,  
86 - totalnum: a.length,  
87 - ids: e.join(",")  
88 - }), this.getTotalPrice(); 89 + selectList: function(e) {
  90 + let that=this;
  91 + t.POST({
  92 + url: "pay/selected",
  93 + header: "application/x-www-form-urlencoded",
  94 + params: {
  95 + ouid: that.data.ouid,
  96 + id: e.currentTarget.dataset.id
  97 + },
  98 + success: function (e) {
  99 + that.getcartlist();
  100 + }
  101 + });
89 }, 102 },
90 getTotalPrice: function() { 103 getTotalPrice: function() {
91 for (var t = this.data.carlist, a = 0, e = 0; e < t.length; e++) t[e].selected && (a += t[e].count * t[e].pprice); 104 for (var t = this.data.carlist, a = 0, e = 0; e < t.length; e++) t[e].selected && (a += t[e].count * t[e].pprice);
@@ -150,5 +163,30 @@ Page({ @@ -150,5 +163,30 @@ Page({
150 onUnload: function() {}, 163 onUnload: function() {},
151 onPullDownRefresh: function() {}, 164 onPullDownRefresh: function() {},
152 onReachBottom: function() {}, 165 onReachBottom: function() {},
153 - onShareAppMessage: function() {} 166 + onShareAppMessage: function (options) {
  167 + let that = this;
  168 + let ouid;
  169 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  170 + var shareObj = {
  171 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  172 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  173 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  174 + success: function (res) {
  175 + // 转发成功之后的回调
  176 + if (res.errMsg == 'shareAppMessage:ok') { }
  177 + },
  178 + fail: function () {
  179 + // 转发失败之后的回调
  180 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  181 + // 用户取消转发
  182 + } else if (res.errMsg == 'shareAppMessage:fail') {
  183 + // 转发失败,其中 detail message 为详细失败信息
  184 + }
  185 + },
  186 + complete: function () {
  187 + // 转发结束之后的回调(转发成不成功都会执行)
  188 + }
  189 + }
  190 + return shareObj;
  191 + },
154 }); 192 });
@@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
3 </view> 3 </view>
4 <view class="carts" wx:else> 4 <view class="carts" wx:else>
5 <view class="cartitem" wx:for="{{carlist}}" wx:key="{{item.id}}"> 5 <view class="cartitem" wx:for="{{carlist}}" wx:key="{{item.id}}">
6 - <view bindtap="selectList" class="cartbox" data-index="{{index}}" wx:if="{{item.selected}}"> 6 + <view bindtap="selectList" class="cartbox" data-id="{{item.id}}" wx:if="{{item.selected}}">
7 <view class=" iconfont icon-duihao-copy"></view> 7 <view class=" iconfont icon-duihao-copy"></view>
8 </view> 8 </view>
9 - <view bindtap="selectList" class="cartbox" data-index="{{index}}" wx:else></view> 9 + <view bindtap="selectList" class="cartbox" data-id="{{item.id}}" wx:else></view>
10 <navigator class="cartimg" url="../index/goodsdetail/goodsdetail?id={{item.gid}}"> 10 <navigator class="cartimg" url="../index/goodsdetail/goodsdetail?id={{item.gid}}">
11 <image src="{{item.thumb}}"></image> 11 <image src="{{item.thumb}}"></image>
12 </navigator> 12 </navigator>
@@ -88,12 +88,12 @@ page { @@ -88,12 +88,12 @@ page {
88 88
89 .del { 89 .del {
90 font-size: 24rpx; 90 font-size: 24rpx;
91 - color: #f00; 91 + color: #FF87B1;
92 } 92 }
93 93
94 .prices { 94 .prices {
95 font-size: 32rpx; 95 font-size: 32rpx;
96 - color: #f00; 96 + color: #FF87B1;
97 margin: 0 0 0 32rpx; 97 margin: 0 0 0 32rpx;
98 } 98 }
99 99
@@ -121,7 +121,7 @@ page { @@ -121,7 +121,7 @@ page {
121 padding: 33rpx 0; 121 padding: 33rpx 0;
122 text-align: center; 122 text-align: center;
123 width: 250rpx; 123 width: 250rpx;
124 - background-color: #d70000; 124 + background-color: #FF87B1;
125 color: #fff; 125 color: #fff;
126 font-size: 36rpx; 126 font-size: 36rpx;
127 } 127 }
@@ -34,5 +34,30 @@ Page({ @@ -34,5 +34,30 @@ Page({
34 onUnload: function() {}, 34 onUnload: function() {},
35 onPullDownRefresh: function() {}, 35 onPullDownRefresh: function() {},
36 onReachBottom: function() {}, 36 onReachBottom: function() {},
37 - onShareAppMessage: function() {} 37 + onShareAppMessage: function (options) {
  38 + let that = this;
  39 + let ouid;
  40 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  41 + var shareObj = {
  42 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  43 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  44 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  45 + success: function (res) {
  46 + // 转发成功之后的回调
  47 + if (res.errMsg == 'shareAppMessage:ok') { }
  48 + },
  49 + fail: function () {
  50 + // 转发失败之后的回调
  51 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  52 + // 用户取消转发
  53 + } else if (res.errMsg == 'shareAppMessage:fail') {
  54 + // 转发失败,其中 detail message 为详细失败信息
  55 + }
  56 + },
  57 + complete: function () {
  58 + // 转发结束之后的回调(转发成不成功都会执行)
  59 + }
  60 + }
  61 + return shareObj;
  62 + },
38 }); 63 });
@@ -113,5 +113,30 @@ Page({ @@ -113,5 +113,30 @@ Page({
113 onUnload: function() {}, 113 onUnload: function() {},
114 onPullDownRefresh: function() {}, 114 onPullDownRefresh: function() {},
115 onReachBottom: function() {}, 115 onReachBottom: function() {},
116 - onShareAppMessage: function() {} 116 + onShareAppMessage: function (options) {
  117 + let that = this;
  118 + let ouid;
  119 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  120 + var shareObj = {
  121 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  122 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  123 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  124 + success: function (res) {
  125 + // 转发成功之后的回调
  126 + if (res.errMsg == 'shareAppMessage:ok') { }
  127 + },
  128 + fail: function () {
  129 + // 转发失败之后的回调
  130 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  131 + // 用户取消转发
  132 + } else if (res.errMsg == 'shareAppMessage:fail') {
  133 + // 转发失败,其中 detail message 为详细失败信息
  134 + }
  135 + },
  136 + complete: function () {
  137 + // 转发结束之后的回调(转发成不成功都会执行)
  138 + }
  139 + }
  140 + return shareObj;
  141 + },
117 }); 142 });
@@ -54,5 +54,5 @@ page { @@ -54,5 +54,5 @@ page {
54 } 54 }
55 55
56 .active { 56 .active {
57 - color: #ffb866; 57 + color: #FF87B1;
58 } 58 }
@@ -46,5 +46,30 @@ Page({ @@ -46,5 +46,30 @@ Page({
46 onUnload: function() {}, 46 onUnload: function() {},
47 onPullDownRefresh: function() {}, 47 onPullDownRefresh: function() {},
48 onReachBottom: function() {}, 48 onReachBottom: function() {},
49 - onShareAppMessage: function() {} 49 + onShareAppMessage: function (options) {
  50 + let that = this;
  51 + let ouid;
  52 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  53 + var shareObj = {
  54 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  55 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  56 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  57 + success: function (res) {
  58 + // 转发成功之后的回调
  59 + if (res.errMsg == 'shareAppMessage:ok') { }
  60 + },
  61 + fail: function () {
  62 + // 转发失败之后的回调
  63 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  64 + // 用户取消转发
  65 + } else if (res.errMsg == 'shareAppMessage:fail') {
  66 + // 转发失败,其中 detail message 为详细失败信息
  67 + }
  68 + },
  69 + complete: function () {
  70 + // 转发结束之后的回调(转发成不成功都会执行)
  71 + }
  72 + }
  73 + return shareObj;
  74 + },
50 }); 75 });
@@ -237,7 +237,8 @@ Page({ @@ -237,7 +237,8 @@ Page({
237 ouid: this.data.ouid, 237 ouid: this.data.ouid,
238 gid: this.data.id, 238 gid: this.data.id,
239 standard: this.data.selectName, 239 standard: this.data.selectName,
240 - count: this.data.num 240 + count: this.data.num,
  241 +
241 }, 242 },
242 success: function(t) { 243 success: function(t) {
243 if (t.data.state = "success") { 244 if (t.data.state = "success") {
@@ -300,5 +301,31 @@ Page({ @@ -300,5 +301,31 @@ Page({
300 o = t, this.setData({ 301 o = t, this.setData({
301 selectName: o 302 selectName: o
302 }); 303 });
  304 + },
  305 + onShareAppMessage: function (options) {
  306 + let that = this;
  307 + let ouid;
  308 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  309 + var shareObj = {
  310 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  311 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  312 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  313 + success: function (res) {
  314 + // 转发成功之后的回调
  315 + if (res.errMsg == 'shareAppMessage:ok') { }
  316 + },
  317 + fail: function () {
  318 + // 转发失败之后的回调
  319 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  320 + // 用户取消转发
  321 + } else if (res.errMsg == 'shareAppMessage:fail') {
  322 + // 转发失败,其中 detail message 为详细失败信息
303 } 323 }
  324 + },
  325 + complete: function () {
  326 + // 转发结束之后的回调(转发成不成功都会执行)
  327 + }
  328 + }
  329 + return shareObj;
  330 + },
304 }); 331 });
@@ -39,7 +39,7 @@ page { @@ -39,7 +39,7 @@ page {
39 .nowprice text { 39 .nowprice text {
40 font-weight: 600; 40 font-weight: 600;
41 font-size: 36rpx; 41 font-size: 36rpx;
42 - color: #f00; 42 + color: #FF87B1;
43 } 43 }
44 44
45 .nowprice .oldprice { 45 .nowprice .oldprice {
@@ -95,7 +95,7 @@ page { @@ -95,7 +95,7 @@ page {
95 } 95 }
96 96
97 .typecolor .actvietext { 97 .typecolor .actvietext {
98 - background-color: #ffad02; 98 + background-color: #FF87B1;
99 color: #fff; 99 color: #fff;
100 } 100 }
101 101
@@ -271,7 +271,7 @@ page { @@ -271,7 +271,7 @@ page {
271 } 271 }
272 272
273 .icon-shoucang1 { 273 .icon-shoucang1 {
274 - color: #f4ea2a; 274 + color: #FF87B1;
275 } 275 }
276 276
277 .imglist { 277 .imglist {
@@ -116,21 +116,30 @@ Page({ @@ -116,21 +116,30 @@ Page({
116 onShow: function() { 116 onShow: function() {
117 this.getbanner(); 117 this.getbanner();
118 }, 118 },
119 - onShareAppMessage: function(a) {  
120 - return a.from, {  
121 - title: "礼寓Leemoral",  
122 - path: "/pages/index/index",  
123 - success: function(a) {  
124 - wx.showToast({  
125 - title: "转发成功"  
126 - });  
127 - },  
128 - fail: function(a) {  
129 - wx.showToast({  
130 - title: "转发取消",  
131 - icon: "none"  
132 - });  
133 - }  
134 - }; 119 + onShareAppMessage: function (options) {
  120 + let that = this;
  121 + let ouid;
  122 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  123 + var shareObj = {
  124 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  125 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  126 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  127 + success: function (res) {
  128 + // 转发成功之后的回调
  129 + if (res.errMsg == 'shareAppMessage:ok') { }
  130 + },
  131 + fail: function () {
  132 + // 转发失败之后的回调
  133 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  134 + // 用户取消转发
  135 + } else if (res.errMsg == 'shareAppMessage:fail') {
  136 + // 转发失败,其中 detail message 为详细失败信息
135 } 137 }
  138 + },
  139 + complete: function () {
  140 + // 转发结束之后的回调(转发成不成功都会执行)
  141 + }
  142 + }
  143 + return shareObj;
  144 + },
136 }); 145 });
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 <text class="old_price">¥{{item.oprice}}</text> 36 <text class="old_price">¥{{item.oprice}}</text>
37 </view> 37 </view>
38 </view> 38 </view>
39 - <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text> 39 + <!-- <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text> -->
40 </navigator> 40 </navigator>
41 </view> 41 </view>
42 </view> 42 </view>
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 <text class="old_price">¥{{item.oprice}}</text> 51 <text class="old_price">¥{{item.oprice}}</text>
52 </view> 52 </view>
53 </view> 53 </view>
54 - <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text> 54 + <!-- <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text> -->
55 </navigator> 55 </navigator>
56 </view> 56 </view>
57 </view> 57 </view>
@@ -40,7 +40,13 @@ Page({ @@ -40,7 +40,13 @@ Page({
40 }); 40 });
41 }, 41 },
42 pay_order: function(a) { 42 pay_order: function(a) {
43 - for (var e = a.currentTarget.dataset.id, o = this.data.info, i = 0, n = 0; n < o.length; n++) i += o[n].count * details[n].pprice; 43 + let i=0;
  44 + let e = a.currentTarget.dataset.id;
  45 + let o = this.data.goods;
  46 + for (let n = 0; n < o.length; n++){
  47 + i += parseInt(o[n].count)* o[n].pprice;
  48 + }
  49 + console.log('jiage',i);
44 t.POST({ 50 t.POST({
45 url: "Pay/pay_order", 51 url: "Pay/pay_order",
46 header: "application/x-www-form-urlencoded", 52 header: "application/x-www-form-urlencoded",
@@ -123,5 +129,30 @@ Page({ @@ -123,5 +129,30 @@ Page({
123 onUnload: function() {}, 129 onUnload: function() {},
124 onPullDownRefresh: function() {}, 130 onPullDownRefresh: function() {},
125 onReachBottom: function() {}, 131 onReachBottom: function() {},
126 - onShareAppMessage: function() {} 132 + onShareAppMessage: function (options) {
  133 + let that = this;
  134 + let ouid;
  135 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  136 + var shareObj = {
  137 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  138 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  139 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  140 + success: function (res) {
  141 + // 转发成功之后的回调
  142 + if (res.errMsg == 'shareAppMessage:ok') { }
  143 + },
  144 + fail: function () {
  145 + // 转发失败之后的回调
  146 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  147 + // 用户取消转发
  148 + } else if (res.errMsg == 'shareAppMessage:fail') {
  149 + // 转发失败,其中 detail message 为详细失败信息
  150 + }
  151 + },
  152 + complete: function () {
  153 + // 转发结束之后的回调(转发成不成功都会执行)
  154 + }
  155 + }
  156 + return shareObj;
  157 + },
127 }); 158 });
@@ -96,14 +96,14 @@ page { @@ -96,14 +96,14 @@ page {
96 } 96 }
97 97
98 .goodsprice { 98 .goodsprice {
99 - color: #f00; 99 + color:#FF87B1;
100 font-size: 30rpx; 100 font-size: 30rpx;
101 } 101 }
102 102
103 .orderbox { 103 .orderbox {
104 background-color: #fff; 104 background-color: #fff;
105 margin: 16rpx 0 200rpx 0; 105 margin: 16rpx 0 200rpx 0;
106 - padding-bottom: 150rpx; 106 + /* padding-bottom: 150rpx; */
107 } 107 }
108 108
109 .orderitem { 109 .orderitem {
@@ -123,17 +123,17 @@ page { @@ -123,17 +123,17 @@ page {
123 } 123 }
124 124
125 .totalprice { 125 .totalprice {
126 - color: #f00; 126 + color: #FF87B1;
127 } 127 }
128 128
129 .del { 129 .del {
130 font-size: 32rpx; 130 font-size: 32rpx;
131 - border: 1px solid #f00; 131 + border: 1px solid #FF87B1;
132 border-radius: 35rpx; 132 border-radius: 35rpx;
133 padding: 15rpx 0; 133 padding: 15rpx 0;
134 text-align: center; 134 text-align: center;
135 width: 200rpx; 135 width: 200rpx;
136 - color: #f00; 136 + color: #FF87B1;
137 } 137 }
138 138
139 .buy { 139 .buy {
@@ -66,5 +66,31 @@ Page({ @@ -66,5 +66,31 @@ Page({
66 searchPageNum: a.data.searchPageNum + 1, 66 searchPageNum: a.data.searchPageNum + 1,
67 isFromSearch: !1 67 isFromSearch: !1
68 }), a.fetchSearchList()); 68 }), a.fetchSearchList());
  69 + },
  70 + onShareAppMessage: function (options) {
  71 + let that = this;
  72 + let ouid;
  73 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  74 + var shareObj = {
  75 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  76 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  77 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  78 + success: function (res) {
  79 + // 转发成功之后的回调
  80 + if (res.errMsg == 'shareAppMessage:ok') { }
  81 + },
  82 + fail: function () {
  83 + // 转发失败之后的回调
  84 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  85 + // 用户取消转发
  86 + } else if (res.errMsg == 'shareAppMessage:fail') {
  87 + // 转发失败,其中 detail message 为详细失败信息
69 } 88 }
  89 + },
  90 + complete: function () {
  91 + // 转发结束之后的回调(转发成不成功都会执行)
  92 + }
  93 + }
  94 + return shareObj;
  95 + },
70 }); 96 });
@@ -93,7 +93,7 @@ Page({ @@ -93,7 +93,7 @@ Page({
93 uploadimg: function() { 93 uploadimg: function() {
94 var t = this.data.pics; 94 var t = this.data.pics;
95 i.uploadimg({ 95 i.uploadimg({
96 - url: "https://leemoral.wx.bronet.cn/index.php/Api/User/upload_wxpic", 96 + url: "https://ailingcheng.cn/index.php/Api/User/upload_wxpic",
97 path: t 97 path: t
98 }); 98 });
99 }, 99 },
@@ -116,5 +116,31 @@ Page({ @@ -116,5 +116,31 @@ Page({
116 current: i[e], 116 current: i[e],
117 urls: i 117 urls: i
118 }); 118 });
  119 + },
  120 + onShareAppMessage: function (options) {
  121 + let that = this;
  122 + let ouid;
  123 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  124 + var shareObj = {
  125 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  126 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  127 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  128 + success: function (res) {
  129 + // 转发成功之后的回调
  130 + if (res.errMsg == 'shareAppMessage:ok') { }
  131 + },
  132 + fail: function () {
  133 + // 转发失败之后的回调
  134 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  135 + // 用户取消转发
  136 + } else if (res.errMsg == 'shareAppMessage:fail') {
  137 + // 转发失败,其中 detail message 为详细失败信息
119 } 138 }
  139 + },
  140 + complete: function () {
  141 + // 转发结束之后的回调(转发成不成功都会执行)
  142 + }
  143 + }
  144 + return shareObj;
  145 + },
120 }); 146 });
@@ -65,6 +65,7 @@ page { @@ -65,6 +65,7 @@ page {
65 height: 330rpx; 65 height: 330rpx;
66 width: 100%; 66 width: 100%;
67 line-height: 44rpx; 67 line-height: 44rpx;
  68 + font-size:28rpx;
68 } 69 }
69 70
70 .comments { 71 .comments {
@@ -56,6 +56,14 @@ Page({ @@ -56,6 +56,14 @@ Page({
56 url: "../comment/comment?odid=" + this.data.odid 56 url: "../comment/comment?odid=" + this.data.odid
57 }); 57 });
58 }, 58 },
  59 + //开发票
  60 + goinvoice(e){
  61 + let that=this;
  62 + let index = parseInt(e.currentTarget.dataset.index) ;
  63 + wx.navigateTo({
  64 + url: "/pages/invoice/invoice?order_id="+e.currentTarget.dataset.id+'&price='+that.data.orders[index].details[0].pprice
  65 + });
  66 + },
59 onLoad: function(e) {}, 67 onLoad: function(e) {},
60 del_order: function(t) { 68 del_order: function(t) {
61 var o = t.currentTarget.dataset.id, a = t.currentTarget.dataset.index, n = this.data.orders, d = this; 69 var o = t.currentTarget.dataset.id, a = t.currentTarget.dataset.index, n = this.data.orders, d = this;
@@ -100,5 +108,30 @@ Page({ @@ -100,5 +108,30 @@ Page({
100 onUnload: function() {}, 108 onUnload: function() {},
101 onPullDownRefresh: function() {}, 109 onPullDownRefresh: function() {},
102 onReachBottom: function() {}, 110 onReachBottom: function() {},
103 - onShareAppMessage: function() {} 111 + onShareAppMessage: function (options) {
  112 + let that = this;
  113 + let ouid;
  114 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  115 + var shareObj = {
  116 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  117 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  118 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  119 + success: function (res) {
  120 + // 转发成功之后的回调
  121 + if (res.errMsg == 'shareAppMessage:ok') { }
  122 + },
  123 + fail: function () {
  124 + // 转发失败之后的回调
  125 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  126 + // 用户取消转发
  127 + } else if (res.errMsg == 'shareAppMessage:fail') {
  128 + // 转发失败,其中 detail message 为详细失败信息
  129 + }
  130 + },
  131 + complete: function () {
  132 + // 转发结束之后的回调(转发成不成功都会执行)
  133 + }
  134 + }
  135 + return shareObj;
  136 + },
104 }); 137 });
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
37 </view> 37 </view>
38 </view> 38 </view>
39 <view class="gopay"> 39 <view class="gopay">
  40 + <text bindtap="goinvoice" data-id="{{item.id}}" data-index="{{index}}" wx:if='{{item.is_up==1}}'>开发票</text>
40 <text bindtap="del_order" data-id="{{item.id}}" data-index="{{index}}">删除订单</text> 41 <text bindtap="del_order" data-id="{{item.id}}" data-index="{{index}}">删除订单</text>
41 </view> 42 </view>
42 </view> 43 </view>
@@ -9,6 +9,6 @@ page { @@ -9,6 +9,6 @@ page {
9 } 9 }
10 10
11 .comment { 11 .comment {
12 - font-size: 24rpx;  
13 - color: #FF0000; 12 + font-size: 26rpx;
  13 + color: #FF87B1;
14 } 14 }
@@ -64,5 +64,30 @@ Page({ @@ -64,5 +64,30 @@ Page({
64 onUnload: function() {}, 64 onUnload: function() {},
65 onPullDownRefresh: function() {}, 65 onPullDownRefresh: function() {},
66 onReachBottom: function() {}, 66 onReachBottom: function() {},
67 - onShareAppMessage: function() {} 67 + onShareAppMessage: function (options) {
  68 + let that = this;
  69 + let ouid;
  70 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  71 + var shareObj = {
  72 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  73 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  74 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  75 + success: function (res) {
  76 + // 转发成功之后的回调
  77 + if (res.errMsg == 'shareAppMessage:ok') { }
  78 + },
  79 + fail: function () {
  80 + // 转发失败之后的回调
  81 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  82 + // 用户取消转发
  83 + } else if (res.errMsg == 'shareAppMessage:fail') {
  84 + // 转发失败,其中 detail message 为详细失败信息
  85 + }
  86 + },
  87 + complete: function () {
  88 + // 转发结束之后的回调(转发成不成功都会执行)
  89 + }
  90 + }
  91 + return shareObj;
  92 + },
68 }); 93 });
@@ -36,5 +36,30 @@ Page({ @@ -36,5 +36,30 @@ Page({
36 onUnload: function() {}, 36 onUnload: function() {},
37 onPullDownRefresh: function() {}, 37 onPullDownRefresh: function() {},
38 onReachBottom: function() {}, 38 onReachBottom: function() {},
39 - onShareAppMessage: function() {} 39 + onShareAppMessage: function (options) {
  40 + let that = this;
  41 + let ouid;
  42 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  43 + var shareObj = {
  44 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  45 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  46 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  47 + success: function (res) {
  48 + // 转发成功之后的回调
  49 + if (res.errMsg == 'shareAppMessage:ok') { }
  50 + },
  51 + fail: function () {
  52 + // 转发失败之后的回调
  53 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  54 + // 用户取消转发
  55 + } else if (res.errMsg == 'shareAppMessage:fail') {
  56 + // 转发失败,其中 detail message 为详细失败信息
  57 + }
  58 + },
  59 + complete: function () {
  60 + // 转发结束之后的回调(转发成不成功都会执行)
  61 + }
  62 + }
  63 + return shareObj;
  64 + },
40 }); 65 });
1 getApp(), require("../../utils/util.js"); 1 getApp(), require("../../utils/util.js");
2 - 2 +var e = require("../../utils/network.js");
3 Page({ 3 Page({
4 data: { 4 data: {
5 - userInfo: [] 5 + userInfo: [],
  6 + unpaynum0:0,
  7 + unpaynum1: 0,
  8 + unpaynum2: 0,
  9 + unpaynum3: 0,
  10 + },
  11 + my_order: function (ouid, status) {
  12 + var t = this;
  13 + e.POST({
  14 + url: "User/my_order",
  15 + header: "application/x-www-form-urlencoded",
  16 + params: {
  17 + ouid: ouid,
  18 + status: status
  19 + },
  20 + success: function (e) {
  21 + if (status == 0){
  22 + t.setData({
  23 + unpaynum0: e.data.orders.length
  24 + })
  25 + } else if (status == 1){
  26 + t.setData({
  27 + unpaynum1: e.data.orders.length
  28 + })
  29 + } else if (status == 2){
  30 + t.setData({
  31 + unpaynum2: e.data.orders.length
  32 + })
  33 + }else{
  34 + t.setData({
  35 + unpaynum3: e.data.orders.length
  36 + })
  37 + }
  38 +
  39 + }
  40 + });
6 }, 41 },
7 payment: function() { 42 payment: function() {
8 wx.navigateTo({ 43 wx.navigateTo({
@@ -34,6 +69,11 @@ Page({ @@ -34,6 +69,11 @@ Page({
34 url: "myoder/myoder" 69 url: "myoder/myoder"
35 }); 70 });
36 }, 71 },
  72 + gomy_wallet(){
  73 + wx.navigateTo({
  74 + url: "../my_wallet/my_wallet"
  75 + });
  76 + },
37 onLoad: function(n) { 77 onLoad: function(n) {
38 var e = this; 78 var e = this;
39 wx.getStorage({ 79 wx.getStorage({
@@ -43,9 +83,18 @@ Page({ @@ -43,9 +83,18 @@ Page({
43 userInfo: n.data 83 userInfo: n.data
44 }); 84 });
45 } 85 }
46 - }), wx.getStorage({ 86 + }),
  87 + wx.getStorage({
47 key: "ouid", 88 key: "ouid",
48 - success: function(n) {} 89 + success: function(n) {
  90 +
  91 + e.my_order(n.data,0);
  92 + e.my_order(n.data, 1);
  93 + e.my_order(n.data, 2);
  94 + e.my_order(n.data, 3);
  95 +
  96 +
  97 + }
49 }); 98 });
50 }, 99 },
51 onReady: function() {}, 100 onReady: function() {},
@@ -54,5 +103,30 @@ Page({ @@ -54,5 +103,30 @@ Page({
54 onUnload: function() {}, 103 onUnload: function() {},
55 onPullDownRefresh: function() {}, 104 onPullDownRefresh: function() {},
56 onReachBottom: function() {}, 105 onReachBottom: function() {},
57 - onShareAppMessage: function() {} 106 + onShareAppMessage: function (options) {
  107 + let that = this;
  108 + let ouid;
  109 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  110 + var shareObj = {
  111 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  112 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  113 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  114 + success: function (res) {
  115 + // 转发成功之后的回调
  116 + if (res.errMsg == 'shareAppMessage:ok') { }
  117 + },
  118 + fail: function () {
  119 + // 转发失败之后的回调
  120 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  121 + // 用户取消转发
  122 + } else if (res.errMsg == 'shareAppMessage:fail') {
  123 + // 转发失败,其中 detail message 为详细失败信息
  124 + }
  125 + },
  126 + complete: function () {
  127 + // 转发结束之后的回调(转发成不成功都会执行)
  128 + }
  129 + }
  130 + return shareObj;
  131 + },
58 }); 132 });
1 <import src="../template/template.wxml"></import> 1 <import src="../template/template.wxml"></import>
2 -<image class="myimg" mode="scaleToFill" src="../src/img/bg.png"></image> 2 +<image class="myimg" mode="scaleToFill" src="../imgs/bg@2x.png"></image>
3 <view class="headbox"> 3 <view class="headbox">
4 <image class="myhead" src="{{userInfo.avatarUrl}}"></image> 4 <image class="myhead" src="{{userInfo.avatarUrl}}"></image>
  5 + <!-- <image class="myhead" src="../imgs/head01@2x.png"></image> -->
5 </view> 6 </view>
6 <view class="myname">{{userInfo.nickName}}</view> 7 <view class="myname">{{userInfo.nickName}}</view>
7 <view class="mylist"> 8 <view class="mylist">
8 <view bindtap="payment" class="myitem"> 9 <view bindtap="payment" class="myitem">
  10 + <text class='hint' wx:if='{{unpaynum0>0}}'>{{unpaynum0}}</text>
9 <view class="iconfont icon-daifukuan1"></view> 11 <view class="iconfont icon-daifukuan1"></view>
10 <text>待付款</text> 12 <text>待付款</text>
11 </view> 13 </view>
12 <view bindtap="delivery" class="myitem"> 14 <view bindtap="delivery" class="myitem">
  15 + <text class='hint' wx:if='{{unpaynum1>0}}'>{{unpaynum1}}</text>
13 <view class="iconfont icon-daifahuo"></view> 16 <view class="iconfont icon-daifahuo"></view>
14 <text>待发货</text> 17 <text>待发货</text>
15 </view> 18 </view>
16 <view bindtap="shipped" class="myitem"> 19 <view bindtap="shipped" class="myitem">
  20 + <text class='hint' wx:if='{{unpaynum2>0}}'>{{unpaynum2}}</text>
17 <view class="iconfont icon-yifahuo"></view> 21 <view class="iconfont icon-yifahuo"></view>
18 <text>已发货</text> 22 <text>已发货</text>
19 </view> 23 </view>
20 <view bindtap="completed" class="myitem"> 24 <view bindtap="completed" class="myitem">
  25 + <text class='hint' wx:if='{{unpaynum3>0}}'>{{unpaynum3}}</text>
21 <view class="iconfont icon-dingdanyiwancheng"></view> 26 <view class="iconfont icon-dingdanyiwancheng"></view>
22 <text>已完成</text> 27 <text>已完成</text>
23 </view> 28 </view>
@@ -31,5 +36,9 @@ @@ -31,5 +36,9 @@
31 <text>我的收藏</text> 36 <text>我的收藏</text>
32 <view class="iconfont icon-jinru"></view> 37 <view class="iconfont icon-jinru"></view>
33 </view> 38 </view>
  39 + <view bindtap="gomy_wallet" class="myoder">
  40 + <text>我的钱包</text>
  41 + <view class="iconfont icon-jinru"></view>
  42 + </view>
34 </view> 43 </view>
35 <template is="kefu" data></template> 44 <template is="kefu" data></template>
1 page { 1 page {
2 background-color: #F5F9FA; 2 background-color: #F5F9FA;
3 } 3 }
4 -  
5 .myimg { 4 .myimg {
6 height: 258rpx; 5 height: 258rpx;
7 width: 100%; 6 width: 100%;
8 } 7 }
9 -  
10 .headbox { 8 .headbox {
11 width: 160rpx; 9 width: 160rpx;
12 height: 160rpx; 10 height: 160rpx;
@@ -35,6 +33,7 @@ page { @@ -35,6 +33,7 @@ page {
35 } 33 }
36 34
37 .myitem { 35 .myitem {
  36 + position: relative;
38 display: flex; 37 display: flex;
39 flex: 1; 38 flex: 1;
40 flex-direction: column; 39 flex-direction: column;
@@ -53,13 +52,15 @@ page { @@ -53,13 +52,15 @@ page {
53 .myoder { 52 .myoder {
54 display: flex; 53 display: flex;
55 justify-content: space-between; 54 justify-content: space-between;
56 - padding: 45rpx 20rpx 45rpx 24rpx; 55 + padding: 37rpx 20rpx 37rpx 24rpx;
57 margin: 0 32rpx; 56 margin: 0 32rpx;
58 font-size: 28rpx; 57 font-size: 28rpx;
59 background-color: #fff; 58 background-color: #fff;
60 border-bottom: 1rpx solid #E6EAEB; 59 border-bottom: 1rpx solid #E6EAEB;
61 } 60 }
62 - 61 +.myoder:last-child{
  62 + border:none;
  63 +}
63 .myoder:active { 64 .myoder:active {
64 background-color: rgba(0,0,0,0.08); 65 background-color: rgba(0,0,0,0.08);
65 } 66 }
@@ -67,4 +68,18 @@ page { @@ -67,4 +68,18 @@ page {
67 .my { 68 .my {
68 margin: 75rpx 0 0 0; 69 margin: 75rpx 0 0 0;
69 box-shadow: 2rpx 0 4rpx rgba(0,0,0,0.08); 70 box-shadow: 2rpx 0 4rpx rgba(0,0,0,0.08);
  71 +}
  72 +.hint{
  73 + position: absolute;
  74 + top:-6rpx;
  75 + right:46rpx;
  76 + width:30rpx;
  77 + height: 30rpx;
  78 + border-radius: 50%;
  79 + text-align: center;
  80 + line-height: 30rpx;
  81 + color:#fff;
  82 + font-size:24rpx;
  83 + z-index:10;
  84 + background: red;
70 } 85 }
@@ -48,5 +48,30 @@ Page({ @@ -48,5 +48,30 @@ Page({
48 onUnload: function() {}, 48 onUnload: function() {},
49 onPullDownRefresh: function() {}, 49 onPullDownRefresh: function() {},
50 onReachBottom: function() {}, 50 onReachBottom: function() {},
51 - onShareAppMessage: function() {} 51 + onShareAppMessage: function (options) {
  52 + let that = this;
  53 + let ouid;
  54 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  55 + var shareObj = {
  56 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  57 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  58 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  59 + success: function (res) {
  60 + // 转发成功之后的回调
  61 + if (res.errMsg == 'shareAppMessage:ok') { }
  62 + },
  63 + fail: function () {
  64 + // 转发失败之后的回调
  65 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  66 + // 用户取消转发
  67 + } else if (res.errMsg == 'shareAppMessage:fail') {
  68 + // 转发失败,其中 detail message 为详细失败信息
  69 + }
  70 + },
  71 + complete: function () {
  72 + // 转发结束之后的回调(转发成不成功都会执行)
  73 + }
  74 + }
  75 + return shareObj;
  76 + },
52 }); 77 });
1 var t = require("../../../utils/network.js"); 1 var t = require("../../../utils/network.js");
2 - 2 +const app=getApp();
3 Page({ 3 Page({
4 data: { 4 data: {
5 type: "", 5 type: "",
@@ -72,10 +72,13 @@ Page({ @@ -72,10 +72,13 @@ Page({
72 total: this.data.totalmoney, 72 total: this.data.totalmoney,
73 name: this.data.address.userName, 73 name: this.data.address.userName,
74 tel: this.data.address.telNumber, 74 tel: this.data.address.telNumber,
75 - addr: this.data.address.provinceName + this.data.address.cityName + this.data.address.countyName + this.data.address.detailInfo,  
76 - leave: this.data.user_msg ? this.data.user_msg : "" 75 + addr: this.data.address.provinceName + this.data.address.cityName + this.data.address.countyName +
  76 + this.data.address.detailInfo,
  77 + leave: this.data.user_msg ? this.data.user_msg : "",
  78 + share_id: app.globalData.share_id ? app.globalData.share_id :0
77 }, 79 },
78 success: function(t) { 80 success: function(t) {
  81 +
79 wx.showLoading({ 82 wx.showLoading({
80 title: "处理中..." 83 title: "处理中..."
81 }), "success" == t.data.state && a.setData({ 84 }), "success" == t.data.state && a.setData({
@@ -85,6 +88,7 @@ Page({ @@ -85,6 +88,7 @@ Page({
85 }); 88 });
86 }, 89 },
87 pay_order: function() { 90 pay_order: function() {
  91 + let that=this;
88 t.POST({ 92 t.POST({
89 url: "Pay/pay_order", 93 url: "Pay/pay_order",
90 header: "application/x-www-form-urlencoded", 94 header: "application/x-www-form-urlencoded",
@@ -94,7 +98,7 @@ Page({ @@ -94,7 +98,7 @@ Page({
94 money: this.data.totalmoney 98 money: this.data.totalmoney
95 }, 99 },
96 success: function(t) { 100 success: function(t) {
97 - console.log(t), t.data && wx.requestPayment({ 101 + t.data && wx.requestPayment({
98 timeStamp: t.data.timeStamp, 102 timeStamp: t.data.timeStamp,
99 nonceStr: t.data.nonceStr, 103 nonceStr: t.data.nonceStr,
100 package: t.data.package, 104 package: t.data.package,
@@ -105,8 +109,16 @@ Page({ @@ -105,8 +109,16 @@ Page({
105 url: "../delivery/delivery" 109 url: "../delivery/delivery"
106 }); 110 });
107 }, 111 },
108 - fail: function(t) {} 112 + fail: function(t) {
  113 + wx.redirectTo({
  114 + url: '/pages/index/paydetail/paydetail?id=' + that.data.oid + '&type=0'
  115 + })
  116 + }
109 }); 117 });
  118 + },
  119 + fail:function(){
  120 +
  121 +
110 } 122 }
111 }); 123 });
112 }, 124 },
@@ -117,7 +129,32 @@ Page({ @@ -117,7 +129,32 @@ Page({
117 onUnload: function() {}, 129 onUnload: function() {},
118 onPullDownRefresh: function() {}, 130 onPullDownRefresh: function() {},
119 onReachBottom: function() {}, 131 onReachBottom: function() {},
120 - onShareAppMessage: function() {}, 132 + onShareAppMessage: function (options) {
  133 + let that = this;
  134 + let ouid;
  135 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  136 + var shareObj = {
  137 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  138 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  139 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  140 + success: function (res) {
  141 + // 转发成功之后的回调
  142 + if (res.errMsg == 'shareAppMessage:ok') { }
  143 + },
  144 + fail: function () {
  145 + // 转发失败之后的回调
  146 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  147 + // 用户取消转发
  148 + } else if (res.errMsg == 'shareAppMessage:fail') {
  149 + // 转发失败,其中 detail message 为详细失败信息
  150 + }
  151 + },
  152 + complete: function () {
  153 + // 转发结束之后的回调(转发成不成功都会执行)
  154 + }
  155 + }
  156 + return shareObj;
  157 + },
121 getaddress: function() { 158 getaddress: function() {
122 var t = this; 159 var t = this;
123 wx.chooseAddress ? wx.chooseAddress({ 160 wx.chooseAddress ? wx.chooseAddress({
@@ -97,7 +97,7 @@ page { @@ -97,7 +97,7 @@ page {
97 } 97 }
98 98
99 .goodsprice { 99 .goodsprice {
100 - color: #f00; 100 + color: #FF87B1;
101 font-size: 30rpx; 101 font-size: 30rpx;
102 } 102 }
103 103
@@ -121,6 +121,7 @@ page { @@ -121,6 +121,7 @@ page {
121 121
122 .orderitem:last-child { 122 .orderitem:last-child {
123 border: 0; 123 border: 0;
  124 +
124 } 125 }
125 126
126 .orderitem .usermsg { 127 .orderitem .usermsg {
@@ -132,7 +133,7 @@ page { @@ -132,7 +133,7 @@ page {
132 } 133 }
133 134
134 .totalprice { 135 .totalprice {
135 - color: #f00; 136 + color: #FF87B1;
136 } 137 }
137 138
138 .del { 139 .del {
@@ -178,7 +179,7 @@ page { @@ -178,7 +179,7 @@ page {
178 } 179 }
179 180
180 .money { 181 .money {
181 - color: #f00; 182 + color: #FF87B1;
182 margin-right: 40rpx; 183 margin-right: 40rpx;
183 } 184 }
184 185
@@ -84,5 +84,30 @@ Page({ @@ -84,5 +84,30 @@ Page({
84 onUnload: function() {}, 84 onUnload: function() {},
85 onPullDownRefresh: function() {}, 85 onPullDownRefresh: function() {},
86 onReachBottom: function() {}, 86 onReachBottom: function() {},
87 - onShareAppMessage: function() {} 87 + onShareAppMessage: function (options) {
  88 + let that = this;
  89 + let ouid;
  90 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  91 + var shareObj = {
  92 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  93 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  94 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  95 + success: function (res) {
  96 + // 转发成功之后的回调
  97 + if (res.errMsg == 'shareAppMessage:ok') { }
  98 + },
  99 + fail: function () {
  100 + // 转发失败之后的回调
  101 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  102 + // 用户取消转发
  103 + } else if (res.errMsg == 'shareAppMessage:fail') {
  104 + // 转发失败,其中 detail message 为详细失败信息
  105 + }
  106 + },
  107 + complete: function () {
  108 + // 转发结束之后的回调(转发成不成功都会执行)
  109 + }
  110 + }
  111 + return shareObj;
  112 + },
88 }); 113 });
@@ -93,5 +93,30 @@ Page({ @@ -93,5 +93,30 @@ Page({
93 onUnload: function() {}, 93 onUnload: function() {},
94 onPullDownRefresh: function() {}, 94 onPullDownRefresh: function() {},
95 onReachBottom: function() {}, 95 onReachBottom: function() {},
96 - onShareAppMessage: function() {} 96 + onShareAppMessage: function (options) {
  97 + let that = this;
  98 + let ouid;
  99 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  100 + var shareObj = {
  101 + title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
  102 + path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
  103 + imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  104 + success: function (res) {
  105 + // 转发成功之后的回调
  106 + if (res.errMsg == 'shareAppMessage:ok') { }
  107 + },
  108 + fail: function () {
  109 + // 转发失败之后的回调
  110 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  111 + // 用户取消转发
  112 + } else if (res.errMsg == 'shareAppMessage:fail') {
  113 + // 转发失败,其中 detail message 为详细失败信息
  114 + }
  115 + },
  116 + complete: function () {
  117 + // 转发结束之后的回调(转发成不成功都会执行)
  118 + }
  119 + }
  120 + return shareObj;
  121 + },
97 }); 122 });
1 <template name="kefu"> 1 <template name="kefu">
2 <view class="service"> 2 <view class="service">
3 - <image mode="scaleToFill" src="../src/img/kefu.png "></image> 3 + <image mode="scaleToFill" src="../imgs/aicon01@2x.png "></image>
4 </view> 4 </view>
5 <view class="services"> 5 <view class="services">
6 <button openType="contact" style="height:100rpx;width:100rpx;opacity: 0"></button> 6 <button openType="contact" style="height:100rpx;width:100rpx;opacity: 0"></button>
@@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
11 "newFeature": true 11 "newFeature": true
12 }, 12 },
13 "compileType": "miniprogram", 13 "compileType": "miniprogram",
14 - "libVersion": "2.3.0",  
15 - "appid": "wx75855734b0730d64",  
16 - "projectname": "%E7%A4%BC%E9%81%87", 14 + "libVersion": "2.4.0",
  15 + "appid": "wx0091d8ff6b11f5b1",
  16 + "projectname": "%E6%90%AD%E5%92%95%E5%95%86%E5%9F%8E%E5%AE%A2%E6%88%B7APPID2",
17 "debugOptions": { 17 "debugOptions": {
18 "hidedInDevtools": [] 18 "hidedInDevtools": []
19 }, 19 },
@@ -27,13 +27,24 @@ @@ -27,13 +27,24 @@
27 "current": -1, 27 "current": -1,
28 "list": [] 28 "list": []
29 }, 29 },
  30 + "plugin": {
  31 + "current": -1,
  32 + "list": []
  33 + },
30 "game": { 34 "game": {
31 "currentL": -1, 35 "currentL": -1,
32 "list": [] 36 "list": []
33 }, 37 },
34 "miniprogram": { 38 "miniprogram": {
35 "current": -1, 39 "current": -1,
36 - "list": [] 40 + "list": [
  41 + {
  42 + "id": -1,
  43 + "name": "my",
  44 + "pathName": "pages/my/my",
  45 + "query": ""
  46 + }
  47 + ]
37 } 48 }
38 } 49 }
39 } 50 }
@@ -16,9 +16,7 @@ function e(e, n) { @@ -16,9 +16,7 @@ function e(e, n) {
16 complete: function() {} 16 complete: function() {}
17 }); 17 });
18 } 18 }
19 -  
20 -var t = "https://leemoral.wx.bronet.cn/index.php/Api/";  
21 - 19 +var t = "https://ailingcheng.cn/index.php/Api/";
22 module.exports = { 20 module.exports = {
23 GET: function(t) { 21 GET: function(t) {
24 e("GET", t); 22 e("GET", t);
@@ -19,7 +19,7 @@ module.exports = { @@ -19,7 +19,7 @@ module.exports = {
19 }, 19 },
20 getSearchMusic: function(t, e, i) { 20 getSearchMusic: function(t, e, i) {
21 wx.request({ 21 wx.request({
22 - url: "https://leemoral.wx.bronet.cn/index.php/Api/Index/ajax_goods_search", 22 + url: "https://ailingcheng.cn/index.php/Api/Index/ajax_goods_search",
23 data: { 23 data: {
24 p: e, 24 p: e,
25 keyword: t 25 keyword: t