diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..95cfff78
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+.DS_Store
+node_modules
+/dist
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+build.sh
+.idea
+unpackage
\ No newline at end of file
diff --git a/api/api.js b/api/api.js
index faa7cf61..56380336 100644
--- a/api/api.js
+++ b/api/api.js
@@ -162,7 +162,7 @@ export function switchH5Login(){
// #endif
/*
- * h5切换公众号登陆
+ * h5切换公众号登录
* */
// #ifdef H5
export function switchH5Login() {
@@ -189,9 +189,9 @@ export function logout(){
/**
* 获取订阅消息id
*/
-export function getTemlIds()
+export function getTemlIds(data)
{
- return request.get('wechat/teml_ids', {}, { noAuth:true});
+ return request.post('wechat/program/my/temp/list?limit=3&page=1', data , { noAuth:true});
}
/**
diff --git a/api/order.js b/api/order.js
index 53f57659..81a1127a 100644
--- a/api/order.js
+++ b/api/order.js
@@ -168,10 +168,11 @@ export function orderRefundVerify(data) {
* 订单确认获取订单详细信息
* @param string cartId
*/
-export function orderConfirm(cartId, isNew) {
+export function orderConfirm(cartId, isNew, addAgain) {
return request.post('order/confirm', {
cartIds: cartId,
- isNew: isNew
+ isNew: isNew,
+ addAgain: addAgain
}, {}, 1);
}
@@ -203,3 +204,11 @@ export function orderCreate(key, data) {
export function postOrderComputed(key, data) {
return request.post("order/computed/" + key, data);
}
+
+/**
+ * 将字符串 转base64
+ * @param object data
+ */
+export function qrcodeApi(data) {
+ return request.post('qrcode/str2base64', data, {}, 1);
+}
\ No newline at end of file
diff --git a/api/public.js b/api/public.js
index b1f19994..42a6ac65 100644
--- a/api/public.js
+++ b/api/public.js
@@ -24,7 +24,7 @@ export function getWechatConfig() {
export function wechatAuth(code, spread, login_type) {
return request.get(
"wechat/authorize/login",
- { code, spread, login_type },
+ { code, spread_spid:spread, login_type },
{ noAuth: true }
);
}
@@ -41,7 +41,7 @@ export function getLogo()
/**
* 小程序用户登录
- * @param data object 小程序用户登陆信息
+ * @param data object 小程序用户登录信息
*/
export function login(code,data) {
return request.post("wechat/authorize/program/login?code="+code, data, { noAuth : true });
diff --git a/api/user.js b/api/user.js
index 2080f364..a228b5df 100644
--- a/api/user.js
+++ b/api/user.js
@@ -325,7 +325,7 @@ export function getRechargeApi() {
}
/**
- * 登陆记录
+ * 登录记录
*/
export function setVisit(data)
{
diff --git a/components/Authorize.vue b/components/Authorize.vue
index 5cfdea9f..a76aec9e 100644
--- a/components/Authorize.vue
+++ b/components/Authorize.vue
@@ -98,7 +98,7 @@
})
},
setUserInfo(){
- uni.showLoading({title:'正在登陆中'});
+ uni.showLoading({title:'正在登录中'});
Routine.getCode().then(code=>{
this.getUserInfo(code);
}).catch(res=>{
diff --git a/components/Authorize002.vue b/components/Authorize002.vue
index 394e3503..0a85d2a2 100644
--- a/components/Authorize002.vue
+++ b/components/Authorize002.vue
@@ -103,7 +103,7 @@
setUserInfo(e){
console.log('78878787');
console.log(e);
- uni.showLoading({title:'正在登陆中'});
+ uni.showLoading({title:'正在登录中'});
if(e.detail.errMsg == "getPhoneNumber:ok"){
console.log('授权成功');
Routine.getCode().then(code=>{
diff --git a/components/orderGoods/index.vue b/components/orderGoods/index.vue
index ea386613..ad5fb318 100644
--- a/components/orderGoods/index.vue
+++ b/components/orderGoods/index.vue
@@ -96,4 +96,7 @@
line-height: 86rpx;
box-sizing: border-box;
}
+ .pictrue image{
+ background: #f4f4f4;
+ }
diff --git a/components/userEvaluation/index.vue b/components/userEvaluation/index.vue
index 46287951..2d4d8c77 100644
--- a/components/userEvaluation/index.vue
+++ b/components/userEvaluation/index.vue
@@ -73,6 +73,7 @@
width: 100%;
height: 100%;
border-radius: 50%;
+ background: #f4f4f4;
}
.evaluateWtapper .evaluateItem .pic-text .name {
diff --git a/config/cache.js b/config/cache.js
index e6e238f3..b8425e33 100644
--- a/config/cache.js
+++ b/config/cache.js
@@ -20,7 +20,7 @@ module.exports = {
//��ȨlogoС����
LOGO_URL: 'LOGO_URL',
//模板缓存
- SUBSCRIBE_MESSAGE: 'SUBSCRIBE_MESSAGE',
+ // SUBSCRIBE_MESSAGE: 'SUBSCRIBE_MESSAGE',
TIPS_KEY: 'TIPS_KEY',
diff --git a/libs/wechat.js b/libs/wechat.js
index cebadf86..dfa2827d 100644
--- a/libs/wechat.js
+++ b/libs/wechat.js
@@ -153,13 +153,14 @@ class AuthWechat {
}
/**
- * 授权登陆获取token
+ * 授权登录获取token
* @param {Object} code
*/
auth(code) {
return new Promise((resolve, reject) => {
let loginType = Cache.get(LOGINTYPE);
- wechatAuth(code, parseInt(Cache.get("spread")), loginType)
+ alert(Cache.get("spread"))
+ wechatAuth(code, Cache.get("spread"), loginType)
.then(({
data
}) => {
@@ -173,6 +174,7 @@ class AuthWechat {
});
Cache.set(WX_AUTH, code);
Cache.clear(STATE_KEY);
+ // Cache.clear('spread');
loginType && Cache.clear(LOGINTYPE);
resolve();
})
@@ -204,7 +206,7 @@ class AuthWechat {
}
/**
- * 跳转自动登陆
+ * 跳转自动登录
*/
toAuth() {
let that = this;
@@ -223,10 +225,6 @@ class AuthWechat {
return new Promise((resolve, reject) => {
let configDefault = {
fail(res) {
- console.log('前解放后的金凤凰3');
- console.log(res);
- console.log(that.instance);
- console.log('前解放后的金凤凰2');
if (that.instance) return reject({
is_ready: true,
wx: that.instance
@@ -236,9 +234,6 @@ class AuthWechat {
is_ready: true,
wx: wx
});
- console.log('么么么么1');
- console.log(wx);
- console.log('么么么么2');
})
},
success(res) {
diff --git a/main.js b/main.js
index ac9ea62e..9ba62985 100644
--- a/main.js
+++ b/main.js
@@ -3,8 +3,11 @@ import App from './App'
import store from './store'
import Cache from './utils/cache'
import util from 'utils/util'
+import configs from './config/app.js'
+
Vue.prototype.$util = util;
+Vue.prototype.$config = configs;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();
Vue.config.productionTip = false
diff --git a/manifest.json b/manifest.json
index bd90133e..7b9f5fdc 100644
--- a/manifest.json
+++ b/manifest.json
@@ -68,6 +68,13 @@
"desc" : "你的位置信息将用于和门店的距离长度"
}
},
+ // "plugins" : {
+ // "chat" : {
+ // "version" : "1.0.8",
+ // "provider" : "wx738958e0f4c894f9"
+ // }
+ // },
+ // "sitemapLocation" : "sitemap.json",
"usingComponents" : true
},
"mp-alipay" : {
diff --git a/pages.json b/pages.json
index 876aefc7..562fed2f 100644
--- a/pages.json
+++ b/pages.json
@@ -109,7 +109,7 @@
// #endif
}
}
- ],
+ ],
"subPackages": [
{
"root": "pages/users",
diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue
index 371043ee..a0b25b67 100644
--- a/pages/goods_details/index.vue
+++ b/pages/goods_details/index.vue
@@ -216,6 +216,8 @@
diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue
index 0151d2eb..8ca3fa62 100644
--- a/pages/users/order_confirm/index.vue
+++ b/pages/users/order_confirm/index.vue
@@ -270,7 +270,8 @@
isShowAuth: false, //是否隐藏授权
from: '',
news: true,
- again: false
+ again: false,
+ addAgain: false
};
},
computed: mapGetters(['isLogin']),
@@ -294,6 +295,7 @@
this.is_address = options.is_address ? true : false;
this.news = options.new || true;
this.again = options.again || false;
+ this.addAgain = options.addAgain || false;
if (this.isLogin) {
this.getaddressInfo();
this.getConfirm();
@@ -361,8 +363,8 @@
* 获取门店列表数据
*/
getList: function() {
- let longitude = uni.getStorageSync("CACHE_LONGITUDE"); //经度
- let latitude = uni.getStorageSync("CACHE_LATITUDE"); //纬度
+ let longitude = uni.getStorageSync("user_longitude"); //经度
+ let latitude = uni.getStorageSync("user_latitude"); //纬度
let data = {
latitude: latitude, //纬度
longitude: longitude, //经度
@@ -400,6 +402,7 @@
shippingType: parseInt(shippingType) + 1,
payType: this.payType
}).then(res => {
+ console.log(res)
let result = res.data.result.result;
if (result) {
this.totalPrice = result.orderId.payPrice;
@@ -408,7 +411,11 @@
this.integral = this.useIntegral ? result.orderId.surplusIntegral : this.userInfo.integral;
this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.orderId.payPostage);
}
- })
+ }).catch(err => {
+ return this.$util.Tips({
+ title: err
+ });
+ });
},
addressType: function(e) {
let index = e;
@@ -494,7 +501,7 @@
*/
getConfirm: function() {
let that = this;
- orderConfirm(that.cartId,that.again).then(res => {
+ orderConfirm(that.cartId,that.news,this.addAgain).then(res => {
that.$set(that, 'userInfo', res.data.userInfo);
that.$set(that, 'integral', res.data.userInfo.integral);
that.$set(that, 'cartInfo', res.data.cartInfo);
@@ -570,17 +577,21 @@
let that = this;
if (that.addressId) {
getAddressDetail(that.addressId).then(res => {
- res.data.isDefault = parseInt(res.data.isDefault);
- that.addressInfo = res.data || {};
- that.addressId = res.data.id || 0;
- that.address.addressId = res.data.id || 0;
+ if(res.data){
+ res.data.isDefault = parseInt(res.data.isDefault);
+ that.addressInfo = res.data || {};
+ that.addressId = res.data.id || 0;
+ that.address.addressId = res.data.id || 0;
+ }
})
} else {
getAddressDefault().then(res => {
- res.data.isDefault = parseInt(res.data.isDefault);
- that.addressInfo = res.data || {};
- that.addressId = res.data.id || 0;
- that.address.addressId = res.data.id || 0;
+ if(res.data){
+ res.data.isDefault = parseInt(res.data.isDefault);
+ that.addressInfo = res.data || {};
+ that.addressId = res.data.id || 0;
+ that.address.addressId = res.data.id || 0;
+ }
})
}
},
@@ -820,8 +831,6 @@
title: '暂无门店,请选择其他方式'
});
}
- console.log('坎坎坷坷扩');
- console.log(that.news);
data = {
realName: that.contacts,
phone: that.contactsTel,
diff --git a/pages/users/user_get_coupon/index.vue b/pages/users/user_get_coupon/index.vue
index 832f3999..096d3c5e 100644
--- a/pages/users/user_get_coupon/index.vue
+++ b/pages/users/user_get_coupon/index.vue
@@ -108,8 +108,8 @@
that.$set(that,'couponsList',list);
that.$util.Tips({ title: '领取成功' });
},function(res){
- return that.$util.Tips({title:res.msg});
- });
+ return that.$util.Tips({title:res});
+ })
},
/**
* 获取领取优惠券列表
diff --git a/pages/users/wechat_login/index.vue b/pages/users/wechat_login/index.vue
new file mode 100644
index 00000000..74196aa9
--- /dev/null
+++ b/pages/users/wechat_login/index.vue
@@ -0,0 +1,373 @@
+
+