11111
This commit is contained in:
2
App.vue
2
App.vue
@@ -8,6 +8,8 @@
|
|||||||
wxSilentLoginURL: config.baseUrl + "/lpkcustomer/wxSilentLogin",
|
wxSilentLoginURL: config.baseUrl + "/lpkcustomer/wxSilentLogin",
|
||||||
sid: "",
|
sid: "",
|
||||||
token: "",
|
token: "",
|
||||||
|
isNewUser: "", //是否新人 0 否 1 是
|
||||||
|
isPurchase: "", //是否购买过 0 否 1 是
|
||||||
navInfo: {
|
navInfo: {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
* loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面
|
* loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
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/lpkapi', // 测试服务器
|
||||||
baseUrl: 'https://lpk.yyundong.com/mallapi', // 测试服务器
|
// baseUrl: 'https://lpk.yyundong.com/mallapi', // 测试服务器
|
||||||
// baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // 正式服务器
|
// baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // 正式服务器
|
||||||
tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
|
tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
|
||||||
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
|
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
|
||||||
|
|||||||
@@ -134,16 +134,14 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
|
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
|
||||||
,满200斤可定制云菜窖</view>
|
,100-200斤有配送费,200斤以上免运费。</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
style="display: flex;flex-direction: row; justify-content: center;align-items: center;padding-bottom: 10px;margin-top: 5px;padding: 0px 10px;">
|
style="display: flex;flex-direction: row; justify-content: center;align-items: center;padding-bottom: 10px;margin-top: 5px;padding: 0px 10px;">
|
||||||
|
|
||||||
<text
|
<button open-type="share">分享新人有礼</button>
|
||||||
style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
|
|
||||||
border: 1px #FF5006 solid; border-top-left-radius: 25px; border-bottom-left-radius: 25px;flex-shrink: 0;">分享新人有礼</text>
|
|
||||||
|
|
||||||
<view style="border: 1px #FF5006 solid;margin-left: 5px;margin-right: 5px;padding: 0px 10px;height: 42px;flex: 1;
|
<view style="border: 1px #FF5006 solid;margin-left: 5px;margin-right: 5px;padding: 0px 10px;height: 42px;flex: 1;
|
||||||
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;" @click="gotoCart()">
|
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;" @click="gotoCart()">
|
||||||
@@ -154,7 +152,7 @@
|
|||||||
<text
|
<text
|
||||||
style="font-size: 15px;color: #FF5006;margin-left: 10px;height: 20px;line-height: 20px;margin-top: 5px;font-weight: bold;">¥{{page.price}}</text>
|
style="font-size: 15px;color: #FF5006;margin-left: 10px;height: 20px;line-height: 20px;margin-top: 5px;font-weight: bold;">¥{{page.price}}</text>
|
||||||
<text
|
<text
|
||||||
style="font-size: 10px;color: #666;margin-left: 10px; height: 10px;line-height: 10px;margin-bottom: 5px;">共减:¥{{page.reduce}}</text>
|
style="font-size: 10px;color: #666;margin-left: 10px; height: 10px;line-height: 10px;margin-bottom: 5px;">配送费:¥{{page.reduce}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -230,7 +228,7 @@
|
|||||||
initPrice: '0',
|
initPrice: '0',
|
||||||
initReduce: "0",
|
initReduce: "0",
|
||||||
initWeight: "0",
|
initWeight: "0",
|
||||||
|
shareSid: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -244,7 +242,10 @@
|
|||||||
this.getgoods()
|
this.getgoods()
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
|
|
||||||
|
this.shareSid = options.shareSid
|
||||||
|
console.log("shareSid>>>>", this.shareSid);
|
||||||
|
|
||||||
let info = uni.getSystemInfoSync();
|
let info = uni.getSystemInfoSync();
|
||||||
|
|
||||||
@@ -253,20 +254,19 @@
|
|||||||
|
|
||||||
this.request()
|
this.request()
|
||||||
|
|
||||||
// this.getallPrice()
|
this.shareGift()
|
||||||
// this.getweight()
|
|
||||||
// this.getcount()
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// searchBtn() {
|
|
||||||
// this.setData({
|
shareGift() {
|
||||||
// scrollLeftTop: 0,
|
|
||||||
// scrollRightTop:0
|
if (this.shareSid && getApp().globalData.isNewUser) {
|
||||||
// })
|
|
||||||
// // this.scrollLeftTop =1 //可以在每次搜索的时候先初始一下
|
}
|
||||||
// // this.scrollRightTop = 1 //然后每次加0.01 别问为啥要加0.01 反正直接给0就是没效果 无解 也可能是本人代码有误 但是亲测有效
|
|
||||||
// },
|
},
|
||||||
|
|
||||||
labelClick(index, item) {
|
labelClick(index, item) {
|
||||||
this.selectIndex = index
|
this.selectIndex = index
|
||||||
|
|
||||||
@@ -587,12 +587,64 @@
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/good/shoppCart?affiliation=' + this.brandType
|
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', "用户点击了取消")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
button {
|
||||||
|
background: #FF9900;
|
||||||
|
color: #fff;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0px 15px;
|
||||||
|
border: 1px #FF5006 solid;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-bottom-left-radius: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
button::after {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
/* height: 126.66vw; */
|
/* height: 126.66vw; */
|
||||||
|
|||||||
@@ -15,28 +15,24 @@
|
|||||||
<image style="width: 70px;height: 70px;border-radius: 50%;" :src="userInfo.photo" @click="showDiaLog">
|
<image style="width: 70px;height: 70px;border-radius: 50%;" :src="userInfo.photo" @click="showDiaLog">
|
||||||
</image>
|
</image>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: column;margin-left: 10px;" v-if="userInfo.nick!=''">
|
<view style="display: flex;flex-direction: column;margin-left: 10px;">
|
||||||
<text style="font-size: 16px;color: #fff;" @click="showDiaLog">{{userInfo.nick}}</text>
|
<text style="font-size: 16px;color: #fff;" @click="showDiaLog">{{userInfo.nick}}</text>
|
||||||
<text style="font-size: 14px;color: #fff;">{{userInfo.mobile}}</text>
|
<text style="font-size: 14px;color: #fff;">{{userInfo.mobile}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: column;margin-left: 10px;" v-if="userInfo.nick==''">
|
|
||||||
<text style="font-size: 16px;color: #fff;" @click="showDiaLog">完善信息</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
style="background: #fff;flex-flow: 1; height: calc(100vh - 50vw - 48px); width: 100%; margin-top: -18vw;border-top-left-radius: 25px;border-top-right-radius: 25px;border-bottom-left-radius: 25px;border-bottom-right-radius: 25px;">
|
style="background: #F7F7F7;flex-flow: 1; height: calc(100vh - 50vw - 48px); width: 100%; margin-top: -18vw;border-radius: 25px;">
|
||||||
|
|
||||||
<scroll-view scroll-y="true"
|
<scroll-view scroll-y="true"
|
||||||
style=" height: 100%; width: 100%; padding-top: 10px;
|
style=" height: 100%; width: 100%; padding: 15px;border-radius: 25px; box-sizing: border-box;"
|
||||||
border-top-left-radius: 25px;border-top-right-radius: 25px;border-bottom-left-radius: 25px;border-bottom-right-radius: 25px;"
|
|
||||||
bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
|
bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
|
||||||
|
|
||||||
<view style=" display: flex;flex-direction: column;
|
<!-- <view
|
||||||
padding-top: 5vw;padding-left: 5vw;padding-right: 5vw;">
|
style=" display: flex;flex-direction: column;padding-top: 5vw;padding-left: 5vw;padding-right: 5vw;">
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||||
|
|
||||||
@@ -67,89 +63,256 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<!-- 预约记录 -->
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column; border-radius: 10px;background: #fff; padding: 10px;">
|
||||||
|
|
||||||
|
<text style="font-size: 15px; color: #101010;font-weight: 600;font-family: sans-serif;">预约记录</text>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 5px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count>0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">全部预约</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 10px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count>0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">待提菜</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 10px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count>0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">已提菜</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 10px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count==0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">过期未提</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <loading-state ref="pageView" @request="request"> -->
|
<!-- 订单记录 -->
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column; border-radius: 10px;background: #fff; padding: 10px; margin-top: 10px;">
|
||||||
|
|
||||||
<view v-if="banKInfo!=null" style="display: flex;flex-direction: column; margin-top: 15px;
|
<text style="font-size: 15px; color: #101010;font-weight: 600;font-family: sans-serif;">订单记录</text>
|
||||||
border-top: 2px #f3f3f3 solid;padding-top: 15px; margin-left: 4vw;margin-right: 4vw;">
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;" >
|
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
|
||||||
<text style="flex: 1;">{{banKInfo.storeName}}</text>
|
|
||||||
<text style="margin-left: 10px;margin-right: 5px;">变更</text>
|
<view
|
||||||
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;"></image>
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 5px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count>0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">待付款</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;">
|
<view
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/date.png"
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
style="width: 20px;height: 20px;"></image>
|
|
||||||
<text style="margin-left: 5px;flex: 1;color: #ECAF4A;">营业时间:{{banKInfo.businessHours}}</text>
|
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 10px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count==0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">已付款</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
|
<view
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/location.png"
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
style="width: 20px;height: 20px;"></image>
|
|
||||||
<text style="margin-left: 5px;flex: 1; color: #ECAF4A;">{{banKInfo.address}}</text>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;">
|
<view
|
||||||
<text style="flex: 1;">提菜人</text>
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
<text style="margin-left: 10px;margin-right: 5px;">{{banKInfo.name}}</text>
|
|
||||||
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;"></image>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
|
|
||||||
<text style="flex: 1;">联系信息</text>
|
|
||||||
<text style="margin-left: 10px;margin-right: 5px;">{{banKInfo.phone}}</text>
|
|
||||||
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: column;margin-top: 15px;margin-left: 4vw;margin-right: 4vw;
|
</view>
|
||||||
border-top: 2px #f3f3f3 solid;padding-top: 15px;">
|
|
||||||
|
<!-- 转赠记录 -->
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column; border-radius: 10px;background: #fff; padding: 10px; margin-top: 10px;">
|
||||||
|
|
||||||
|
<text style="font-size: 15px; color: #101010;font-weight: 600;font-family: sans-serif;">转赠记录</text>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 5px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count>0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center; flex: 1;">
|
|
||||||
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
|
|
||||||
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
|
|
||||||
<text style="margin-left: 8px;font-size: 18px;color: #333;font-weight: 600;font-family: sans-serif;">推荐有礼</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">赠与我的</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
<view
|
||||||
<text style="margin-left: 10px;margin-right: 5px;">马上推荐</text>
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
<view style="position: relative;width: 35px;height: 35px;">
|
||||||
|
<image style="width: 25px;height: 25px;margin-left: 5px; margin-top: 10px; "
|
||||||
|
src="../../static/basket_icon.png" mode="aspectFill"></image>
|
||||||
|
|
||||||
|
<view v-if="data.count>0" style="border-radius: 50%;text-align: center;background: #f00;color: #fff;font-size: 8px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
width: auto;">{{data.count}}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<text style="font-size: 13px; color: #101010;margin-top: 5px;">我的转赠</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column; border-radius: 10px;background: #fff;
|
||||||
|
padding: 10px; margin-top: 10px;width: 100%;box-sizing: border-box;">
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: row;justify-content: space-between;width: 100%;">
|
||||||
|
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
|
||||||
|
<text
|
||||||
|
style="font-size: 15px;color: #101010;font-weight: 600;font-family: sans-serif;">推荐有礼</text>
|
||||||
|
<image src="../../static/share_gift.png"
|
||||||
|
style="margin-left: 5px; width: 20px;height: 20px;"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view style="display: flex;flex-direction: row;align-items: center;" @click="">
|
||||||
|
<text style="margin-right: 5px;color: #FF9900;font-size: 12px;">马上邀请</text>
|
||||||
|
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;"></image>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<button open-type="share" class='sharebtn'>
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: row;align-items: center;justify-content: flex-end;">
|
||||||
|
<text style="margin-right: 5px;color: #FF9900;font-size: 12px;">马上邀请</text>
|
||||||
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;"></image>
|
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
<text style="font-size: 12px;color: #4B4B4B; margin-top: 8px;">邀请新朋友后,您和您的朋友将获得“蔬菜品鉴礼包”。</text>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center; ">
|
|
||||||
|
|
||||||
<image :src="recommend.iconUrl" style="width: 35%;height: 150px; border-radius: 10px;" mode="aspectFill">
|
|
||||||
|
|
||||||
</image>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: column; margin-left: 20px; ">
|
|
||||||
<view v-for="(child,pos) in recommend.recordList" :key="pos"
|
|
||||||
style="display: flex;flex-direction: column;">
|
|
||||||
|
|
||||||
<text style="color: #424242; font-size: 12px;line-height: 20px;">* {{child.content}}</text>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="height: 150px;"></view>
|
|
||||||
|
<text style="font-size: 12px;color: #4B4B4B; margin-top: 8px;">邀请新朋友后,您和您的朋友将获得“蔬菜品鉴礼包”。</text>
|
||||||
|
|
||||||
|
<!-- <view style="display: flex;flex-direction: row;align-items: center; ">
|
||||||
|
|
||||||
|
<image :src="recommend.iconUrl" style="width: 35%;height: 150px; border-radius: 10px;"
|
||||||
|
mode="aspectFill">
|
||||||
|
|
||||||
|
</image>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column; margin-left: 20px; ">
|
||||||
|
<view v-for="(child,pos) in recommend.recordList" :key="pos"
|
||||||
|
style="display: flex;flex-direction: column;">
|
||||||
|
|
||||||
|
<text style="color: #424242; font-size: 12px;line-height: 20px;">* {{child.content}}</text>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- </loading-state> -->
|
<!-- </loading-state> -->
|
||||||
|
|
||||||
@@ -157,101 +320,21 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 弹窗蒙版 -->
|
|
||||||
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal' @click.stop="colseDialog()"></view>
|
|
||||||
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal'>
|
|
||||||
|
|
||||||
<view style="display:flex;flex-direction: column;justify-content: center;align-items: center;
|
|
||||||
margin-top: 20px;">
|
|
||||||
|
|
||||||
<image src="../../static/logo_icon.png" style="width: 20vw;height: 20vw;"></image>
|
|
||||||
<text style="margin-top: 10px;">汇融云菜窖</text>
|
|
||||||
<text style="margin-top: 10px;">邀请补全您的个人信息</text>
|
|
||||||
<text style="margin-top: 10px;">(头像、昵称)</text>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: column;
|
|
||||||
margin-top: 20px;">
|
|
||||||
|
|
||||||
<view
|
|
||||||
style="display: flex;flex-direction: row; justify-content: space-between;align-items: center;">
|
|
||||||
|
|
||||||
<text>头像</text>
|
|
||||||
<image :src="dialogInfo.url"
|
|
||||||
style="width: 40px; height: 40px; border-radius: 50%;background-color: #ccc;"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view
|
|
||||||
style="display: flex;flex-direction: row; justify-content: space-between;align-items: center;">
|
|
||||||
|
|
||||||
<text>昵称</text>
|
|
||||||
<input placeholder="请输入昵称"
|
|
||||||
style="font-size: 30rpx;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
|
|
||||||
:value="dialogInfo.name" @input="onKeyInput1" />
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view
|
|
||||||
style="display: flex;flex-direction: row; justify-content: space-between;align-items: center;">
|
|
||||||
|
|
||||||
<text>手机号码</text>
|
|
||||||
<input placeholder="请输入手机号码" type="number" maxlength="11"
|
|
||||||
style="font-size: 30rpx;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
|
|
||||||
:value="dialogInfo.mobile" @input="onKeyInput2" />
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;margin-top: 20px;">
|
|
||||||
<button style="flex: 1;" class='btn1' @click="colseDialog()">取消</button>
|
|
||||||
<button style="flex: 1;" class='btn2' open-type="chooseAvatar" @chooseavatar="onChooseAvatar"
|
|
||||||
v-if="chooseAvatar">上传头像</button>
|
|
||||||
<button style="flex: 1;" class='btn2' @click="saveDialog()" v-if="!chooseAvatar">确定</button>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 弹窗蒙版 -->
|
|
||||||
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
|
|
||||||
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
|
|
||||||
<view style="display:flex;flex-direction: column;justify-content: center;align-items: center;
|
|
||||||
margin-top: 20px;">
|
|
||||||
|
|
||||||
<image src="../../static/logo.png" style="width: 20vw;height: 20vw;"></image>
|
|
||||||
<text style="margin-top: 10px;">汇融云菜窖</text>
|
|
||||||
<text style="margin-top: 10px;">申请获取您的手机号码</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;margin-top: 20px;">
|
|
||||||
<button style="flex: 1;" class='btn1' @click="colseDialog()">拒绝</button>
|
|
||||||
<button style="flex: 1;" class='btn2' open-type="getPhoneNumber">允许</button>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
//引入bus
|
|
||||||
import bus from '@/common/bus';
|
|
||||||
import config from '@/common/config.js'
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
uploadAction: config.baseUrl + "/lpkcustomer/uploadfile",
|
|
||||||
showModal: false,
|
|
||||||
showModal2: false,
|
|
||||||
chooseAvatar: true,
|
|
||||||
page: {
|
page: {
|
||||||
startHeight: 0,
|
startHeight: 0,
|
||||||
endHeight: 0
|
endHeight: 0
|
||||||
},
|
},
|
||||||
data: {},
|
data: {
|
||||||
|
count: "1",
|
||||||
|
},
|
||||||
userInfo: {
|
userInfo: {
|
||||||
nick: "",
|
nick: "",
|
||||||
mobile: "绑定手机号",
|
mobile: "绑定手机号",
|
||||||
@@ -263,8 +346,8 @@
|
|||||||
mobile: ""
|
mobile: ""
|
||||||
},
|
},
|
||||||
headImage: "",
|
headImage: "",
|
||||||
recommend:{},
|
recommend: {},
|
||||||
banKInfo:null
|
banKInfo: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -275,7 +358,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
this.getStoreBySid()
|
|
||||||
this.myRecommend()
|
this.myRecommend()
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -308,141 +390,72 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
getStoreBySid(){
|
myRecommend() {
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.$api.getStoreBySid(getApp().globalData.sid).then((resp) => {
|
|
||||||
|
|
||||||
_this.banKInfo = resp
|
|
||||||
}).catch(e => {
|
|
||||||
|
|
||||||
})
|
|
||||||
},
|
|
||||||
myRecommend(){
|
|
||||||
let _this = this
|
|
||||||
_this.$api.myRecommend(getApp().globalData.sid).then((resp) => {
|
_this.$api.myRecommend(getApp().globalData.sid).then((resp) => {
|
||||||
|
|
||||||
_this.recommend = resp
|
_this.recommend = resp
|
||||||
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showDiaLog() {
|
showDiaLog() {
|
||||||
// this.showModal = true
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/me/base_info'
|
url: '/pages/me/base_info'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
colseDialog() {
|
onShareAppMessage: function(res) {
|
||||||
this.showModal = false
|
console.log("res", res)
|
||||||
},
|
console.log("data", res.target.dataset)
|
||||||
saveDialog() {
|
var data = res.target.dataset.info
|
||||||
|
// ①
|
||||||
let _this = this
|
let shareData = JSON.stringify({
|
||||||
|
// params: {
|
||||||
if (this.stringIsEmpty(this.dialogInfo.name)) {
|
// code: data.code,
|
||||||
this.shortToast('请输入昵称')
|
// codeKey: data.codeKey,
|
||||||
return
|
// customerSid: ''
|
||||||
}
|
// },
|
||||||
if (this.dialogInfo.mobile.length != 11) {
|
// functionName: 'bindCard',
|
||||||
this.shortToast('手机号码格式不对')
|
// url: '/pages/detail/detail_affeection?sid=' + data.sid
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var params = {
|
|
||||||
sid: getApp().globalData.sid,
|
|
||||||
photo: _this.headImage,
|
|
||||||
nick: _this.dialogInfo.name,
|
|
||||||
mobile: _this.dialogInfo.mobile
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.$api.uploadHandImage(params).then((resp) => {
|
|
||||||
// if (resp.success) {
|
|
||||||
|
|
||||||
_this.chooseAvatar = true
|
|
||||||
_this.colseDialog()
|
|
||||||
|
|
||||||
_this.userInfo = {
|
|
||||||
nick: _this.dialogInfo.name,
|
|
||||||
mobile: _this.dialogInfo.mobile,
|
|
||||||
photo: _this.headImage
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}).catch(e => {
|
|
||||||
console.log('eeeee', e)
|
|
||||||
|
|
||||||
|
url:'/pages/home/cloudCard2?shareSid='+getApp().globalData.sid,
|
||||||
|
functionName:'share'
|
||||||
})
|
})
|
||||||
|
// 转码传输
|
||||||
|
let value = encodeURIComponent(shareData)
|
||||||
|
|
||||||
},
|
return {
|
||||||
|
title: '汇融惠享-云菜窖',
|
||||||
showDiaLog2() {
|
// ②
|
||||||
this.showModal2 = true
|
path: '/pages/login/login?data=' + value,
|
||||||
},
|
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
|
||||||
colseDialog2() {
|
success: function(res) {
|
||||||
this.showModal2 = false
|
console.log('aaaa', "分享成功")
|
||||||
},
|
|
||||||
onKeyInput1(event) {
|
|
||||||
this.dialogInfo.name = event.target.value
|
|
||||||
},
|
|
||||||
onKeyInput2(event) {
|
|
||||||
this.dialogInfo.mobile = event.target.value
|
|
||||||
},
|
|
||||||
|
|
||||||
onChooseAvatar(e) {
|
|
||||||
this.dialogInfo.url = e.detail.avatarUrl;
|
|
||||||
this.uploadImage(e.detail.avatarUrl)
|
|
||||||
},
|
|
||||||
uploadImage(imagePath) {
|
|
||||||
let _this = this
|
|
||||||
wx.uploadFile({
|
|
||||||
url: _this.uploadAction, // 上传图片的接口地址
|
|
||||||
fileType: "image",
|
|
||||||
filePath: imagePath, // 图片文件路径
|
|
||||||
name: 'file', // 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容
|
|
||||||
success: (res) => {
|
|
||||||
// 上传成功后,将服务器返回的图片地址更新到image标签中
|
|
||||||
let info = JSON.parse(res.data)
|
|
||||||
_this.headImage = info.data.fullUrl
|
|
||||||
_this.chooseAvatar = false
|
|
||||||
},
|
},
|
||||||
fail: function(res) {
|
fail: function(res) {
|
||||||
console.log(res);
|
// 转发失败
|
||||||
|
console.log('aaaa', "用户点击了取消")
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.btn1 {
|
.sharebtn {
|
||||||
font-size: 18px;
|
margin-right: -10px;
|
||||||
color: #949094;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
height: 13vw;
|
/* font-size: 12px;
|
||||||
line-height: 13vw;
|
color: #fff;
|
||||||
text-align: center;
|
width: 30vw;
|
||||||
border-bottom-left-radius: 20px;
|
border-radius: 20px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.btn1::after {
|
.sharebtn::after {
|
||||||
/* border: none; */
|
border: none;
|
||||||
}
|
|
||||||
|
|
||||||
.btn2 {
|
|
||||||
font-size: 18px;
|
|
||||||
color: #FB913C;
|
|
||||||
background: #fff;
|
|
||||||
height: 13vw;
|
|
||||||
line-height: 13vw;
|
|
||||||
text-align: center;
|
|
||||||
border-bottom-right-radius: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn2::after {
|
|
||||||
/* border: none; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -455,34 +468,4 @@
|
|||||||
/* 让背景图基于容器大小伸缩 */
|
/* 让背景图基于容器大小伸缩 */
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 弹窗样式 */
|
|
||||||
.model {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: #000;
|
|
||||||
z-index: 999;
|
|
||||||
opacity: 0.5;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modalDlg {
|
|
||||||
/* 设置超出滚动 */
|
|
||||||
position: absolute;
|
|
||||||
top: 50vw;
|
|
||||||
left: 10vw;
|
|
||||||
width: 80%;
|
|
||||||
z-index: 9999;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 20px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -78,6 +78,8 @@
|
|||||||
// 成功后跳转主页
|
// 成功后跳转主页
|
||||||
getApp().globalData.sid = res.data.data.sid
|
getApp().globalData.sid = res.data.data.sid
|
||||||
getApp().globalData.token = res.data.data.token
|
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)
|
uni.setStorageSync("satoken", res.data.data.token)
|
||||||
console.log("人员sid", res.data.data.sid);
|
console.log("人员sid", res.data.data.sid);
|
||||||
console.log("token", res.data.data.token);
|
console.log("token", res.data.data.token);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<view class="line-thin"></view>
|
<view class="line-thin"></view>
|
||||||
|
|
||||||
<uni-datetime-picker style="flex: 1;margin-top: 1px;" type="date" :value="page.birthDay" :start="startDate"
|
<uni-datetime-picker style="flex: 1;margin-top: 1px;" type="date" :value="page.birthDay" :start="startDate"
|
||||||
:end="endData" v-model="page.birthDay" :disabledDate="[]">
|
:end="endData" v-model="page.birthDay" >
|
||||||
<view class="menu-item">
|
<view class="menu-item">
|
||||||
<text class="text">生日</text>
|
<text class="text">生日</text>
|
||||||
<text class="explain">{{stringIsEmpty(page.birthDay) ?"请选择生日":page.birthDay}}</text>
|
<text class="explain">{{stringIsEmpty(page.birthDay) ?"请选择生日":page.birthDay}}</text>
|
||||||
|
|||||||
BIN
static/share_gift.png
Normal file
BIN
static/share_gift.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 392 B |
Reference in New Issue
Block a user