diff --git a/App.vue b/App.vue
index c4a890f..3bcb583 100644
--- a/App.vue
+++ b/App.vue
@@ -18,13 +18,13 @@
mapActions
} from 'vuex'
import {
- spread,copyrightApi,channelId
+ spread,copyrightApi
} from "@/api/user";
// const app = getApp();
export default {
globalData: {
spread: 0, //推广人id
- channelId:0, //通道id
+
code: 0,
isLogin: false,
userInfo: {},
@@ -117,14 +117,14 @@
let value = this.$util.getUrlParams(decodeURIComponent(option.query.scene));
that.globalData.spread = value.spread?value.spread:'';
// 通道id
- that.globalData.channelId = value.channelId?value.channelId:'';
+
that.globalData = this.$util.formatMpQrCodeData(value);
break;
}
}
if (option.spread) that.globalData.spread = option.spread;
// 通道id
- if (option.channelId) that.globalData.channelId = option.channelId;
+
// #endif
// 获取导航高度;
uni.getSystemInfo({
@@ -159,8 +159,7 @@
// 存储静默授权code
uni.setStorageSync('snsapiCode', code);
let spread = that.globalData.spread ? that.globalData.spread : 0;
- // 通道id
- let channelId = that.globalData.channelId ? that.globalData.channelId : 0;
+
Auth.auth(code, that.$Cache.get('SPREAD'))
.then(res => {
uni.setStorageSync('snRouter', decodeURIComponent(decodeURIComponent(option.query
@@ -195,6 +194,7 @@
location.replace(uni.getStorageSync('snRouter'));
}
}
+
// #endif
// #ifdef MP
diff --git a/api/api.js b/api/api.js
index 6996785..ed6bba6 100644
--- a/api/api.js
+++ b/api/api.js
@@ -360,12 +360,10 @@ export function getinstallment(data) {
}
+// 首页记录ip
+export function logoip() {
+ return request.get(`login/log`, {}, {
+ noAuth: true
+ });
+}
-
-
- // 查询签约是否成功
-// export function getqytrue(data) {
-// return request.get('order/getSignResult/',data,{
-// noAuth: true
-// })
-// }
\ No newline at end of file
diff --git a/api/public.js b/api/public.js
index 9a883a4..556c282 100644
--- a/api/public.js
+++ b/api/public.js
@@ -19,19 +19,19 @@ export function getWechatConfig() {
* 获取微信sdk配置
* @returns {*}
*/
-export function wechatAuth(code, spread,channelId) {
+export function wechatAuth(code, spread,) {
var reg=/^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 ,判断正整数用/^[1-9]+[0-9]*]*$/
spread = reg.test(spread) ? spread : 0;
- channelId = reg.test(channelId) ? channelId : 0;
+
return request.get(
- "wechat/authorize/login?code=" + code + "&spread_spid=" + spread+"&channelId="+channelId, {},
+ "wechat/authorize/login?code=" + code + "&spread_spid=" + spread , {},
{ noAuth: true }
);
}
/**
* 获取登录授权login
- *
+ *
*/
export function getLogo()
{
@@ -109,4 +109,4 @@ export function appleLogin(data) {
*/
export function iosBinding(data) {
return request.post("ios/binding/phone", data, { noAuth : true });
-}
+}
\ No newline at end of file
diff --git a/api/user.js b/api/user.js
index a28fa9d..26093e2 100644
--- a/api/user.js
+++ b/api/user.js
@@ -119,7 +119,7 @@ export function getSignMonthList(data){
*/
export function userActivity(){
return request.get('user/activity');
-}
+}
/*
* 余额明细(types|2=全部,1=支出,2=收入)
diff --git a/components/orderGoods/index.vue b/components/orderGoods/index.vue
index 1394133..a0ace27 100644
--- a/components/orderGoods/index.vue
+++ b/components/orderGoods/index.vue
@@ -20,7 +20,7 @@
-
+
@@ -61,10 +61,10 @@
return 0;
}
}
- },
+ },
data() {
return {
- totalNmu: ''
+ totalNmu: ''
};
},
watch: {
diff --git a/config/app.js b/config/app.js
index 0fd5b48..428cbe9 100644
--- a/config/app.js
+++ b/config/app.js
@@ -1,32 +1,33 @@
//移动端商城API
// let domain = 'http://117.50.163.143:20410'
-let domain = 'http://117.50.215.20:20410'
-// let domain = 'http://192.168.2.14:8081'
-// let domain = 'http://106.75.49.247:20410'
-
+// let domain = 'http://117.50.215.20:20410'
+// let domain = 'http://192.168.2.14:8081'
+// let domain = 'http://106.75.49.247:20410'
+let domain = 'https://yruibao.com/prod'
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP || APP-PLUS
- // HTTP_REQUEST_URL:'',
- HTTP_REQUEST_URL: domain,
- // H5商城地址
- // HTTP_H5_URL: 'http://106.75.49.247:20410',
- HTTP_H5_URL: 'http://117.50.215.20:20410',
+ // HTTP_REQUEST_URL:'',
+ HTTP_REQUEST_URL: domain,
+ // H5商城地址
+ HTTP_H5_URL: 'https://yruibao.com/prod', //正式
+ // HTTP_H5_URL: 'http://192.168.2.14:8081', //本地
+ // HTTP_H5_URL: 'http://117.50.215.20:20410', //测试
// #endif
// #ifdef H5
- HTTP_REQUEST_URL:domain,
+ HTTP_REQUEST_URL: domain,
// #endif
- HEADER:{
+ HEADER: {
'content-type': 'application/json',
},
- HEADERPARAMS:{
+ HEADERPARAMS: {
'content-type': 'application/x-www-form-urlencoded'
},
// 回话密钥名称 请勿修改此配置
TOKENNAME: 'Authori-zation',
// 缓存时间 0 永久
- EXPIRE:0,
+ EXPIRE: 0,
//分页最多显示条数
LIMIT: 10
-};
+};
\ No newline at end of file
diff --git a/config/cache.js b/config/cache.js
index bf653ac..e43f20f 100644
--- a/config/cache.js
+++ b/config/cache.js
@@ -26,12 +26,12 @@ module.exports = {
TIPS_KEY: 'TIPS_KEY',
- SPREAD: 'SPREAD',
- CHANNELID: 'CHANNELID',
+
+ SPREAD: 'SPREAD',
//缓存经度
CACHE_LONGITUDE: 'LONGITUDE',
//缓存纬度
CACHE_LATITUDE: 'LATITUDE',
//app手机信息
PLATFORM: 'systemPlatform'
-}
+}
\ No newline at end of file
diff --git a/libs/apps.js b/libs/apps.js
index c8739c4..2efedeb 100644
--- a/libs/apps.js
+++ b/libs/apps.js
@@ -33,5 +33,6 @@ class Apps{
.catch(reject);
});
}
+
}
export default new Apps();
\ No newline at end of file
diff --git a/libs/wechat.js b/libs/wechat.js
index 60e9334..c238da6 100644
--- a/libs/wechat.js
+++ b/libs/wechat.js
@@ -232,6 +232,7 @@ class AuthWechat {
});
}
+
/**
* 获取跳转授权后的地址
* @param {Object} appId
diff --git a/main.js b/main.js
index 1bb0e0e..1582209 100644
--- a/main.js
+++ b/main.js
@@ -29,13 +29,13 @@ import {
} from "./utils";
import Auth from './libs/wechat';
import {
- SPREAD,CHANNELID
+ SPREAD
} from './config/cache';
Vue.prototype.$wechat = Auth;
let cookieName = "VCONSOLE",
query = parseQuery(),
urlSpread = query["spread"],
- urlChannelId = query["channelId"],
+
vconsole = query[cookieName.toLowerCase()],
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
@@ -46,13 +46,7 @@ let cookieName = "VCONSOLE",
value: urlSpread,
})
}
-if (urlChannelId) {
- urlChannelId = parseInt(urlChannelId);
- Cache.setItem({
- name: 'channelId',
- value: urlChannelId,
- })
-}
+
if (vconsole !== undefined) {
if (vconsole === md5UnCrmeb && Cache.has(cookieName))
Cache.clear(cookieName);
diff --git a/manifest.json b/manifest.json
index c0ed792..85c8645 100644
--- a/manifest.json
+++ b/manifest.json
@@ -163,7 +163,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx46c3a73d8c4f7051",
+ "appid" : "wx424c861adb20990f",
"libVersion" : "latest",
"setting" : {
"urlCheck" : false,
diff --git a/pages/activity/goods_bargain_details/index.vue b/pages/activity/goods_bargain_details/index.vue
index 53d96de..0734138 100644
--- a/pages/activity/goods_bargain_details/index.vue
+++ b/pages/activity/goods_bargain_details/index.vue
@@ -342,7 +342,7 @@
import countDown from '@/components/countDown';
import parser from "@/components/jyf-parser/jyf-parser";
import {
- silenceBindingSpread
+ silenceBindingSpread,
} from "@/utils";
// #ifdef APP-PLUS
import {
@@ -494,8 +494,7 @@
// 链接进入获取绑定关系id
if(options.spread) app.globalData.spread = options.spread;
- // 通道id
- // if(options.channelId) app.globalData.channelId = options.channelId;
+
var pages = getCurrentPages();
if (pages.length <= 1) {
@@ -525,7 +524,7 @@
} else {
this.$Cache.set(BACK_URL,
'/pages/activity/goods_bargain_details/index?id=' + options.id +
- '&startBargainUid=' + this.uid + '&spread=' + this.uid + '&storeBargainId=' + this.storeBargainId
+ '&startBargainUid=' + this.uid + '&spread=' + this.uid + '&storeBargainId=' + this.storeBargainId
);
toLogin();
}
@@ -535,6 +534,7 @@
if(this.isLogin && parseInt(app.globalData.spread)>0){
silenceBindingSpread()
}
+
},
methods: {
//去支付
@@ -586,7 +586,7 @@
"//" +
window.location.host +
'/pages/activity/goods_bargain_details/index?id=' + this.id + '&startBargainUid=' + this
- .uid + '&spread=' + this.uid + '&storeBargainId=' + this.storeBargainId,
+ .uid + '&spread=' + this.uid + '&storeBargainId=' + this.storeBargainId,
imgUrl: that.bargainInfo.image
};
if (this.$wechat.isWeixin()) {
diff --git a/pages/activity/goods_combination_details/index.vue b/pages/activity/goods_combination_details/index.vue
index 58238b0..8a13e20 100644
--- a/pages/activity/goods_combination_details/index.vue
+++ b/pages/activity/goods_combination_details/index.vue
@@ -494,6 +494,7 @@
//获取浏览器参数
if(options.spread) app.globalData.spread = options.spread; //推广码
+
if (options.id) this.id = options.id; // 商品id
// 仅仅小程序扫码进入获取商品id,商品类型
if (options.scene) {
@@ -504,6 +505,7 @@
if (this.isLogin) {
this.combinationDetail();
if(parseInt(app.globalData.spread)>0) silenceBindingSpread()
+
} else {
this.$Cache.set('login_back_url',
`/pages/activity/goods_combination_details/index?id=${options.id}&spread=${app.globalData.spread?app.globalData.spread:0}`
@@ -616,6 +618,7 @@
getCombinationDetail(data).then(function(res) {
//分享地址
that.openPages = '/pages/activity/goods_combination_details/index?id=' + that.id + '&spread=' + that.uid;
+
that.dataShow = 1;
uni.setNavigationBarTitle({
title: res.data.storeCombination.storeName.substring(0, 16)
@@ -1105,6 +1108,7 @@
// 生成二维码;
make() {
let href = location.href.split('?')[0] + "?id="+ this.id + "&spread=" + this.uid;
+
uQRCode.make({
canvasId: 'qrcode',
text: href,
@@ -1122,6 +1126,7 @@
}
})
},
+
/*
* 保存到手机相册
*/
@@ -1178,9 +1183,8 @@
if (this.$wechat.isWeixin()) {
href =
href.indexOf("?") === -1 ?
- href + "?spread=" + this.uid :
- href + "&spread=" + this.uid;
-
+ href + "?spread=" + this.uid : href + "&spread=" + this.uid;
+
let configAppMessage = {
desc: data.storeInfo,
title: data.storeName,
diff --git a/pages/activity/goods_combination_status/index.vue b/pages/activity/goods_combination_status/index.vue
index 7b25681..d99c3fb 100644
--- a/pages/activity/goods_combination_status/index.vue
+++ b/pages/activity/goods_combination_status/index.vue
@@ -237,6 +237,7 @@
if (newV) {
this.getCombinationPink();
if(parseInt(app.globalData.spread)>0)silenceBindingSpread()
+
}
},
deep: true
@@ -254,6 +255,7 @@
this.$set(this,'theme',this.$Cache.get('theme'));
this.pinkId = options.id;
if(options.spread) app.globalData.spread = options.spread;
+
switch (this.theme) {
case 'theme1':
this.posterbackgd = '../../../static/images/bargain_post1.png' // 因为跨域不能使用网络图片,
@@ -275,10 +277,12 @@
this.timestamp = (new Date()).getTime();
this.getCombinationPink();
if(parseInt(app.globalData.spread)>0)silenceBindingSpread()
+
}else{
this.$Cache.set('login_back_url',
`/pages/activity/goods_combination_status/index?id=${options.id}&spread=${app.globalData.spread?app.globalData.spread:0}`
);
+
toLogin();
}
},
@@ -305,6 +309,7 @@
this.timestamp = (new Date()).getTime();
this.getCombinationPink();
silenceBindingSpread()
+
}else{
toLogin();
}
@@ -658,6 +663,7 @@
}
})
},
+
//拼团信息
getCombinationPink: function() {
var that = this;
@@ -665,6 +671,7 @@
.then(res => {
that.openPages = '/pages/activity/goods_combination_status/index?id=' + that.pinkId +
"&spread=" + that.uid;
+
let storeCombination = res.data.storeCombination;
res.data.pinkT.stop_time = parseInt(res.data.pinkT.stopTime);
that.$set(that, 'storeCombination', storeCombination);
@@ -708,6 +715,7 @@
desc: that.storeCombination.title,
link: window.location.protocol + '//' + window.location.host +
'/pages/activity/goods_combination_status/index?id=' + that.pinkId + "&spread=" + this.uid,
+
imgUrl: that.storeCombination.image
};
if (this.$wechat.isWeixin()) {
diff --git a/pages/activity/goods_seckill_details/index.vue b/pages/activity/goods_seckill_details/index.vue
index 477da32..506a680 100644
--- a/pages/activity/goods_seckill_details/index.vue
+++ b/pages/activity/goods_seckill_details/index.vue
@@ -446,23 +446,15 @@
this.id = value.id ? value.id : '';
}
if(options.spread) app.globalData.spread = options.spread;
- // if (options.hasOwnProperty('id') || options.scene){
- // if (options.scene) { // 仅仅小程序扫码进入
- // let qrCodeValue = this.$util.getUrlParams(decodeURIComponent(options.scene));
- // let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue);
- // app.globalData.spread = mapeMpQrCodeValue.spread;
- // this.id = mapeMpQrCodeValue.id;
- // }else{
- // this.id = options.id;
- // }
- // }
+
if (this.isLogin) {
this.getSeckillDetail();
} else {
this.$Cache.set('login_back_url',
- '/pages/activity/goods_seckill_details/index?id=' + this.id + '&spread=' + app.globalData.spread?app.globalData.spread:0);
+ '/pages/activity/goods_seckill_details/index?id=' + this.id + '&spread=' + app.globalData.spread?app.globalData.spread:0);
+
toLogin();
}
this.$nextTick(() => {
@@ -477,9 +469,10 @@
.exec();
// #endif
})
- if(this.isLogin && parseInt(app.globalData.spread)>0){
+ if(this.isLogin && parseInt(app.globalData.spread)>0){
silenceBindingSpread()
}
+
},
methods: {
// app分享
@@ -492,7 +485,8 @@
provider: "weixin",
scene: scene,
type: 0,
- href: `${HTTP_H5_URL}${curRoute}&spread=${that.uid}`,
+ href: `${HTTP_H5_URL}${curRoute}&spread=${that.uid}}`,
+
title: that.storeInfo.storeName,
summary:app.globalData.companyName,
imageUrl: that.storeInfo.image,
@@ -614,7 +608,8 @@
setTimeout(function() {
that.infoScroll();
}, 1000);
- that.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&spread=' + that.uid ;
+ that.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&spread=' + that.uid+ '&channelI=' + that.uid;
+ // that.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&channelI=' + that.uid ;
setTimeout(() => {
that.showSkeleton = false
}, 1000)
@@ -1068,7 +1063,7 @@
},
// 生成二维码;
make() {
- let href = location.href.split('?')[0] + "?id="+ this.id + "&spread=" + this.uid;
+ let href = location.href.split('?')[0] + "?id="+ this.id + "&spread=" + this.uid + "&channelI=" + this.uid;
uQRCode.make({
canvasId: 'qrcode',
text: href,
@@ -1086,6 +1081,25 @@
}
})
},
+ // make() {
+ // let href = location.href.split('?')[0] + "?id="+ this.id + "&channelI=" + this.uid;
+ // uQRCode.make({
+ // canvasId: 'qrcode',
+ // text: href,
+ // size: this.qrcodeSize,
+ // margin: 10,
+ // success: res => {
+ // this.PromotionCode = res;
+ // },
+ // complete: (res) => {
+ // },
+ // fail:res=>{
+ // this.$util.Tips({
+ // title: '海报二维码生成失败!'
+ // });
+ // }
+ // })
+ // },
// 图片预览;
getpreviewImage: function() {
if (this.posterImage) {
@@ -1157,8 +1171,12 @@
if (this.$wechat.isWeixin()) {
href =
href.indexOf("?") === -1 ?
- href + "?spread=" + this.uid :
- href + "&spread=" + this.uid;
+ href + "?spread=" + this.uid+ "?channelI=" + this.uid :
+ href + "&spread=" + this.uid+"&channelI=" + this.uid;
+ // href =
+ // href.indexOf("?") === -1 ?
+ // href + "?channelI=" + this.uid :
+ // href + "&channelI=" + this.uid;
let configAppMessage = {
desc: app.globalData.companyName,
diff --git a/pages/activity/poster-poster/index.vue b/pages/activity/poster-poster/index.vue
index 1e4421f..a34da3d 100644
--- a/pages/activity/poster-poster/index.vue
+++ b/pages/activity/poster-poster/index.vue
@@ -145,6 +145,34 @@
}
})
},
+ make(uid) {
+ let href = location.protocol + '//' + window.location.host + '/pages/activity/goods_combination_status/index?id=' + this.id ;
+ uQRCode.make({
+ canvasId: 'qrcode',
+ text: href,
+ size: this.qrcodeSize,
+ margin: 10,
+ success: res => {
+ this.PromotionCode = res;
+ let arrImages = [this.posterbackgd, this.imgTop, this.PromotionCode];
+ let storeName = this.storeCombination.storeCombination.title;
+ let price = this.storeCombination.storeCombination.price;
+ let people = this.storeCombination.storeCombination.people;
+ let otPrice = this.storeCombination.storeCombination.otPrice;
+ let count = this.storeCombination.count;
+ setTimeout(() => {
+ this.PosterCanvas(arrImages, storeName, price, people,otPrice,count);
+ }, 300);
+ },
+ complete: () => {
+ },
+ fail:res=>{
+ this.$util.Tips({
+ title: '海报二维码生成失败!'
+ });
+ }
+ })
+ },
// 生成海报
PosterCanvas:function(arrImages, storeName, price, people,otPrice,count){
uni.showLoading({
diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue
index bd89793..a18cb67 100644
--- a/pages/goods_details/index.vue
+++ b/pages/goods_details/index.vue
@@ -252,7 +252,7 @@
@getImg="showImg" @installments="installments">