gdpaomg
This commit is contained in:
commit
0290189205
@ -314,10 +314,25 @@ export default {
|
|||||||
goodsShelves({live_id}){
|
goodsShelves({live_id}){
|
||||||
return vm.$u.post('Specialci/goodsShelves',{live_id})
|
return vm.$u.post('Specialci/goodsShelves',{live_id})
|
||||||
},
|
},
|
||||||
//
|
// 收藏店铺
|
||||||
addFavoriteStore({ id }) {
|
addFavoriteStore({ id }) {
|
||||||
return vm.$u.post('member/addFavoriteStore',{ fid: id })
|
return vm.$u.post('member/addFavoriteStore',{ fid: id })
|
||||||
},
|
},
|
||||||
|
//店家id获取用户信息
|
||||||
|
getAtwillUserInfo({ id }) {
|
||||||
|
return vm.$u.post('Specialci/getAtwillUserInfo',{ store_id: id })
|
||||||
|
},
|
||||||
|
// 收藏商品
|
||||||
|
addFavoriteGoods({ fid }) {
|
||||||
|
return vm.$u.post('member/addFavoriteGoods',{ fid: fid })
|
||||||
|
},
|
||||||
|
// 取消收藏(商品/店铺)
|
||||||
|
removeFavorite({ fid, type }) {
|
||||||
|
return vm.$u.post('Member/removeFavorite',{
|
||||||
|
fav_id: fid,
|
||||||
|
type: type
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
var md5 = require("../static/js/md5.min.js")
|
||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
// 此为自定义配置参数,具体参数见上方说明
|
// 此为自定义配置参数,具体参数见上方说明
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'https://dmmall.sdbairui.com/api',
|
baseUrl: 'https://dmmall.sdbairui.com/api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
// originalData: true
|
originalData: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// 请求拦截,配置Token等参数
|
// 请求拦截,配置Token等参数
|
||||||
@ -12,20 +13,37 @@ const install = (Vue, vm) => {
|
|||||||
|
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
|
|
||||||
config.header.Authorization = 'Bearer' + " " + token;
|
config.header.Authorization = 'Bearer' + " " + token;
|
||||||
|
Date.prototype.Format = function (fmt) { // author: meizz
|
||||||
|
var o = {
|
||||||
|
"M+": this.getMonth() + 1, // 月份
|
||||||
|
"d+": this.getDate(), // 日
|
||||||
|
"h+": this.getHours(), // 小时
|
||||||
|
"m+": this.getMinutes(), // 分
|
||||||
|
"s+": this.getSeconds(), // 秒
|
||||||
|
"q+": Math.floor((this.getMonth() + 3) / 3), // 季度
|
||||||
|
"S": this.getMilliseconds() // 毫秒
|
||||||
|
};
|
||||||
|
if (/(y+)/.test(fmt))
|
||||||
|
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||||
|
for (var k in o)
|
||||||
|
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||||
|
return fmt;
|
||||||
|
}
|
||||||
|
let time = new Date().Format("yyyyMMddhhmmss")
|
||||||
|
config.header.Sign = md5('DBCA4F8DA7BC0BA2' + time) + '-' + time
|
||||||
return config;
|
return config;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 响应拦截,如配置,每次请求结束都会执行本方法
|
// 响应拦截,如配置,每次请求结束都会执行本方法
|
||||||
Vue.prototype.$u.http.interceptor.response = (res) => {
|
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||||
if(parseInt(res.errCode) == 0) {
|
if(parseInt(res.data.errCode) == 0) {
|
||||||
// res为服务端返回值,可能有errCode,result等字段
|
// res为服务端返回值,可能有errCode,result等字段
|
||||||
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
||||||
// 如果配置了originalData为true,请留意这里的返回值
|
// 如果配置了originalData为true,请留意这里的返回值
|
||||||
return res;
|
return res.data;
|
||||||
} else if(res.errCode == 401) {
|
} else if(res.data.errCode == 401) {
|
||||||
// 假设201为token失效,这里跳转登录
|
// 假设201为token失效,这里跳转登录
|
||||||
// vm.$u.toast('您还没有登录哦,请先去登录!');
|
// vm.$u.toast('您还没有登录哦,请先去登录!');
|
||||||
if (res.data.action != "memberinfo") {
|
if (res.data.action != "memberinfo") {
|
||||||
@ -55,7 +73,7 @@ const install = (Vue, vm) => {
|
|||||||
} else {
|
} else {
|
||||||
// 如果返回false,则会调用Promise的reject回调,
|
// 如果返回false,则会调用Promise的reject回调,
|
||||||
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
||||||
return res;
|
return res.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
||||||
<u-swipe-action
|
<u-swipe-action
|
||||||
v-for="(item, index) in list" :key="index"
|
v-for="(item, index) in list" :key="index"
|
||||||
:index='item.fav_id'
|
:index='index'
|
||||||
:show="item.show"
|
:show="item.show"
|
||||||
:options="options"
|
:options="options"
|
||||||
@click="removeFavorite"
|
@click="removeFavorite"
|
||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<view class="item u-border-bottom">
|
<view class="item u-border-bottom" @click="viewGoodsDetails(item)">
|
||||||
<image :src="item.goods_image"></image>
|
<image :src="item.goods_image"></image>
|
||||||
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
||||||
<view class="title-wrap">
|
<view class="title-wrap">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<view class="item-price">¥{{ item.favlog_price }}</view>
|
<view class="item-price">¥{{ item.favlog_price }}</view>
|
||||||
<view class="item-date">
|
<view class="item-date">
|
||||||
<image src="@/pageE/static/mine/26.png"></image>
|
<image src="@/pageE/static/mine/26.png"></image>
|
||||||
<view>{{ item.fav_time }}</view>
|
<view>{{ item.fav_time | date }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -31,7 +31,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
show: false,
|
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
text: '删除',
|
text: '删除',
|
||||||
@ -46,20 +45,38 @@ export default {
|
|||||||
this.getGoodsFavoritesList();
|
this.getGoodsFavoritesList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
viewGoodsDetails(item) {
|
||||||
|
const list = this.list.filter(item => {
|
||||||
|
return item.show;
|
||||||
|
})
|
||||||
|
if(list.length) return false;
|
||||||
|
this.$u.route({
|
||||||
|
url: 'pageB/sdetails/index',
|
||||||
|
params: {
|
||||||
|
id: item.fav_id,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getGoodsFavoritesList() {
|
getGoodsFavoritesList() {
|
||||||
this.$u.api.getFavoritesList().then(res => {
|
this.$u.api.getFavoritesList().then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
|
this.list.forEach(item => {
|
||||||
|
Object.assign(item, { show: false });
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeFavorite(id) {
|
removeFavorite(index) {
|
||||||
|
const id = this.list[index].fav_id;
|
||||||
this.$u.api.removeFavorite({
|
this.$u.api.removeFavorite({
|
||||||
id: id
|
fid: id,
|
||||||
|
type: 'goods'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$u.toast(res.message);
|
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.getGoodsFavoritesList();
|
this.getGoodsFavoritesList();
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -70,6 +87,7 @@ export default {
|
|||||||
this.list.map((val, idx) => {
|
this.list.map((val, idx) => {
|
||||||
if(index != idx) this.list[idx].show = false;
|
if(index != idx) this.list[idx].show = false;
|
||||||
})
|
})
|
||||||
|
this.$forceUpdate();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<view class="price">¥<span>{{ couponInfo.vouchertemplate_price }}</span></view>
|
<view class="price">¥<span>{{ couponInfo.vouchertemplate_price }}</span></view>
|
||||||
<view class="condition">满{{ couponInfo.vouchertemplate_limit }}使用</view>
|
<view class="condition">满{{ couponInfo.vouchertemplate_limit }}使用</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-store u-line-1">仅限{{ couponInfo.vouchertemplate_storename }}商品使用</view>
|
<view class="info-store u-line-1">仅限{{ couponInfo.type == 2 ? couponInfo.vouchertemplate_storename : '指定商品' }}使用</view>
|
||||||
<view class="info-integral">兑换积分:{{ couponInfo.vouchertemplate_points }}积分</view>
|
<view class="info-integral">兑换积分:{{ couponInfo.vouchertemplate_points }}积分</view>
|
||||||
<view class="info-date">有效期{{ couponInfo.vouchertemplate_startdate }}-{{ couponInfo.vouchertemplate_enddate }}</view>
|
<view class="info-date">有效期{{ couponInfo.vouchertemplate_startdate }}-{{ couponInfo.vouchertemplate_enddate }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<view class="price">¥<span>{{ couponInfo.voucher_price }}</span></view>
|
<view class="price">¥<span>{{ couponInfo.voucher_price }}</span></view>
|
||||||
<view class="condition">满{{ couponInfo.voucher_limit }}使用</view>
|
<view class="condition">满{{ couponInfo.voucher_limit }}使用</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-store u-line-1">仅限{{ couponInfo.type == 1 ? '平台' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用</view>
|
<view class="info-store u-line-1">仅限{{ couponInfo.type == 1 ? '指定商品' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用</view>
|
||||||
<view class="info-integral">兑换积分:{{ couponInfo.voucher_points }}积分</view>
|
<view class="info-integral">兑换积分:{{ couponInfo.voucher_points }}积分</view>
|
||||||
<view class="info-date">有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}</view>
|
<view class="info-date">有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore" v-if="goodsList.length>=pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore"></u-loadmore>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -22,7 +22,7 @@ export default {
|
|||||||
name:"list",
|
name:"list",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageSize: 12,
|
// pageSize: 12,
|
||||||
current: -1,
|
current: -1,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
|
@ -60,8 +60,9 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
params: {
|
||||||
id: this.recommendData.pintuan_id,
|
// id: this.recommendData.pintuan_id,
|
||||||
type: 2,
|
id: this.recommendData.groupbuy_id,
|
||||||
|
// type: 2,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,9 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
params: {
|
||||||
id: this.item.groupbuy_id,
|
// id: this.item.groupbuy_id,
|
||||||
type: 3,
|
id: this.item.goods_id,
|
||||||
|
// type: 3,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -4,6 +4,11 @@
|
|||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"blueimp-md5": {
|
||||||
|
"version": "2.17.0",
|
||||||
|
"resolved": "https://registry.npm.taobao.org/blueimp-md5/download/blueimp-md5-2.17.0.tgz?cache=0&sync_timestamp=1595922448921&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fblueimp-md5%2Fdownload%2Fblueimp-md5-2.17.0.tgz",
|
||||||
|
"integrity": "sha1-9PysCIsRX3tARfGfXaWenQGxu5Y="
|
||||||
|
},
|
||||||
"uview-ui": {
|
"uview-ui": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.0.tgz",
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"blueimp-md5": "^2.17.0",
|
||||||
"uview-ui": "^1.5.0",
|
"uview-ui": "^1.5.0",
|
||||||
"vuex": "^3.5.1"
|
"vuex": "^3.5.1"
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
<text>¥{{ goodsInfo.goods_price }}</text>
|
<text>¥{{ goodsInfo.goods_price }}</text>
|
||||||
<s>¥{{ goodsInfo.goods_marketprice }}</s>
|
<s>¥{{ goodsInfo.goods_marketprice }}</s>
|
||||||
</view>
|
</view>
|
||||||
<view class="collect">
|
<view class="collect" @click="switchCollect(goodsInfo.goods_collect)">
|
||||||
<u-icon name="star" color="#474747" size="28" v-if="1"></u-icon>
|
<u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon>
|
||||||
<u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
|
<u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
|
||||||
<text>收藏</text>
|
<text>{{ !goodsInfo.goods_collect ? '收藏' : '已收藏' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
<text>购买数量</text>
|
<text>购买数量</text>
|
||||||
<u-number-box v-model="goodsNumber" @change="valChange"></u-number-box>
|
<u-number-box v-model="goodsNumber"></u-number-box>
|
||||||
</view>
|
</view>
|
||||||
<view style="height:100rpx"></view>
|
<view style="height:100rpx"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<image src="/static/image/common/18.png"></image>
|
<image src="/static/image/common/18.png"></image>
|
||||||
店铺
|
店铺
|
||||||
</view>
|
</view>
|
||||||
<view class="navs" style="margin-right:30rpx" v-if="!showSpec">
|
<view class="navs" style="margin-right:30rpx" v-if="!showSpec" @click="customers()">
|
||||||
<image src="/static/image/common/19.png"></image>
|
<image src="/static/image/common/19.png"></image>
|
||||||
客服
|
客服
|
||||||
</view>
|
</view>
|
||||||
@ -166,7 +166,7 @@
|
|||||||
<image src="/static/image/common/18.png"></image>
|
<image src="/static/image/common/18.png"></image>
|
||||||
<text>店铺</text>
|
<text>店铺</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view @click="customers()">
|
||||||
<image src="/static/image/common/19.png"></image>
|
<image src="/static/image/common/19.png"></image>
|
||||||
<text>客服</text>
|
<text>客服</text>
|
||||||
</view>
|
</view>
|
||||||
@ -211,6 +211,7 @@ export default {
|
|||||||
sel: "", // 拼接的规格
|
sel: "", // 拼接的规格
|
||||||
quanxuan: false, // 规格是否选择
|
quanxuan: false, // 规格是否选择
|
||||||
debounce: true,
|
debounce: true,
|
||||||
|
storeid:0 //店铺id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -227,9 +228,11 @@ export default {
|
|||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
// this.init();
|
// this.init();
|
||||||
// console.log(option);
|
// console.log(option);
|
||||||
this.type = Number(option.type);
|
// this.type = Number(option.type);
|
||||||
|
// this.type = 1;
|
||||||
this.id = option.id;
|
this.id = option.id;
|
||||||
this.setTitle();
|
// 先请求普通商品详情获取商品类型再渲染页面
|
||||||
|
this.ordinaryDetails(this.id);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.debounce = true;
|
this.debounce = true;
|
||||||
@ -245,6 +248,34 @@ export default {
|
|||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
customers(){
|
||||||
|
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.name = name;
|
||||||
|
this.avatar = avatar;
|
||||||
|
this.online = false;
|
||||||
|
this.unReadMessage = 0;
|
||||||
|
this.text = text;
|
||||||
|
this.time = time;
|
||||||
|
this.date = date
|
||||||
|
}
|
||||||
|
console.log(123)
|
||||||
|
this.$u.api.getAtwillUserInfo({
|
||||||
|
id:this.storeid
|
||||||
|
}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pageD/privateChat/privateChat",
|
||||||
|
params:{
|
||||||
|
id:JSON.stringify(user)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}).catch((err)=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
setSwiperList(list) {
|
setSwiperList(list) {
|
||||||
let img = [];
|
let img = [];
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
@ -305,10 +336,6 @@ export default {
|
|||||||
case 3:
|
case 3:
|
||||||
this.spikeGoodsDetails(id);
|
this.spikeGoodsDetails(id);
|
||||||
break;
|
break;
|
||||||
case 4:
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -316,13 +343,26 @@ export default {
|
|||||||
// 普通商品详情
|
// 普通商品详情
|
||||||
ordinaryDetails(id) {
|
ordinaryDetails(id) {
|
||||||
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.evaluate = res.data.goods_evaluate_info;
|
this.evaluate = res.data.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.goods;
|
this.goodsInfo = res.data.goods;
|
||||||
this.storeInfo = res.data.store;
|
this.storeInfo = res.data.store;
|
||||||
this.setSwiperList(res.data.goods_image);
|
this.setSwiperList(res.data.goods_image);
|
||||||
this.glist = res.data.spec_list;
|
this.glist = res.data.spec_list;
|
||||||
|
this.storeid = res.data.store.store_id
|
||||||
// console.log(this.goodsInfo.mobile_body);
|
// console.log(this.goodsInfo.mobile_body);
|
||||||
|
this.type = res.data.view_type;
|
||||||
|
this.setTitle();
|
||||||
|
if(this.type == 1) {
|
||||||
|
this.id = res.data.goods.goods_id;
|
||||||
|
} else if(this.type == 2) {
|
||||||
|
this.id = res.data.goods.pintuan_id;
|
||||||
|
this.getGoodsDetails(this.id);
|
||||||
|
} else if(this.type == 3) {
|
||||||
|
this.id = res.data.goods.groupbuy_id;
|
||||||
|
this.getGoodsDetails(this.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -338,7 +378,7 @@ export default {
|
|||||||
this.glist = res.data.data.spec_list;
|
this.glist = res.data.data.spec_list;
|
||||||
this.user_suc = res.data.data.user_suc;
|
this.user_suc = res.data.data.user_suc;
|
||||||
this.groupUser =res.data.data.user;
|
this.groupUser =res.data.data.user;
|
||||||
console.log(this.groupUser);
|
// console.log(this.groupUser);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -348,6 +388,7 @@ export default {
|
|||||||
groupbuy_id: id
|
groupbuy_id: id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
|
this.id = res.data.groupbuy_id;
|
||||||
this.groupbuyInfo = res.data.groupbuyInfo;
|
this.groupbuyInfo = res.data.groupbuyInfo;
|
||||||
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.goodsInfo.goods;
|
this.goodsInfo = res.data.goodsInfo.goods;
|
||||||
@ -361,7 +402,7 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pageB/triedDress/index',
|
url: '/pageB/triedDress/index',
|
||||||
params: {
|
params: {
|
||||||
id: this.id,
|
id: this.goodsInfo.goods_id,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -412,9 +453,6 @@ export default {
|
|||||||
this.showInvolvementUser = true;
|
this.showInvolvementUser = true;
|
||||||
// console.log(this.involvemenGroupInfo);
|
// console.log(this.involvemenGroupInfo);
|
||||||
},
|
},
|
||||||
valChange(e) {
|
|
||||||
// console.log(this.value)
|
|
||||||
},
|
|
||||||
self(){
|
self(){
|
||||||
// console.log(this.$refs.guige)
|
// console.log(this.$refs.guige)
|
||||||
let index = 0;
|
let index = 0;
|
||||||
@ -481,7 +519,32 @@ export default {
|
|||||||
urls: arr,
|
urls: arr,
|
||||||
current: arr[index]
|
current: arr[index]
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
switchCollect(status) {
|
||||||
|
if(status) {
|
||||||
|
this.removeFavorite();
|
||||||
|
} else {
|
||||||
|
this.addFavoriteGoods();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addFavoriteGoods() {
|
||||||
|
this.$u.api.addFavoriteGoods({ fid: this.goodsInfo.goods_id }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.getGoodsDetails(this.id);
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
removeFavorite() {
|
||||||
|
this.$u.api.removeFavorite({ fid: this.goodsInfo.goods_id, type: 'goods' }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.getGoodsDetails(this.id);
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item">
|
<view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item">
|
||||||
<u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="g_index"></u-checkbox>
|
<u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="g_index"></u-checkbox>
|
||||||
<image :src="goods.goods_image" @click="viewGoodsDetails(goods.goods_id)"></image>
|
<image :src="goods.goods_image" @click="viewGoodsDetails(goods.goods_id)"></image>
|
||||||
<view class="info" @click="viewGoodsDetails(goods.goods_id)">
|
<view class="info">
|
||||||
<view class="name u-line-2">{{ goods.goods_name }}</view>
|
<view class="name u-line-2" @click="viewGoodsDetails(goods.goods_id)">{{ goods.goods_name }}</view>
|
||||||
<view class="cart-info">
|
<view class="cart-info">
|
||||||
<view class="price">¥{{ goods.goods_price }}</view>
|
<view class="price">¥{{ goods.goods_price }}</view>
|
||||||
<u-number-box :input-width="38" :input-height="39" :size="22" bg-color="#FFFFFF" :disabled-input=true color="#FF780F" :index="goods.cart_id" @minus="reduce" @plus="plus" v-model="goods.goods_num"></u-number-box>
|
<u-number-box :input-width="38" :input-height="39" :size="22" bg-color="#FFFFFF" :disabled-input=true color="#FF780F" :index="goods.cart_id" @minus="reduce" @plus="plus" v-model="goods.goods_num"></u-number-box>
|
||||||
@ -238,7 +238,7 @@ export default {
|
|||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
let currentWebview = page.$getAppWebview();
|
let currentWebview = page.$getAppWebview();
|
||||||
let titleObj = currentWebview.getStyle().titleNView;
|
let titleObj = currentWebview.getStyle().titleNView;
|
||||||
console.log(JSON.stringify(titleObj.buttons[0]));
|
// console.log(JSON.stringify(titleObj.buttons[0]));
|
||||||
if (!titleObj.buttons) {
|
if (!titleObj.buttons) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,8 @@
|
|||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
backgroundColor : '#D02129',
|
backgroundColor : '#FF780F',
|
||||||
frontColor : '#ffffff'
|
frontColor : '#333333'
|
||||||
});
|
});
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
||||||
@ -567,7 +567,7 @@
|
|||||||
}
|
}
|
||||||
.chatInterface .message-item.self .content span{
|
.chatInterface .message-item.self .content span{
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background:#D02129;
|
background:#FF780F;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
max-width: 520rpx;
|
max-width: 520rpx;
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="coupon-swiper">
|
<view class="coupon-swiper">
|
||||||
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
<scroll-view scroll-x="true" class="classify-coupon">
|
||||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
<view v-for="(classify, index) in couponGroupList" :key="index" class="classify-item" :class="{ 'active': couponCurrent == index }" @click="couponTabsChange(index)">{{ classify.gc_name }}</view>
|
||||||
|
</scroll-view>
|
||||||
|
<!-- <swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll">
|
||||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
@ -11,7 +13,14 @@
|
|||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper> -->
|
||||||
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll" :style="{ height: swiperHeight }">
|
||||||
|
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||||
|
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -19,7 +28,7 @@ import Coupon from "@/components/mine/coupon/index";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageSize: 12,
|
pageSize: 5, // 页面显示的条数
|
||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
couponCurrent: 0,
|
couponCurrent: 0,
|
||||||
swiperCouponCurrent: 0,
|
swiperCouponCurrent: 0,
|
||||||
@ -39,9 +48,10 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
couponCurrent(index) {
|
couponCurrent(index) {
|
||||||
|
this.couponList = [];
|
||||||
const id = this.couponGroupList[index].gc_id;
|
const id = this.couponGroupList[index].gc_id;
|
||||||
this.getCouponList({ gc_id: id, load: 'reload' });
|
this.getCouponList({ gc_id: id, load: 'reload' });
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onreachBottom() {
|
onreachBottom() {
|
||||||
@ -89,6 +99,7 @@ export default {
|
|||||||
},
|
},
|
||||||
couponTabsChange(index) {
|
couponTabsChange(index) {
|
||||||
this.couponCurrent = index;
|
this.couponCurrent = index;
|
||||||
|
this.swiperCouponCurrent = this.couponCurrent;
|
||||||
},
|
},
|
||||||
couponAnimationFinish(e) {
|
couponAnimationFinish(e) {
|
||||||
const current = e.detail.current;
|
const current = e.detail.current;
|
||||||
@ -104,64 +115,92 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.coupon-swiper {
|
.coupon-swiper {
|
||||||
.swiper-coupon-item {
|
.classify-coupon {
|
||||||
box-sizing: border-box;
|
white-space: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 30rpx {
|
margin-bottom: 2rpx;
|
||||||
top: 0;
|
.classify-item {
|
||||||
};
|
display: inline-block;
|
||||||
.coupon-item {
|
line-height: 88rpx;
|
||||||
margin-bottom: 20rpx;
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
color: #FF780F;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .swiper-coupon-item {
|
||||||
|
// box-sizing: border-box;
|
||||||
|
// background-color: #ffffff;
|
||||||
|
// padding: 30rpx {
|
||||||
|
// top: 0;
|
||||||
|
// };
|
||||||
|
// .coupon-item {
|
||||||
|
// margin-bottom: 20rpx;
|
||||||
|
// }
|
||||||
|
// .coupon-item {
|
||||||
|
// padding: 30rpx;
|
||||||
|
// background-color: #ffffff;
|
||||||
|
// display: flex;
|
||||||
|
// align-items: flex-end;
|
||||||
|
// // margin-bottom: 2rpx;
|
||||||
|
// > img {
|
||||||
|
// width: 180rpx;
|
||||||
|
// height: 160rpx;
|
||||||
|
// border-radius: 10rpx;
|
||||||
|
// margin-right: 30rpx;
|
||||||
|
// }
|
||||||
|
// .coupon-main {
|
||||||
|
// .coupon-title {
|
||||||
|
// font-size: 30rpx;
|
||||||
|
// color: rgba(51,51,51,1);
|
||||||
|
// }
|
||||||
|
// .coupon-date {
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// margin: 29rpx 0 20rpx;
|
||||||
|
// > img {
|
||||||
|
// width: 24rpx;
|
||||||
|
// height: 24rpx;
|
||||||
|
// margin-right: 15rpx;
|
||||||
|
// }
|
||||||
|
// > view {
|
||||||
|
// font-size: 24rpx;
|
||||||
|
// color: rgba(153,153,153,1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// .coupon-integral {
|
||||||
|
// font-size: 30rpx;
|
||||||
|
// font-weight: 500;
|
||||||
|
// color: rgba(255,120,15,1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// .coupon-btn {
|
||||||
|
// margin-left: auto;
|
||||||
|
// width: 85rpx;
|
||||||
|
// // height: 42rpx;
|
||||||
|
// border: 2rpx solid rgba(255,120,15,1);
|
||||||
|
// border-radius: 10rpx;
|
||||||
|
// font-size: 26rpx;
|
||||||
|
// color: rgba(255,120,15,1);
|
||||||
|
// line-height: 42rpx;
|
||||||
|
// text-align: center;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.coupon-scroll {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
.coupon-item {
|
||||||
|
padding: 30rpx {
|
||||||
|
top: 0;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// .coupon-item {
|
|
||||||
// padding: 30rpx;
|
|
||||||
// background-color: #ffffff;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: flex-end;
|
|
||||||
// // margin-bottom: 2rpx;
|
|
||||||
// > img {
|
|
||||||
// width: 180rpx;
|
|
||||||
// height: 160rpx;
|
|
||||||
// border-radius: 10rpx;
|
|
||||||
// margin-right: 30rpx;
|
|
||||||
// }
|
|
||||||
// .coupon-main {
|
|
||||||
// .coupon-title {
|
|
||||||
// font-size: 30rpx;
|
|
||||||
// color: rgba(51,51,51,1);
|
|
||||||
// }
|
|
||||||
// .coupon-date {
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// margin: 29rpx 0 20rpx;
|
|
||||||
// > img {
|
|
||||||
// width: 24rpx;
|
|
||||||
// height: 24rpx;
|
|
||||||
// margin-right: 15rpx;
|
|
||||||
// }
|
|
||||||
// > view {
|
|
||||||
// font-size: 24rpx;
|
|
||||||
// color: rgba(153,153,153,1);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// .coupon-integral {
|
|
||||||
// font-size: 30rpx;
|
|
||||||
// font-weight: 500;
|
|
||||||
// color: rgba(255,120,15,1);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// .coupon-btn {
|
|
||||||
// margin-left: auto;
|
|
||||||
// width: 85rpx;
|
|
||||||
// // height: 42rpx;
|
|
||||||
// border: 2rpx solid rgba(255,120,15,1);
|
|
||||||
// border-radius: 10rpx;
|
|
||||||
// font-size: 26rpx;
|
|
||||||
// color: rgba(255,120,15,1);
|
|
||||||
// line-height: 42rpx;
|
|
||||||
// text-align: center;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -51,7 +51,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeFavorite(id) {
|
removeFavorite(id) {
|
||||||
console.log(id);
|
|
||||||
this.$u.api.removeFavorite({
|
this.$u.api.removeFavorite({
|
||||||
id: id,
|
id: id,
|
||||||
type: 'store'
|
type: 'store'
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom" class="order-scroll">
|
||||||
<view>
|
<view>
|
||||||
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
||||||
<OrderItem :order="order" @refreshOrderList="refreshOrderList" v-if="current != 4"></OrderItem>
|
<OrderItem :order="order" @refreshOrderList="refreshOrderList" v-if="current != 4"></OrderItem>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
||||||
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length >= 15"></u-loadmore>
|
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="current != 4 && orderList.length>3" class="order-loadmore"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -162,8 +162,7 @@ export default {
|
|||||||
return res.data.list.length;
|
return res.data.list.length;
|
||||||
},
|
},
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
// 大于15条才会加载更多
|
if(this.current == 4) return;
|
||||||
if(this.orderList.length < 15) return false;
|
|
||||||
if(!this.timer) return false;
|
if(!this.timer) return false;
|
||||||
this.timer = false;
|
this.timer = false;
|
||||||
this.loadStatus.splice(this.current, 1, "loading");
|
this.loadStatus.splice(this.current, 1, "loading");
|
||||||
@ -171,8 +170,8 @@ export default {
|
|||||||
let promise;
|
let promise;
|
||||||
// if(this.current == 6) promise = this.getAfterSaleList();
|
// if(this.current == 6) promise = this.getAfterSaleList();
|
||||||
// else
|
// else
|
||||||
if(this.current == 4) promise = this.goodsTryOrderList();
|
// if(this.current == 4) promise = this.goodsTryOrderList();
|
||||||
else promise = this.getOrderList();
|
promise = this.getOrderList();
|
||||||
promise.then(length => {
|
promise.then(length => {
|
||||||
this.loadStatus.splice(this.current, 1, "nomore");
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
if(length == 0) this.page--;
|
if(length == 0) this.page--;
|
||||||
@ -204,8 +203,10 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
.item-container {
|
.order-scroll {
|
||||||
padding: 20rpx 30rpx;
|
.item-container {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1030,7 +1030,6 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/mine/index",
|
"path": "pages/mine/index",
|
||||||
"style": {
|
"style": {
|
||||||
"enablePullDownRefresh": true,
|
|
||||||
"navigationBarTitleText": "我的",
|
"navigationBarTitleText": "我的",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
|
@ -251,6 +251,23 @@
|
|||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
},
|
},
|
||||||
|
onLoad(){
|
||||||
|
if(this.$store.state.hasLogin){
|
||||||
|
const user = uni.getStorageSync('user_info');
|
||||||
|
console.log(user)
|
||||||
|
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
||||||
|
this.imService.connectIM()
|
||||||
|
let that = this
|
||||||
|
setTimeout(function(){
|
||||||
|
that.imService.disconnect()
|
||||||
|
console.log("guanbi")
|
||||||
|
},1000)
|
||||||
|
setTimeout(function(){
|
||||||
|
console.log("lianjie")
|
||||||
|
that.imService.connectIM()
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
// this.getManicureList({ load: 'reload' });
|
// this.getManicureList({ load: 'reload' });
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
<view class="title">{{item.name}}</view>
|
<view class="title">{{item.name}}</view>
|
||||||
<view class="contentes u-line-1">{{item.text}}</view>
|
<view class="contentes u-line-1">{{item.text}}</view>
|
||||||
<view class="times">{{item.time}}</view>
|
<view class="times">{{item.time}}</view>
|
||||||
|
<view class="tishi" v-if="item.unReadMessage"></view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -100,21 +102,7 @@
|
|||||||
if (this.hasLogin) {
|
if (this.hasLogin) {
|
||||||
this.messageIndex();
|
this.messageIndex();
|
||||||
}
|
}
|
||||||
if(this.$store.state.hasLogin){
|
|
||||||
const user = uni.getStorageSync('user_info');
|
|
||||||
console.log(user)
|
|
||||||
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
|
||||||
this.imService.connectIM()
|
|
||||||
let that = this
|
|
||||||
setTimeout(function(){
|
|
||||||
that.imService.disconnect()
|
|
||||||
console.log("guanbi")
|
|
||||||
},1000)
|
|
||||||
setTimeout(function(){
|
|
||||||
console.log("lianjie")
|
|
||||||
that.imService.connectIM()
|
|
||||||
},2000)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gochat(id){
|
gochat(id){
|
||||||
@ -173,10 +161,14 @@
|
|||||||
},
|
},
|
||||||
// 清空消息
|
// 清空消息
|
||||||
delMessage(){
|
delMessage(){
|
||||||
|
|
||||||
this.$u.api.delMessage({
|
this.$u.api.delMessage({
|
||||||
type : "all"
|
type : "all"
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
this.imService.friends = {};
|
||||||
|
this.information_dl = [];
|
||||||
|
uni.setStorageSync('imlist',JSON.stringify([]));
|
||||||
if(res.errCode == 0){
|
if(res.errCode == 0){
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '清除成功',
|
title: '清除成功',
|
||||||
@ -194,6 +186,15 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.tishi{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 30rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #FF0000;
|
||||||
|
}
|
||||||
.sousuo {
|
.sousuo {
|
||||||
height: 113rpx;
|
height: 113rpx;
|
||||||
border: 1px #f00 solid;
|
border: 1px #f00 solid;
|
||||||
@ -236,6 +237,7 @@
|
|||||||
padding-bottom: 23rpx;
|
padding-bottom: 23rpx;
|
||||||
border-bottom: 1px #ececec solid;
|
border-bottom: 1px #ececec solid;
|
||||||
padding: 20rpx 5rpx 23rpx 5rpx;
|
padding: 20rpx 5rpx 23rpx 5rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 84rpx;
|
width: 84rpx;
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
|
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<!-- <view @click="toOtherPage('/mine/GoodsCollection')">
|
<view @click="toOtherPage('/mine/GoodsCollection')">
|
||||||
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
|
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
|
||||||
<view>商品收藏</view>
|
<view>商品收藏</view>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <view @click="toOtherPage('/mine/StoreCollection')">
|
<!-- <view @click="toOtherPage('/mine/StoreCollection')">
|
||||||
<view>{{ userInfo.member_fav_store_num || 0 }}</view>
|
<view>{{ userInfo.member_fav_store_num || 0 }}</view>
|
||||||
<view>店铺收藏</view>
|
<view>店铺收藏</view>
|
||||||
@ -158,7 +158,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$u.api.getMemberInfo().then(res => {
|
this.$u.api.getMemberInfo().then(res => {
|
||||||
uni.stopPullDownRefresh();
|
// uni.stopPullDownRefresh();
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// this.userInfo = res.data.MemberArray;
|
// this.userInfo = res.data.MemberArray;
|
||||||
this.$set(this, 'userInfo', res.data.MemberArray);
|
this.$set(this, 'userInfo', res.data.MemberArray);
|
||||||
@ -329,6 +329,12 @@ export default {
|
|||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
> view:nth-child(1){
|
> view:nth-child(1){
|
||||||
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
import GoEasyIM from './goeasy-im-1.0.9';
|
import GoEasyIM from './goeasy-im-1.0.9';
|
||||||
import restApi from './restapi';
|
import restApi from './restapi';
|
||||||
|
|
||||||
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
|
function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) {
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
this.online = false;
|
this.online = false;
|
||||||
this.unReadMessage = 0;
|
this.unReadMessage = parseInt(unReadMessage);
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.time = time;
|
this.time = time;
|
||||||
this.date = date
|
this.date = date
|
||||||
@ -106,7 +106,7 @@ IMService.prototype.initialContacts = function (friendList) {
|
|||||||
},
|
},
|
||||||
success(res){
|
success(res){
|
||||||
console.log(res)
|
console.log(res)
|
||||||
that.friends[i[0]] = new Friend(res.data.data.member_id, res.data.data.member_nickname, res.data.data.member_avatar,i[1],i[2]);
|
that.friends[i[0]] = new Friend(res.data.data.member_id, res.data.data.member_nickname, res.data.data.member_avatar,i[1],i[2],i[3]);
|
||||||
console.log(that.friends)
|
console.log(that.friends)
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
@ -299,7 +299,7 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
sorts(that.friendsarr)
|
sorts(that.friendsarr)
|
||||||
let arr = []
|
let arr = []
|
||||||
for(let i in that.friends){
|
for(let i in that.friends){
|
||||||
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date])
|
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date,that.friends[i].unReadMessage])
|
||||||
}
|
}
|
||||||
console.log(arr)
|
console.log(arr)
|
||||||
uni.setStorageSync('imlist',JSON.stringify(arr))
|
uni.setStorageSync('imlist',JSON.stringify(arr))
|
||||||
@ -323,7 +323,7 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
sorts(that.friendsarr)
|
sorts(that.friendsarr)
|
||||||
let arr = []
|
let arr = []
|
||||||
for(let i in that.friends){
|
for(let i in that.friends){
|
||||||
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date])
|
arr.push([that.friends[i].uuid,that.friends[i].time,that.friends[i].text,that.friends[i].date,that.friends[i].unReadMessage])
|
||||||
}
|
}
|
||||||
console.log(arr)
|
console.log(arr)
|
||||||
uni.setStorageSync('imlist',JSON.stringify(arr))
|
uni.setStorageSync('imlist',JSON.stringify(arr))
|
||||||
|
2
static/js/md5.min.js
vendored
Normal file
2
static/js/md5.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
!function(n){"use strict";function d(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function f(n,t,r,e,o,u){return d((c=d(d(t,n),d(e,u)))<<(f=o)|c>>>32-f,r);var c,f}function l(n,t,r,e,o,u,c){return f(t&r|~t&e,n,t,o,u,c)}function v(n,t,r,e,o,u,c){return f(t&e|r&~e,n,t,o,u,c)}function g(n,t,r,e,o,u,c){return f(t^r^e,n,t,o,u,c)}function m(n,t,r,e,o,u,c){return f(r^(t|~e),n,t,o,u,c)}function i(n,t){var r,e,o,u;n[t>>5]|=128<<t%32,n[14+(t+64>>>9<<4)]=t;for(var c=1732584193,f=-271733879,i=-1732584194,a=271733878,h=0;h<n.length;h+=16)c=l(r=c,e=f,o=i,u=a,n[h],7,-680876936),a=l(a,c,f,i,n[h+1],12,-389564586),i=l(i,a,c,f,n[h+2],17,606105819),f=l(f,i,a,c,n[h+3],22,-1044525330),c=l(c,f,i,a,n[h+4],7,-176418897),a=l(a,c,f,i,n[h+5],12,1200080426),i=l(i,a,c,f,n[h+6],17,-1473231341),f=l(f,i,a,c,n[h+7],22,-45705983),c=l(c,f,i,a,n[h+8],7,1770035416),a=l(a,c,f,i,n[h+9],12,-1958414417),i=l(i,a,c,f,n[h+10],17,-42063),f=l(f,i,a,c,n[h+11],22,-1990404162),c=l(c,f,i,a,n[h+12],7,1804603682),a=l(a,c,f,i,n[h+13],12,-40341101),i=l(i,a,c,f,n[h+14],17,-1502002290),c=v(c,f=l(f,i,a,c,n[h+15],22,1236535329),i,a,n[h+1],5,-165796510),a=v(a,c,f,i,n[h+6],9,-1069501632),i=v(i,a,c,f,n[h+11],14,643717713),f=v(f,i,a,c,n[h],20,-373897302),c=v(c,f,i,a,n[h+5],5,-701558691),a=v(a,c,f,i,n[h+10],9,38016083),i=v(i,a,c,f,n[h+15],14,-660478335),f=v(f,i,a,c,n[h+4],20,-405537848),c=v(c,f,i,a,n[h+9],5,568446438),a=v(a,c,f,i,n[h+14],9,-1019803690),i=v(i,a,c,f,n[h+3],14,-187363961),f=v(f,i,a,c,n[h+8],20,1163531501),c=v(c,f,i,a,n[h+13],5,-1444681467),a=v(a,c,f,i,n[h+2],9,-51403784),i=v(i,a,c,f,n[h+7],14,1735328473),c=g(c,f=v(f,i,a,c,n[h+12],20,-1926607734),i,a,n[h+5],4,-378558),a=g(a,c,f,i,n[h+8],11,-2022574463),i=g(i,a,c,f,n[h+11],16,1839030562),f=g(f,i,a,c,n[h+14],23,-35309556),c=g(c,f,i,a,n[h+1],4,-1530992060),a=g(a,c,f,i,n[h+4],11,1272893353),i=g(i,a,c,f,n[h+7],16,-155497632),f=g(f,i,a,c,n[h+10],23,-1094730640),c=g(c,f,i,a,n[h+13],4,681279174),a=g(a,c,f,i,n[h],11,-358537222),i=g(i,a,c,f,n[h+3],16,-722521979),f=g(f,i,a,c,n[h+6],23,76029189),c=g(c,f,i,a,n[h+9],4,-640364487),a=g(a,c,f,i,n[h+12],11,-421815835),i=g(i,a,c,f,n[h+15],16,530742520),c=m(c,f=g(f,i,a,c,n[h+2],23,-995338651),i,a,n[h],6,-198630844),a=m(a,c,f,i,n[h+7],10,1126891415),i=m(i,a,c,f,n[h+14],15,-1416354905),f=m(f,i,a,c,n[h+5],21,-57434055),c=m(c,f,i,a,n[h+12],6,1700485571),a=m(a,c,f,i,n[h+3],10,-1894986606),i=m(i,a,c,f,n[h+10],15,-1051523),f=m(f,i,a,c,n[h+1],21,-2054922799),c=m(c,f,i,a,n[h+8],6,1873313359),a=m(a,c,f,i,n[h+15],10,-30611744),i=m(i,a,c,f,n[h+6],15,-1560198380),f=m(f,i,a,c,n[h+13],21,1309151649),c=m(c,f,i,a,n[h+4],6,-145523070),a=m(a,c,f,i,n[h+11],10,-1120210379),i=m(i,a,c,f,n[h+2],15,718787259),f=m(f,i,a,c,n[h+9],21,-343485551),c=d(c,r),f=d(f,e),i=d(i,o),a=d(a,u);return[c,f,i,a]}function a(n){for(var t="",r=32*n.length,e=0;e<r;e+=8)t+=String.fromCharCode(n[e>>5]>>>e%32&255);return t}function h(n){var t=[];for(t[(n.length>>2)-1]=void 0,e=0;e<t.length;e+=1)t[e]=0;for(var r=8*n.length,e=0;e<r;e+=8)t[e>>5]|=(255&n.charCodeAt(e/8))<<e%32;return t}function e(n){for(var t,r="0123456789abcdef",e="",o=0;o<n.length;o+=1)t=n.charCodeAt(o),e+=r.charAt(t>>>4&15)+r.charAt(15&t);return e}function r(n){return unescape(encodeURIComponent(n))}function o(n){return a(i(h(t=r(n)),8*t.length));var t}function u(n,t){return function(n,t){var r,e,o=h(n),u=[],c=[];for(u[15]=c[15]=void 0,16<o.length&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(h(t)),512+8*t.length),a(i(c.concat(e),640))}(r(n),r(t))}function t(n,t,r){return t?r?u(t,n):e(u(t,n)):r?o(n):e(o(n))}"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.md5=t}(this);
|
||||||
|
//# sourceMappingURL=md5.min.js.map
|
Loading…
Reference in New Issue
Block a user