diff --git a/components/diy_store_select/diy_store_select.js b/components/diy_store_select/diy_store_select.js
index fdc6784..c83e633 100644
--- a/components/diy_store_select/diy_store_select.js
+++ b/components/diy_store_select/diy_store_select.js
@@ -44,10 +44,6 @@ Component({
//获取顶部的门店
getApp().get_user_store(function(){
- var top_store=getApp().globalData.pk_store;
- if(top_store){
- th.setData({top_store:top_store});
- }else{
wx.getLocation({
type: 'gcj02',
success: function(res) {
@@ -61,9 +57,12 @@ Component({
}
}
})
- }
+
})
},
+
+
+
//-- 设置最近的店为默认的店,一开始加载的时候 --
set_fir_store_to_def(){
var th=this;
@@ -74,7 +73,13 @@ Component({
page:1,
};
dd.lat = th.data.lat;
- dd.lon = th.data.lon;
+ dd.lon = th.data.lon;
+
+ var top_store=getApp().globalData.pk_store;
+ if(top_store){
+ dd.pickup_id=top_store.pickup_id;
+ }
+
//----------获取门店,最近的门店----------------
getApp().request.promiseGet("/api/weshop/pickup/list", {
data: dd,
@@ -173,8 +178,7 @@ Component({
this.deal_pickup(this.data.all_pick_list,func)
return false;
}
- var th = this,that=this;
- var i = getApp().request;
+ var th = this,that=this;
var dd = {
store_id: o.stoid,
isstop: 0,
diff --git a/components/diy_store_select/diy_store_select.wxml b/components/diy_store_select/diy_store_select.wxml
index 8db133f..b56406c 100644
--- a/components/diy_store_select/diy_store_select.wxml
+++ b/components/diy_store_select/diy_store_select.wxml
@@ -1,3 +1,5 @@
+
+
@@ -51,7 +53,7 @@
- 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}
+ 距离: {{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}
地址:{{item.fulladdress}}
diff --git a/packageB/pages/user/binding_info/binding_info.js b/packageB/pages/user/binding_info/binding_info.js
new file mode 100644
index 0000000..a9d1ed5
--- /dev/null
+++ b/packageB/pages/user/binding_info/binding_info.js
@@ -0,0 +1,66 @@
+// packageB/pages/user/binding_info/binding_info.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/packageB/pages/user/binding_info/binding_info.json b/packageB/pages/user/binding_info/binding_info.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/packageB/pages/user/binding_info/binding_info.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/packageB/pages/user/binding_info/binding_info.wxml b/packageB/pages/user/binding_info/binding_info.wxml
new file mode 100644
index 0000000..7861b3d
--- /dev/null
+++ b/packageB/pages/user/binding_info/binding_info.wxml
@@ -0,0 +1,2 @@
+
+packageB/pages/user/binding_info/binding_info.wxml
diff --git a/packageB/pages/user/binding_info/binding_info.wxss b/packageB/pages/user/binding_info/binding_info.wxss
new file mode 100644
index 0000000..80927e4
--- /dev/null
+++ b/packageB/pages/user/binding_info/binding_info.wxss
@@ -0,0 +1 @@
+/* packageB/pages/user/binding_info/binding_info.wxss */
\ No newline at end of file
diff --git a/pages/user/binding_info/binding_info.js b/pages/user/binding_info/binding_info.js
deleted file mode 100644
index 7fcf09d..0000000
--- a/pages/user/binding_info/binding_info.js
+++ /dev/null
@@ -1,244 +0,0 @@
-var e = getApp(),app=e, a = e.request, t = e.globalData.setting,os=t, i = require("../../../utils/common.js");
-
-Page({
- data: {
- url: t.url,
- iurl: t.imghost,
- nickName: "",
- userHeadPic: "",
- isRegist: !1,
- bindMobile: "",
- bindCode: "",
- regMobile: "",
- regCode: "",
- regPwd: "",
- isAgree: !1,
- canGetCode: !1,
-
- config:null,
-
- store: null,
- imghots: os.imghost,
- gettime:0,
- },
- onLoad: function(e) {
- var th=this;
- app.getConfig(function (e) {
- th.setData({ store: e });
- })
- app.getConfig2(function (e) {
- var cf = JSON.parse(e.sms_send_type);
- th.setData({ config: cf });
- console.log(th.data.config);
- })
-
-
- },
- account: function() {
- this.setData({
- isRegist: !1
- });
- },
- regist: function() {
- this.setData({
- isRegist: !0
- });
- },
- setMobile: function(e) {
- this.data.bindMobile = e.detail.value;
- },
- setCode: function(e) {
- this.data.bindCode = e.detail.value;
- },
-
- //---获取短信验证码---
- getCode: function(t) {
- var th=this;
- if ("" != this.data.bindMobile) {
- var s = this;
- a.post("/api/weshop/smslog/sendsms", {
- data: {
- mobile: this.data.bindMobile,
- store_id: os.stoid,
- wxopenid: app.globalData.openid,
- },
- success: function(e) {
- if(e.data.code==0){
- th.setData({ gettime: th.data.config.time_out, canGetCode:1});
- th.setInt();
- }else{
- e.showWarning(e.data.msg);
- }
- }
- });
- } else e.showWarning("请输入手机号码");
- },
-
- //----发送验证码的推送时间倒计时---
- setInt:function(){
- var th=this;
- var it=setInterval(function(){
- var ti = th.data.gettime-1;
- if (ti<=0){
- th.setData({ gettime:0, canGetCode: !1 });
- clearInterval(it);
- }
- else{
- th.setData({ gettime: ti,});
- }
- },1000);
- },
-
- setRegMobile: function(e) {
- this.data.regMobile = e.detail.value;
- },
- setRegPwd: function(e) {
- this.data.regPwd = e.detail.value;
- },
- setRegCode: function(e) {
- this.data.regCode = e.detail.value;
- },
- getRegCode: function(t) {
- if ("" != this.data.regMobile) {
- var s = this;
- a.post("/Home/Api/checkRegMobile", {
- data: {
- mobile: this.data.regMobile
- },
- success: function(e) {
- i.sendBindSmsCode(s.data.regMobile);
- }
- });
- } else e.showWarning("请输入手机号码");
- },
- check: function() {
- this.setData({
- isAgree: !this.data.isAgree
- });
- },
- bindAccount: function() {
- var t = this;
- var r = getApp().globalData.getu;
- var openid = getApp().globalData.openid;
-
- "" != this.data.bindMobile ? "" != this.data.bindCode ? a.get("/api/weshop/users/thirdLogin", {
- data: {
- mobile: t.data.bindMobile,
- code: t.data.bindCode,
- openid: openid,
- nickname: r.nickName,
- head_pic: r.avatarUrl,
- sex: r.gender,
- store_id:os.stoid,
- },
- success: function(a) {
- if(a.data.code==0){
- wx.setStorageSync("isAuth", !0),
- e.globalData.userInfo = a.data.data,
- e.globalData.user_id = e.globalData.userInfo.user_id, e.globalData.userInfo.head_pic = i.getFullUrl(e.globalData.userInfo.head_pic),
- "function" == typeof cb && cb(e.globalData.userInfo, e.globalData.wechatUser);
- e.showWarning("绑定成功");
- setTimeout(function(){
- wx.navigateTo({
- url: '/pages/user/index/index',
- })
- },1000);
- }else{
- e.showWarning("请输入验证码")
- }
- }
- }) : e.showWarning("请输入验证码") : e.showWarning("请输入手机号码");
- },
-
- bindReg: function() {
- var t = this;
- if( "" != this.data.regMobile ){
- e.showWarning("请输入手机号码"); return false;
- }else if( "" != this.data.regCode){
- e.showWarning("请输入验证码"); return false;
- }else {
- var openid = getApp().globalData.openid;
- var r = getApp().globalData.getu;
- a.post("/api/weshop/users/thirdLogin", {
- data: {
- mobile: t.data.regMobile,
- verify_code: t.data.regCode,
- openid: openid,
- nickname: r.nickName,
- head_pic: r.avatarUrl,
- sex: r.gender,
- },
- success: function(a) {
- console.log("thirdLogin");
- console.log(e);
- if (e.data.code == 0) {
- app.globalData.user_id = e.data.data.user_id;
- } else {
- return app.showWarning("授权登入失败!");
- }
- wx.setStorageSync("isAuth", !0), a.globalData.userInfo = e.data.data, a.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic);
- wx.navigateBack({ delta: 1 })
- }
- })
- }
- }
-});
-
-function randomNum(min, max) {
- return Math.floor(Math.random() * (max - min) + min);
-}
-/**生成一个随机色**/
-function randomColor(min, max) {
- var r = randomNum(min, max);
- var g = randomNum(min, max);
- var b = randomNum(min, max);
- return "rgb(" + r + "," + g + "," + b + ")";
-}
-
-/**绘制验证码图片**/
-function drawPic(that) {
- ctx = wx.createCanvasContext('canvas');
- /**绘制背景色**/
- ctx.fillStyle = randomColor(180, 240); //颜色若太深可能导致看不清
- ctx.fillRect(0, 0, 90, 28)
- /**绘制文字**/
- var arr;
- var text = '';
- var str = 'ABCEFGHJKLMNPQRSTWXY123456789';
- for (var i = 0; i < 4; i++) {
- var txt = str[randomNum(0, str.length)];
- ctx.fillStyle = randomColor(50, 160); //随机生成字体颜色
- ctx.font = randomNum(20, 26) + 'px SimHei'; //随机生成字体大小
- var x = 5 + i * 20;
- var y = randomNum(20, 25);
- var deg = randomNum(-20, 20);
- //修改坐标原点和旋转角度
- ctx.translate(x, y);
- ctx.rotate(deg * Math.PI / 180);
- ctx.fillText(txt, 5, 0);
- text = text + txt;
- //恢复坐标原点和旋转角度
- ctx.rotate(-deg * Math.PI / 180);
- ctx.translate(-x, -y);
- }
- /**绘制干扰线**/
- for (var i = 0; i < 4; i++) {
- ctx.strokeStyle = randomColor(40, 180);
- ctx.beginPath();
- ctx.moveTo(randomNum(0, 90), randomNum(0, 28));
- ctx.lineTo(randomNum(0, 90), randomNum(0, 28));
- ctx.stroke();
- }
- /**绘制干扰点**/
- for (var i = 0; i < 20; i++) {
- ctx.fillStyle = randomColor(0, 255);
- ctx.beginPath();
- ctx.arc(randomNum(0, 90), randomNum(0, 28), 1, 0, 2 * Math.PI);
- ctx.fill();
- }
- ctx.draw(false, function () {
- that.setData({
- text: text
- })
- });
-}
\ No newline at end of file
diff --git a/pages/user/binding_info/binding_info.json b/pages/user/binding_info/binding_info.json
deleted file mode 100644
index 5d848ff..0000000
--- a/pages/user/binding_info/binding_info.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "关联手机号",
- "enablePullDownRefresh": false
-}
\ No newline at end of file
diff --git a/pages/user/binding_info/binding_info.wxml b/pages/user/binding_info/binding_info.wxml
deleted file mode 100644
index e898b41..0000000
--- a/pages/user/binding_info/binding_info.wxml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
- {{store.store_name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 手机号码
-
-
-
-
-
- 验 证 码
-
-
-
-
-
-
-
-
-
-
-
- 手机号码
-
-
-
-
- 设置密码
-
-
-
-
- 验 证 码
-
-
-
-
-
-
-
-
-
-
-
-
- 《TPshop商城用户注册协议》
-
-
-
-
-
diff --git a/pages/user/binding_info/binding_info.wxss b/pages/user/binding_info/binding_info.wxss
deleted file mode 100644
index d8c8001..0000000
--- a/pages/user/binding_info/binding_info.wxss
+++ /dev/null
@@ -1,210 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.binding-top {
- width: 100%;
- height: 450rpx;
- text-align: center;
- position: relative;
- overflow: hidden;
-}
-
-.user-logo {
- width: 190rpx;
- height: 190rpx;
- border-radius: 50%;
- border: 2px solid #fff;
- overflow: hidden;
- position: absolute;
- left: 50%;
- margin-left: -95rpx;
- top: 60rpx;
-}
-
-.user-logo image {
- width: 100%;
- height: 100%;
-}
-
-.user-text {
- margin-top: 142px;
-}
-
-.user-text text {
- display: block;
- margin-top: 16rpx;
- color: #fff;
-}
-
-.userbj-cover {
- width: 100%;
- height: 46rpx;
- position: absolute;
- left: 0;
- bottom: 0;
- z-index: 20;
-}
-
-.userbj-cover image {
- width: 100%;
- height: 46rpx;
-}
-
-.binding-container {
- width: 100%;
- padding-top: 15px;
-}
-
-.binding-tips {
- font-size: 14px;
- color: #666;
- text-align: center;
- letter-spacing: 2rpx;
-}
-
-.correlation-cont {
- width: 600rpx;
- margin: 0 auto;
- margin-top: 40rpx;
- overflow: hidden;
-}
-
-.connect-item {
- width: 296rpx;
- height: 78rpx;
- line-height: 78rpx;
- font-size: 16px;
- text-align: center;
- border: 1px solid #b7b7b7;
- float: left;
-}
-
-.correlation-cont .connect-item:first-child {
- border-bottom-left-radius: 30px;
- border-top-left-radius: 30px;
-}
-
-.correlation-cont .connect-item:last-child {
- border-bottom-right-radius: 30px;
- border-top-right-radius: 30px;
-}
-
-.tp-list-bg {
- color: #fff;
- background: #e23435;
- border: 1px solid #e23435!important;
-}
-
-.correlation-input-wrap {
- margin-top: 56rpx;
- width: 100%;
-}
-
-.item_cont {
- width: 660rpx;
- height: 96rpx;
- margin: 0 auto;
- position: relative;
- line-height: 96rpx;
- border-bottom: 1px solid #e6e6e6;
-}
-
-.item_cont image {
- width: 48rpx;
- height: 48rpx;
- vertical-align: middle;
-}
-
-.item_cont text {
- font-size: 16px;
- vertical-align: middle;
- color: #666;
- margin-left: 16rpx;
-}
-
-.item_cont input {
- border: 0px;
- font-size: 16px;
- height: 50rpx;
- line-height: 50rpx;
- display: inline-block;
- vertical-align: middle;
- width: 432rpx;
- margin-left: 30rpx;
-}
-
-.tp-get-gode {
- position: absolute;
- right: 0;
- top: 20rpx;
- border-radius: 30rpx;
- background-color: #f05052;
- color: #fff;
- height: 56rpx;
- width: 140rpx;
- font-size: 22rpx;
- line-height: 56rpx;
- z-index: 50;
-}
-.tp-get-gode.btn-disable{
- background-color: #e6e6e6;
- color: #999;
-}
-
-.correlation-submit {
- width: 660rpx;
- height: 96rpx;
- line-height: 96rpx;
- background: #db261e;
- border: none;
- border-radius: 6px;
- color: #ffffff;
- font-size: 20px;
- margin-top: 40rpx;
-}
-
-.bingding-agreement {
- width: 660rpx;
- margin: 0 auto;
- margin-top: 20rpx;
- font-size: 14px;
- margin-bottom: 30px;
-}
-
-.bingding-agreement label {
- vertical-align: middle;
- color: #333;
- margin-left: 10rpx;
-}
-
-.bingding-agreement navigator {
- vertical-align: middle;
- color: #0094ca;
- display: inline-block;
-}
-
-checkbox .wx-checkbox-input {
- border-radius: 50%;
- width: 36rpx;
- height: 36rpx;
-}
-
-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
- border: none;
- background: red;
- width: 40rpx;
- height: 40rpx;
-}
-
-checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
- border-radius: 50%;
- width: 36rpx;
- height: 36rpx;
- line-height: 36rpx;
- text-align: center;
- font-size: 30rpx;
- color: #fff;
- background: transparent;
- transform: translate(-50%,-50%) scale(1);
-}
\ No newline at end of file