diff --git a/App.vue b/App.vue
index 09794d1..5f01694 100644
--- a/App.vue
+++ b/App.vue
@@ -8,6 +8,8 @@
wxSilentLoginURL: config.baseUrl + "/lpkcustomer/wxSilentLogin",
sid: "",
token: "",
+ isNewUser: "", //是否新人 0 否 1 是
+ isPurchase: "", //是否购买过 0 否 1 是
navInfo: {
}
diff --git a/common/config.js b/common/config.js
index 2946bc5..ba87c1f 100644
--- a/common/config.js
+++ b/common/config.js
@@ -6,9 +6,9 @@
* loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面
*/
module.exports = {
- // baseUrl: 'http://192.168.2.110:7211', // 本地
+ baseUrl: 'http://192.168.2.106:7211', // 本地
// baseUrl: 'https://lpk.yyundong.com/lpkapi', // 测试服务器
- baseUrl: 'https://lpk.yyundong.com/mallapi', // 测试服务器
+ // baseUrl: 'https://lpk.yyundong.com/mallapi', // 测试服务器
// baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // 正式服务器
tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
diff --git a/pages/home/cloudCard2.vue b/pages/home/cloudCard2.vue
index 1a468cd..2506fae 100644
--- a/pages/home/cloudCard2.vue
+++ b/pages/home/cloudCard2.vue
@@ -134,16 +134,14 @@
- ,满200斤可定制云菜窖
+ ,100-200斤有配送费,200斤以上免运费。
- 分享新人有礼
+
@@ -154,7 +152,7 @@
¥{{page.price}}
共减:¥{{page.reduce}}
+ style="font-size: 10px;color: #666;margin-left: 10px; height: 10px;line-height: 10px;margin-bottom: 5px;">配送费:¥{{page.reduce}}
@@ -230,7 +228,7 @@
initPrice: '0',
initReduce: "0",
initWeight: "0",
-
+ shareSid: "",
}
},
onShow() {
@@ -244,7 +242,10 @@
this.getgoods()
},
- onLoad() {
+ onLoad(options) {
+
+ this.shareSid = options.shareSid
+ console.log("shareSid>>>>", this.shareSid);
let info = uni.getSystemInfoSync();
@@ -253,20 +254,19 @@
this.request()
- // this.getallPrice()
- // this.getweight()
- // this.getcount()
+ this.shareGift()
},
methods: {
- // searchBtn() {
- // this.setData({
- // scrollLeftTop: 0,
- // scrollRightTop:0
- // })
- // // this.scrollLeftTop =1 //可以在每次搜索的时候先初始一下
- // // this.scrollRightTop = 1 //然后每次加0.01 别问为啥要加0.01 反正直接给0就是没效果 无解 也可能是本人代码有误 但是亲测有效
- // },
+
+ shareGift() {
+
+ if (this.shareSid && getApp().globalData.isNewUser) {
+
+ }
+
+ },
+
labelClick(index, item) {
this.selectIndex = index
@@ -587,12 +587,64 @@
uni.navigateTo({
url: '/pages/good/shoppCart?affiliation=' + this.brandType
})
- }
+ },
+ onShareAppMessage: function(res) {
+ console.log("res", res)
+ console.log("data", res.target.dataset)
+ var data = res.target.dataset.info
+ // ①
+ let shareData = JSON.stringify({
+ // params: {
+ // code: data.code,
+ // codeKey: data.codeKey,
+ // customerSid: ''
+ // },
+ // functionName: 'bindCard',
+ // url: '/pages/detail/detail_affeection?sid=' + data.sid
+
+ url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
+ functionName: 'share'
+ })
+ // 转码传输
+ let value = encodeURIComponent(shareData)
+
+ return {
+ title: '汇融惠享-云菜窖',
+ // ②
+ path: '/pages/login/login?data=' + value,
+ imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
+ success: function(res) {
+ console.log('aaaa', "分享成功")
+ },
+ fail: function(res) {
+ // 转发失败
+ console.log('aaaa', "用户点击了取消")
+ }
+ }
+ },
+
}
}
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index a673717..fe0c6f9 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -78,6 +78,8 @@
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
getApp().globalData.token = res.data.data.token
+ getApp().globalData.isNewUser = res.data.data.isNewUser
+ getApp().globalData.isPurchase = res.data.data.isPurchase
uni.setStorageSync("satoken", res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
diff --git a/pages/me/RealInfo.vue b/pages/me/RealInfo.vue
index f4d9a1b..6d9e449 100644
--- a/pages/me/RealInfo.vue
+++ b/pages/me/RealInfo.vue
@@ -24,7 +24,7 @@
+ :end="endData" v-model="page.birthDay" >