ymt-db-dev
游梦婷 1 year ago
parent 536dd4f10b
commit 417b7e0490
  1. 10
      App.vue
  2. 11
      common/share.js
  3. 15
      components/cart-choose/cart-choose.vue
  4. 10
      pages/goods/externalCoupon/externalCoupon.vue
  5. 7
      pages/goods/store-list/store-details.vue
  6. 7
      pages/login/register.vue
  7. 6
      pages/tabBar/user/user.vue
  8. 4
      pages/user/deposit/deposit.vue
  9. 30
      pages/welcome/welcome.vue

@ -81,11 +81,11 @@
const methodToPatch = ['navigateTo', 'redirectTo', 'switchTab', ]; const methodToPatch = ['navigateTo', 'redirectTo', 'switchTab', ];
let arr = [ let arr = [
"/subPages/recharge-centre/recharge-centre",// // "/subPages/recharge-centre/recharge-centre",//
"/pages/user/mineCoupons/mineCoupons",// "/pages/user/mineCoupons/mineCoupons",//
"/pages/user/myPromotion/myPromotion",//广 "/pages/user/myPromotion/myPromotion",//广
"/subPages/cardsList/cardsList",// "/subPages/cardsList/cardsList",//
"/pages/user/deposit/deposit",// // "/pages/user/deposit/deposit",//
"/physical-merchants/address/address",// "/physical-merchants/address/address",//
"/pages/goods/recording/recording",// "/pages/goods/recording/recording",//
"../../../subPages/cardsList/cardsList",// "../../../subPages/cardsList/cardsList",//
@ -96,7 +96,11 @@
"/physical-merchants/classify/cart/cart",// "/physical-merchants/classify/cart/cart",//
"../order/confirmation",// "../order/confirmation",//
"../coupon-comfirmation/coupon-comfirmation",// "../coupon-comfirmation/coupon-comfirmation",//,
"/pages/goods/refuel-confirm/refuel-confirm",//
"../unionComfirmation/unionComfirmation",//
"/physical-merchants/settleAccounts/settleAccounts",//
"../rec-confirmation/rec-confirmation",//
]; ];

@ -162,7 +162,7 @@ export default {
/* h5分享页面的回退 */ /* h5分享页面的回退 */
const app = getApp(); const app = getApp();
let str = uni.getStorageSync("accountType"); let str = uni.getStorageSync("accountType");
if(str == "0000016&key"){ // if(str == "0000016&key"){
if(getCurrentPages().length == 2 && getCurrentPages()[0].route == "pages/welcome/welcome"){ if(getCurrentPages().length == 2 && getCurrentPages()[0].route == "pages/welcome/welcome"){
uni.switchTab({ uni.switchTab({
@ -172,7 +172,16 @@ export default {
return true; return true;
} }
// }
if(getCurrentPages().length == 1){
uni.switchTab({
url:"/pages/tabBar/home/home"
})
return true;
} }
return false; return false;
}, },

@ -234,16 +234,21 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
title = "加入购物车成功"; title = "加入购物车成功";
this.$emit("refreshCartNum") this.$emit("refreshCartNum")
}else{
title = res.return_msg;
}
uni.showToast({ uni.showToast({
title: title, title: title,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
}else{
// title = res.return_msg;
}
// uni.showToast({
// title: title,
// icon: 'none',
// duration: 2000
// })
this.chooseNumber = 1; this.chooseNumber = 1;
this.$emit("close") this.$emit("close")
@ -262,7 +267,7 @@
// //
toBuy(){ toBuy(){
console.log(this.specificationList[this.chooseIndex],this.goodsDetail) // console.log(this.specificationList[this.chooseIndex],this.goodsDetail)
let _this = this let _this = this
let obj =[{ let obj =[{

@ -215,20 +215,20 @@
setTimeout(()=>{ setTimeout(()=>{
/* let res = uni.getStorageSync("user"); let res = uni.getStorageSync("user");
app.globalData.userInfo = res; app.globalData.userInfo = res;
console.log(app.globalData.userInfo,"=========app.globalData.userInfo=========") console.log(app.globalData.userInfo,"=========app.globalData.userInfo=========")
if (app.globalData.userInfo.phone) { if (app.globalData.userInfo.phone) {
this.userInfo = 2; this.userInfo = 2;
} else { } else {
this.userInfo = 1; this.userInfo = 1;
} */ }
uni.getStorage({ /* uni.getStorage({
key: 'user', key: 'user',
success: (res) => { success: (res) => {
app.globalData.userInfo = res.data; app.globalData.userInfo = res.data;
if (app.globalData.userInfo.phone) { if (app.globalData.userInfo&&app.globalData.userInfo.phone) {
this.userInfo = 2; this.userInfo = 2;
} else { } else {
this.userInfo = 1; this.userInfo = 1;
@ -237,7 +237,7 @@
fail() { fail() {
this.userInfo = 1; this.userInfo = 1;
} }
}); }); */
},0) },0)

@ -125,9 +125,16 @@
methods: { methods: {
// //
getuserinfo() { getuserinfo() {
// #ifdef MP
uni.navigateTo({ uni.navigateTo({
url: '../../userLogin/userLogin' url: '../../userLogin/userLogin'
}) })
// #endif
// #ifdef H5
uni.navigateTo({
url: '/pages/login/register'
})
// #endif
}, },
// //
getMerchantStoreById() { getMerchantStoreById() {

@ -161,6 +161,13 @@
smsCode: this.code, smsCode: this.code,
openIdH5:app.globalData.openId openIdH5:app.globalData.openId
} }
if(app.globalData.accountType == '0000017&key'){
let value = uni.getStorageSync('goUrl');
value = value.slice(0, value.lastIndexOf("#"));
params.popularizeUserId = value;
}
phone(params).then(res => { phone(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {

@ -32,20 +32,20 @@
<view class="headcoun width100"> <view class="headcoun width100">
<view class="height80 alijus width92 border-8r backcorfff"> <view class="height80 alijus width92 border-8r backcorfff">
<view class=" fotct" style="width: 33%;" @click="jumppage(5)"> <view class=" fotct" style="width: 33%;" @click="jumppage(5)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{textnum}} </text> </view> <view class="width100 font12 fcor333"><text class="font20 marglerig">{{textnum || 0}} </text> </view>
<view class="width100 font18 fcor333 mart5">卡券</view> <view class="width100 font18 fcor333 mart5">卡券</view>
</view> </view>
<view style="width: 1px;height: 50px;background-color: #f6f6f6;"> <view style="width: 1px;height: 50px;background-color: #f6f6f6;">
</view> </view>
<view class=" fotct" style="width: 33%;" @click="jumppage(6)"> <view class=" fotct" style="width: 33%;" @click="jumppage(6)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{textSend}} </text> </view> <view class="width100 font12 fcor333"><text class="font20 marglerig">{{textSend || 0}} </text> </view>
<view class="width100 font18 fcor333 mart5">优惠券</view> <view class="width100 font18 fcor333 mart5">优惠券</view>
</view> </view>
<view style="width: 1px;height: 50px;background-color: #f6f6f6;"> <view style="width: 1px;height: 50px;background-color: #f6f6f6;">
</view> </view>
<view class=" fotct" style="width: 33%;" @click="jumppage(7)"> <view class=" fotct" style="width: 33%;" @click="jumppage(7)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{payactivitynum}} </text> </view> <view class="width100 font12 fcor333"><text class="font20 marglerig">{{payactivitynum || 0}} </text> </view>
<view class="width100 font18 fcor333 mart5">活动券</view> <view class="width100 font18 fcor333 mart5">活动券</view>
</view> </view>
</view> </view>

@ -94,14 +94,16 @@
} }
this.findUser();
}, },
onShow() { onShow() {
this.getThirdPartyByDetail(); this.getThirdPartyByDetail();
if(app.globalData.userInfo){
this.findUser(); this.findUser();
}
console.log(this.user,"user") console.log(this.user,"user")
}, },

@ -82,6 +82,7 @@
// 0014 // 0014
// 0016 // 0016
// 0017code
if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) { if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) {
@ -136,6 +137,18 @@
return; return;
} }
// goUrl
if (app.globalData.accountType == '0000017&key' && app.globalData.h5code){
if(!app.globalData.userInfo||!app.globalData.token){
uni.navigateTo({
url: '/pages/login/register'
})
return
}
}
uni.switchTab({ uni.switchTab({
url: '../tabBar/home/home' url: '../tabBar/home/home'
}) })
@ -169,10 +182,7 @@
if(arr1.indexOf("code") != -1){ if(arr1.indexOf("code") != -1){
let goUrl =arr1.slice(Number(arr1.indexOf("code"))+5) ; let goUrl =arr1.slice(Number(arr1.indexOf("code"))+5) ;
uni.setStorage({ uni.setStorageSync("goUrl",decodeURIComponent(goUrl));
key: "goUrl",
data: decodeURIComponent(goUrl)
})
} }
@ -255,6 +265,7 @@
data: res.return_data.uniqueCode data: res.return_data.uniqueCode
}) })
}else{ }else{
if(uni.getStorageSync("accountId")=="0000011&key"){
app.globalData.userInfo = ''; app.globalData.userInfo = '';
app.globalData.token = ''; app.globalData.token = '';
uni.setStorage({ uni.setStorage({
@ -266,6 +277,17 @@
data: '' data: ''
}) })
} }
// app.globalData.userInfo = '';
// app.globalData.token = '';
// uni.setStorage({
// key: "user",
// data: ''
// })
// uni.setStorage({
// key: "token",
// data: ''
// })
}

Loading…
Cancel
Save