作者 朱振飞

开放商城

@@ -47,7 +47,7 @@ Component({ @@ -47,7 +47,7 @@ Component({
47 },1300) 47 },1300)
48 }else{ 48 }else{
49 wx.navigateTo({ 49 wx.navigateTo({
50 - url: '/pages/shop_detail/shop_detail?id=' + id 50 + url: '/packageA/pages/shop_detail/shop_detail?id=' + id
51 }) 51 })
52 } 52 }
53 }, 53 },
@@ -69,11 +69,18 @@ App({ @@ -69,11 +69,18 @@ App({
69 wx.hideLoading(); 69 wx.hideLoading();
70 reject(res.data) 70 reject(res.data)
71 wx.removeStorageSync('login'); 71 wx.removeStorageSync('login');
72 -  
73 - // wx.removeStorageSync('token');  
74 - // wx.navigateTo({  
75 - // url: '/pages/register/register?type=1',  
76 - // }) 72 + wx.showModal({
  73 + title: '提示',
  74 + content: res.data.msg,
  75 + showCancel: false
  76 + })
  77 + wx.removeStorageSync('token');
  78 + setTimeout(()=>{
  79 + wx.navigateTo({
  80 + url: '/pages/register/register?type=1',
  81 + })
  82 + },1200)
  83 +
77 } else { 84 } else {
78 wx.showModal({ 85 wx.showModal({
79 title: '提示', 86 title: '提示',
packageA @ fa07629b
1 -Subproject commit eed5ec7a45fa6ecb75d55addfbcaf7b9236a67dd 1 +Subproject commit fa07629bea63caece0380a34b13e14ad18f14b80
@@ -33,7 +33,7 @@ Page({ @@ -33,7 +33,7 @@ Page({
33 tel: e.detail.value.replace(/\s+/g, '') 33 tel: e.detail.value.replace(/\s+/g, '')
34 }) 34 })
35 }, 35 },
36 - beiTelFun(){ 36 + beiTelFun(e){
37 this.setData({ 37 this.setData({
38 beiyongTel: e.detail.value.replace(/\s+/g, '') 38 beiyongTel: e.detail.value.replace(/\s+/g, '')
39 }) 39 })
@@ -96,13 +96,13 @@ Page({ @@ -96,13 +96,13 @@ Page({
96 icon: 'none', 96 icon: 'none',
97 duration: 1300 97 duration: 1300
98 }) 98 })
99 - } else if (d.beiyongTel == '') { 99 + } else if (d.b_tel == '') {
100 wx.showToast({ 100 wx.showToast({
101 title: '请输入手机号', 101 title: '请输入手机号',
102 icon: 'none', 102 icon: 'none',
103 duration: 1300 103 duration: 1300
104 }) 104 })
105 - } else if (!AuglyTest_phone.test(d.beiyongTel)) { 105 + } else if (!AuglyTest_phone.test(d.b_tel)) {
106 wx.showToast({ 106 wx.showToast({
107 title: '请输入正确的备用手机号', 107 title: '请输入正确的备用手机号',
108 icon: 'none', 108 icon: 'none',
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <view class="user_info"> 3 <view class="user_info">
4 <view class="name">{{item.name}}</view> 4 <view class="name">{{item.name}}</view>
5 <view class="tel">{{item.tel}}</view> 5 <view class="tel">{{item.tel}}</view>
6 - <view class="tel">{{item.b_tel}}</view> 6 + <view class="tel">{{item.b_tel||''}}</view>
7 <view class="type" wx:if="{{item.mo == 1}}">默认</view> 7 <view class="type" wx:if="{{item.mo == 1}}">默认</view>
8 </view> 8 </view>
9 <view class="address"> 9 <view class="address">
@@ -17,7 +17,7 @@ page { @@ -17,7 +17,7 @@ page {
17 17
18 .item .user_info { 18 .item .user_info {
19 width: 100%; 19 width: 100%;
20 - height: 96rpx; 20 + height: 60rpx;
21 padding: 0 40rpx; 21 padding: 0 40rpx;
22 box-sizing: border-box; 22 box-sizing: border-box;
23 display: flex; 23 display: flex;
@@ -25,19 +25,19 @@ page { @@ -25,19 +25,19 @@ page {
25 } 25 }
26 26
27 .user_info .name { 27 .user_info .name {
28 - font-size: 32rpx; 28 + font-size: 28rpx;
29 font-family: PingFang SC; 29 font-family: PingFang SC;
30 font-weight: bold; 30 font-weight: bold;
31 color: rgba(6, 14, 35, 1); 31 color: rgba(6, 14, 35, 1);
32 } 32 }
33 33
34 .user_info .tel { 34 .user_info .tel {
35 - font-size: 32rpx; 35 + font-size: 28rpx;
36 font-family: PingFang SC; 36 font-family: PingFang SC;
37 font-weight: bold; 37 font-weight: bold;
38 color: rgba(19, 26, 46, 1); 38 color: rgba(19, 26, 46, 1);
39 - margin-left: 40rpx;  
40 - margin-right: 20rpx; 39 + margin-left: 10rpx;
  40 + margin-right: 10rpx;
41 } 41 }
42 42
43 .user_info .type { 43 .user_info .type {
@@ -67,6 +67,11 @@ Page({ @@ -67,6 +67,11 @@ Page({
67 tel: e.detail.value.replace(/\s+/g, '') 67 tel: e.detail.value.replace(/\s+/g, '')
68 }) 68 })
69 }, 69 },
  70 + inputtelFun(e){
  71 + this.setData({
  72 + b_tel: e.detail.value.replace(/\s+/g, '')
  73 + })
  74 + },
70 75
71 // 获取详细地址 76 // 获取详细地址
72 getAddressFun(e) { 77 getAddressFun(e) {
@@ -104,6 +109,7 @@ Page({ @@ -104,6 +109,7 @@ Page({
104 let u = a.interface.editaddress; 109 let u = a.interface.editaddress;
105 let d = { 110 let d = {
106 tel: t.data.tel, 111 tel: t.data.tel,
  112 + b_tel: t.data.b_tel,
107 name: t.data.name, 113 name: t.data.name,
108 area: t.data.area, 114 area: t.data.area,
109 address: t.data.address, 115 address: t.data.address,
@@ -128,7 +134,19 @@ Page({ @@ -128,7 +134,19 @@ Page({
128 icon: 'none', 134 icon: 'none',
129 duration: 1300 135 duration: 1300
130 }) 136 })
131 - } else if (d.area == '') { 137 + } else if (d.b_tel == '') {
  138 + wx.showToast({
  139 + title: '请输入手机号',
  140 + icon: 'none',
  141 + duration: 1300
  142 + })
  143 + } else if (!AuglyTest_phone.test(d.b_tel)) {
  144 + wx.showToast({
  145 + title: '请输入正确的手机号',
  146 + icon: 'none',
  147 + duration: 1300
  148 + })
  149 + }else if (d.area == '') {
132 wx.showToast({ 150 wx.showToast({
133 title: '请选择省市区', 151 title: '请选择省市区',
134 icon: 'none', 152 icon: 'none',
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <view class="list"> 14 <view class="list">
15 <view class="list_left">备用手机号码</view> 15 <view class="list_left">备用手机号码</view>
16 <view class="list_right"> 16 <view class="list_right">
17 - <input placeholder="请输入手机号" type="number" maxlength="11" bindinput="telFun" p value="{{b_tel}}" placeholder-class="inut_plclass"></input> 17 + <input placeholder="请输入手机号" type="number" maxlength="11" bindinput="inputtelFun" p value="{{b_tel}}" placeholder-class="inut_plclass"></input>
18 </view> 18 </view>
19 </view> 19 </view>
20 <picker mode="region" style="width: 100%;" bindchange="bindRegionChange"> 20 <picker mode="region" style="width: 100%;" bindchange="bindRegionChange">
@@ -6,7 +6,7 @@ page { @@ -6,7 +6,7 @@ page {
6 6
7 .box { 7 .box {
8 width: 100%; 8 width: 100%;
9 - height: 200%; 9 + height: 100%;
10 background: rgba(255, 255, 255, 1); 10 background: rgba(255, 255, 255, 1);
11 box-sizing: border-box; 11 box-sizing: border-box;
12 padding-left: 32rpx; 12 padding-left: 32rpx;
@@ -30,7 +30,7 @@ page { @@ -30,7 +30,7 @@ page {
30 } 30 }
31 31
32 .list_left { 32 .list_left {
33 - width: 166rpx; 33 + width: 200rpx;
34 font-size: 30rpx 34 font-size: 30rpx
35 } 35 }
36 36
@@ -33,7 +33,7 @@ Page({ @@ -33,7 +33,7 @@ Page({
33 goods_id:id 33 goods_id:id
34 // goods_id:911 34 // goods_id:911
35 } 35 }
36 - app.postk(url, param).then((res) => { 36 + app.post(url, param).then((res) => {
37 console.log(res,'商品') 37 console.log(res,'商品')
38 if(res.data.length!=undefined){ 38 if(res.data.length!=undefined){
39 let data=res.data; 39 let data=res.data;
@@ -98,14 +98,14 @@ Page({ @@ -98,14 +98,14 @@ Page({
98 goods_id:that.data.goods_id, 98 goods_id:that.data.goods_id,
99 spec_sku_id:that.data.spec_sku_id.join("_") 99 spec_sku_id:that.data.spec_sku_id.join("_")
100 } 100 }
101 - app.postk(url, param).then((res) => {  
102 - console.log(res,'购物车数量') 101 + app.post(url, param).then((res) => {
  102 + console.log(res,'购物车数量')
103 that.setData({ 103 that.setData({
104 - min_goods_price:res.data.goods_price, 104 + min_goods_price:res.data.goods_price,
105 line_price:res.data.line_price, 105 line_price:res.data.line_price,
106 goodimg:res.data.spec_image, 106 goodimg:res.data.spec_image,
107 - stock_num:res.data.stock_num  
108 - }) 107 + stock_num:res.data.stock_num
  108 + })
109 }) 109 })
110 }, 110 },
111 num_change(e) { 111 num_change(e) {
@@ -144,7 +144,7 @@ Page({ @@ -144,7 +144,7 @@ Page({
144 getcartnum(){ 144 getcartnum(){
145 let that=this; 145 let that=this;
146 let url = '/car/bubble' 146 let url = '/car/bubble'
147 - app.postk(url, { 147 + app.post(url, {
148 148
149 }).then((res) => { 149 }).then((res) => {
150 console.log(res,'购物车数量') 150 console.log(res,'购物车数量')
@@ -173,7 +173,7 @@ Page({ @@ -173,7 +173,7 @@ Page({
173 type:1, 173 type:1,
174 spec_sku_id:that.data.spec_sku_id.join("_") 174 spec_sku_id:that.data.spec_sku_id.join("_")
175 } 175 }
176 - app.postk(url, params).then((res) => { 176 + app.post(url, params).then((res) => {
177 that.setData({ 177 that.setData({
178 "info.shop": Number(that.data.info.shop) + that.data.num, 178 "info.shop": Number(that.data.info.shop) + that.data.num,
179 num: 1 179 num: 1
@@ -178,6 +178,12 @@ @@ -178,6 +178,12 @@
178 "pathName": "packageA/pages/order/order", 178 "pathName": "packageA/pages/order/order",
179 "query": "type=3&info={\"shop_id\":3232,\"num\":1}&id=3232", 179 "query": "type=3&info={\"shop_id\":3232,\"num\":1}&id=3232",
180 "scene": null 180 "scene": null
  181 + },
  182 + {
  183 + "name": "packageA/pages/logistics/logistics",
  184 + "pathName": "packageA/pages/logistics/logistics",
  185 + "query": "order=K7J527500103601",
  186 + "scene": null
181 } 187 }
182 ] 188 ]
183 } 189 }