作者 王楠

滨海

... ... @@ -22,6 +22,11 @@ Component({
wx.makePhoneCall({
phoneNumber: wx.getStorageSync('tel')
})
},
tokefu(){
wx.navigateTo({
url: '/pages/kefu/kefu',
})
}
}
})
... ...
<view class="concat_box">
<image src="/images/icon_65.png" class="item" />
<button open-type="contact" plain="true" class="dadianhua"></button>
<button bindtap="tokefu" class="item" plain="true">
<image src="/images/icon_65.png" />
</button>
<view class="item" catchtap="tel">
<image src="/images/bodadianhua_icon.png" />
</view>
... ...
... ... @@ -37,7 +37,8 @@
"pages/coupon",
"pages/pinpaibox/pinpaibox",
"pages/jumplink/jumplink",
"pages/birthday/birthday"
"pages/birthday/birthday",
"pages/kefu/kefu"
],
"subpackages": [
{
... ... @@ -77,10 +78,12 @@
]
}
],
"preloadRule":{
"pages/index/index":{
"network":"all",
"packages": ["packageA"]
"preloadRule": {
"pages/index/index": {
"network": "all",
"packages": [
"packageA"
]
}
},
"window": {
... ...
... ... @@ -139,7 +139,7 @@ Page({
let sq = wx.getStorageSync('sq')
console.log(token)
if (token == ''||sq==2) {
if (token == '' || sq == 2) {
// wx.showToast({
// title: '请登录后操作',
// icon: 'none',
... ... @@ -184,7 +184,7 @@ Page({
let sq = wx.getStorageSync('gh_sq')
console.log(token)
console.log(sq)
if (token == ''||sq == 2) {
if (token == '' || sq == 2) {
// wx.showLoading({
// title: '模块加载中',
// })
... ... @@ -229,7 +229,7 @@ Page({
let cb_login = wx.getStorageSync('cb_login');
let sq = wx.getStorageSync('cb_sq')
console.log(token)
if (token == ''||sq==2) {
if (token == '' || sq == 2) {
// wx.showLoading({
// title: '模块加载中',
// })
... ... @@ -740,15 +740,15 @@ Page({
// } else {
// let login_new = wx.getStorageSync('login');
// if (style == 2) {
// wx.navigateTo({
// url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src
// })
// } else {
if (style == 2) {
wx.navigateTo({
url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src
})
} else {
wx.navigateTo({
url: '/pages/shop_detail/shop_detail?id=' + id
})
// }
}
// }
},
... ...
... ... @@ -105,7 +105,6 @@
<view class="hotgoodimg">
<image src="{{activity[0].image}}"></image>
</view>
</view>
</view>
... ...
... ... @@ -10,7 +10,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
onLoad: function (options) {
this.getCodeFun();
},
... ... @@ -19,7 +19,7 @@ Page({
getCodeFun() {
let that = this;
wx.login({
success: function(r) {
success: function (r) {
that.setData({
code: r.code
})
... ... @@ -32,7 +32,7 @@ Page({
iv: reg.iv,
encryptedData: reg.encryptedData
})
if(that.data.iv){
if (that.data.iv) {
that.get_token()
}
... ... @@ -49,12 +49,16 @@ Page({
// 立即授权
get_info(e) {
let that = this
if (e.detail.errMsg == 'getUserInfo:ok'){
wx.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res.iv)
that.setData({
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
iv: res.iv,
encryptedData: res.encryptedData
})
if(that.data.iv){
wx.login({
success: function(r) {
that.setData({
... ... @@ -67,11 +71,36 @@ Page({
}
},
fail() {
wx.navigateBack({
delta: 0,
})
}
})
// if (e.detail.errMsg == 'getUserInfo:ok') {
// that.setData({
// iv: e.detail.iv,
// encryptedData: e.detail.encryptedData
// })
// if (that.data.iv) {
// wx.login({
// success: function (r) {
// that.setData({
// code: r.code
// })
// that.get_token()
// }
// })
// }
// }
},
// 获取登录注册信息
get_token(){
// 获取登录注册信息
get_token() {
wx.showLoading({
title: '加载中',
})
... ... @@ -94,6 +123,12 @@ Page({
wx.setStorageSync('login', r.new_login);
wx.setStorageSync('gh_login', r.gh_login);
wx.setStorageSync('cb_login', r.cb_login);
wx.setStorageSync('sq', JSON.parse(r.sq1.msg).data)
wx.setStorageSync('gh_sq', JSON.parse(r.sq2.msg).data)
wx.setStorageSync('cb_sq', JSON.parse(r.sq3.msg).data)
wx.navigateBack({
delta: 0,
})
// wx.setStorageSync('tel', r.tel);
// wx.reLaunch({
// url: '/pages/index/index'
... ... @@ -101,9 +136,7 @@ Page({
// wx.reLaunch({
// url: '/pages/index/index'
// })
wx.navigateBack({
delta: 0,
})
// if (r.new_login == 0) {
// // 未绑定手机号
// wx.redirectTo({
... ... @@ -137,49 +170,49 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
... ... @@ -9,6 +9,6 @@
</view>
</view>
<view class="button_box">
<button class="login" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="get_info">立即授权</button>
<button class="login" lang="zh_CN" bindtap="get_info">立即授权</button>
<view class="no_login" bindtap="returnPageFun">暂不授权</view>
</view>
\ No newline at end of file
... ...
... ... @@ -20,8 +20,7 @@
<shop_item list="{{list}}" wx:if="{{list.length>0}}" type="1" actioning='{{actioning}}' check_num="{{check_num}}" bindcheck_type="check_type" bindchange_num="change_num" binddelete_shop="delete_shop" />
<view class="empty" wx:else>暂无更多数据</view>
</view>
<!-- wx:if="{{list.length>0}}" -->
<!-- footer -->
<view class="footer" wx:if="{{list.length>0}}">
<view class="check_box" bindtap="check_all">
<image class="check" src="{{checkAll?'/images/check@.png':'/images/check.png'}}" />
... ... @@ -33,7 +32,5 @@
</view>
<view class="submit" bindtap="submit" wx:if="{{editshow}}">结算({{all_num}})</view>
</view>
<concat />
</block>
<v-tab-bar selected="{{selected}}" text="1" list="{{listarr}}"></v-tab-bar>
\ No newline at end of file
... ...
... ... @@ -37,6 +37,7 @@ page {
background: #fff;
position: fixed;
left: 0;
bottom: calc(100rpx + constant(safe-area-inset-bottom));
bottom: calc(100rpx + env(safe-area-inset-bottom));
font-size: 26rpx;
font-family: PingFang SC;
... ...
... ... @@ -18,7 +18,8 @@
<Model_item list="{{shop_arr}}" type='open' />
<view class='real_goods' wx:if="{{activelist.length>0}}">
<view class="real_goods_item" wx:for="{{activelist}}" wx:key="index" data-id="{{item.goods_id}}" bindtap="{{item.product.sold==0?'':'look_more'}}" data-type="{{item.type}}">
<view class="real_goods_item" wx:for="{{activelist}}" wx:key="index" data-id="{{item.goods_id}}"
bindtap="{{item.product.sold==0?'':'look_more'}}" data-type="{{item.type}}">
<view wx:if="{{item.type==1}}">
<view class='real_goods_img'>
... ... @@ -29,7 +30,7 @@
<view class='goods_title'>{{item.goods.name}}</view>
<view class='goods_flex'>
<!-- <view class='score'>积分</view> -->
<view class='price'>¥{{item.goods.goods_price}}</view>
<view class='price'>¥{{item.goods_price}}</view>
<view class="huaxianprice">¥{{item.goods.line_price}}</view>
</view>
<view class='sell'>已卖出{{item.goods.sales}}件</view>
... ...
... ... @@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
... ...