Browse Source

Merge branch 'new' into threedate

threedate
Enzo 5 years ago
parent
commit
f24ed161d3
  1. 1
      common/api.js
  2. 2
      pages/center/fans.vue
  3. 2
      pages/center/invite.vue
  4. 12
      pages/contactService/index.vue
  5. 6
      pages/goodsDetail/index.vue
  6. 23
      pages/index/index.vue

1
common/api.js

@ -9,6 +9,7 @@ export const PRODURL = 'https://mall.gxsky.com'; // 正式服请求地址
export const API_CATEGORY_LIST = '/api/category/list'; // 首页-分类
export const API_GOODS_LIST = '/api/goods/list'; // 首页-分类下商品列表
export const API_SHARE_HOME = '/api/share/home'; // 首页分享信息
export const API_SALESMAN_BINDALL = '/api/salesman/bindAll'; // 点击链接就可以被绑定
// 用户订单
export const API_USERORDER = '/api/order/list';

2
pages/center/fans.vue

@ -21,7 +21,7 @@
</view>
<view class="flex flex-direction justify-around lf-p-l-20">
<view class="lf-font-32 text-black1">{{item.username}} <text class="bg-red lf-font-24 lf-m-l-10" style="border-radius: 30rpx;padding: 5rpx 16rpx;">{{item.state}}</text></view>
<view class="lf-font-24 lf-color-gray">{{item.share_time}}</view>
<view class="lf-font-24 lf-color-gray">{{item.share_time || 0}}</view>
</view>
</view>

2
pages/center/invite.vue

@ -63,7 +63,7 @@
_this.$http(_this.API.API_BILLBACKGROUND, {
type: 'telent_share'
}).then(res => {
let img = res.data.img_url
let img = res.data?.img_url; // ?.
if (img) {
wx.getImageInfo({
src: img,

12
pages/contactService/index.vue

@ -6,22 +6,23 @@
</view>
<view class="lf-row-between item">
<view class="lf-color-gray">服务时间</view>
<view>{{ info.service_period }}</view>
<view>{{ info.service_period || '-' }}</view>
</view>
<view class="lf-row-between item" @click="makePhoneCall">
<view class="lf-color-gray">客服电话</view>
<view style="color: #1E89FF!important;">{{ info.phone }}</view>
<view style="color: #1E89FF!important;">{{ info.phone || '-' }}</view>
</view>
<view class="lf-row-between item">
<view class="lf-color-gray">联系地址</view>
<view style="max-width: 500rpx;">{{ info.address }}</view>
<view style="max-width: 500rpx;">{{ info.address || '-' }}</view>
</view>
<view class="lf-row-between item">
<view class="lf-color-gray">客服微信</view>
<view>
<view v-if="info.wechat">
<text>{{ info.wechat }}</text>
<text class="lf-m-l-20 lf-color-primary" @click="copy">复制</text>
</view>
<view v-else>-</view>
</view>
<view class="lf-row-between item">
<view class="lf-color-gray">当前版本</view>
@ -46,11 +47,12 @@
//
getInfo(){
this.$http(this.API.API_CONTACT).then(res => {
this.info = res.data;
this.info = res.data || {};
})
},
//
makePhoneCall(){
if(!this.info?.phone) return;
uni.makePhoneCall({
phoneNumber: this.info.phone
})

6
pages/goodsDetail/index.vue

@ -401,7 +401,7 @@
}
},
//
//
getGoodsDetail() {
let that = this;
this.$http(this.API.API_GOODS_DETAIL, {
@ -516,7 +516,9 @@
let options = {
id: goods.id,
route: 'goods',
scene_code: this.$scene.V2_GOODS_SHAREPOSTER
scene_code: this.$scene.V2_GOODS_SHAREPOSTER,
share_id: this.userInfo.id,
pt: 2
}
this.generateKooken(token, options); // token

23
pages/index/index.vue

@ -78,6 +78,8 @@
uni.removeStorageSync('homePageOptions');
if(this.pt == 2) {
this.bindUsders()
}else if(this.pt == 3){
this.bindAllUsders();
}
}
},
@ -96,7 +98,6 @@
let timeDate = Math.round(new Date().getTime() / 1000).toString();
let md5TimeDate = SparkMD5.hash(timeDate)
let nowTime = new Date().toLocaleString();
console.log("进来啦~~~~~")
_this.$http(_this.API.API_BINDSALES, {
deed: md5TimeDate,
sid: _this.s_id,
@ -107,6 +108,14 @@
console.log(err)
})
},
//
bindAllUsders(){
this.$http(this.API.API_SALESMAN_BINDALL, {
pid: this.s_id
}).then(res => {
this.$msg('提交审核成功');
})
},
//
getShareInfo(){
this.$http(this.API.API_SHARE_HOME).then(res => {
@ -157,6 +166,7 @@
getGoodsList(){
let per_page = this.pageSize;
let tab_item = this.tab_list[this.current];
if(this.$shared.isValueType(tab_item) == 'undefined') return;
this.$http(this.API.API_GOODS_LIST, {
category_id: tab_item.id,
type: tab_item.type,
@ -219,16 +229,21 @@
// this.getGoodsList();
},
onShareAppMessage(){
const token = this.$shared.createToken();
const userInfo = uni.getStorageSync('userinfo') || {};
const token = this.$shared.createToken({user_id: userInfo.id});
const scene_code = this.$scene.V2_HOME_SHAREBUTTON;
let options = {route: 'home', scene_code};
let options = {
route: 'home',
scene_code,
share_id: userInfo.id,
pt: 3
};
this.generateKooken(token, options); // token
let shareInfo = {
title: this.shareInfo.title || '欢迎使用时空网小程序',
path: '/pages/route/index?token='+ token
}
if(this.shareInfo.cover){
shareInfo.imageUrl = this.shareInfo.cover;
}

Loading…
Cancel
Save